/* ============================================================
   GBCA — Greater Bergen Community Action
   Two-theme stylesheet (theme-gbca + theme-headstart)
   Mobile-first, WCAG 2.1 AA, locked brand tokens (system Arial)
   ============================================================ */

:root {
  /* GBCA brand — LOCKED tokens per build spec */
  --gbca-green:        #168747;
  --gbca-green-dark:   #0f6234;
  --gbca-navy:         #1f3c94;
  --gbca-navy-dark:    #18306d;
  --gbca-yellow:       #f5ef73;
  --gbca-blue:         #1f3c94;  /* secondary alias to navy */

  /* Head Start sub-brand */
  --hs-green:          #266040;
  --hs-green-dark:     #1e4e34;
  --hs-coral:          #e75e40;
  --hs-gold:           #fbca74;

  /* Neutrals */
  --text:              #1e2733;
  --text-muted:        #5a6577;
  --bg:                #ffffff;
  --bg-tint:           #faf8f4;
  --bg-tint-deep:      #ede9e3;
  --border:            #d8d3c4;
  --border-strong:     #a4b1bd;
  --error:             #b00020;
  --error-bg:          #fce8e6;
  --success:           #006633;
  --success-bg:        #e6f4ea;
  --focus-ring:        #f5ef73;

  /* Typography — LOCKED per build spec */
  --font-display:      'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  --font-body:         Arial, 'Helvetica Neue', sans-serif;

  /* Layout — three-tier width system. 1440 is the design width.
     Tier 1: prose / reading content        → --max-width-prose (720, 65-75 char/line)
     Tier 2: forms                          → --max-width-form  (960, comfortable for 2-col rows)
     Tier 3: card grids, listing pages      → --max-width       (1200, cards-grid + program detail wide sections)
     Tier 4: site shell (header / footer)   → --max-width-outer (1440, design reference width) */
  --max-width-prose:   720px;
  --max-width-form:    960px;
  --max-width:         1200px;
  --max-width-outer:   1440px;
  --radius:            8px;
  --radius-lg:         12px;
  --radius-pill:       999px;
  --shadow:            0 2px 8px rgba(22, 45, 61, 0.06);
  --shadow-hover:      0 12px 24px rgba(22, 45, 61, 0.12);

  /* Per-theme tokens — re-bound by .theme-* body classes below */
  --brand-primary:       var(--gbca-green);
  --brand-primary-dark:  var(--gbca-green-dark);
  --brand-accent:        var(--gbca-yellow);
  --brand-secondary:     var(--gbca-blue);
  --footer-bg:           var(--gbca-navy);
  --footer-bg-dark:      var(--gbca-navy-dark);
}

body.theme-headstart {
  --brand-primary:       var(--hs-green);
  --brand-primary-dark:  var(--hs-green-dark);
  --brand-accent:        var(--hs-gold);
  --brand-secondary:     var(--hs-coral);
}

/* ============================================================
   Reset / base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0 auto;
  /* Site-wide max width. On ultra-wide monitors the whole page (including
     full-bleed section backgrounds) stops growing at 1440px and the
     browser paints its own background around it — the letterbox bars.
     Set the surrounding bar colour on <html>, not on body, so bands
     inside body keep their own paper/bone/ink backgrounds. */
  max-width: var(--max-width-outer);
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html { background: var(--bg); }

img, video, svg { max-width: 100%; height: auto; display: block; }
.hero-media, .card-image, .center-card__media img,
.program-overview img, .county-map-banner img,
.program-related__card img {
  border-radius: 12px;
}
.hero-media, .program-overview img, .county-map-banner img,
.center-card__media img {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.hero-media { border-radius: 0; box-shadow: none; } /* full-bleed hero stays edge-to-edge */
.card-image { border-radius: 0; }
.program-related__card img { border-radius: 0; }
/* Eligibility actions row — side-by-side on desktop, stacked on mobile */
.eligibility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 32px 0 24px;
  align-items: center;
}
@media (max-width: 767px) {
  .eligibility-actions { flex-direction: column; gap: 12px; align-items: stretch; }
  .eligibility-actions .btn { width: 100%; }
}
#eligibility-details:not([hidden]) {
  animation: details-fade-in 0.3s ease;
}
@keyframes details-fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Focus + skip link (AA)
   ============================================================ */

*:focus { outline: none; }
*:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--gbca-navy);
}

.skip-link {
  position: absolute;
  left: -10000px;
  top: 0;
  background: var(--brand-primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  text-decoration: none;
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; top: 0; }

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 0.5em 0;
  color: var(--gbca-navy);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; }
p  { margin: 0 0 1.5em 0; }
p:last-child { margin-bottom: 0; }

.lead { font-size: 1.25rem; line-height: 1.55; color: var(--text-muted); }

a { color: var(--brand-primary-dark); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--gbca-navy); text-decoration-thickness: 2.5px; }

