/* ==========================================================================
   PrimeX League — Pinterest-Style Global Event Gallery CSS
   Adaptive Theme: Dark (.theme--dark) and Light (:not(.theme--dark))
   ========================================================================== */

:root {
    --gallery-gold: #D4AF37;
    --gallery-gold-bright: #F59E0B;
    --gallery-gold-glow: rgba(212, 175, 55, 0.25);
}

/* ── Theme Tokens: Dark Mode (Default & body.theme--dark) ────── */
body.theme--dark .gallery-page,
.gallery-page {
    --gallery-bg: #0B0C10;
    --gallery-hero-bg: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.12) 0%, rgba(11, 12, 16, 0) 70%), #0B0C10;
    --gallery-card-bg: #14161F;
    --gallery-card-media-bg: #181A24;
    --gallery-skeleton-start: #181A24;
    --gallery-skeleton-mid: #222634;
    --gallery-border: rgba(255, 255, 255, 0.08);
    --gallery-text-main: #FFFFFF;
    --gallery-text-muted: #9CA3AF;
    --gallery-tab-bg: rgba(255, 255, 255, 0.04);
    --gallery-tab-text: #9CA3AF;
    --gallery-tab-border: rgba(255, 255, 255, 0.08);
    --gallery-tab-hover-bg: rgba(255, 255, 255, 0.09);
    --gallery-tab-hover-text: #FFFFFF;
    --gallery-tab-count-bg: rgba(0, 0, 0, 0.3);
    --gallery-tab-count-color: #D1D5DB;
    --gallery-nav-bg: rgba(11, 12, 16, 0.92);
    --gallery-stat-pill-bg: rgba(255, 255, 255, 0.04);
    --gallery-stat-pill-color: #E5E7EB;
    --gallery-card-shadow-default: 0 4px 16px rgba(0, 0, 0, 0.4);
    --gallery-card-shadow-hover: 0 16px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.18);
    background-color: var(--gallery-bg);
    color: var(--gallery-text-main);
    min-height: 85vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Theme Tokens: Light Mode (body:not(.theme--dark)) ───────── */
body:not(.theme--dark) .gallery-page {
    --gallery-bg: #F8FAFC;
    --gallery-hero-bg: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.16) 0%, rgba(248, 250, 252, 0) 70%), #F1F5F9;
    --gallery-card-bg: #FFFFFF;
    --gallery-card-media-bg: #E2E8F0;
    --gallery-skeleton-start: #E2E8F0;
    --gallery-skeleton-mid: #F8FAFC;
    --gallery-border: #E2E8F0;
    --gallery-text-main: #0F172A;
    --gallery-text-muted: #475569;
    --gallery-tab-bg: #FFFFFF;
    --gallery-tab-text: #475569;
    --gallery-tab-border: #CBD5E1;
    --gallery-tab-hover-bg: #E2E8F0;
    --gallery-tab-hover-text: #0F172A;
    --gallery-tab-count-bg: #F1F5F9;
    --gallery-tab-count-color: #334155;
    --gallery-nav-bg: rgba(248, 250, 252, 0.94);
    --gallery-stat-pill-bg: #FFFFFF;
    --gallery-stat-pill-color: #334155;
    --gallery-card-shadow-default: 0 4px 14px rgba(0, 0, 0, 0.05);
    --gallery-card-shadow-hover: 0 14px 30px rgba(0, 0, 0, 0.1), 0 0 16px rgba(212, 175, 55, 0.2);
}

