/* ── gallery.css ── */
/* Matches the CULTUREWEB design system (style.css) */

/* ──────────────────────────────────────────────────
   0. Page base
────────────────────────────────────────────────── */
.gallery-page {
    background: #080808;
    color: #fff;
    min-height: 100vh;
}

/* Reusable glass utility */
.glass {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.13);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ──────────────────────────────────────────────────
   1. Hero
────────────────────────────────────────────────── */
.gallery-hero {
    position: relative;
    height: 100vh;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Animated gradient mesh background */
.gh-bg-layer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 20% 40%, rgba(20,255,114,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 70%, rgba(20,180,255,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 80% 80% at 50% 100%, rgba(0,0,0,0.95) 0%, transparent 80%),
        #0a0a0a;
    animation: bgPulse 12s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0%  { background-position: 0% 0%; }
    100%{ filter: brightness(1.08); }
}

/* Particle dots */
.gh-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.gh-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-solid);
    opacity: 0;
    animation: particleFade var(--dur, 6s) var(--delay, 0s) ease-in-out infinite;
}

@keyframes particleFade {
    0%, 100% { opacity: 0; transform: translateY(0) scale(1); }
    50%       { opacity: 0.35; transform: translateY(-20px) scale(1.2); }
}

/* Hero text */
.gh-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gh-eyebrow {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 16px;
    animation: fadeUp 0.8s 0.2s both;
}

.gh-title {
    font-size: clamp(4rem, 14vw, 9rem);
    font-weight: 700;
    line-height: 1;
    color: #fff;
    letter-spacing: -2px;
    animation: fadeUp 0.8s 0.4s both;
}

.gh-title span {
    color: var(--accent);
}

.gh-sub {
    max-width: 440px;
    font-size: clamp(12px, 1.4vw, 14px);
    color: rgba(255,255,255,0.6);
    line-height: 1.8;
    margin-top: 18px;
    animation: fadeUp 0.8s 0.6s both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scroll hint */
.gh-scroll-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    font-size: 9px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.35);
    animation: fadeUp 0.8s 0.9s both;
}

.gh-scroll-line {
    width: 40px;
    height: 1px;
    background: rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.gh-scroll-line::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--accent);
    animation: scanLine 2s ease-in-out infinite;
}

@keyframes scanLine {
    0%   { left: -100%; }
    100% { left: 100%; }
}

/* Floating stat cards */
.gh-stats {
    position: absolute;
    bottom: 40px;
    right: 5%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
    animation: fadeUp 0.8s 1.1s both;
}

.stat-card {
    padding: 12px 20px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    transition: transform 0.3s, border-color 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(20,255,114,0.35);
}

.stat-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-lbl {
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.45);
    margin-top: 3px;
}

/* ──────────────────────────────────────────────────
   2. Filter bar
────────────────────────────────────────────────── */
.gallery-filter-wrap {
    position: sticky;
    top: 60px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 5%;
    margin: 0 auto;
    max-width: 1300px;
    height: 60px;
}

.gf-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 40px;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.gf-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-family: "Poppins", sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s;
}

.gf-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.07);
}

.gf-btn.active {
    background: var(--accent);
    color: #000;
    font-weight: 700;
}

/* View toggle */
.gf-view-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.view-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-btn.active,
.view-btn:hover {
    background: rgba(20,255,114,0.15);
    border-color: rgba(20,255,114,0.4);
    color: var(--accent);
}

/* ──────────────────────────────────────────────────
   3. Gallery grid
────────────────────────────────────────────────── */
.gallery-section {
    max-width: 1300px;
    margin: 40px auto 0;
    padding: 0 5% 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 260px;
    gap: 14px;
}

/* Grid spans */
.g-item.g-wide  { grid-column: span 2; }
.g-item.g-tall  { grid-row: span 2; }

/* Each card */
.g-item {
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.08);
    transition: border-color 0.3s;
}

.g-item:hover {
    border-color: rgba(20,255,114,0.3);
}

.g-img-wrap {
    width: 100%;
    height: 100%;
    position: relative;
}

.g-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.g-item:hover .g-img-wrap img {
    transform: scale(1.06);
}

/* Dark overlay */
.g-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75) 0%,
        rgba(0,0,0,0.15) 40%,
        transparent 70%
    );
    transition: opacity 0.3s;
}

.g-item:hover .g-overlay {
    opacity: 0.85;
}

/* Category badge (top-left) */
.g-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.3s;
}

.g-item:hover .g-badge {
    opacity: 1;
    transform: translateY(0);
}

/* Caption (bottom) */
.g-caption {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 50px;
    padding: 10px 14px;
    border-radius: 12px;
    transform: translateY(8px);
    opacity: 0;
    transition: all 0.35s;
}

.g-item:hover .g-caption {
    transform: translateY(0);
    opacity: 1;
}

.g-caption-title {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.g-caption-loc {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.5);
}

/* Zoom button (bottom-right) */
.g-zoom-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s;
}

.g-item:hover .g-zoom-btn {
    opacity: 1;
    transform: scale(1);
}

