/* ── Gallery Hero ─── */
.gallery-hero {
    background:
        radial-gradient(ellipse at top left, rgb(13 143 208 / 15%) 0%, transparent 40%),
        radial-gradient(ellipse at top right, rgb(217 111 13 / 18%) 0%, transparent 40%),
        radial-gradient(ellipse at bottom left, rgb(11 101 147 / 12%) 0%, transparent 40%),
        radial-gradient(ellipse at bottom right, rgb(131 67 6 / 15%) 0%, transparent 40%),
        linear-gradient(135deg, var(--dark-bg-primary) 0%, var(--dark-bg-secondary) 25%, #1a2030 50%, var(--dark-bg-secondary) 75%, var(--dark-bg-primary) 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 15% 20%, rgba(13, 159, 232, .10), transparent),
        radial-gradient(1px 1px at 85% 30%, rgba(237, 131, 33, .08), transparent),
        radial-gradient(1px 1px at 25% 80%, rgba(13, 159, 232, .06), transparent),
        radial-gradient(1px 1px at 70% 70%, rgba(237, 131, 33, .10), transparent);
    background-size: 400px 300px;
    animation: galleryFloat 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes galleryFloat {

    0%,
    100% {
        transform: translateX(0) translateY(0);
    }

    25% {
        transform: translateX(-10px) translateY(-5px);
    }

    50% {
        transform: translateX(5px) translateY(-10px);
    }

    75% {
        transform: translateX(-5px) translateY(5px);
    }
}

.gallery-hero .hero-content {
    position: relative;
    z-index: 2;
}

.gallery-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50px;
    padding: 8px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-text-secondary);
    letter-spacing: .5px;
    text-transform: uppercase;
}

.gallery-hero .hero-title {
    font-size: 3.5rem;
    font-weight: 400;
    color: var(--dark-text-primary);
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .2);
}

.gallery-hero .hero-highlight {
    font-weight: 500;
    background: linear-gradient(135deg, #0d9fe8 0%, #ed8321 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-hero .hero-description {
    font-size: 17px;
    color: var(--dark-text-secondary);
    max-width: 560px;
    margin: 0 auto 0px;
    line-height: 1.65;
}

/* ── Breadcrumb ────────────────────────────────────────────── */
/* Reusable — drop .tg-breadcrumb inside any .contact-hero style section */
.tg-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.tg-breadcrumb a {
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, .5);
    text-decoration: none;
    transition: color .2s ease;
    letter-spacing: .2px;
}

.tg-breadcrumb a:hover {
    color: rgba(255, 255, 255, .85);
}

.tg-breadcrumb .tg-bc-sep {
    font-size: 11px;
    color: rgba(255, 255, 255, .25);
    user-select: none;
}

.tg-breadcrumb .tg-bc-current {
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    letter-spacing: .2px;
}

/* ── Filter Bar ────────────────────────────────────────────── */
.gallery-filter-bar {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
}

/* Each row: label + scrollable pill track + type toggle */
.gallery-filter-row {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 12px 0;
}

.gallery-filter-row+.gallery-filter-row {
    padding-top: 0;
    padding-bottom: 12px;
    border-top: 1px solid #f0f0f0;
}

/* Label */
.gf-label {
    font-size: 10px;
    font-weight: 700;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: .9px;
    white-space: nowrap;
    flex-shrink: 0;
    width: 46px;
    /* fixed so tracks align */
}

/* Scrollable pill track */
.gf-track-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    /* allow shrink */
}

/* Fade edges — hint scroll */
.gf-track-wrap::before,
.gf-track-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
    transition: opacity .25s ease;
}

