/* =========================================================================
   GALLERY PAGE — Complete Redesign
   Light cinematic hero + Editorial magazine grid
   ========================================================================= */

/* =========================================================================
   HERO — Light Cinematic Split Layout
   ========================================================================= */
.gallery-hero-dark {
    background: linear-gradient(160deg, #f0f6ff 0%, #e8f0fe 40%, #f5f8ff 100%);
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Giant background watermark */
.gallery-watermark {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.75);
    font-family: 'Outfit', sans-serif;
    font-size: clamp(4rem, 12vw, 15rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.09em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #0f172a 30%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transition: opacity 2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 2s cubic-bezier(0.16, 1, 0.3, 1),
                letter-spacing 2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, letter-spacing;
    z-index: 2;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
}

.gallery-hero-dark.is-active .gallery-watermark {
    opacity: 0.05;
    letter-spacing: 0.04em;
    transform: translate(-50%, -50%) scale(1);
}

/* Cinematic entrance slide triggers */
.reveal-slide-up {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-mosaic {
    opacity: 1 !important;
    transform: translateX(0) !important;
    transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-hero-dark.is-active .reveal-slide-up,
.gallery-hero-dark.is-active .reveal-mosaic {
    opacity: 1;
    transform: translate(0) scale(1);
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }
.delay-4 { transition-delay: 0.48s; }

/* Ambient glow orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(120px);
}

.hero-orb.orb-1 {
    width: 600px; height: 600px;
    top: -200px; left: -150px;
    background: rgba(37, 99, 235, 0.12);
}

.hero-orb.orb-2 {
    width: 500px; height: 500px;
    bottom: -250px; right: -100px;
    background: rgba(99, 102, 241, 0.1);
}

/* Noise texture */
.gallery-hero-dark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

/* Left content */
.gallery-hero-dark .hero-content {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    align-items: flex-start !important;
    gap: 0 !important;
    padding-right: 20px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.hero-eyebrow-line {
    width: 40px; height: 1px;
    background: #2563eb;
}

.hero-eyebrow-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: #2563eb;
    text-transform: uppercase;
}

.hero-heading {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 4.8vw, 4.2rem);
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-heading .accent {
    display: block;
    white-space: nowrap;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    color: #2563eb;
    font-size: 1.05em;
    margin-top: 2px;
}

.hero-desc {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.7;
    max-width: 440px;
    margin-bottom: 40px;
    font-weight: 400;
}

/* Stats row */
.hero-metrics {
    display: flex;
    gap: 50px;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #0f172a 30%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Right — Preview mosaic */
.hero-mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 160px;
    gap: 12px;
    position: relative;
}

.mosaic-img {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, 0.04);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

.mosaic-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.mosaic-img:hover img {
    transform: scale(1.04);
}

.mosaic-img:first-child {
    grid-row: span 2;
}

/* Floating badge on mosaic */
.mosaic-badge {
    position: absolute;
    bottom: 14px; left: 14px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(37, 99, 235, 0.12);
    color: #2563eb;
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 6px 14px;
    border-radius: 8px;
    text-transform: uppercase;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Scroll indicator */
.hero-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, #94a3b8, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.3); }
}

/* =========================================================================
   BODY — Editorial Magazine Section
   ========================================================================= */
.gallery-body {
    background: #e9f0f8;
    padding: clamp(50px, 7vw, 120px) 0;
    position: relative;
}

/* Section header */
.editorial-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
    padding: 0 10px;
}

.editorial-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editorial-number {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.12em;
}

.editorial-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    max-width: 350px;
    line-height: 1.5;
}

.editorial-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.2rem, 4vw, 4rem);
    font-weight: 900;
    color: #0f172a;
    line-height: 1.05;
    text-align: right;
}

/* =========================================================================
   Filter Bar & Sticky Navigation
   ========================================================================= */
.gallery-filter-wrapper {
    position: sticky;
    top: 90px;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(233, 240, 248, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 8px 12px;
    border-radius: 50px;
    margin: 0 auto 50px;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
    transition: all 0.35s ease;
}

/* Floating Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: -60px;
    width: 48px;
    height: 48px;
    background: #0f172a;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    z-index: 999;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.back-to-top.show {
    right: 30px;
    opacity: 1;
}

.back-to-top:hover {
    background: #2563eb;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

.gallery-filter-bar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    padding: 5px;
    border-radius: 50px;
    position: relative;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.filter-pill-bg {
    position: absolute;
    height: calc(100% - 10px);
    top: 5px;
    border-radius: 40px;
    background: #0f172a;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2);
    transition: left 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.filter-btn {
    background: transparent;
    color: #475569;
    border: none;
    border-radius: 40px;
    padding: 10px 24px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.35s ease;
    font-family: 'Outfit', sans-serif;
    position: relative;
    z-index: 2;
    white-space: nowrap;
}

.filter-btn:hover { color: #0f172a; }
.filter-btn.active { color: #ffffff; }

/* =========================================================================
   Counter
   ========================================================================= */
.gallery-results-bar {
    padding: 0 10px;
    margin-bottom: 30px;
}

.results-count {
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.results-count strong { color: #0f172a; }

/* =========================================================================
   EDITORIAL GRID — Asymmetric Magazine Layout
   ========================================================================= */
.editorial-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(clamp(110px, 12vw, 150px), auto);
    gap: clamp(10px, 1.2vw, 20px);
    padding: 0 clamp(10px, 2vw, 30px);
    min-height: 600px;
    transition: opacity 0.3s ease;
}

/* Image tiles */
.grid-tile {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.04);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.02);
}

