/* =============================================
   GALLERIJ.CSS — standalone, do not import
   into style.css
   ============================================= */

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

:root {
    --bg: #fefdfb;
    --surface: #161410;
    --gold: #c9a96e;
    --gold-light: #e2c99a;
    --text: #0c2b00;
    --muted: #7a7060;
    --border: rgba(201,169,110,0.2);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

header {
    text-align: center;
    margin-bottom: 56px;
    position: relative;
}

    header::after {
        content: '';
        display: block;
        width: 60px;
        height: 1px;
        background: var(--text);
        margin: 24px auto 0;
    }

h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--text);
}

h2 {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    color: var(--text);
    margin-top: 10px;
    text-transform: uppercase;
}

/* --- Event sections --- */

section {
    margin-bottom: 60px;
}

    section h2 {
        font-size: 0.7rem;
        font-weight: 500;
        letter-spacing: 0.25em;
        color: var(--text);
        margin-bottom: 20px;
        text-transform: uppercase;
    }

/* --- Grid --- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 6px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3/2;
    background: var(--surface);
}

    .gallery-item.portrait {
        aspect-ratio: 2/3;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.5s ease, filter 0.5s ease;
        filter: brightness(0.88) saturate(0.9);
    }

    .gallery-item:hover img {
        transform: scale(1.04);
        filter: brightness(1) saturate(1.1);
    }

    .gallery-item .overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 50%);
        opacity: 0;
        transition: opacity 0.4s ease;
        display: flex;
        align-items: flex-end;
        padding: 16px;
    }

    .gallery-item:hover .overlay {
        opacity: 1;
    }

.overlay span {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    text-transform: uppercase;
}

/* --- Lightbox --- */

#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8,7,6,0.96);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

    #lightbox.active {
        display: flex;
    }

#lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    display: block;
    border: 1px solid var(--border);
    box-shadow: 0 0 80px rgba(0,0,0,0.8);
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

#lightbox-caption {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    color: var(--muted);
    text-transform: uppercase;
    white-space: nowrap;
}

#lightbox-counter {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.lb-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 1px solid var(--border);
    color: var(--gold);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s, border-color 0.2s;
    z-index: 10;
}

    .lb-btn:hover {
        background: rgba(201,169,110,0.12);
        border-color: var(--gold);
    }

#lb-prev {
    left: 20px;
}

#lb-next {
    right: 20px;
}

#lb-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s, border-color 0.2s;
}

    #lb-close:hover {
        color: var(--text);
        border-color: var(--muted);
    }

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

    .lb-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    #lb-prev {
        left: 8px;
    }

    #lb-next {
        right: 8px;
    }
}
