/* ===== GALERIE ===== */

.galerie-main {
    padding-top: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
    padding-bottom: 80px;
}

/* HEADER */
.galerie-header {
    display: flex;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 32px;
    margin-top : 20px;
}


.back-link:hover {
    color: #c9a84c;
}

.galerie-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(32px, 6vw, 80px);
    font-weight: 400;
    letter-spacing: 6px;
    color: #fff;
    text-transform: uppercase;
    flex: 1;
    text-align: center;
}

.galerie-count {
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    color: #000000;
    white-space: nowrap;
    padding-top : -20px;
}

/* MASONRY */
.masonry {
    columns: 3;
    column-gap: 12px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    cursor: pointer;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.4s ease;
    filter: brightness(0.85);
}

.item-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s ease;
}

.item-hover span {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #fff;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.masonry-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.4);
}

.masonry-item:hover .item-hover {
    background: rgba(0, 0, 0, 0.2);
}

.masonry-item:hover .item-hover span {
    opacity: 1;
    transform: translateY(0);
}

/* FADE IN */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease var(--d, 0s),
                transform 0.7s ease var(--d, 0s);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* NAV ACTIVE */
.nav .Annexes a.active {
    color: #c9a84c;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lb-img-wrap {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-img-wrap img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 2px;
    transition: opacity 0.2s ease;
}

.lb-img-wrap img.switching {
    opacity: 0;
}

.lb-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: #888;
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s;
    font-family: 'Raleway', sans-serif;
    padding: 8px;
}

.lb-close:hover { color: #fff; }

.lb-prev,
.lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 28px;
    cursor: pointer;
    padding: 16px 24px;
    transition: color 0.2s;
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-prev:hover,
.lb-next:hover { color: #fff; }

.lb-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    color: #444;
}

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: 40px;
    margin-top: 72px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.footer-socials {
    display: flex;
    gap: 32px;
    align-items: center;
}

.social-link {
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.social-link:hover { color: #c9a84c; }

.footer-copy {
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    color: #333;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .galerie-main {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 80px;
    }

    .masonry {
        columns: 2;
        column-gap: 8px;
    }

    .masonry-item {
        margin-bottom: 8px;
    }

    .galerie-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 28px 0 32px;
    }

    .galerie-title {
        text-align: left;
    }

    .lb-prev { left: 4px; padding: 12px; }
    .lb-next { right: 4px; padding: 12px; }
}

@media (max-width: 480px) {
    .masonry {
        columns: 1;
    }
}