/* Eyebrow / pretitle */
.eyebrow {
  display: inline-block;
  color: var(--gbca-green-dark);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.hero .eyebrow { color: var(--brand-accent); }

/* ============================================================
   Layout primitives
   ============================================================ */

.container {
  max-width: var(--max-width);          /* 1200 — card grids, listing pages, wide content */
  margin: 0 auto;
  padding: 0 24px;
}
.container-form {
  max-width: var(--max-width-form);     /* 960 — forms (contact, apply, inline lead) */
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: var(--max-width-prose);    /* 720 — body prose, mission, overview, eligibility, etc. */
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 64px 0;
}
@media (min-width: 768px) {
  .section { padding: 96px 0; }
}
.section-alt {
  background: var(--bg-tint);
  border-top: 1px solid #ede9e3;
  border-bottom: 1px solid #ede9e3;
}
.section-dark { background: var(--footer-bg); color: #fff; }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }

.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

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

/* ============================================================
   Buttons (pill, uppercase, branded)
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--brand-primary);
  color: #fff !important;
  border: 2px solid var(--brand-primary);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.95rem;
  min-height: 48px;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(22, 135, 71, 0.18);
}
.btn:hover {
  background: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 135, 71, 0.3);
}
.btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
.btn::after {
  content: "→";
  font-size: 1.1em;
  transition: transform .15s;
}
.btn:hover::after { transform: translateX(4px); }

.btn-secondary {
  background: transparent;
  color: var(--brand-primary) !important;
}
.btn-secondary:hover {
  background: var(--brand-primary);
  color: #fff !important;
}

.btn-on-dark {
  background: #fff;
  color: var(--brand-primary) !important;
  border-color: #fff;
}
.btn-on-dark:hover {
  background: var(--brand-accent);
  color: var(--text) !important;
  border-color: var(--brand-accent);
}

.btn-plain::after { content: none; }

/* ============================================================
   Header / nav
   ============================================================ */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(22,45,61,.04);
}
.header-inner {
  max-width: var(--max-width-outer);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.15;
}
.logo img { height: 56px; width: auto; }
@media (min-width: 1024px) { .logo img { height: 80px; } }
.logo span { display: inline-block; font-size: 1.05rem; line-height: 1.15; }
@media (min-width: 1024px) { .logo span { font-size: 1.2rem; } }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 2px solid var(--brand-primary);
  padding: 10px 12px;
  cursor: pointer;
  border-radius: var(--radius);
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--brand-primary);
  border-radius: 2px;
}

.main-nav { display: none; }
.main-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.main-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
}
.main-nav li { border-bottom: 1px solid var(--border); }
.main-nav li:last-child { border-bottom: none; }
.main-nav a {
  display: block;
  padding: 16px 24px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 44px;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--bg-tint);
  color: var(--brand-primary);
}

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .main-nav,
  .main-nav.is-open {
    display: block;
    position: static;
    background: transparent;
    box-shadow: none;
    border-bottom: none;
  }
  .main-nav ul {
    flex-direction: row;
    gap: 4px;
    align-items: center;
  }
  .main-nav li { border-bottom: none; }
  .main-nav a {
    padding: 10px 16px;
    border-radius: var(--radius);
    min-height: auto;
  }
  .main-nav a[aria-current="page"] {
    background: transparent;
    color: var(--brand-primary);
    box-shadow: inset 0 -3px 0 var(--brand-primary);
    border-radius: 0;
  }
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gbca-navy) 0%, #2d4ea8 100%);
  color: #fff;
}
@media (min-width: 768px) {
  .hero { min-height: clamp(520px, 65vh, 720px); }
}
.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 80%, rgba(255,255,255,0.06) 0%, transparent 40%),
    linear-gradient(180deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.55) 100%);
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
  animation: hero-fade-in 0.4s ease;
}
@media (min-width: 768px) {
  .hero-content { padding: 120px 24px; }
}
@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .eyebrow { color: var(--gbca-yellow); }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255,255,255,0.9); }
.hero h1 {
  color: #fff;
  max-width: 16ch;
  margin-bottom: 16px;
}
.hero p {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 56ch;
  margin-bottom: 24px;
  color: rgba(255,255,255,0.95);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.hero-actions-center { justify-content: center; }

/* Breadcrumb inside hero */
.hero-crumbs {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.85);
}
.hero-crumbs a { color: rgba(255,255,255,0.85); text-decoration: underline; }
.hero-crumbs a:hover { color: #fff; }
.hero-crumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.6; }

