/* --- 1. FONTS & GRUND --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Playfair+Display:wght@700;900&display=swap');

html, body {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background-color: #fff;
}

/* --- 2. HERO --- */
.hero {
    position: relative;
    width: calc(100% - 40px);
    max-width: 1400px;
    height: 500px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 40px 40px 0 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-text {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; color: white; z-index: 10; width: 90%;
}
.hero-text h1 { 
    font-family: 'Playfair Display', serif; font-weight: 900; font-size: 5rem; 
    margin: 0; text-transform: uppercase; text-shadow: 0 4px 20px rgba(0,0,0,0.8); 
}
.hero-text p { 
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1.1rem; 
    text-transform: uppercase; letter-spacing: 5px; color: #fff !important; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* --- 3. MENYN --- */
.nav-bar { 
    background: white; 
    padding: 20px 0 40px 0;
    text-align: center; 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 25px;
}
.nav-bar a { 
    font-family: 'Inter', sans-serif; 
    color: #333; 
    text-decoration: none; 
    padding: 8px 15px; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    font-weight: 700; 
    letter-spacing: 1px;
}
.nav-bar a.active { color: #000; position: relative; }
.nav-bar a.active::after {
    content: ''; display: block; width: 30px; height: 2px; background: #333; margin: 8px auto 0;
}

/* --- 4. INTRO & KNAPP --- */
.album-intro { display: flex; justify-content: center; padding: 60px 20px; text-align: center; }
.album-intro-inner { max-width: 800px; }
.cta-button {
    display: inline-block; padding: 16px 40px; background-color: #222; color: #fff !important;
    text-decoration: none; font-family: 'Inter', sans-serif; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px; border-radius: 8px; 
    transition: 0.3s; margin-top: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* --- 5. GALLERI (Datorinställningar) --- */
.gallery { padding: 40px 20px; max-width: 1200px; margin: 0 auto; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-grid a { position: relative; display: block; height: 350px; border-radius: 15px; overflow: hidden; background: #000; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: all 0.5s ease; opacity: 0.85; }
.gallery-grid a:hover img { transform: scale(1.05); opacity: 1; }

.gallery-grid h3 {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    margin: 0; color: #fff !important; font-family: 'Playfair Display', serif;
    font-size: 1.8rem; text-transform: uppercase; text-align: center;
    z-index: 5; pointer-events: none; text-shadow: 0 0 15px rgba(0,0,0,0.8);
}

/* --- 6. LIGHTBOX - TOTAL RESET --- */
.lightbox-overlay {
    display: none; /* Döljs helt från början */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

/* Visas bara när JS sätter display: flex */
.lightbox-overlay[style*="display: flex"] { display: flex !important; }

.lightbox-content {
    position: relative;
    max-width: 85%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 3px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 50px rgba(0,0,0,1);
}

.lightbox-counter {
    color: white;
    margin-top: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.1);
    padding: 5px 15px;
    border-radius: 20px;
}

/* Stora klickytor för navigering */
.nav-btn {
    position: absolute;
    top: 0;
    height: 100%;
    width: 15%; /* 15% av skärmen på varje sida är klickbar */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 50px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10010;
    user-select: none;
}
.prev-btn { left: 0; }
.next-btn { right: 0; }
.nav-btn:hover { background: rgba(255,255,255,0.05); }

.close-btn {
    position: absolute;
    top: 20px; right: 30px;
    color: white;
    font-size: 50px;
    cursor: pointer;
    z-index: 10020;
}

/* --- 7. MOBILANPASSNING --- */
@media (max-width: 768px) {
    /* 7.1 Fixar galleriet (Inga fler "kola-bilder") */
    .gallery-grid {
        grid-template-columns: 1fr; /* 1 bild i bredd på mobil */
        gap: 15px;
    }

    .gallery-grid a {
        height: auto;           /* Tar bort fast höjd som drog ut bilderna */
        aspect-ratio: 4 / 3;    /* Ger alla bilder samma snygga proportioner */
        border-radius: 15px;
        overflow: hidden;
    }

    .gallery-grid img {
        width: 100%;
        height: 100%;
        object-fit: cover;      /* Fyller ut rutan utan att förvränga bilden */
    }

    /* 7.2 Behåller Lightbox-funktioner */
    .hero { 
        height: 280px; 
        width: calc(100% - 20px); 
        border-radius: 20px 20px 0 0; 
    }
    
    .hero-text h1 { font-size: 2.2rem; }
    .hero-text p { font-size: 0.8rem; letter-spacing: 2px; }

    .lightbox-image {
        max-width: 95%;
        max-height: 70vh; 
    }

    .nav-btn {
        width: 25%; 
        font-size: 40px;
    }

    .close-btn {
        top: 10px;
        right: 20px;
        font-size: 45px;
    }

    .lightbox-counter {
        bottom: 40px; 
    }
}