/* Bratlie Bygg - Enkel og funksjonell */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    overflow-y: scroll;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #e0e0e0;
    background-color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    overflow-x: hidden;
}

main.container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Navigation */
nav {
    background-color: #252525;
    padding: 1rem;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.container {
    max-width: 750px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

nav .logo {
    font-weight: bold;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    align-items: center;
}

nav a {
    color: #ccc;
    text-decoration: none;
}

nav a:hover,
nav a.active {
    color: #fff;
    text-decoration: underline;
}

/* Typography */
h1, h2, h3 {
    margin: 1.5rem 0 0.75rem 0;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

ul {
    margin: 0 0 1rem 1.5rem;
}

li {
    margin-bottom: 0.25rem;
}

a {
    color: #6cb3ff;
}

/* Page title */
.page-title {
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #444;
}

/* Hero (kun forsiden) */
.hero {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.hero h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.hero p {
    margin-bottom: 0;
}

/* Services (forsiden) */
.services {
    padding-bottom: 2rem;
}

.services h2 {
    margin-top: 0;
}

.service-card {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.service-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.service-card h3 {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.service-card p {
    margin-bottom: 0;
}

/* Projects */
.project {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
}

.project:last-child {
    border-bottom: none;
}

.project h2 {
    margin-top: 0;
}

.project-ingress {
    margin-bottom: 1rem;
}

/* Gallery */
.gallery {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.gallery-item {
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
}

.gallery-item img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    display: block;
    border: 1px solid #333;
}

.gallery-item figcaption {
    font-size: 0.85rem;
    max-width: 200px;
    padding-top: 0.25rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    text-align: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 70vh;
}

#lightbox-caption {
    color: #fff;
    margin-top: 1rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
}

.lightbox-close { top: 0; right: 0; }
.lightbox-prev { left: 0; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0; top: 50%; transform: translateY(-50%); }

/* About */
.about-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    margin-top: 1.5rem;
}

.about-text h2:first-of-type {
    margin-top: 2rem;
}

.about-image {
    width: 250px;
    flex-shrink: 0;
    border: 1px solid #333;
}

/* Footer */
footer {
    background: #252525;
    color: #ccc;
    padding: 1.5rem 1rem;
    margin-top: auto;
}

footer a {
    color: #6cb3ff;
}

.contact-info {
    margin: 0.5rem 0;
}

.contact-info p {
    margin: 0.25rem 0;
}

/* Responsive */
@media (max-width: 600px) {
    .about-content {
        flex-direction: column-reverse;
    }
    
    .about-image {
        width: 150px;
    }
}
