/* ==========================================================
   FSCB 2025 — SCHOLARSHIP RECIPIENTS
   Brand: FSCB green #206269 (year badge, matches .cta_button_green /
   .cta_button_teal), maroon #8C2633 (focus ring).
   Every photo frame shares one aspect ratio (--sch-ratio) and the
   image fills it with object-fit: cover, so all photos render the
   same size no matter what was uploaded.
   All classes prefixed .sch- to avoid site-wide bleed.
   ========================================================== */

.sch-2025 {
  --sch-maroon: #8C2633;
  --sch-teal: #206269;
  --sch-green: #206269; /* site .cta_button_green */
  --sch-text: #26302f;
  --sch-border: #DADADA;
  --sch-font: 'franklin-gothic-std', Arial, sans-serif;
  --sch-gap: 30px;
  --sch-cols: var(--sch-cols-d, 4);
  padding-top: var(--sch-pt, 60px);
  padding-bottom: var(--sch-pb, 60px);
  font-family: var(--sch-font);
  color: var(--sch-text);
}

.sch-2025 *, .sch-2025 *::before, .sch-2025 *::after { box-sizing: border-box; }

.sch-2025__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Section heading = site h2 */
.sch-2025__heading {
  font-family: var(--sch-font);
  font-weight: 600;
  font-size: 32px;
  line-height: 40px;
  color: #000;
  text-align: center;
  margin: 0 0 12px;
}

.sch-2025__intro {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
  font-size: 18px;
  line-height: 28px;
}
.sch-2025__intro p { margin: 0; }

/* ===== Grid (flex so a partial last row stays centered) ===== */
.sch-2025__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--sch-gap);
}

/* Width accounts for the gaps so N columns really fit on one row */
.sch-card {
  flex: 0 0 calc((100% - (var(--sch-cols) - 1) * var(--sch-gap)) / var(--sch-cols));
  max-width: calc((100% - (var(--sch-cols) - 1) * var(--sch-gap)) / var(--sch-cols));
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--sch-border);
  border-radius: 16px;
  overflow: hidden;
}
.sch-card::before { content: none; } /* guard against theme list bullets */

/* ===== Uniform photo frame ===== */
.sch-card__photo {
  position: relative;
  width: 100%;
  aspect-ratio: var(--sch-ratio, 4 / 5);
  background: #E9ECEC;
  color: #9AA3A2;
  overflow: hidden;
}

/* Fallback for browsers without aspect-ratio (older Safari) */
@supports not (aspect-ratio: 1 / 1) {
  .sch-card__photo { height: 0; padding-top: 125%; }
}

.sch-2025 .sch-card__img {
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
  margin: 0;
  border: 0;
}
.sch-2025 .sch-card__img--center { object-position: 50% 50%; }
.sch-2025 .sch-card__img--bottom { object-position: 50% 85%; }

.sch-card__placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 45%;
  height: 45%;
  transform: translate(-50%, -50%);
}

/* ===== Text ===== */
.sch-card__body {
  flex: 1 1 auto;
  padding: 20px 18px 24px;
  text-align: center;
}

.sch-card__year {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--sch-green);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: .04em;
}

.sch-2025 .sch-card__name {
  font-family: var(--sch-font);
  font-weight: 600;
  font-size: 22px;
  line-height: 28px;
  color: #000;
  margin: 0 0 6px;
}

.sch-card__town {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--sch-text);
}
.sch-card__pin {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 4px;
  color: var(--sch-teal);
}

.sch-card__details {
  margin-top: 10px;
  font-size: 15px;
  line-height: 23px;
}
.sch-card__details p { margin: 0 0 6px; }
.sch-card__details p:last-child { margin-bottom: 0; }

/* Links (ADA: underlined, visible focus) */
.sch-2025 a { color: var(--sch-teal); text-decoration: underline; font-weight: 600; }
.sch-2025 a:focus-visible {
  outline: 3px solid var(--sch-maroon);
  outline-offset: 3px;
  border-radius: 4px;
}

.sch-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* =========================
   COLUMNS BY BREAKPOINT
   (matches site: ≤980 tablet, ≤640 mobile)
   ========================= */
@media (max-width: 980px) {
  .sch-2025 { --sch-cols: var(--sch-cols-t, 2); --sch-gap: 24px; }
}

@media (max-width: 640px) {
  .sch-2025 { --sch-cols: var(--sch-cols-m, 2); --sch-gap: 16px; }
  .sch-2025__inner { padding: 0 16px; }
  .sch-2025__heading { font-size: 26px; line-height: 32px; }
  .sch-2025__intro { font-size: 16px; line-height: 25px; margin-bottom: 28px; }
  .sch-card { border-radius: 12px; }
  .sch-card__body { padding: 14px 10px 18px; }
  .sch-card__year { font-size: 13px; padding: 3px 10px; margin-bottom: 8px; }
  .sch-2025 .sch-card__name { font-size: 18px; line-height: 23px; }
  .sch-card__town { font-size: 14px; line-height: 20px; }
  .sch-card__pin { width: 14px; height: 14px; margin-top: 3px; }
}