/* ── Hero & Header ─────────────────────────────────────────── */
.gallery-hero {
    position: relative;
    padding: 3.5rem 1.5rem 2.5rem;
    text-align: center;
    background: var(--gallery-hero-bg);
    border-bottom: 1px solid var(--gallery-border);
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.gallery-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--gallery-gold);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.gallery-hero__title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 900;
    color: var(--gallery-text-main);
    line-height: 1.15;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.gallery-hero__title span {
    background: linear-gradient(135deg, var(--gallery-text-main) 10%, var(--gallery-gold) 60%, var(--gallery-gold-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gallery-hero__desc {
    max-width: 680px;
    margin: 0 auto 1.5rem;
    color: var(--gallery-text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.gallery-hero__stats {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.gallery-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gallery-stat-pill-color);
    background: var(--gallery-stat-pill-bg);
    padding: 0.45rem 0.95rem;
    border-radius: 10px;
    border: 1px solid var(--gallery-border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.gallery-stat-pill strong {
    color: var(--gallery-gold);
}

/* ── Hero Policy Pill Button ───────────────────────────────── */
.gallery-hero__policy-wrap {
    margin-top: 1.15rem;
    display: flex;
    justify-content: center;
}

.gallery-policy-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.15rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 9999px;
    color: var(--gallery-text-main);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.gallery-policy-pill-btn:hover {
    background: rgba(212, 175, 55, 0.22);
    border-color: var(--gallery-gold);
    color: var(--gallery-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--gallery-gold-glow);
}

.gallery-policy-pill-btn svg {
    color: var(--gallery-gold);
    flex-shrink: 0;
}

/* ── Sticky Tabs Bar ───────────────────────────────────────── */
.gallery-nav-sticky {
    position: sticky;
    top: 70px;
    z-index: 40;
    background: var(--gallery-nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--gallery-border);
    padding: 1rem 0;
    margin-bottom: 2rem;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.gallery-nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gallery-tabs {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.25rem 0;
}

.gallery-tabs::-webkit-scrollbar {
    display: none;
}

.gallery-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    border-radius: 9999px;
    border: 1px solid var(--gallery-tab-border);
    background: var(--gallery-tab-bg);
    color: var(--gallery-tab-text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.gallery-tab-btn:hover {
    background: var(--gallery-tab-hover-bg);
    color: var(--gallery-tab-hover-text);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
}

.gallery-tab-btn--active {
    background: linear-gradient(135deg, var(--gallery-gold) 0%, var(--gallery-gold-bright) 100%) !important;
    color: #000000 !important;
    font-weight: 800;
    border-color: transparent !important;
    box-shadow: 0 4px 18px var(--gallery-gold-glow);
}

.gallery-tab-btn__count {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: var(--gallery-tab-count-bg);
    color: var(--gallery-tab-count-color);
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.gallery-tab-btn--active .gallery-tab-btn__count {
    background: rgba(0, 0, 0, 0.25) !important;
    color: #000000 !important;
}

/* ── Pinterest Masonry Grid ────────────────────────────────── */
.gallery-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.gallery-photos-header {
    max-width: 1440px;
    margin: 0 auto 1.5rem;
    padding: 0 1.5rem;
}

.gallery-masonry {
    column-count: 2;
    column-gap: 0.65rem;
    width: 100%;
}

@media (min-width: 640px) {
    .gallery-masonry {
        column-count: 2;
        column-gap: 1.25rem;
    }
}

@media (min-width: 920px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media (min-width: 1280px) {
    .gallery-masonry {
        column-count: 4;
    }
}

/* ── Gallery Card Item ─────────────────────────────────────── */
.gallery-card {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin-bottom: 1.25rem;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: var(--gallery-card-bg);
    border: 1px solid var(--gallery-border);
    box-shadow: var(--gallery-card-shadow-default);
    cursor: pointer;
    transform: translateY(0);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.35s ease,
                background-color 0.3s ease;
    will-change: transform, opacity;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--gallery-card-shadow-hover);
    border-color: rgba(212, 175, 55, 0.5);
}

/* Smooth fade-in on mount */
.gallery-card--animate {
    animation: pinterestFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pinterestFadeIn {
    0% {
        opacity: 0;
        transform: translateY(22px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gallery-card__media-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--gallery-card-media-bg);
    transition: background 0.3s ease;
}

.gallery-card__img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
    opacity: 0;
}

.gallery-card__img.is-loaded {
    opacity: 1;
}

.gallery-card:hover .gallery-card__img {
    transform: scale(1.04);
}

/* Placeholder Skeleton */
.gallery-card__skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--gallery-skeleton-start) 0%, var(--gallery-skeleton-mid) 50%, var(--gallery-skeleton-start) 100%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.6s infinite ease-in-out;
    transition: opacity 0.3s ease;
}

.gallery-card__img.is-loaded + .gallery-card__skeleton {
    opacity: 0;
    pointer-events: none;
}

@keyframes skeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Hover Overlay & Action buttons */
.gallery-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 12, 16, 0.9) 0%, rgba(11, 12, 16, 0.2) 40%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 2;
}

.gallery-card:hover .gallery-card__overlay {
    opacity: 1;
}

.gallery-card__top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.gallery-btn-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(11, 12, 16, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-btn-circle:hover {
    background: var(--gallery-gold);
    color: #000;
    border-color: var(--gallery-gold);
    transform: scale(1.1);
}

.gallery-btn-circle:disabled,
.gallery-btn-circle--loading {
    cursor: wait !important;
    opacity: 0.85;
    pointer-events: none;
    transform: none !important;
}

.gallery-spin-icon {
    animation: gallerySpin 0.75s linear infinite;
    transform-origin: center;
}

.gallery-card__meta {
    transform: translateY(8px);
    transition: transform 0.25s ease;
}

.gallery-card:hover .gallery-card__meta {
    transform: translateY(0);
}

.gallery-card__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-card__sub {
    font-size: 0.75rem;
    color: var(--gallery-gold);
    margin-top: 2px;
}

/* ── Video Badge & Play Button ─────────────────────────────── */
.gallery-card__video-badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 2;
}

.gallery-card__video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.92);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 16px var(--gallery-gold-glow);
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.gallery-card:hover .gallery-card__video-play {
    transform: translate(-50%, -50%) scale(1.12);
    background: #FFFFFF;
}

/* ── Sentinel & Infinite Loading Indicator ─────────────────── */
.gallery-loading-indicator {
    text-align: center;
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
}

.gallery-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(212, 175, 55, 0.25);
    border-top-color: var(--gallery-gold);
    border-radius: 50%;
    animation: gallerySpin 0.75s linear infinite;
}

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

.gallery-loading-text {
    font-size: 0.9rem;
    color: var(--gallery-text-muted);
    font-weight: 500;
}

.gallery-end-badge {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gallery-text-muted);
    font-size: 0.9rem;
}

.gallery-end-badge span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    background: var(--gallery-tab-bg);
    border: 1px solid var(--gallery-border);
    color: var(--gallery-text-muted);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

/* ── Fullscreen Lightbox Modal (Always Cinema High Contrast) ─ */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(8, 9, 13, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-lightbox--open {
    opacity: 1;
    pointer-events: auto;
}

.gallery-lightbox__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-lightbox__info {
    display: flex;
    flex-direction: column;
}

.gallery-lightbox__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFFFFF;
}

.gallery-lightbox__album {
    font-size: 0.8rem;
    color: var(--gallery-gold);
}

.gallery-lightbox__controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gallery-lightbox__content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1.5rem;
    overflow: hidden;
}

.gallery-lightbox__media-container {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gallery-lightbox__img {
    max-width: 90vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.gallery-lightbox--open .gallery-lightbox__img {
    transform: scale(1);
    opacity: 1;
}

.gallery-lightbox__iframe-wrapper {
    width: 80vw;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    background: #000;
}

.gallery-lightbox__iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.gallery-lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.gallery-lightbox__arrow:hover {
    background: var(--gallery-gold);
    color: #000;
    border-color: var(--gallery-gold);
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox__arrow--prev {
    left: 1.5rem;
}

.gallery-lightbox__arrow--next {
    right: 1.5rem;
}

@media (max-width: 768px) {
    .gallery-lightbox__header {
        padding: 1rem;
    }
    .gallery-lightbox__arrow {
        width: 38px;
        height: 38px;
    }
    .gallery-lightbox__arrow--prev { left: 0.5rem; }
    .gallery-lightbox__arrow--next { right: 0.5rem; }
}

/* ── Hierarchical Folder Explorer & Breadcrumbs ───────────── */
.gallery-explorer-nav {
    padding: 1.25rem 1.5rem;
    background: var(--gallery-nav-bg);
    border-bottom: 1px solid var(--gallery-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 70px;
    z-index: 40;
    backdrop-filter: blur(12px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.gallery-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.92rem;
}

.gallery-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-breadcrumb-link {
    color: var(--gallery-text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.gallery-breadcrumb-link:hover {
    color: var(--gallery-gold);
    background: rgba(212, 175, 55, 0.1);
}

.gallery-breadcrumb-current {
    color: var(--gallery-text-main);
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gallery-breadcrumb-sep {
    color: var(--gallery-text-muted);
    opacity: 0.5;
    font-size: 0.8rem;
    user-select: none;
}

.gallery-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gallery-text-main);
    background: var(--gallery-card-bg);
    border: 1px solid var(--gallery-border);
    border-radius: 8px;
    text-decoration: none;
    box-shadow: var(--gallery-card-shadow-default);
    transition: all 0.2s ease;
}

.gallery-back-btn:hover {
    border-color: var(--gallery-gold);
    color: var(--gallery-gold);
    transform: translateX(-3px);
}

/* ── Folders & Subcategories Section ──────────────────────── */
.gallery-folders-section {
    padding: 2.5rem 1.5rem 1.5rem;
    max-width: 1440px;
    margin: 0 auto;
}

.gallery-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.gallery-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gallery-text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
}

.gallery-section-title svg {
    color: var(--gallery-gold);
}

.gallery-folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.gallery-folder-card {
    background: var(--gallery-card-bg);
    border: 1px solid var(--gallery-border);
    border-radius: 14px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--gallery-card-shadow-default);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-folder-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gallery-gold);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-folder-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: var(--gallery-card-shadow-hover);
}

.gallery-folder-card:hover::before {
    opacity: 1;
}

.gallery-folder-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gallery-gold);
    flex-shrink: 0;
    transition: transform 0.25s ease, background 0.25s ease;
}

.gallery-folder-card:hover .gallery-folder-icon {
    transform: scale(1.08) rotate(3deg);
    background: rgba(212, 175, 55, 0.2);
}

.gallery-folder-info {
    flex-grow: 1;
    min-width: 0;
}

.gallery-folder-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gallery-text-main);
    margin: 0 0 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.gallery-folder-card:hover .gallery-folder-name {
    color: var(--gallery-gold);
}

.gallery-folder-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.gallery-folder-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: var(--gallery-tab-bg);
    border: 1px solid var(--gallery-tab-border);
    color: var(--gallery-text-muted);
}

.gallery-folder-pill--gold {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--gallery-gold);
}