/* ============================================================
   Cards (used for category grid + program grid + center cards)
   ============================================================ */

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}
@media (min-width: 768px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.cards-grid-5 { /* category cards on home — 5-up at very wide */ }
@media (min-width: 1200px) {
  .cards-grid-5 { grid-template-columns: repeat(5, 1fr); }
}

.card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(31, 60, 148, 0.04), 0 4px 12px rgba(31, 60, 148, 0.06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover, .card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 1px 3px rgba(31, 60, 148, 0.04), 0 8px 24px rgba(31, 60, 148, 0.12);
  border-color: var(--gbca-green);
}
.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-tint);
}
.card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-body h3 {
  color: var(--text);
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.card-body p { color: var(--text-muted); font-size: 0.95rem; }
.card .card-link {
  margin-top: auto;
  padding-top: 12px;
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Text-only category card variant (home page) — top accent + icon */
.card-text-only {
  position: relative;
  border-top: 4px solid var(--gbca-green);
}
.card-text-only h3 {
  color: var(--gbca-green-dark);
  font-size: 1.25rem;
}
.card-text-only .card-body { display: flex; flex-direction: column; }
.card-icon { display: block; margin-bottom: 16px; color: var(--gbca-green); }
.card-explore { margin-top: auto; padding-top: 12px; color: var(--gbca-green); font-family: var(--font-display); font-weight: 900; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.card-explore .arrow { display: inline-block; transition: transform .2s ease; }
.card:hover .card-explore .arrow { transform: translateX(4px); }

/* Rotating accent colors */
.card-accent--green  { border-top-color: var(--gbca-green);  }
.card-accent--green  .card-icon, .card-accent--green  h3, .card-accent--green  .card-explore { color: var(--gbca-green-dark); }
.card-accent--yellow { border-top-color: var(--gbca-yellow); }
/* Yellow on white fails contrast at brand tone; use a darker mustard for icon/text. */
.card-accent--yellow .card-icon, .card-accent--yellow h3, .card-accent--yellow .card-explore { color: #6e6307; }
.card-accent--navy   { border-top-color: var(--gbca-navy);   }
.card-accent--navy   .card-icon, .card-accent--navy   h3, .card-accent--navy   .card-explore { color: var(--gbca-navy); }

/* ============================================================
   Accordion (native details)
   ============================================================ */

details.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: #fff;
}
details.accordion[open] { border-color: var(--brand-primary); }
details.accordion summary {
  padding: 18px 22px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}
details.accordion summary::-webkit-details-marker { display: none; }
details.accordion summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--brand-primary);
  font-weight: 400;
  margin-left: 12px;
}
details.accordion[open] summary::after { content: "−"; }
details.accordion summary:hover { background: var(--bg-tint); }
details.accordion summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -3px;
}
details.accordion .accordion-body { padding: 0 22px 22px; }
details.accordion .accordion-body p:last-child { margin-bottom: 0; }
details.accordion .accordion-body ul,
details.accordion .accordion-body ol { padding-left: 1.25em; }

/* ============================================================
   Forms
   ============================================================ */

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.form-group label .required { color: var(--error); }
.form-control {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  min-height: 44px;
  font-family: inherit;
}
.form-control:hover { border-color: var(--border-strong); }
.form-control:focus-visible {
  border-color: var(--brand-primary);
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}
textarea.form-control { min-height: 140px; resize: vertical; }
.form-error { color: var(--error); font-size: 0.9rem; margin-top: 4px; }
.form-status {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-top: 18px;
  font-weight: 500;
}
.form-status.success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}
.form-status.error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error);
}

/* ─── Native form (accessibility-audited) ─── */
.native-form { max-width: 760px; margin: 0 auto; }
.native-form .form-intro {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 24px;
}
.native-form .form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px 8px;
  margin: 0 0 22px;
  background: #fff;
}
@media (max-width: 767px) { .native-form .form-section { padding: 14px 14px 4px; } }
.native-form .form-section__legend {
  font-family: var(--font-display);
  color: var(--gbca-navy);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  padding: 0 8px;
  margin-left: -8px;
}
.native-form .form-help {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: -4px 0 12px;
}
.native-form .step-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 18px;
}
@media (min-width: 768px) {
  .native-form .step-row { grid-template-columns: 1fr 1fr; }
  .native-form .step-row > .form-group:not(.step-col--2col-1):not(.step-col--2col-2) {
    grid-column: 1 / -1;
  }
}
.native-form .step-col--2col-1 { grid-column: auto; }
.native-form .step-col--2col-2 { grid-column: auto; }

.native-form fieldset.form-group--radio,
.native-form fieldset.form-group--checkbox-group {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  grid-column: 1 / -1;
}
.native-form fieldset.form-group--radio legend,
.native-form fieldset.form-group--checkbox-group legend {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--text);
}
.native-form .radio-group,
.native-form .checkbox-group {
  display: grid;
  gap: 8px;
}
.native-form .radio-option,
.native-form .checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-tint);
  cursor: pointer;
  min-height: 44px;
  font-weight: 500;
}
.native-form .radio-option input,
.native-form .checkbox-option input {
  width: 20px; height: 20px;
  accent-color: var(--brand-primary);
  flex-shrink: 0;
  cursor: pointer;
}
.native-form .radio-option:hover,
.native-form .checkbox-option:hover {
  background: #fff;
  border-color: var(--brand-primary);
}
.native-form .radio-option:focus-within,
.native-form .checkbox-option:focus-within {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}
.native-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
}
.native-form .form-actions .btn {
  min-width: 160px;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .native-form .form-actions .btn { width: 100%; }
}
.native-form .form-status { margin-top: 0; flex: 1 1 280px; }

/* ─── Google Places legacy Autocomplete dropdown ───
   The .pac-* class names are owned by Google's Places library; their dropdown
   is appended to <body>, NOT to our form, so the styling lives at the global
   level. Light-mode skin matching the rest of the form. */