.grid-tile.revealed {
    opacity: 1;
    transform: translateY(0);
}

.grid-tile img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid-tile:hover img { transform: scale(1.05); }

/* Hover overlay */
.tile-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(37, 99, 235, 0.12);
    opacity: 0;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border-radius: 14px;
}

.grid-tile:hover .tile-overlay { opacity: 1; }

.tile-label {
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    text-align: center;
    transform: translateY(12px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tile-label::before {
    content: '';
    display: block;
    width: 38px; height: 38px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%232563eb' stroke-width='2.5' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
    margin-bottom: 4px;
    transition: transform 0.4s ease;
}

.grid-tile:hover .tile-label::before {
    transform: scale(1.1);
}

.grid-tile:hover .tile-label {
    transform: translateY(0); opacity: 1;
}

/* Text blocks */
.grid-text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
    border-radius: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.grid-text-block.revealed {
    opacity: 1; transform: translateY(0);
}

.grid-text-block h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.35;
}

.grid-text-block p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
    font-weight: 500;
}

/* =========================================================================
   Grid Placement Patterns
   ========================================================================= */
.editorial-grid > :nth-child(1)  { grid-column: span 3; grid-row: span 2; }
.editorial-grid > :nth-child(2)  { grid-column: span 4; grid-row: span 2; }
.editorial-grid > :nth-child(3)  { grid-column: span 5; grid-row: span 2; }
.editorial-grid > :nth-child(4)  { grid-column: span 2; grid-row: span 2; }
.editorial-grid > :nth-child(5)  { grid-column: span 3; grid-row: span 1; }
.editorial-grid > :nth-child(6)  { grid-column: span 3; grid-row: span 2; }
.editorial-grid > :nth-child(7)  { grid-column: span 4; grid-row: span 2; }
.editorial-grid > :nth-child(8)  { grid-column: span 3; grid-row: span 2; }
.editorial-grid > :nth-child(9)  { grid-column: span 2; grid-row: span 1; }
.editorial-grid > :nth-child(10) { grid-column: span 3; grid-row: span 2; }
.editorial-grid > :nth-child(n+11):nth-child(odd)  { grid-column: span 5; grid-row: span 2; }
.editorial-grid > :nth-child(n+11):nth-child(even) { grid-column: span 4; grid-row: span 2; }

/* =========================================================================
   Lightbox
   ========================================================================= */
.gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.93) 0%, rgba(2, 6, 23, 0.98) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 999999 !important; /* Forces modal on top of global navbar */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow: hidden;
}

/* Ambient glow orbs in the background */
.gallery-modal::before {
    content: '';
    position: absolute;
    top: -15%; left: -15%;
    width: 55%; height: 55%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, transparent 70%);
    filter: blur(100px);
    pointer-events: none;
    z-index: 1;
    animation: modalGlowFloat1 25s infinite alternate ease-in-out;
}

.gallery-modal::after {
    content: '';
    position: absolute;
    bottom: -15%; right: -15%;
    width: 55%; height: 55%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.14) 0%, transparent 70%);
    filter: blur(100px);
    pointer-events: none;
    z-index: 1;
    animation: modalGlowFloat2 30s infinite alternate ease-in-out;
}

@keyframes modalGlowFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(120px, 80px) scale(1.15); }
}

@keyframes modalGlowFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-140px, -80px) scale(0.9); }
}

.gallery-modal.show { opacity: 1; }

.modal-content-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 80vw; /* Wide side gutters to prevent image from overlapping nav arrows */
    max-height: 80vh;
    z-index: 10;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    transform: scale(0.92);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    object-fit: contain;
}

.gallery-modal.show .modal-image { transform: scale(1); }

.modal-caption {
    position: fixed;
    bottom: 114px; /* Stacked cleanly above bottom thumbnails */
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease 0.15s;
    letter-spacing: -0.01em;
    z-index: 10002;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 80vw;
    overflow: hidden;
}

.gallery-modal.show .modal-caption { opacity: 1; }

.modal-counter {
    position: fixed;
    bottom: 90px; /* Positioned between caption and thumbnails */
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    opacity: 0;
    transition: opacity 0.5s ease 0.25s;
    z-index: 10002;
}

.gallery-modal.show .modal-counter { opacity: 1; }