.g-zoom-btn:hover {
    background: var(--accent) !important;
    color: #000;
}

/* ──────────────────────────────────────────────────
   4. Reveal animations
────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger via inline delay set by JS */

/* Hidden items (filter) */
.g-item.filtered-out {
    display: none;
}

/* Masonry layout toggle */
.gallery-grid.masonry {
    display: block;
    column-count: 4;
    column-gap: 14px;
}

.gallery-grid.masonry .g-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 14px;
    height: auto;
    break-inside: avoid;
}

.gallery-grid.masonry .g-img-wrap {
    height: auto;
}

.gallery-grid.masonry .g-img-wrap img {
    height: auto;
    min-height: 160px;
}

.gallery-grid.masonry .g-wide,
.gallery-grid.masonry .g-tall {
    grid-column: unset;
    grid-row: unset;
}

/* ──────────────────────────────────────────────────
   5. Load more
────────────────────────────────────────────────── */
.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.load-more-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    border-radius: 40px;
    border: none;
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: rgba(20,255,114,0.15);
    border-color: rgba(20,255,114,0.4);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ──────────────────────────────────────────────────
   6. Quote strip
────────────────────────────────────────────────── */
.gallery-quote {
    padding: 60px 5%;
}

.gq-inner {
    max-width: 760px;
    margin: auto;
    border-radius: 24px;
    padding: 48px 52px;
    text-align: center;
    position: relative;
}

.gq-mark {
    font-size: 80px;
    line-height: 0.5;
    color: var(--accent);
    font-family: Georgia, serif;
    opacity: 0.4;
    display: block;
    margin-bottom: 16px;
}

.gq-inner blockquote {
    font-size: clamp(16px, 2.2vw, 22px);
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    line-height: 1.65;
    font-style: italic;
}

.gq-inner cite {
    display: block;
    margin-top: 20px;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
    font-style: normal;
}

/* ──────────────────────────────────────────────────
   7. Lightbox
────────────────────────────────────────────────── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
}

.lightbox-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.lb-content {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    max-width: 90vw;
    max-height: 75vh;
}

.lb-img-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 1;
}

.lb-img-wrap img {
    max-height: 72vh;
    max-width: 75vw;
    display: block;
    border-radius: 16px;
    object-fit: contain;
    transition: opacity 0.25s;
}

/* Spinner */
.lb-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.lb-spinner::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}

.lb-img-wrap.loading .lb-spinner::after { display: block; }
.lb-img-wrap.loading img { opacity: 0; }

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

/* Info panel */
.lb-info {
    border-radius: 16px;
    padding: 20px 22px;
    min-width: 170px;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.lb-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--accent);
    text-transform: uppercase;
}

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

.lb-loc {
    font-size: 10px;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.45);
}

.lb-counter {
    font-size: 10px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.3);
    margin-top: 8px;
}

/* Close / prev / next */
.lb-close, .lb-prev, .lb-next {
    position: absolute;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    font-size: 18px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
}

.lb-close {
    top: 20px;
    right: 20px;
    font-size: 22px;
}

.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

.lb-close:hover, .lb-prev:hover, .lb-next:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

/* Thumbnail strip */
.lb-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 90vw;
    padding-bottom: 4px;
}

.lb-thumbs::-webkit-scrollbar { display: none; }

.lb-thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.lb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lb-thumb.active {
    border-color: var(--accent);
    transform: scale(1.08);
}

/* ──────────────────────────────────────────────────
   8. Footer
────────────────────────────────────────────────── */
.gallery-footer {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 40px 5%;
}

.gf-footer-inner {
    max-width: 1300px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--accent);
}

.gallery-footer p {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
}

.gallery-footer .footer-links {
    display: flex;
    gap: 4px;
}

.gallery-footer .footer-links a {
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 4px;
    transition: 0.2s;
}

.gallery-footer .footer-links a:hover,
.gallery-footer .footer-links a.active {
    background: var(--accent);
    color: #000;
}

/* ──────────────────────────────────────────────────
   9. Responsive
────────────────────────────────────────────────── */
@media (max-width: 1000px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 230px;
    }
    .gallery-grid.masonry { column-count: 3; }
}

@media (max-width: 720px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    .gallery-grid.masonry { column-count: 2; }

    .g-item.g-wide  { grid-column: span 2; }
    .g-item.g-tall  { grid-row: span 1; }

    .gh-stats { display: none; }

    .lb-content { flex-direction: column; align-items: center; }
    .lb-info { max-width: 90vw; min-width: unset; width: 100%; }
    .lb-img-wrap img { max-width: 92vw; }

    .gf-footer-inner { flex-direction: column; text-align: center; }
    .gallery-filter-wrap { top: 60px; height: auto; padding: 10px 4%; }
    .gf-inner { border-radius: 14px; }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }
    .gallery-grid.masonry { column-count: 1; }
    .g-item.g-wide { grid-column: span 1; }
    .gq-inner { padding: 32px 24px; }
}