.gallery-folder-arrow {
    color: var(--gallery-text-muted);
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.gallery-folder-card:hover .gallery-folder-arrow {
    transform: translateX(4px);
    opacity: 1;
    color: var(--gallery-gold);
}

/* Separator between folders and media */
.gallery-section-divider {
    max-width: 1440px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

.gallery-section-divider hr {
    border: none;
    border-top: 1px solid var(--gallery-border);
    margin: 0;
}

/* ── Photography Use & Download Policies Section ────────────── */
.gallery-policy-section {
    max-width: 1440px;
    margin: 3rem auto 4rem;
    padding: 0 1.5rem;
}

.gallery-policy-card {
    background: var(--gallery-card-bg);
    border: 1px solid var(--gallery-border);
    border-radius: 18px;
    padding: 2.25rem;
    box-shadow: var(--gallery-card-shadow-default);
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.gallery-policy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gallery-gold), var(--gallery-gold-bright), transparent);
}

.gallery-policy-header {
    margin-bottom: 1.25rem;
}

.gallery-policy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gallery-gold);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.gallery-policy-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gallery-text-main);
    margin: 0;
    letter-spacing: -0.01em;
}

.gallery-policy-lead {
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--gallery-text-main);
    font-weight: 500;
    margin: 0 0 1.25rem;
}

