/* ---------- Archive filters ---------- */
.gallery-filters { background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
.gallery-filters__inner { padding-block: 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }

/* ---------- Masonry ---------- */
.gallery { padding-block: 40px 80px; }
.gallery__count { margin-bottom: 24px; font-size: 15px; color: var(--c-muted); }
.gallery__count strong { color: var(--c-text); }
.g-grid { list-style: none; margin: 0; padding: 0; columns: 3 300px; column-gap: 20px; }
.g-item { break-inside: avoid; margin: 0 0 20px; }
.g-tile { display: block; text-decoration: none; color: var(--c-text); }
.g-tile__media { display: flex; align-items: center; justify-content: center; border-radius: 18px; min-height: 200px; }
.g-tile__media > img { position: relative; width: 100%; height: auto; display: block; }
/* Placeholder heights apply only when there is no (working) image, so the masonry still reads as one. */
.g-tile__media > img.is-broken { position: absolute; inset: 0; }
.g-tile__media.is-h0:not(:has(> img:not(.is-broken))) { height: 300px; }
.g-tile__media.is-h1:not(:has(> img:not(.is-broken))) { height: 220px; }
.g-tile__media.is-h2:not(:has(> img:not(.is-broken))) { height: 260px; }
.g-tile__media.is-h3:not(:has(> img:not(.is-broken))) { height: 340px; }
.g-tile__media.is-h4:not(:has(> img:not(.is-broken))) { height: 240px; }
.g-tile__media.is-h5:not(:has(> img:not(.is-broken))) { height: 380px; }
.g-tile__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.g-tile__badge { top: 14px; right: 14px; }
.g-tile:hover .g-tile__media > img { transform: scale(1.03); }
.g-tile__media > img { transition: transform .3s ease; }
.g-tile__caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 4px 0; }
.g-tile__caption strong { font-size: 15px; color: var(--c-green); }
.g-tile__caption .eyebrow { white-space: nowrap; }
.gallery__more { display: flex; justify-content: center; margin-top: 24px; }
.gallery-cta { padding-bottom: var(--section-y); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(4, 26, 13, .92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__close {
  position: absolute; top: 20px; right: 20px; width: 48px; height: 48px; border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; display: flex; align-items: center; justify-content: center;
}
.lightbox__row { display: flex; align-items: center; gap: 20px; width: 100%; max-width: 1100px; }
.lightbox__stage { flex: 1; min-width: 0; aspect-ratio: 16 / 9; border-radius: var(--r-card); position: relative; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }
.lightbox__stage img { width: 100%; height: 100%; object-fit: contain; }
.lightbox__stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox__meta { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; text-align: center; }
.lightbox__meta strong { font-family: var(--f-display); font-size: 22px; }
.lightbox__meta span { font-size: 14px; color: var(--c-on-green); }
.lightbox__meta .btn { margin-top: 6px; }
@media (max-width: 700px) {
  .lightbox { padding: 72px 12px 24px; }
  .lightbox__row { flex-wrap: wrap; justify-content: center; }
  .lightbox__stage { flex-basis: 100%; order: -1; }
}
body.lightbox-open { overflow: hidden; }

/* ---------- Single item ---------- */
.g-head { padding-block: 32px 28px; display: flex; flex-direction: column; gap: 20px; }
.g-head__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.g-head__text { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.g-head__title { font-size: clamp(38px, 5vw, 60px); }
.share { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.share__label { font-size: 14px; font-weight: 600; color: var(--c-muted); }
.share__copy { min-height: 44px; padding: 0 16px; border-width: 1px; border-color: var(--c-line-input); font-size: 14px; }

.viewer { padding-bottom: 56px; display: flex; flex-direction: column; gap: 16px; }
.viewer__stage { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-xl); }
.viewer__slide { position: absolute; inset: 0; margin: 0; }
.viewer__slide img { width: 100%; height: 100%; object-fit: cover; }
.viewer__slide iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.viewer__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .15); }
.viewer__badge { right: 22px; top: 20px; background: rgba(0, 0, 0, .35); }
.viewer__caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 32px 24px 18px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); font-size: 14px; }
.viewer__pos { position: absolute; left: 22px; top: 20px; z-index: 2; background: rgba(255, 255, 255, .9); color: var(--c-green); font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: var(--r-pill); }
.viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.viewer__nav--prev { left: 20px; }
.viewer__nav--next { right: 20px; }
.viewer__thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.viewer__thumb {
  width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r-sm); padding: 0; border: 1px solid var(--c-line); opacity: .8;
  display: flex; align-items: center; justify-content: center;
}
.viewer__thumb img { position: absolute; inset: 0; }
.viewer__thumb .play-btn { position: relative; background: var(--c-gold); color: var(--c-green); }
.viewer__thumb[aria-pressed="true"] { border: 3px solid var(--c-green); box-shadow: 0 0 0 3px var(--c-gold); opacity: 1; }
@media (max-width: 600px) {
  .viewer__stage { border-radius: var(--r-card); }
  .viewer__nav { width: 40px; height: 40px; }
  .viewer__nav--prev { left: 10px; } .viewer__nav--next { right: 10px; }
}