.modal-close {
    position: fixed;
    top: 24px; right: 24px;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 10001;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-nav {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    color: #ffffff;
    cursor: pointer;
    z-index: 10005; /* Always on top of all image assets */
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75); /* Dark circle background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1.6rem;
    user-select: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.modal-nav:hover {
    background: #2563eb; /* Glowing blue on hover */
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.modal-nav.prev { left: 32px; }
.modal-nav.next { right: 32px; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-mosaic {
        max-width: 500px;
    }
    .gallery-hero-dark {
        min-height: auto;
        padding: 140px 0 60px;
    }
    .editorial-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .editorial-grid > :nth-child(1) { grid-column: span 3; grid-row: span 2; }
    .editorial-grid > :nth-child(2) { grid-column: span 3; grid-row: span 2; }
    .editorial-grid > :nth-child(3) { grid-column: span 6; grid-row: span 2; }
    .editorial-grid > :nth-child(4) { grid-column: span 2; grid-row: span 2; }
    .editorial-grid > :nth-child(5) { grid-column: span 2; grid-row: span 1; }
    .editorial-grid > :nth-child(6) { grid-column: span 2; grid-row: span 2; }
    .editorial-grid > :nth-child(7) { grid-column: span 3; grid-row: span 2; }
    .editorial-grid > :nth-child(8) { grid-column: span 3; grid-row: span 2; }
    .editorial-grid > :nth-child(n+9):nth-child(odd)  { grid-column: span 3; grid-row: span 2; }
    .editorial-grid > :nth-child(n+9):nth-child(even) { grid-column: span 3; grid-row: span 2; }
    .editorial-title { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .modal-img-container {
        width: 90vw !important;
        height: 50vh !important;
    }
    .gallery-hero-dark { padding: 120px 0 50px; }
    .hero-heading { font-size: 2.5rem; }
    .hero-metrics { gap: 30px; }
    .metric-value { font-size: 1.6rem; }
    .hero-mosaic {
        grid-template-rows: 160px 120px;
    }
    .hero-scroll-hint { display: none; }
    .editorial-header { flex-direction: column; gap: 16px; }
    .editorial-title { text-align: left; font-size: 1.8rem; }
    .gallery-filter-wrapper {
        top: 75px;
        margin-bottom: 30px;
        padding: 6px 10px;
    }
    .gallery-filter-bar {
        justify-content: center;
    }
    .editorial-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: minmax(110px, auto);
        gap: 8px;
    }
    .editorial-grid > :nth-child(1) { grid-column: span 2; grid-row: span 2; }
    .editorial-grid > :nth-child(2) { grid-column: span 2; grid-row: span 2; }
    .editorial-grid > :nth-child(3) { grid-column: span 4; grid-row: span 2; }
    .editorial-grid > :nth-child(n+4) { grid-column: span 2; grid-row: span 2; }
    .gallery-body { padding: 50px 0 60px; }
    .modal-nav.prev { left: 10px; }
    .modal-nav.next { right: 10px; }
    .modal-nav { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
    .hero-inner { gap: 24px; }
    .hero-mosaic {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 140px 100px;
        gap: 8px;
    }
    .editorial-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .editorial-grid > * {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
    .editorial-grid > :nth-child(3n+1) {
        grid-column: span 2 !important;
        grid-row: span 2 !important;
    }
    .filter-btn { padding: 8px 16px; font-size: 0.78rem; }
}

/* =========================================================================
   Load More Button & Spinner
   ========================================================================= */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.load-more-btn {
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 40px;
    padding: 16px 40px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Outfit', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

.load-more-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: btnSpin 0.8s ease-in-out infinite;
    display: none;
}

.load-more-btn.loading .btn-spinner {
    display: inline-block;
}

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

/* =========================================================================
   Advanced Lightbox Viewer additions
   ========================================================================= */
.modal-controls {
    position: fixed;
    top: 24px; right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
}

.modal-tool-btn, .modal-tool-close {
    color: white;
    cursor: pointer;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1.4rem;
    padding: 0;
}

.modal-tool-btn:hover, .modal-tool-close:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: scale(1.05);
}

.modal-tool-close:hover {
    transform: rotate(90deg) scale(1.05);
}

.modal-img-container {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80vw;
    height: 60vh;
}

/* Thumbnail Ribbon */
.modal-thumbnails-wrap {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 600px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
    z-index: 10002;
}

.modal-thumbnails-wrap::-webkit-scrollbar {
    display: none;
}

.modal-thumbnails-ribbon {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: max-content;
    margin: 0 auto;
}

.modal-thumb-item {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.modal-thumb-item:hover {
    opacity: 0.8;
}

.modal-thumb-item.active {
    border-color: #2563eb;
    opacity: 1;
    transform: scale(1.08);
}

/* Explicit transparency overrides to prevent container card layouts from showing in lightbox */
.gallery-modal .modal-content-wrap,
.gallery-modal .modal-img-container,
.gallery-modal .modal-image {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