.gf-track-wrap::before {
    left: 0;
    background: linear-gradient(to right, #fff 30%, transparent);
    opacity: 0;
    /* hidden when scrolled to start */
}

.gf-track-wrap::after {
    right: 0;
    background: linear-gradient(to left, #fff 30%, transparent);
}

.gf-track-wrap.fade-left::before {
    opacity: 1;
}

.gf-track-wrap.fade-right::after {
    opacity: 0;
}

/* at end — hide right fade */

.gf-track {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 3px 2px;
    /* hide scrollbar cross-browser */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gf-track::-webkit-scrollbar {
    display: none;
}

/* Pills */
.gf-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 15px;
    border-radius: 100px;
    border: 1.5px solid #dee2e6;
    background: transparent;
    color: #6c757d;
    font-family: 'Manrope', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.gf-pill:hover {
    border-color: #0d9fe8;
    color: #0d9fe8;
    background: rgba(13, 159, 232, .05);
}

.gf-pill.active {
    background: #0d9fe8;
    border-color: #0d9fe8;
    color: #fff;
}

/* Divider between track and type toggle */
.gf-divider {
    width: 1px;
    height: 26px;
    background: #e9ecef;
    flex-shrink: 0;
    margin: 0 12px;
}

/* Type toggle — right side of year row only */
.gf-type-group {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 100px;
    padding: 3px;
    flex-shrink: 0;
}

.gf-type-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 100px;
    border: none;
    background: transparent;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
}

.gf-type-btn i {
    font-size: 10px;
}

.gf-type-btn.active {
    background: #fff;
    color: #212529;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}

.gf-type-btn[data-type="photo"].active {
    color: #0d9fe8;
}

.gf-type-btn[data-type="video"].active {
    color: #ed8321;
}

/* Count — below both rows, small */
.gf-count-bar {
    padding: 0 0 10px;
    font-size: 12px;
    color: #adb5bd;
    font-weight: 500;
    display: none;
}

.gf-count-bar strong {
    color: #495057;
}

/* Event row — hidden until year selected */
.gallery-filter-row.event-row {
    display: none;
}

.gallery-filter-row.event-row.visible {
    display: flex;
}

/* ── Gallery Section ───────────────────────────────────────── */
.gallery-section {
    padding: 40px 0 80px;
    background: #f4f6f8;
    min-height: 60vh;
}

/* ── CSS Grid ──────────────────────────────────────────────── */
/* 4 equal columns. Base row = 220px.
   Portrait images get class "tall" → span 2 rows (440px).
   Every item fills its cell 100% via position:absolute img. */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 12px;
}

/* ── Item shell ────────────────────────────────────────────── */
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #e4e8ed;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .35s ease, transform .35s ease, box-shadow .22s ease;
}

.gallery-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item.hidden {
    display: none;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item:hover {
    box-shadow: 0 10px 32px rgba(0, 0, 0, .2);
    z-index: 1;
}

/* ── Image: covers full cell ───────────────────────────────── */
.gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity .4s ease, transform .5s ease;
}

.gallery-item img.loaded {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ── Shimmer skeleton (before image loads) ─────────────────── */
.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(100deg,
            #e4e8ed 30%, #edf0f3 50%, #e4e8ed 70%);
    background-size: 300% 100%;
    animation: gShimmer 1.5s linear infinite;
    transition: opacity .3s ease;
}

.gallery-item.img-loaded::before {
    opacity: 0;
}

@keyframes gShimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: -100% 50%;
    }
}

/* ── Video fallback card (no thumbnail available) ──────────── */
/* Used for Vimeo, unknown video URLs, failed loads.
   Shows a rich dark gradient so the card looks intentional.   */
.gallery-item.video-fallback {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(237, 131, 33, .18) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(13, 159, 232, .14) 0%, transparent 55%),
        linear-gradient(145deg, #1a2030 0%, #0f1520 100%);
}

/* Title label shown on fallback cards */
.gallery-item.video-fallback .gallery-item-overlay {
    opacity: 1;
    /* always visible on fallback */
    background: linear-gradient(to top,
            rgba(6, 11, 20, .95) 0%,
            rgba(6, 11, 20, .4) 60%,
            transparent 100%);
}

/* Slightly larger play circle on fallback — it's the hero element */
.gallery-item.video-fallback .gallery-play-circle {
    width: 52px;
    height: 52px;
    font-size: 18px;
    box-shadow: 0 6px 28px rgba(237, 131, 33, .55);
}

/* ── Hover overlay (gradient bottom-up) ────────────────────── */
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top,
            rgba(6, 11, 20, .90) 0%,
            rgba(6, 11, 20, .20) 50%,
            transparent 100%);
    opacity: 0;
    transition: opacity .25s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    pointer-events: none;
}

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

.gallery-item-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 6px;
}

.gallery-item-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.gallery-item-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    backdrop-filter: blur(4px);
}

.gallery-item-tag.blue {
    background: rgba(13, 159, 232, .65);
    color: #fff;
}

.gallery-item-tag.orange {
    background: rgba(237, 131, 33, .65);
    color: #fff;
}