.g-story { padding-bottom: 72px; display: flex; gap: 48px; flex-wrap: wrap; align-items: flex-start; }
.g-story__text { flex: 999 1 560px; min-width: 0; }
.g-story__text h2:first-child { margin-top: 0; }
.g-story__aside { flex: 1 1 340px; max-width: 100%; display: flex; flex-direction: column; gap: 16px; }
.g-story__aside .panel { border-radius: var(--r-lg); }
.details { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; }
.details dt { color: var(--c-muted); }
.details dd { margin: 0; font-weight: 600; }
.donate-card { background: var(--c-green); color: #fff; border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.donate-card .eyebrow { color: var(--c-gold); font-size: 12px; }
.donate-card__title { font-family: var(--f-display); font-size: 26px; line-height: 1.15; }
.donate-card__text { font-size: 15px; line-height: 1.6; color: var(--c-on-green); }
.donate-card__note { font-size: 13px; color: var(--c-on-green); display: flex; gap: 8px; align-items: center; }

.g-pager { padding-bottom: 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.g-pager__link {
  display: flex; gap: 16px; align-items: center; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-card); padding: 16px; text-decoration: none; color: var(--c-text);
}
.g-pager__link:hover { border-color: var(--c-green); color: var(--c-text); }
.g-pager__link--next { justify-content: flex-end; text-align: right; }
.g-pager__link > span:not(.g-pager__thumb) { display: flex; flex-direction: column; gap: 2px; }
.g-pager__link strong { font-size: 16px; color: var(--c-green); }
.g-pager__thumb { width: 96px; height: 64px; flex: none; border-radius: var(--r-input); }
.g-pager__thumb img { position: absolute; inset: 0; }

.g-more { background: var(--c-surface); border-top: 1px solid var(--c-line); }
.g-more__grid { list-style: none; margin: 0; padding: 0; }
.more-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--c-text); }
.more-card__media { height: 200px; border-radius: var(--r-card); display: flex; align-items: center; justify-content: center; }
.more-card__media > img { position: absolute; inset: 0; }
.more-card__kind { position: absolute; top: 14px; left: 14px; z-index: 1; }
.more-card strong { font-family: var(--f-display); font-size: 20px; color: var(--c-green); }
.more-card:hover strong { text-decoration: underline; }
/* YouTube posters are 4:3 with letterbox bars: crop to 16:9. */
.g-tile__media.ph-dark > img, .more-card__media.ph-dark > img { aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Legacy [FinalTilesGallery] inside page content ---------- */
.tiles-gallery { margin-block: 32px; }
.prose .tiles-gallery ul { padding-left: 0; }
.prose .tiles-gallery li + li { margin-top: 0; }
.g-grid--compact { columns: 3 200px; column-gap: 12px; }
.g-grid--compact .g-item { margin-bottom: 12px; }
.g-grid--compact .g-tile__media { border-radius: var(--r-sm); min-height: 140px; }
.g-grid--compact .g-tile__caption strong { font-size: 14px; font-weight: 600; }
.prose .tiles-gallery img { border-radius: 0; }
.tiles-gallery .g-tile:focus-visible { outline-offset: 3px; border-radius: var(--r-sm); }
