/* ══════════════════════════════════════════════════════════
   gallery.css
   ══════════════════════════════════════════════════════════ */

:root {
    --brand: #c67529;
    --brand-2: #ff8f0c;
    --brand-3: #b07219;
    --brand-grad: linear-gradient(135deg, #c67529 0%, #ff8f0c 30%, #ac5c21 50%, #b07219 70%, #e8820a 100%);
    --ink: #111;
    --muted: #222;
    --line: rgba(0, 0, 0, .08);
    --cream: #faf7f1;
}

.kf-divider--center {
    margin-left: auto;
    margin-right: auto;
}


/* ═══════════════════════════════════════════
   PANEL (one per section: Photographs / Visitor
   Moments / Development Stage)
   ═══════════════════════════════════════════ */
.gl-panel {
    display: block;
    padding: 80px 0;
    background: #fff;
    overflow: hidden;
}

/* Alternate background so consecutive white sections still read as
   visually distinct, and add a hairline where two same-colour
   sections meet. */
.gl-panel[data-panel="visitors"] {
    background: var(--cream);
}

.gl-panel + .gl-panel {
    border-top: 1px solid var(--line);
}

.gl-empty {
    padding: 30px 0 10px;
}

/* ── Video play icon (shown on video-type items, always visible) ── */
.gl-item-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .5);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 18px;
    z-index: 2;
    transition: background .3s ease, transform .3s ease;
}

.gl-item:hover .gl-item-play {
    background: var(--brand);
    border-color: var(--brand);
    transform: translate(-50%, -50%) scale(1.1);
}


/* ═══════════════════════════════════════════
   SECTION HEAD
   ═══════════════════════════════════════════ */
.gl-head {
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}


/* ═══════════════════════════════════════════
   ALIGNED IMAGE GRID
   Every image sits in the same size cell, in a clean, static
   3-column grid — no scroll-linked movement, so nothing drifts
   out of line while scrolling.
   ═══════════════════════════════════════════ */
.gl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Individual frame ── */
.gl-item {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
    height: 320px;
    box-shadow: 0 30px 60px -35px rgba(0, 0, 0, .35);
}

.gl-item--hidden {
    display: none;
}

.gl-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.2s cubic-bezier(.16, 1, .3, 1), filter .6s ease;
    filter: grayscale(.15) brightness(.96);
}

.gl-item:hover img {
    transform: scale(1.08);
    filter: grayscale(0) brightness(1);
}

/* ── Hover: subtle darken only, no caption text (image-only gallery) ── */
.gl-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 6, .18);
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}

.gl-item:hover::after {
    opacity: 1;
}

.gl-item-view {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 13px;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .35s ease .05s, transform .35s ease .05s, background .3s ease;
}

.gl-item:hover .gl-item-view {
    opacity: 1;
    transform: scale(1);
}

.gl-item-view:hover {
    background: var(--brand);
    border-color: var(--brand);
}


/* ═══════════════════════════════════════════
   VIEW MORE
   ═══════════════════════════════════════════ */
.gl-viewmore-wrap {
    text-align: center;
    margin-top: 50px;
}

.gl-view-more i {
    margin-left: 8px;
    font-size: 12px;
    transition: transform .3s ease;
}

.gl-view-more:hover i {
    transform: translateY(2px);
}


/* ═══════════════════════════════════════════
   LIGHTBOX (image-only — no info/caption panel)
   ═══════════════════════════════════════════ */
.gl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease, visibility 0s linear .4s;
}

.gl-lightbox.active {
    opacity: 1;
    visibility: visible;
    transition: opacity .4s ease;
}

.gl-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 7, 5, .94);
    backdrop-filter: blur(4px);
}

.gl-lb-stage {
    position: relative;
    z-index: 2;
    width: min(92vw, 1100px);
    max-height: 88vh;
    display: block;
    background: #1b3228;
    box-shadow: 0 60px 120px -30px rgba(0, 0, 0, .6);
    transform: scale(.92);
    opacity: 0;
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .5s ease;
}

.gl-lightbox.active .gl-lb-stage {
    transform: scale(1);
    opacity: 1;
}

.gl-lb-frame {
    position: relative;
    min-height: 320px;
    max-height: 88vh;
    overflow: hidden;
    background: #000;
}

.gl-lb-frame img,
.gl-lb-frame video {
    width: 100%;
    height: 100%;
    max-height: 88vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.gl-lb-frame video {
    display: none;
    background: #000;
}

.gl-lb-frame.is-video img {
    display: none;
}

.gl-lb-frame.is-video video {
    display: block;
}

/* ── Controls ── */
.gl-lb-close {
    position: absolute;
    top: 28px;
    right: 32px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    font-size: 16px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all .3s ease;
}

.gl-lb-close:hover {
    background: var(--brand);
    border-color: var(--brand);
    transform: rotate(90deg);
}

.gl-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    font-size: 17px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all .3s ease;
}

.gl-lb-nav:hover {
    background: var(--brand);
    border-color: var(--brand);
}

.gl-lb-prev {
    left: 28px;
}

.gl-lb-next {
    right: 28px;
}


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 991px) {
    .gl-panel {
        padding: 3rem 0rem;
    }
    .gl-head{
        margin-bottom: 1rem;
    }

    .gl-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 24px;
    }

    .gl-item {
        height: 300px;
    }

    .gl-lb-stage {
        width: 94vw;
        max-height: 92vh;
    }

    .gl-lb-frame {
        max-height: 80vh;
    }

    .gl-lb-frame img,
    .gl-lb-frame video {
        max-height: 80vh;
    }

    .gl-lb-nav {
        width: 44px;
        height: 44px;
        font-size: 14px;
    }

    .gl-lb-prev {
        left: 12px;
    }

    .gl-lb-next {
        right: 12px;
    }
}

@media (max-width: 576px) {
    .gl-grid {
        grid-template-columns: 1fr;
        padding: 0 18px;
    }

    .gl-item {
        height: 280px;
    }

    .gl-lb-close {
        top: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .gl-item img,
    .gl-item-view,
    .gl-item::after {
        transition: none !important;
    }
}