/* ───────────────────────────────────────────────────────────
   Gallery page
     .gallery-page       page background override
     .gallery-header     h1 + lead intro block
     .gallery-year       one section per year
     .gallery-grid       5-col responsive square-thumbnail grid
     .gallery-item       individual figure + hover treatment
   ─────────────────────────────────────────────────────────── */


/* ─── PAGE ──────────────────────────────────────────────── */

.gallery-page {
    background: var(--color-bg-block-grey);
}


/* ─── GLIGHTBOX OVERRIDES ───────────────────────────────── */

.goverlay {
    background: rgba(0, 49, 104, 0.5);
}

.gslide-image img,
.gslide-image,
.gslide-media {
    box-shadow: none !important;
}


/* ─── PAGE HEADER ───────────────────────────────────────── */

.gallery-header {
    padding-bottom: 0;
}

.gallery-header__lead {
    font-size: clamp(16px, 1.4vw, 19px);
    color: var(--color-text-body);
    margin-top: 8px;
    margin-bottom: 0;
}


/* ─── YEAR SECTION ──────────────────────────────────────── */

.gallery-year {
    padding-block: clamp(48px, 6vw, 72px);
}

.gallery-year + .gallery-year {
    padding-top: 0;
}

.gallery-year__title {
    margin-bottom: 24px;
}


/* ─── THUMBNAIL GRID ────────────────────────────────────── */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.gallery-item {
    margin: 0;
    aspect-ratio: 1;
    overflow: hidden;
    background: #cccccc;
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
    text-decoration: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.gallery-item a:hover img,
.gallery-item a:focus-visible img {
    transform: scale(1.05);
    opacity: 0.85;
}


/* ─── RESPONSIVE ────────────────────────────────────────── */

@media (max-width: 860px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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


/* ─── REDUCED MOTION ────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .gallery-item img {
        transition: none;
    }
}