.pac-container {
  font-family: var(--font-body);
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  margin-top: 4px;
  z-index: 9999;
}
.pac-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
  border-top: 1px solid var(--border);
  min-height: 44px;
  line-height: 1.4;
}
.pac-item:first-child { border-top: 0; }
.pac-item:hover,
.pac-item-selected {
  background: var(--bg-tint);
}
.pac-icon {
  margin-right: 8px;
  flex-shrink: 0;
}
.pac-item-query {
  color: var(--gbca-navy);
  font-weight: 700;
  font-size: 1rem;
}
.pac-matched { font-weight: 700; }
/* Hide the Google logo at the bottom on narrow screens — it stays at the
   bottom of the dropdown on desktop. */
@media (max-width: 480px) {
  .hdpi.pac-logo:after, .pac-logo:after {
    background-position: 99% center !important;
  }
}

/* ============================================================
   Two-column layouts (contact, sidebar)
   ============================================================ */

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 1024px) {
  .two-col { grid-template-columns: 2fr 1fr; gap: 56px; }
}

/* Side-by-side image + prose block (e.g. program Overview).
   Stacks on mobile; equal columns from 900px. Image stays inside the column. */
.media-text {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
@media (min-width: 1024px) {
  .media-text { grid-template-columns: 1fr 1fr; gap: 56px; }
}
.media-text img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
}
.media-text .rich-content > :first-child { margin-top: 0; }

/* ============================================================
   Testimonials
   ============================================================ */

.testimonial {
  background: #fff;
  border-left: 5px solid var(--brand-primary);
  padding: 24px 28px;
  margin: 16px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}
.testimonial blockquote {
  margin: 0 0 12px;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.55;
}
.testimonial cite {
  display: block;
  font-weight: 700;
  font-style: normal;
  color: var(--brand-primary-dark);
  font-size: 0.95rem;
}

/* ============================================================
   Stats grid (Head Start impact)
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(6, 1fr); } }
.stat {
  text-align: center;
  padding: 28px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-num {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1;
  margin-bottom: 8px;
}
.stat p {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ============================================================
   Phone CTA banner (program detail option)
   ============================================================ */

.phone-cta {
  background: var(--brand-accent);
  color: var(--text);
  text-align: center;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 1.05rem;
}
.phone-cta a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   Center / location card (used on headstart-center page)
   Image-left / info-right at >=720px, stacks below.
   ============================================================ */

.center-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .center-card { grid-template-columns: minmax(220px, 320px) 1fr; }
}
.center-card__media {
  background: var(--bg-tint);
  aspect-ratio: 4 / 3;
}
.center-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.center-card__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.center-card__body { padding: 24px 28px; }
.center-card__body h3 {
  color: var(--brand-primary);
  margin-bottom: 12px;
  font-size: 1.25rem;
}
.center-card__body dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0 0 16px;
}
.center-card__body dt {
  font-family: var(--font-display);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.center-card__body dd { margin: 0; }
.center-amenities {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}
@media (min-width: 768px) { .center-amenities { grid-template-columns: repeat(3, 1fr); } }
.center-amenities li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  list-style: none;
}
.center-amenities li::before {
  content: "✓";
  color: var(--brand-primary);
  font-family: var(--font-display);
  font-weight: 900;
}
.center-amenities-empty {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-tint);
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

/* County hero map banner */
.county-map-banner {
  background: var(--bg-tint);
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.county-map-banner img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
}

/* ============================================================
   1-2-3 stepped inline form (program pages)
   ============================================================ */

.step-form {
  max-width: 640px;
  margin: 0 auto;
}
.form-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px 18px;
  margin-bottom: 36px;
  align-items: start;
}
.step-num {
  width: 44px;
  height: 44px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  line-height: 1;
  grid-column: 1;
  grid-row: 1;
}
.step-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0;
  align-self: center;
  grid-column: 2;
  grid-row: 1;
}
.step-body {
  grid-column: 1 / -1;
}
@media (min-width: 768px) {
  .step-body { grid-column: 2; }
}
.step-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .step-row--2col { grid-template-columns: 1fr 1fr; }
}
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 8px 0;
}
.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
}
.radio-group input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}
.step-submit {
  text-align: center;
  margin-top: 8px;
}

/* ============================================================
   Footer — unified structure
   ============================================================ */