.gallery-policy-divider {
    height: 1px;
    background: var(--gallery-border);
    margin: 1.25rem 0 1.5rem;
}

.gallery-policy-paragraphs {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.gallery-policy-block {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.gallery-policy-block__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: var(--gallery-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.gallery-policy-block__content {
    flex: 1;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--gallery-text-muted);
}

.gallery-policy-block__content p {
    margin: 0 0 0.4rem;
}

.gallery-policy-block__content p:last-child {
    margin-bottom: 0;
}

.gallery-policy-warning {
    color: #EF4444;
    font-weight: 600;
}

.gallery-policy-highlight {
    color: var(--gallery-gold);
    font-weight: 600;
}

.gallery-policy-footer {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gallery-border);
    text-align: center;
}

.gallery-policy-slogan {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gallery-gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Lightbox Floating Policy Button ───────────────────────── */
.gallery-lightbox__policy-pill {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 45;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    background: rgba(15, 17, 26, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 9999px;
    color: #F3F4F6;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.15);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    user-select: none;
}

.gallery-lightbox__policy-pill:hover {
    background: rgba(212, 175, 55, 0.22);
    border-color: var(--gallery-gold);
    color: #FFFFFF;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.3);
}

.gallery-lightbox__policy-pill svg {
    color: var(--gallery-gold);
    flex-shrink: 0;
}

/* ── Lightbox In-Modal Policy Dialog ───────────────────────── */
.gallery-lightbox__policy-dialog {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.gallery-lightbox__policy-dialog--open {
    opacity: 1;
    pointer-events: auto;
}

.gallery-lightbox__policy-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.gallery-lightbox__policy-panel {
    position: relative;
    z-index: 2;
    background: #13151F;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 16px;
    max-width: 620px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 25px rgba(212, 175, 55, 0.15);
    animation: lightboxPolicyScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lightboxPolicyScaleUp {
    0% {
        transform: scale(0.94) translateY(12px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.gallery-lightbox__policy-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-lightbox__policy-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #FFFFFF;
    margin: 1rem 1.5rem 0.5rem;
    letter-spacing: -0.01em;
}

.gallery-lightbox__policy-body {
    padding: 0.5rem 1.5rem 1.25rem;
    overflow-y: auto;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #D1D5DB;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.gallery-lightbox__policy-body p {
    margin: 0;
}

.gallery-lightbox__policy-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
}

.gallery-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.4rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--gallery-gold) 0%, var(--gallery-gold-bright) 100%);
    color: #000000;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--gallery-gold-glow);
    transition: all 0.2s ease;
}

.gallery-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--gallery-gold-glow);
}

/* ── Mobile Phone Optimizations (< 640px) ─────────────────── */
@media (max-width: 640px) {
    /* 1. Hero: reduce padding, margins, badge and font sizes */
    .gallery-hero {
        padding: 1.75rem 1rem 1.25rem;
    }

    .gallery-hero__badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.65rem;
        margin-bottom: 0.65rem;
        letter-spacing: 0.05em;
    }

    .gallery-hero__title {
        font-size: 1.65rem;
        line-height: 1.2;
        margin: 0 0 0.5rem;
    }

    .gallery-hero__desc {
        font-size: 0.85rem;
        line-height: 1.45;
        margin: 0 auto 1rem;
    }

    .gallery-hero__stats {
        gap: 0.5rem;
    }

    .gallery-stat-pill {
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
        gap: 0.35rem;
        border-radius: 8px;
    }

    .gallery-hero__policy-wrap {
        margin-top: 0.65rem;
    }

    .gallery-policy-pill-btn {
        padding: 0.32rem 0.8rem;
        font-size: 0.74rem;
        gap: 0.35rem;
    }

    /* 2. Hierarchical Explorer Nav & Breadcrumbs */
    .gallery-explorer-nav {
        padding: 0.65rem 0.75rem;
        top: 60px;
        gap: 0.5rem;
    }

    .gallery-breadcrumbs {
        font-size: 0.78rem;
        gap: 0.3rem;
    }

    .gallery-breadcrumb-link,
    .gallery-breadcrumb-current {
        padding: 0.2rem 0.45rem;
        font-size: 0.75rem;
        gap: 0.25rem;
    }

    .gallery-breadcrumb-link svg,
    .gallery-breadcrumb-current svg {
        width: 14px;
        height: 14px;
    }

    .gallery-back-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        gap: 0.35rem;
    }

    .gallery-back-btn svg {
        width: 14px;
        height: 14px;
    }

    /* 3. Folders Section: 2 columns ("de dos en dos") */
    .gallery-folders-section {
        padding: 1rem 0.75rem 0.75rem;
    }

    .gallery-section-header {
        margin-bottom: 0.75rem;
    }

    .gallery-section-title {
        font-size: 1rem;
        gap: 0.4rem;
    }

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

    .gallery-folders-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .gallery-folder-card {
        padding: 0.75rem 0.65rem;
        gap: 0.5rem;
        border-radius: 10px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .gallery-folder-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

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

    .gallery-folder-info {
        width: 100%;
    }

    .gallery-folder-name {
        font-size: 0.8rem;
        margin: 0 0 0.25rem;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.25;
    }

    .gallery-folder-badges {
        gap: 0.25rem;
    }

    .gallery-folder-pill {
        font-size: 0.65rem;
        padding: 0.12rem 0.35rem;
        border-radius: 4px;
    }

    .gallery-folder-arrow {
        display: none;
    }

    /* 4. Section Divider */
    .gallery-section-divider {
        margin: 0.75rem auto;
        padding: 0 0.75rem;
    }

    /* 5. Photos Header & Wrapper */
    .gallery-wrapper {
        padding: 0 0.75rem 2.5rem;
    }

    .gallery-photos-header {
        margin: 0 auto 0.75rem;
        padding: 0 0.75rem;
    }

    /* 6. Masonry Cards: 2 columns ("de dos en dos") */
    .gallery-card {
        margin-bottom: 0.65rem;
        border-radius: 10px;
    }

    .gallery-card__overlay {
        padding: 0.5rem;
    }

    .gallery-btn-circle {
        width: 28px;
        height: 28px;
    }

    .gallery-btn-circle svg {
        width: 13px;
        height: 13px;
    }

    .gallery-card__title {
        font-size: 0.72rem;
    }

    .gallery-card__sub {
        font-size: 0.62rem;
    }

    .gallery-card__video-badge {
        top: 0.4rem;
        left: 0.4rem;
        padding: 0.15rem 0.4rem;
        font-size: 0.6rem;
    }

    .gallery-card__video-play {
        width: 34px;
        height: 34px;
    }

    .gallery-card__video-play svg {
        width: 15px;
        height: 15px;
    }

    /* 7. End Badge & Tabs (if any) */
    .gallery-end-badge {
        padding: 1.5rem 0.5rem;
        font-size: 0.8rem;
    }

    .gallery-end-badge span {
        padding: 0.35rem 0.85rem;
        font-size: 0.75rem;
    }

    .gallery-nav-sticky {
        padding: 0.5rem 0;
        margin-bottom: 1rem;
    }

    .gallery-nav-container {
        padding: 0 0.75rem;
    }

    .gallery-tab-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* 8. Policy Section & Lightbox Policy Mobile */
    .gallery-policy-section {
        margin: 2rem auto 2.5rem;
        padding: 0 0.75rem;
    }

    .gallery-policy-card {
        padding: 1.25rem 1rem;
        border-radius: 14px;
    }

    .gallery-policy-title {
        font-size: 1.15rem;
    }

    .gallery-policy-lead {
        font-size: 0.88rem;
        margin-bottom: 1rem;
    }

    .gallery-policy-block {
        gap: 0.75rem;
    }

    .gallery-policy-block__icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .gallery-policy-block__icon svg {
        width: 16px;
        height: 16px;
    }

    .gallery-policy-block__content {
        font-size: 0.82rem;
        line-height: 1.5;
    }

    .gallery-policy-warning,
    .gallery-policy-highlight {
        font-size: 0.8rem;
    }

    .gallery-policy-slogan {
        font-size: 0.8rem;
    }

    .gallery-lightbox__policy-pill {
        bottom: 1.1rem;
        font-size: 0.74rem;
        padding: 0.4rem 0.9rem;
    }

    .gallery-lightbox__policy-dialog {
        padding: 0.75rem;
    }

    .gallery-lightbox__policy-panel {
        max-height: 85vh;
        border-radius: 12px;
    }

    .gallery-lightbox__policy-panel-header {
        padding: 0.85rem 1rem 0.5rem;
    }

    .gallery-lightbox__policy-heading {
        font-size: 1rem;
        margin: 0.65rem 1rem 0.25rem;
    }

    .gallery-lightbox__policy-body {
        padding: 0.5rem 1rem 0.85rem;
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .gallery-lightbox__policy-actions {
        padding: 0.65rem 1rem;
    }
}

/* ── Floating Download Policy Button (Stacked Above Back to Top) ── */
.gallery-floating-policy {
    position: fixed;
    bottom: 160px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-floating-policy.back-to-top--visible,
.gallery-floating-policy.gallery-floating-policy--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gallery-floating-policy:hover {
    transform: scale(1.1) translateY(-3px);
    background: #000;
    border-color: var(--gallery-gold, #D4AF37);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.3);
    color: var(--gallery-gold, #D4AF37);
}

.gallery-floating-policy svg {
    width: 20px;
    height: 20px;
    transition: transform 0.25s ease;
}

.gallery-floating-policy:hover svg {
    transform: scale(1.12);
}

body.theme--dark .gallery-floating-policy {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

body.theme--dark .gallery-floating-policy:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--gallery-gold, #D4AF37);
}

