/* =====================================================
   BIECHTEN GALLERY
   ===================================================== */

.biechten-gallery {
    margin-top: var(--space-xl);
}

/* --- Track & pages --------------------------------- */

.gallery-track-wrap {
    overflow: hidden;
}

.gallery-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-page {
    flex: 0 0 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

/* --- Thumbnails ------------------------------------- */

.gallery-thumb {
    display: block;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    position: relative;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.gallery-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(43, 94, 43, 0);
    transition: background 0.25s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.06);
}

.gallery-thumb:hover::after {
    background: rgba(43, 94, 43, 0.18);
}

/* --- Carousel nav ----------------------------------- */

.gallery-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.gallery-nav__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(43, 94, 43, 0.35);
    background: none;
    cursor: pointer;
    color: var(--color-green);
    transition: border-color var(--transition-fast), background var(--transition-fast);
    padding: 0;
    flex-shrink: 0;
}

.gallery-nav__btn svg {
    width: 18px;
    height: 18px;
}

.gallery-nav__btn:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.gallery-nav__dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.gallery-nav__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(43, 94, 43, 0.25);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.gallery-nav__dot.is-active {
    background: var(--color-gold);
    transform: scale(1.3);
}

/* =====================================================
   LIGHTBOX
   ===================================================== */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(10, 10, 10, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lbFadeIn 0.2s ease forwards;
}

.gallery-lightbox[hidden] {
    display: none;
}

@keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox__img-wrap {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
}

.lightbox__close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    padding: 0;
    z-index: 1;
}

.lightbox__close svg {
    width: 20px;
    height: 20px;
}

.lightbox__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.lightbox__arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    padding: 0;
}

.lightbox__arrow svg {
    width: 22px;
    height: 22px;
}

.lightbox__arrow--prev { left: 20px; }
.lightbox__arrow--next { right: 20px; }

.lightbox__arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox__counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 1px;
    margin: 0;
}

/* =====================================================
   REDUCED MOTION
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    .gallery-track,
    .gallery-thumb img,
    .gallery-thumb::after {
        transition: none;
    }

    .gallery-lightbox {
        animation: none;
    }
}
