/**
 * Montgomery EMS — Cadet applications (TEMPORARY, 2026 season)
 * ─────────────────────────────────────────────────────────────
 * Styles for cadet-program.html and the cadet section on index.html.
 * Plain CSS (not text/tailwindcss) so both pages share one file and the
 * whole feature comes out cleanly after the season. Colors mirror the
 * tokens in js/tailwind-config.js.
 */

/* ══════════════════════════════════════════════════════════════════
   APPLICATION-WINDOW STATES  (state set on <html> by js/cadet.js)
   ══════════════════════════════════════════════════════════════════ */
html[data-cadet-state="before"] [data-cadet-when]:not([data-cadet-when~="before"]),
html[data-cadet-state="open"]   [data-cadet-when]:not([data-cadet-when~="open"]),
html[data-cadet-state="closed"] [data-cadet-when]:not([data-cadet-when~="closed"]),
/* no JS: fall back to the "before" content */
html:not([data-cadet-state])    [data-cadet-when]:not([data-cadet-when~="before"]) {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════════
   SHARED: date tiles (calendar-page look) + status pill
   ══════════════════════════════════════════════════════════════════ */
.cadet-dates {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.85rem;
}
.cadet-date {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: #fff;
  border: 1px solid #d8dde4;
  border-radius: 8px;
  padding: 0.6rem 1.1rem 0.6rem 0.6rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.cadet-date__cal {
  flex-shrink: 0;
  width: 58px;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
  border: 1.5px solid #2b3390;
  font-family: 'K2D', sans-serif;
  line-height: 1;
}
.cadet-date__cal span {
  display: block;
  background: #2b3390;
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0 0.25rem;
}
.cadet-date__cal strong {
  display: block;
  color: #2b3390;
  font-weight: 800;
  font-size: 1.65rem;
  padding: 0.3rem 0 0.35rem;
}
.cadet-date__label {
  font-family: 'K2D', sans-serif;
  line-height: 1.25;
  color: #242424;
}
.cadet-date__label small {
  display: block;
  color: #5a6370;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cadet-date__label b { font-weight: 700; font-size: 1rem; }

.cadet-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'K2D', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3466a8;
  margin-bottom: 0.5rem;
}
.cadet-status--live::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1f9d55;
  box-shadow: 0 0 0 4px rgba(31, 157, 85, 0.18);
}

/* ══════════════════════════════════════════════════════════════════
   HOME PAGE SECTION  (index.html, right after the hero)
   ══════════════════════════════════════════════════════════════════ */
.cadet-home {
  background: #fff;
  border-top: 1px solid #d8dde4;
  padding-block: clamp(3rem, 6vw, 5rem);
}
.cadet-home__grid {
  display: grid;
  grid-template-columns: 56fr 44fr;
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: center;
}
.cadet-home__photo { margin: 0; }
.cadet-home__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(30, 60, 94, 0.18);
}
.cadet-home h2 {
  color: #2b3390;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  margin: 0.15rem 0 1rem;
}
.cadet-home p {
  color: #5a6370;
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.7;
  margin: 0 0 1.5rem;
  max-width: 48ch;
}
.cadet-home .cadet-dates { margin-bottom: 1.75rem; }

/* ══════════════════════════════════════════════════════════════════
   CADET PROGRAM PAGE
   ══════════════════════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────────────────────────── */
.cadet-hero {
  background: #1e3c5e;
  color: #fff;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  position: relative;
  overflow: hidden;
}
/* faint star-of-life watermark, as on members.html */
.cadet-hero::after {
  content: '';
  position: absolute;
  left: -7rem; bottom: -8rem;
  width: 26rem; height: 26rem;
  background: url('../assets/images/Logo.png') center / contain no-repeat;
  opacity: 0.05;
  pointer-events: none;
}
.cadet-hero__grid {
  display: grid;
  grid-template-columns: 45fr 55fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  position: relative;
  z-index: 1;
}
.cadet-hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 0.5rem 0 1.1rem;
}
.cadet-hero__lede {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.7;
  max-width: 46ch;
  margin: 0 0 1.75rem;
}
.cadet-hero .cadet-status { color: #fff; }
.cadet-hero .cadet-dates { margin-bottom: 1.75rem; }
.cadet-hero__photo { margin: 0; }
.cadet-hero__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* ── About + What Cadets Do ────────────────────────────────────────── */
.cadet-about {
  background: #fff;
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.cadet-about__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
}
.cadet-about h2,
.cadet-who h2 {
  color: #2b3390;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.15;
  margin: 0 0 0.25rem;
}
.cadet-about p,
.cadet-who p {
  color: #242424;
  font-size: clamp(0.98rem, 1.3vw, 1.05rem);
  line-height: 1.75;
  margin: 0 0 1rem;
}

/* ── Who we're looking for ─────────────────────────────────────────── */
.cadet-who {
  background: #f5f7fa;
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.cadet-who__grid {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.cadet-who__card {
  background: #fff;
  border: 1px solid #d8dde4;
  border-top: 3px solid #2b3390;
  border-radius: 0 0 8px 8px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.cadet-who__card h3 {
  color: #2b3390;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 1rem;
}
.cadet-who__card .checklist li { line-height: 1.6; }

/* ── Apply ─────────────────────────────────────────────────────────── */
.cadet-apply {
  background: #2b3390;
  color: #fff;
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  text-align: center;
}
.cadet-apply h2 {
  color: #fff;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.1;
  margin: 0.25rem 0 1rem;
}
.cadet-apply p {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.7;
  max-width: 56ch;
  margin: 0 auto 1.5rem;
}
.cadet-apply .cadet-dates { justify-content: center; margin-bottom: 2rem; }
.cadet-apply .cadet-date { box-shadow: none; border-color: transparent; text-align: left; }
.cadet-apply__note {
  font-size: 0.92rem !important;
  color: rgba(255, 255, 255, 0.75) !important;
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.cadet-apply__questions {
  margin-top: clamp(2.5rem, 5vw, 3.5rem) !important;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 40rem !important;
}
.cadet-apply a[data-cadet-email] {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .cadet-home__grid,
  .cadet-hero__grid,
  .cadet-who__grid { grid-template-columns: minmax(0, 1fr); }
  .cadet-hero__photo { max-width: 640px; }
}
@media (max-width: 680px) {
  .cadet-about__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .cadet-dates { flex-direction: column; }
  .cadet-apply .cadet-dates { align-items: center; }
}
