/* Gallery page (gallery.php) */
.gallery-container { width: min(92%, 1180px); margin: 0 auto; }

.gallery-hero { padding: 150px 0 86px; color: #fff; background: linear-gradient(135deg, #061d43, #0b315c 62%, #17854a); }
.gallery-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: #a8f0c6; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.gallery-hero h1 { margin: 18px 0; color: #fff; font-size: clamp(44px, 7vw, 78px); line-height: .98; letter-spacing: -.06em; }
.gallery-hero h1 span { color: #8ee9b2; }
.gallery-hero p { max-width: 580px; margin: 0; color: rgba(255,255,255,.74); font-size: 18px; line-height: 1.75; }

.gallery-section { padding: 76px 0 100px; background: #f6faf8; }
.gallery-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.gallery-photo { display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 20px; background: #e3ece7; box-shadow: 0 16px 40px rgba(6,29,67,.08); }
.gallery-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.gallery-photo:hover img, .gallery-photo:focus-visible img { transform: scale(1.05); }
.gallery-photo:focus-visible { outline: 3px solid #17854a; outline-offset: 3px; }
.gallery-empty { color: #50617a; font-size: 16px; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; }
.gallery-filter { padding: 9px 18px; border: 1px solid rgba(6,29,67,.12); border-radius: 999px; color: #061d43; background: #fff; font-size: 14px; font-weight: 700; text-decoration: none; transition: .2s; }
.gallery-filter:hover { border-color: #17854a; color: #17854a; }
.gallery-filter.is-active { border-color: #17854a; color: #fff; background: #17854a; }
.gallery-group + .gallery-group { margin-top: 56px; }
.gallery-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid rgba(6,29,67,.1); }
.gallery-group-head h2 { margin: 0; color: #061d43; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.03em; }
.gallery-group-head span { color: #50617a; font-size: 14px; font-weight: 700; white-space: nowrap; }

/* Enlarged photo */
.gallery-viewer { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: 0; border: 0; background: rgba(4,15,34,.94); }
.gallery-viewer[open] { display: flex; align-items: center; justify-content: center; }
.gallery-viewer::backdrop { background: rgba(4,15,34,.94); }
.gallery-viewer figure { margin: 0; padding: 0 72px; text-align: center; }
.gallery-viewer img { display: block; max-width: min(1200px, 100%); max-height: 84vh; margin: 0 auto; border-radius: 14px; object-fit: contain; }
.gallery-viewer figcaption { margin-top: 14px; color: rgba(255,255,255,.8); font-size: 15px; }
.gallery-viewer figcaption:empty { display: none; }
.gallery-viewer button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; color: #fff; background: rgba(255,255,255,.12); font-size: 20px; cursor: pointer; transition: background .2s; }
.gallery-viewer button:hover, .gallery-viewer button:focus-visible { background: #17854a; outline: none; }
.gallery-viewer-close { top: 20px; right: 20px; }
.gallery-viewer-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.gallery-viewer-next { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 800px) {
    .gallery-hero { padding: 120px 0 64px; }
    .gallery-section { padding: 48px 0 70px; }
    .gallery-photos { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .gallery-group + .gallery-group { margin-top: 40px; }
    .gallery-photo { border-radius: 14px; }
    .gallery-viewer figure { padding: 0 12px; }
    .gallery-viewer-nav { top: auto; bottom: 24px; transform: none; }
    .gallery-viewer-prev { left: calc(50% - 60px); }
    .gallery-viewer-next { right: calc(50% - 60px); }
}