.footer-row,
.footer-upper,
.footer-lower {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}
.footer-upper { padding-top: 8px; padding-bottom: 32px; border-bottom: none; margin-bottom: 0; }
@media (min-width: 768px) {
  .footer-row { grid-template-columns: repeat(2, 1fr); }
  .footer-upper { grid-template-columns: repeat(2, 1fr); }
  .footer-lower { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  /* 4-section: brand block (fixed) + GBCA HQ + Quick Links + Top Programs. */
  .footer-row   { grid-template-columns: 320px 1fr 1fr 1fr; gap: 48px; align-items: start; }
  .footer-upper { grid-template-columns: 1fr 1fr 1fr 1.3fr; }
  .footer-lower { grid-template-columns: 1fr 1fr 1.2fr; }
}

/* Section 1: GBCA brand mark (already has "Lives Changed Here" baked into the image) */
.footer-brand {
  display: flex;
  align-items: center;
}
.footer-brand-mark {
  width: 220px;
  height: auto;
  flex-shrink: 0;
  display: block;
}
@media (min-width: 1024px) {
  .footer-brand-mark { width: 280px; }
}
/* HS variant: combined image only */
.footer-brand--single img {
  max-width: 240px;
  width: 100%;
  height: auto;
  display: block;
}
@media (min-width: 1024px) {
  .footer-brand--single img { max-width: 320px; }
}
@media (max-width: 1023px) {
  .footer-brand { justify-content: center; }
  .footer-brand--single { display: flex; justify-content: center; }
}
.footer-col h3 {
  font-family: var(--font-display);
  color: var(--gbca-navy);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.footer-col p { color: var(--text); margin: 0 0 6px; line-height: 1.5; }
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col li { line-height: 1.4; }

.footer-bottom-strip {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-bottom-strip a { color: var(--text-muted); }
.footer-bottom-strip a:hover, .footer-bottom-strip a:focus-visible {
  color: var(--gbca-green);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: #ffffff;
  color: var(--text);
  padding: 56px 0 40px;
  margin-top: 64px;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 10px;
  background: var(--gbca-green);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) { .footer-inner { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-inner { grid-template-columns: repeat(4, 1fr); } }

.site-footer a {
  color: var(--text);
  text-decoration: none;
}
.site-footer a:hover, .site-footer a:focus-visible {
  color: var(--gbca-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Legacy navy-era leftover, kept only so old class isn't undefined */
.footer-bottom {
  display: none;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
}

.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row !important;
  gap: 12px;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  font-weight: 700;
}
.social-links a:hover, .social-links a:focus-visible {
  background: var(--gbca-yellow);
  color: var(--text);
  border-color: var(--gbca-yellow);
  text-decoration: none;
}

/* ============================================================
   Loading / error states
   ============================================================ */

.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  background: var(--bg-tint);
  border-radius: var(--radius);
}

/* ============================================================
   Mission / lead block
   ============================================================ */

.mission {
  text-align: center;
}
.mission p { font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.6; }

/* ============================================================
   Rich content (HTML coming from DB MainBody / EligibilityList etc.)
   ============================================================ */

.rich-content > * + * { margin-top: 1em; }
.rich-content ul, .rich-content ol { padding-left: 1.25em; }
.rich-content li + li { margin-top: 0.25em; }
.rich-content h2 { margin-top: 1.5em; font-size: 1.5rem; }
.rich-content h3 { margin-top: 1.25em; }
.rich-content a { color: var(--brand-primary-dark); }

/* Rich-content tables (inserted by staff via the quill-table-better
   editor plugin in /admin). Design defaults: full-width of the
   content container, equal-width columns via table-layout:fixed,
   left-aligned top-aligned 1rem-padded cells, no visible borders
   (authors add borders via the plugin cell menu -- rendered via
   inline styles which safeHtml preserves).

   Why !important on every width: the plugin saves inline
   <table style="width: 85.22%"> and per-cell
   <td width="20.37%" style="width: 20.37%"> from the author's
   drag-resize handles in the editor. Without !important those
   inline widths would win and give uneven / offset columns on the
   public page. Forcing width:100% + table-layout:fixed + td width:
   auto overrides the drag-resize state and yields perfectly equal
   columns regardless of what the author did in the editor.

   On phones (<768px) table / thead / tbody / tr / td all become
   blocks so cells stack full-width; td gets margin-bottom for
   card-like separation. */
.rich-content table,
.band table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse;
  margin: 1em 0;
  /* On preview/program.html the LocationsList is injected into
     #locations-list.locations which is `display: grid;
     grid-template-columns: 1fr 1fr` (two-up card grid). Without
     grid-column: 1 / -1 a table would land in a single track and
     max out at ~490 px on a 980 px section. This span-all directive
     is a no-op on non-grid parents (public program.html's
     .rich-content wrapper is a block, so this line does nothing
     there) so it's safe to include unconditionally. */
  grid-column: 1 / -1;
}
.rich-content table td, .rich-content table th,
.band table td, .band table th {
  width: auto !important;
  text-align: left;
  vertical-align: top;
  padding: 0.75rem;
  word-wrap: break-word;
}
.rich-content table colgroup col,
.band table colgroup col { width: auto !important; }
.rich-content table th,
.band table th { font-weight: 600; }
@media (max-width: 767px) {
  .rich-content table, .rich-content table thead, .rich-content table tbody, .rich-content table tr, .rich-content table td,
  .band table, .band table thead, .band table tbody, .band table tr, .band table td {
    display: block !important;
    width: 100% !important;
  }
  .rich-content table td,
  .band table td {
    margin-bottom: 1rem;
    padding: 0.75rem 0;
  }
  .rich-content table colgroup, .rich-content table col,
  .band table colgroup, .band table col { display: none !important; }
}

/* ============================================================
   Program detail — locked class taxonomy
   ============================================================ */

.program-hero { /* alias of .hero used by program detail */ }

.program-section {
  padding: 56px 0;
}
@media (min-width: 768px) {
  .program-section { padding: 80px 0; }
}
.program-section--alt { background: var(--bg-tint); }

.program-overview .media-text {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
@media (min-width: 1024px) {
  .program-overview .media-text { grid-template-columns: 1.2fr 1fr; gap: 56px; }
}
.program-overview img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
}
/* Wrap layout: image floats to the right; prose flows around and
   continues underneath once it clears the image (classic magazine
   text-wrap). The parent .program-overview--wrap clears the float so
   following sections don't collide. On mobile the float is dropped
   and the image stacks above the prose (floats don't help in a narrow
   column). */
.program-overview__image--wrap {
  width: 100%;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .program-overview__image--wrap {
    float: right;
    width: 45%;
    max-width: 520px;
    margin: 0 0 24px 32px;
  }
}
.program-overview--wrap::after {
  content: "";
  display: block;
  clear: both;
}

/* ============================================================
   Per-section media (2026-07-24)
   ------------------------------------------------------------
   Every content section on the Program page can carry one media
   slot (image or video) via a <figure class="section-media"> that
   the renderer inserts inside the section container. Layout +
   size are set as modifier classes:
     .section-media--top-left      float left (text wraps right, then under)
     .section-media--top-right     float right (text wraps left, then under)
     .section-media--bottom-left   after text, aligned left
     .section-media--bottom-right  after text, aligned right
     .section-media--size-small    ~25% width, max 300px
     .section-media--size-medium   ~40% width, max 480px  (default)
     .section-media--size-large    ~60% width, max 720px
     .section-media--size-full     100% width (stacks above text; no float)
   The .program-section that wraps the media gets .program-section--has-media
   so ::after can clear any floats without touching other sections.
   Mobile (<768px) always collapses to full-width stacked -- floats
   don't work well in a narrow column.
   ============================================================ */
.section-media {
  margin: 0 0 24px 0;
  padding: 0;
}
.section-media img,
.section-media video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  object-fit: cover;
}
.section-media__caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}
/* Default sizes at mobile: everything full-width stacked. */
.section-media--size-small,
.section-media--size-medium,
.section-media--size-large,
.section-media--size-full {
  width: 100%;
  max-width: none;
  float: none;
  margin: 0 0 24px 0;
}
@media (min-width: 768px) {
  /* Sizes at desktop */
  .section-media--size-small  { width: 25%; max-width: 300px; }
  .section-media--size-medium { width: 40%; max-width: 480px; }
  .section-media--size-large  { width: 60%; max-width: 720px; }
  .section-media--size-full   { width: 100%; max-width: none; }
  /* Layouts at desktop — 40px buffer around the media so text doesn't
     hug the image edge; 32px looked cramped in QA. */
  .section-media--top-right {
    float: right;
    margin: 0 0 32px 40px;
  }
  .section-media--top-left {
    float: left;
    margin: 0 40px 32px 0;
  }
  .section-media--bottom-right {
    float: none;
    margin: 32px 0 0 auto;   /* right-aligned block */
  }
  .section-media--bottom-left {
    float: none;
    margin: 32px auto 0 0;   /* left-aligned block */
  }
  /* Full size forces block layout regardless of layout picker -- a
     full-width float would just fill the row and defeat the wrap. */
  .section-media--size-full {
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
/* Clear floats at the end of the section container so following
   sections don't collide with a still-floating media element. */
.program-section--has-media::after,
.band--has-media::after {
  content: "";
  display: block;
  clear: both;
}

/* Eligibility — green checkmark bullets */
.program-eligibility ul,
.program-eligibility .rich-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.program-eligibility li,
.program-eligibility .rich-content li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 12px;
  line-height: 1.55;
}
.program-eligibility li::before,
.program-eligibility .rich-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 22px;
  height: 22px;
  background-color: var(--gbca-green);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' fill='black'/></svg>") no-repeat center / 22px 22px;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' fill='black'/></svg>") no-repeat center / 22px 22px;
}

/* Cost callout — yellow tinted pull-quote */
.program-callout {
  background: #fefdf2;
  border-left: 4px solid var(--gbca-yellow);
}
.program-callout .eyebrow { color: var(--gbca-navy-dark); }
.program-callout h2 { color: var(--gbca-navy); }

/* Documentation — numbered checklist (small green circles) */
.program-checklist ol,
.program-checklist .rich-content ol {
  counter-reset: doc-step;
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.program-checklist li,
.program-checklist .rich-content li {
  counter-increment: doc-step;
  position: relative;
  padding-left: 48px;
  margin-bottom: 14px;
  min-height: 32px;
  line-height: 1.55;
}
.program-checklist li::before,
.program-checklist .rich-content li::before {
  content: counter(doc-step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 32px;
  height: 32px;
  background: var(--gbca-green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.95rem;
}

/* Locations — grid of address blocks */
.program-locations {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 8px;
}
@media (min-width: 768px) { .program-locations { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .program-locations { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.program-locations__block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.program-locations__block p { margin: 0 0 8px; }
.program-locations__block p:last-child { margin: 0; }
.program-locations__block strong {
  display: block;
  font-family: var(--font-display);
  color: var(--gbca-green-dark);
  margin-bottom: 4px;
  font-size: 1.05rem;
}

/* When LocationsList contains prose paragraphs (rather than a structured locations list), render with the same card-grid feel */
.program-locations--prose {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.program-locations--prose strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  color: var(--gbca-green-dark);
  font-size: 1.05rem;
  margin-top: 16px;
}
.program-locations--prose strong::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-color: var(--gbca-green);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>") no-repeat center / 18px 18px;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>") no-repeat center / 18px 18px;
}
.program-locations--prose strong:first-child { margin-top: 0; }
.program-locations--prose p { margin: 0 0 4px; padding-left: 26px; }

/* Primary CTA band (phone + apply) */
.program-cta {
  background: var(--gbca-green);
  color: #fff;
}
.program-cta h2,
.program-cta .eyebrow,
.program-cta .lead,
.program-cta p,
.program-cta strong { color: #fff; }
.program-cta a:not(.btn) { color: #fff; text-decoration: underline; }
.program-cta .btn {
  background: #fff;
  color: var(--gbca-green) !important;
  border-color: #fff;
}
.program-cta .btn:hover {
  background: var(--gbca-yellow);
  color: var(--text) !important;
  border-color: var(--gbca-yellow);
}
.program-cta .btn-secondary {
  background: transparent;
  color: #fff !important;
  border-color: #fff;
}
.program-cta .btn-secondary:hover {
  background: #fff;
  color: var(--gbca-green) !important;
}

/* Application download */
.program-application {
  text-align: center;
}

/* Related programs grid */
.program-related {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}
@media (min-width: 768px) { .program-related { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .program-related { grid-template-columns: repeat(3, 1fr); } }

.program-related__card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.program-related__card:hover, .program-related__card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand-primary);
}
.program-related__card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-tint);
}
.program-related__card-body { padding: 20px 24px; flex: 1; display: flex; flex-direction: column; }
.program-related__card h3 { margin-bottom: 6px; font-size: 1.125rem; }
.program-related__card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 12px; }
.program-related__card .card-link {
  margin-top: auto;
  color: var(--brand-primary);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* HS county footer cards (used in Head Start footer) */
.hs-footer-counties {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (min-width: 768px) { .hs-footer-counties { grid-template-columns: repeat(3, 1fr); } }
.hs-footer-county {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.hs-footer-county h4 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.hs-footer-county a {
  color: var(--gbca-yellow);
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-decoration: none;
}
.hs-footer-county a:hover, .hs-footer-county a:focus-visible { text-decoration: underline; }

/* ============================================================
   Print
   ============================================================ */

@media print {
  .site-header, .site-footer, .hero-actions, .nav-toggle, .gbca-chat { display: none; }
  .hero { min-height: auto; color: var(--text); background: #fff; }
  .hero::after { display: none; }
  .hero h1, .hero p { color: var(--text); }
  a { color: var(--text); text-decoration: underline; }
}

/* ============================================================
   "Find Help" chat widget — global, all public pages.
   Internal staging (not public yet). Vanilla, no deps. Injected
   by renderChatWidget() in js/app.js; excluded on /admin + 404.
   ============================================================ */
.gbca-chat, .gbca-chat * { box-sizing: border-box; }

/* ── Closed state: floating action button ── */
.gbca-chat__fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--brand-primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hover);
  z-index: 1000;
  transition: background-color .15s, transform .15s;
}
.gbca-chat__fab:hover { background: var(--brand-primary-dark); transform: translateY(-2px); }
.gbca-chat__fab:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.gbca-chat__fab svg { width: 28px; height: 28px; }
.gbca-chat__fab-tip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--gbca-navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius);
}

/* Attention-bounce modifier: 3 hops at decreasing height. JS adds the
   class and removes it on animationend, so the bubble settles at
   translateY(0) with no fallback snap. Suppressed under reduced motion. */
.gbca-chat__fab--bounce { animation: gbca-chat-fab-bounce 1.4s ease-in-out 1; }
@keyframes gbca-chat-fab-bounce {
  0%, 30%, 60%, 90%, 100% { transform: translateY(0); }
  15%                     { transform: translateY(-12px); }
  45%                     { transform: translateY(-8px); }
  75%                     { transform: translateY(-5px); }
}

.gbca-chat__fab[hidden], .gbca-chat__panel[hidden],
.gbca-chat__disclaimer[hidden], .gbca-chat__body[hidden],
.gbca-chat__typing[hidden] { display: none; }

/* ── Open state: chat panel ── */
.gbca-chat__panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 400px;
  max-width: calc(100vw - 40px);
  height: 600px;
  max-height: calc(100vh - 40px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gbca-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 14px 20px;
  background: var(--brand-primary);
  color: #fff;
  flex: none;
}
.gbca-chat__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
}
.gbca-chat__close {
  flex: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}
.gbca-chat__close:hover { background: rgba(255, 255, 255, 0.18); }
.gbca-chat__close:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* ── Pre-chat disclaimer ── */
.gbca-chat__disclaimer {
  padding: 20px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}
.gbca-chat__disclaimer p { margin: 0 0 18px; }

/* ── Body: messages + input + handoff ── */
.gbca-chat__body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.gbca-chat__messages {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gbca-chat__msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.gbca-chat__msg--bot {
  align-self: flex-start;
  background: var(--bg-tint-deep);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.gbca-chat__msg--user {
  align-self: flex-end;
  background: var(--brand-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.gbca-chat__typing { align-self: flex-start; display: flex; gap: 5px; padding: 12px 14px; }
.gbca-chat__typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: gbca-chat-bounce 1.2s infinite ease-in-out;
}
.gbca-chat__typing span:nth-child(2) { animation-delay: .15s; }
.gbca-chat__typing span:nth-child(3) { animation-delay: .30s; }
@keyframes gbca-chat-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ── Input ── */
.gbca-chat__input-wrap { border-top: 1px solid var(--border); padding: 12px; flex: none; }
.gbca-chat__input-row { display: flex; gap: 8px; align-items: flex-end; }
.gbca-chat__textarea {
  flex: 1 1 auto;
  resize: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: #fff;
  min-height: 44px;
  max-height: 120px;
}
.gbca-chat__textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--brand-primary);
}
.gbca-chat__send, .gbca-chat__start {
  flex: none;
  min-height: 44px;
  border: none;
  border-radius: var(--radius);
  background: var(--brand-primary);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
}
.gbca-chat__send { padding: 0 18px; }
.gbca-chat__start { width: 100%; padding: 12px 18px; font-size: 0.95rem; }
.gbca-chat__send:hover, .gbca-chat__start:hover { background: var(--brand-primary-dark); }
.gbca-chat__send:focus-visible, .gbca-chat__start:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.gbca-chat__counter {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

/* ── Handoff ── */
.gbca-chat__handoff {
  width: 100%;
  border: none;
  border-top: 1px solid var(--border);
  padding: 13px 16px;
  background: var(--bg-tint);
  color: var(--brand-primary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
  flex: none;
}
.gbca-chat__handoff:hover { background: var(--bg-tint-deep); }
.gbca-chat__handoff:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -3px; }
/* Emphasized when the backend signals a human handoff / crisis. */
.gbca-chat__handoff--cta {
  background: var(--brand-primary);
  color: #fff;
  text-decoration: none;
  animation: gbca-chat-cta 1s ease-in-out 2;
}
.gbca-chat__handoff--cta:hover { background: var(--brand-primary); filter: brightness(1.08); }
@keyframes gbca-chat-cta {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(255,255,255,0); }
  50%      { box-shadow: inset 0 0 0 3px rgba(255,255,255,.45); }
}

/* ── Program cards (authoritative /programs/<slug> links) ── */
.gbca-chat__cards {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 80%;
  margin: -2px 0 2px;
}
.gbca-chat__card {
  display: block;
  padding: 9px 13px;
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius);
  background: var(--bg-tint);
  color: var(--brand-primary);
  font-size: 0.9rem;
  text-decoration: none;
  text-align: left;
}
.gbca-chat__card:hover { background: var(--bg-tint-deep); }
.gbca-chat__card:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.gbca-chat__card__title {
  display: block;
  font-weight: 700;
}
.gbca-chat__card__title::after { content: " →"; }
.gbca-chat__card__desc {
  display: block;
  margin-top: 3px;
  font-weight: 400;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-muted);
}
/* "None of these match my need" — visually distinct: dashed
   border, no arrow, neutral muted color. It is a button, not a
   link, so it triggers an in-chat message instead of navigation. */
.gbca-chat__card--reject {
  border-style: dashed;
  border-color: var(--text-muted);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  width: 100%;
  cursor: pointer;
  margin-top: 2px;
}
.gbca-chat__card--reject:hover {
  background: var(--bg-tint);
  color: var(--text);
  border-color: var(--text);
}
.gbca-chat__card--reject::after { content: ""; }

/* ── Option (quick-reply) buttons — the bot's clarifying question
   surfaces 2-4 suggested answers + an always-present "Other". They
   are tappable shortcuts, not commitments: tapping sends that text
   as the visitor's next message; "Other" simply focuses the
   textarea so the visitor can type their own answer. Visually pill-
   shaped to distinguish them from program cards (which are
   rectangular and outlined like primary actions). ── */
.gbca-chat__options {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 90%;
  margin: -2px 0 2px;
}
.gbca-chat__option {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--brand-primary);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-primary);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.gbca-chat__option:hover { background: var(--bg-tint); }
.gbca-chat__option:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.gbca-chat__option--other {
  border-style: dashed;
  border-color: var(--text-muted);
  color: var(--text-muted);
}
.gbca-chat__option--other:hover {
  background: var(--bg-tint);
  color: var(--text);
  border-color: var(--text);
}

/* ── Mobile: full screen ── */
@media (max-width: 560px) {
  .gbca-chat__panel {
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border: none;
    border-radius: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gbca-chat__fab { transition: none; }
  .gbca-chat__fab--bounce { animation: none; }
  .gbca-chat__typing span { animation: none; }
}

/* CMS rich text: nested ordered lists letter then roman (a, b, c /
   i, ii, iii) to match what Quill shows managers in the admin
   editor. Nested lists only occur inside CMS-authored content. */
ol ol { list-style-type: lower-alpha; }
ol ol ol { list-style-type: lower-roman; }