/* ── Expand icon ───────────────────────────────────────────── */
.gallery-item-expand {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-item-expand {
    opacity: 1;
    transform: scale(1);
}

/* ── Video: play button ────────────────────────────────────── */
.gallery-play-btn {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.gallery-play-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(237, 131, 33, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    padding-left: 3px;
    box-shadow: 0 4px 20px rgba(237, 131, 33, .5);
    transition: transform .22s ease, background .22s ease;
}

.gallery-item[data-type="video"]:hover .gallery-play-circle {
    transform: scale(1.12);
    background: #ed8321;
}

.gallery-duration {
    position: absolute;
    bottom: 9px;
    right: 9px;
    z-index: 3;
    background: rgba(0, 0, 0, .75);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* ── Empty state ───────────────────────────────────────────── */
.gallery-empty {
    display: none;
    text-align: center;
    padding: 80px 20px;
    grid-column: 1/-1;
}

.gallery-empty.visible {
    display: block;
}

.gallery-empty i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
    display: block;
}

.gallery-empty h3 {
    font-size: 18px;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 8px;
}

.gallery-empty p {
    font-size: 14px;
    color: #adb5bd;
}

/* ── Lightbox ──────────────────────────────────────────────── */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(4, 8, 16, .96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s .28s, opacity .28s ease;
}

.gallery-lightbox.open {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity .28s ease;
}

body.gallery-lb-open {
    overflow: hidden;
}

.gallery-lb-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 80px 48px;
}

.gallery-lb-media {
    position: relative;
    max-width: min(90vw, 1200px);
    max-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lb-media img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .6);
    display: block;
}

.gallery-lb-media video {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 12px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .6);
    background: #000;
}

.gallery-lb-media iframe {
    width: min(88vw, 960px);
    height: min(78vh, 540px);
    border: none;
    border-radius: 12px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .6);
}

.gallery-lb-spinner {
    width: 200px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lb-spinner i {
    font-size: 28px;
    color: #0d9fe8;
    animation: lbSpin .8s linear infinite;
}

@keyframes lbSpin {
    to {
        transform: rotate(360deg);
    }
}

.gallery-lb-caption {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(90vw, 1200px);
    gap: 16px;
}

.gallery-lb-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gallery-lb-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.gallery-lb-tags {
    display: flex;
    gap: 6px;
}

.gallery-lb-tag {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 100px;
}

.gallery-lb-tag.year {
    background: rgba(13, 159, 232, .25);
    color: #3bbdf5;
}

.gallery-lb-tag.event {
    background: rgba(237, 131, 33, .2);
    color: #fba54a;
}

.gallery-lb-counter {
    font-size: 12px;
    color: rgba(255, 255, 255, .4);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.gallery-lb-prev,
.gallery-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
    backdrop-filter: blur(6px);
}

.gallery-lb-prev {
    left: 18px;
}

.gallery-lb-next {
    right: 18px;
}

.gallery-lb-prev:hover,
.gallery-lb-next:hover {
    background: rgba(13, 159, 232, .35);
}

.gallery-lb-prev.disabled,
.gallery-lb-next.disabled {
    opacity: .2;
    pointer-events: none;
}

.gallery-lb-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 80, 80, .12);
    border: 1px solid rgba(255, 80, 80, .18);
    color: #ff6b6b;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
    z-index: 10;
}

.gallery-lb-close:hover {
    background: rgba(255, 80, 80, .32);
    color: #fff;
}

.gallery-lb-dots {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.gallery-lb-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.gallery-lb-dot.active {
    background: #0d9fe8;
    transform: scale(1.45);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 200px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    .gallery-item.tall {
        grid-row: span 1;
    }

    /* collapse tall on tablet */
    .gallery-hero .hero-title {
        font-size: 2.4rem;
    }

    .gallery-filter-bar {
        position: static;
    }

    .gf-label {
        width: 36px;
        font-size: 9px;
    }

    .gf-divider {
        margin: 0 8px;
    }

    .gallery-lb-inner {
        padding: 60px 20px 48px;
    }

    .gallery-lb-prev {
        left: 8px;
    }

    .gallery-lb-next {
        right: 8px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
    }

    .gallery-hero {
        padding: 60px 0;
    }

    .gallery-hero .hero-title {
        font-size: 2rem;
    }

    .gf-type-group {
        display: none;
    }

    .gallery-lb-caption {
        flex-direction: column;
        align-items: flex-start;
    }
}