/* Event Recap Gallery Lightbox */

.gallery-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(2, 4, 10, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow-y: auto;
}

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

.gallery-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.gallery-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.75rem;
}

.gallery-kicker {
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #7dd3fc;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gallery-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.gallery-meta {
    margin-top: 0.5rem;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #8b95a6;
    font-weight: 600;
}

.gallery-close,
.gallery-viewer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    cursor: pointer;
    transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
    flex-shrink: 0;
}

.gallery-close:hover,
.gallery-viewer-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(125, 211, 252, 0.55);
    transform: scale(1.05);
}

.gallery-grid {
    column-count: 3;
    column-gap: 0.9rem;
}

@media (max-width: 1024px) {
    .gallery-grid { column-count: 2; }
}

@media (max-width: 640px) {
    .gallery-grid { column-count: 1; }
}

.gallery-cell {
    break-inside: avoid;
    width: 100%;
    margin-bottom: 0.9rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 0.9rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    cursor: zoom-in;
    transition: border-color 220ms ease, transform 220ms ease;
}

.gallery-cell:hover {
    border-color: rgba(56, 189, 248, 0.55);
    transform: translateY(-2px);
}

.gallery-cell img {
    display: block;
    width: 100%;
    height: auto;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #8b95a6;
    padding: 3rem 0;
    font-size: 0.95rem;
}

.gallery-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-count {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #8b95a6;
    font-weight: 700;
}

.gallery-load-more {
    padding: 0.85rem 2.2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 220ms ease, border-color 220ms ease;
}

.gallery-load-more:hover {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.55);
}

.gallery-load-more.hidden {
    display: none;
}

/* Full-image viewer */

.gallery-viewer {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(1, 3, 8, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.5rem;
}

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

.gallery-figure {
    margin: 0;
    max-width: min(1100px, 86vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.gallery-figure img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
}

#gallery-viewer-caption {
    color: #b9c2d0;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
}
