/* Gallery: photos and YouTube videos use distinct, predictable card layouts. */
.gallery-page { padding-bottom: 72px; }
.gallery-page__header { max-width: 760px; margin: 12px auto 38px; text-align: center; }
.gallery-page__header h1 { margin: 10px 0 14px; color: var(--text); font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; }
.gallery-page__header p { margin: 0; color: var(--text-muted); font-size: 1rem; line-height: 1.7; }
.gallery-page__summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.gallery-page__summary h2 { margin: 0; font-size: 1.35rem; }
.gallery-page__summary p { margin: 0; color: var(--text-muted); font-size: .9rem; }

.gallery-filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.gallery-filter-label { color: var(--text-muted); font-size: .88rem; font-weight: 700; margin-right: 2px; }
.gallery-filter-btn { padding: 8px 15px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text-muted); font-size: .88rem; font-weight: 700; cursor: pointer; transition: .18s ease; }
.gallery-filter-btn:hover { border-color: var(--primary); color: var(--primary); background: rgb(26 43 109 / 5%); }
.gallery-filter-btn.active { border-color: var(--primary); color: #fff; background: var(--primary); box-shadow: 0 3px 10px rgb(26 43 109 / 18%); }

.gallery-media-section { margin-top: 34px; }
.gallery-media-section[hidden] { display: none; }
.gallery-media-section__heading { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--text); font-size: 1.2rem; }
.gallery-media-section__heading i { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: rgb(26 43 109 / 8%); color: var(--primary); font-size: .95rem; }
.gallery-media-section__count { color: var(--text-muted); font-size: .82rem; font-weight: 500; }

.activity-gallery__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.activity-gallery__item { display: flex; flex-direction: column; overflow: hidden; margin: 0; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 4px 16px rgb(15 23 42 / 6%); transition: transform .2s ease, box-shadow .2s ease; }
.activity-gallery__item:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgb(15 23 42 / 12%); }
.activity-gallery__item > a, .activity-gallery__video-wrap { display: block; position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #eef2f6; }
.activity-gallery__item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease, filter .25s ease; }
.activity-gallery__item:hover img { transform: scale(1.04); }
.activity-gallery__item > a:focus-visible, .activity-gallery__video-thumb:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.activity-gallery__item figcaption { padding: 14px 16px 16px; border-top: 1px solid var(--border-light, #f1f5f9); }
.activity-gallery__item h3 { margin: 0; color: var(--text); font-size: .98rem; line-height: 1.4; }
.activity-gallery__item p { display: -webkit-box; margin: 6px 0 0; overflow: hidden; color: var(--text-muted); font-size: .82rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.activity-gallery__item--video { border-color: #e5e7eb; }
.activity-gallery__item--video .activity-gallery__video-wrap { aspect-ratio: 16 / 9; background: #111827; }
.activity-gallery__video-thumb { display: block; position: relative; width: 100%; height: 100%; cursor: pointer; }
.activity-gallery__video-thumb::after { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgb(0 0 0 / 32%)); content: ""; pointer-events: none; }
.activity-gallery__video-thumb:hover img { filter: brightness(.8); }
.activity-gallery__play-btn { position: absolute; z-index: 1; top: 50%; left: 50%; display: grid; width: 60px; height: 44px; place-items: center; transform: translate(-50%, -50%); border-radius: 12px; background: #f00; color: #fff; box-shadow: 0 6px 20px rgb(0 0 0 / 35%); transition: transform .2s ease; }
.activity-gallery__play-btn i { margin-left: 2px; }
.activity-gallery__video-thumb:hover .activity-gallery__play-btn { transform: translate(-50%, -50%) scale(1.08); }
.activity-gallery__video-badge { position: absolute; z-index: 1; top: 12px; left: 12px; border-radius: 999px; padding: 5px 9px; background: rgb(0 0 0 / 68%); color: #fff; font-size: .72rem; font-weight: 700; }
.activity-gallery__video-thumb--playing { cursor: default; }
.activity-gallery__video-thumb--playing::after { display: none; }

/* Video playlist: the first video is shown in a prominent player by default. */
.gallery-video-player { overflow: hidden; margin: 0 0 20px; border: 1px solid var(--border); border-radius: 16px; background: #111827; box-shadow: 0 10px 30px rgb(15 23 42 / 15%); }
.gallery-video-player__frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.gallery-video-player__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery-video-player__caption { padding: 15px 18px 18px; color: #fff; }
.gallery-video-player__caption span { display: inline-flex; align-items: center; gap: 7px; color: #fca5a5; font-size: .78rem; font-weight: 700; }
.gallery-video-player__caption h3 { margin: 6px 0 0; color: inherit; font-size: 1.08rem; }
.activity-gallery__grid--videos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.activity-gallery__video-select { display: block; width: 100%; padding: 0; border: 0; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.activity-gallery__video-copy { display: block; padding: 12px 14px 14px; }
.activity-gallery__video-copy strong { display: -webkit-box; overflow: hidden; color: var(--text); font-size: .92rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.activity-gallery__video-copy small { display: -webkit-box; margin-top: 5px; overflow: hidden; color: var(--text-muted); font-size: .78rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.activity-gallery__item--video.is-selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(26 43 109 / 14%), 0 8px 18px rgb(15 23 42 / 10%); }
.activity-gallery__item--video.is-selected .activity-gallery__video-copy strong { color: var(--primary); }
.activity-gallery__video-select:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }

@media (max-width: 800px) { .activity-gallery__grid, .activity-gallery__grid--videos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 520px) { .gallery-page__summary { display: block; } .gallery-page__summary p { margin-top: 6px; } .gallery-filter-label { width: 100%; } .activity-gallery__grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .activity-gallery__item, .activity-gallery__item img, .activity-gallery__play-btn { transition: none; } .activity-gallery__item:hover { transform: none; } }
