/* ==========================================================================
   ST. FRANCIS DE SALES PRE-UNIVERSITY COLLEGE
   gallery.css — Gallery page only (loaded after sfs.css and about.css, which
   supplies the shared inner-page hero). Existing design tokens only; every
   class is prefixed `sfs-gal-`.
   ========================================================================== */
.sfs-gal-sec { background: var(--sfs-paper); }
.sfs-gal-head { margin-bottom: clamp(24px, 3vw, 40px); }
.sfs-gal-kicker { display: inline-flex; align-items: center; gap: 14px; font-size: 0.905rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--sfs-amber-ink); }
.sfs-gal-kicker::before { content: ""; width: 40px; height: 2px; background: var(--sfs-amber); }
.sfs-gal-head h2 { margin-top: 12px; font-family: var(--sfs-display); font-size: clamp(2rem, 3.6vw, 3.2rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; color: #0D306C; }

/* ---- filter pills ---- */
.sfs-gal-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 clamp(28px, 3.4vw, 44px); }
.sfs-gal-filter {
  padding: 11px 22px; border-radius: 999px; border: 1px solid var(--sfs-line); background: var(--sfs-white);
  font: inherit; font-size: .925rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sfs-ink-70); cursor: pointer;
  transition: background-color .3s var(--sfs-ease), color .3s var(--sfs-ease), border-color .3s var(--sfs-ease);
}
.sfs-gal-filter:hover { border-color: #0D306C; color: #0D306C; }
.sfs-gal-filter[aria-pressed="true"] { background: #0D306C; border-color: #0D306C; color: var(--sfs-white); }
.sfs-gal-filter:focus-visible { outline: 3px solid var(--sfs-amber); outline-offset: 2px; }
.sfs-gal-count { margin-left: auto; align-self: center; font-size: .85rem; color: var(--sfs-ink-50); }

/* ---- grid ---- */
.sfs-gal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.sfs-gal-item { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; border: 1px solid var(--sfs-line); background: var(--sfs-line-soft); cursor: zoom-in; }
.sfs-gal-item[hidden] { display: none; }
.sfs-gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--sfs-ease-out); }
.sfs-gal-item:hover img, .sfs-gal-item:focus-visible img { transform: scale(1.07); }
.sfs-gal-item__cap {
  position: absolute; inset: auto 0 0 0; padding: 34px 16px 14px; color: var(--sfs-white);
  background: linear-gradient(0deg, rgba(4, 20, 47, .82), rgba(4, 20, 47, 0));
  font-size: 0.945rem; font-weight: 700; line-height: 1.35;
  opacity: 0; transform: translateY(6px); transition: opacity .3s var(--sfs-ease), transform .3s var(--sfs-ease-out);
}
.sfs-gal-item:hover .sfs-gal-item__cap, .sfs-gal-item:focus-visible .sfs-gal-item__cap { opacity: 1; transform: none; }
.sfs-gal-item:focus-visible { outline: 3px solid var(--sfs-amber); outline-offset: 3px; }
.sfs-gal-item__tag {
  position: absolute; top: 10px; left: 10px; padding: 5px 12px; border-radius: 999px; background: rgba(4, 20, 47, .55);
  color: var(--sfs-gold); font-size: 0.805rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}

@media (max-width: 1100px) { .sfs-gal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sfs-gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .sfs-gal-grid { grid-template-columns: 1fr; }
  .sfs-gal-count { margin-left: 0; flex: 1 1 100%; }
}

/* ---- lightbox (shared visual language with the Associations page) ---- */
.sfs-gal-lb { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; background: rgba(4, 20, 47, .94); }
.sfs-gal-lb[hidden] { display: none; }
.sfs-gal-lb__stage { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 12px; }
.sfs-gal-lb__stage img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.sfs-gal-lb__cap { margin-top: 18px; max-width: 70ch; text-align: center; color: var(--sfs-white); font-weight: 700; }
.sfs-gal-lb__close, .sfs-gal-lb__nav {
  border: 0; cursor: pointer; color: var(--sfs-white); background: rgba(255, 255, 255, .12); border-radius: 50%; line-height: 1;
  transition: background-color .25s var(--sfs-ease);
}
.sfs-gal-lb__close:hover, .sfs-gal-lb__nav:hover { background: rgba(255, 255, 255, .28); }
.sfs-gal-lb__close:focus-visible, .sfs-gal-lb__nav:focus-visible { outline: 3px solid var(--sfs-amber); outline-offset: 2px; }
.sfs-gal-lb__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; font-size: 1.8rem; z-index: 2; }
.sfs-gal-lb__nav { flex: none; position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 1.3rem; z-index: 2; }
.sfs-gal-lb__nav--prev { left: 16px; } .sfs-gal-lb__nav--next { right: 16px; }
.sfs-gal-lb__count { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 0.945rem; font-weight: 700; letter-spacing: .14em; color: rgba(255, 255, 255, .8); }
.sfs-gal-lb__link { display: inline-flex; margin-top: 10px; color: var(--sfs-gold); font-size: 0.905rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; }
