/* ============================================================
   DESIGN TOKENS — St Francis College
   ------------------------------------------------------------
   PER-SCHOOL FILE. Re-skin by editing only this file.
   Palette drawn from the official crest: deep navy shield +
   cornflower-blue cross stripe. No warm tones — cool blues only.
   ============================================================ */
:root{
  /* Brand palette ------------------------------------------- */
  --navy:        #1b3a6e;   /* deep crest navy — hero, headings, nav */
  --navy-2:      #274f8f;   /* slightly lighter navy for hover states */
  --accent:      #4f8ecf;   /* cornflower blue — cross stripe on crest */
  --accent-dark: #2d6aac;   /* deeper blue — CTA links, borders, eyebrows */

  /* Neutrals ------------------------------------------------- */
  --ink:    #1e2a3a;
  --muted:  #556070;
  --line:   rgba(27,58,110,.12);
  --paper:  #f6f7fb;        /* cool off-white — suits blue-dominant palette */
  --paper-2:#e9eff9;        /* light blue-tinted alternate section bg */
  --white:  #ffffff;

  /* Type ----------------------------------------------------- */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --fs-hero: clamp(2.6rem, 5.5vw, 4.8rem);
  --fs-h2:   clamp(1.9rem, 3.4vw, 3rem);
  --fs-h3:   1.35rem;
  --fs-lead: clamp(1.05rem, 1.5vw, 1.3rem);
  --eyebrow: .16em;

  /* Shape ---------------------------------------------------- */
  --r-md: 14px;
  --r-lg: 26px;
  --r-pill: 999px;
  --maxw: 1180px;
  --shadow: 0 18px 50px -22px rgba(27,58,110,.38);
}

/* Mobile header — Apply button (hidden on desktop, shown <=980px) */
.header-apply { display: none; }
@media (max-width: 980px) {
  .header-apply {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: #fff !important;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    white-space: nowrap;
  }
  .header-apply:hover { background: var(--accent-dark); }
}

/* Nav Apply button — override .nav a colour inheritance */
.nav a.btn-primary,
.nav a.btn-primary:hover { color: #fff; }

/* Phase card "Learn more" — match .read text button size */
.phase-more { font-size: inherit; }

/* Gallery dots — CSS controls visibility
   JS must NOT set display:flex inline on .gallery-dots */
.gallery-dots {
  display: none;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
@media (max-width: 640px) {
  .gallery-dots { display: flex; }
}

/* Gallery horizontal scroll (mobile) */
@media (max-width: 640px) {
  .gallery {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding-bottom: 12px;
    scrollbar-width: none;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery .cell {
    flex: 0 0 78%;
    scroll-snap-align: start;
    aspect-ratio: 4 / 3;
    border-radius: var(--r-md);
  }
}

/* Fee tables — stacked cards on mobile
   Uses data-label on <td> + attr() so labels adapt per table */
@media (max-width: 640px) {
  .fees { border: none; background: transparent; }
  .fees thead { display: none; }
  .fees tbody { display: flex; flex-direction: column; gap: 10px; }
  .fees tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    background: #fff;
  }
  .fees td {
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    border-bottom: none;
    text-align: left !important;
  }
  /* First cell = full-width navy card header */
  .fees td:first-child {
    grid-column: 1 / -1;
    background: var(--navy);
    color: #fff;
    padding: 12px 16px;
    font-family: var(--serif);
    font-size: 1.05rem;
  }
  /* colspan placeholder rows span full width */
  .fees td[colspan] { grid-column: 1 / -1; }
  /* 4th column (Note in aftercare) sits full width below the pair */
  .fees td:nth-child(4) { grid-column: 1 / -1; }
  /* Column label injected from data-label attribute */
  .fees td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 4px;
  }
  .fees td:first-child * { color: inherit; }
}

/* Aftercare fees: hide Annual on mobile, Note beside Monthly */
@media (max-width: 640px) {
  .aftercare-fees td:nth-child(3) { display: none; }
  .aftercare-fees td:nth-child(4) { grid-column: auto; }
}

/* Contact page — full-bleed panels at <=640px
   780px single-column is already in styles.css */
@media (max-width: 640px) {
  #contact                { padding: 0; }
  #contact .wrap          { padding: 0; max-width: 100%; }
  #contact .contact-grid  { gap: 0; }
  #contact .form          { padding: 40px 24px; background: var(--white); }
  #contact .contact-info  { padding: 40px 24px; background: var(--paper-2); }
}

/* Step numbers — plain, no circle */
.step::before {
  width: auto;
  height: auto;
  border-radius: 0;
  border: none;
  background: transparent;
  display: block;
  place-items: unset;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent-dark);
  margin-bottom: 12px;
}

/* Fee discount grid — stack on mobile */
@media (max-width: 640px) {
  .fee-discounts-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

/* Stats bar — horizontal scroll on mobile */
@media (max-width: 780px) {
  .stats-inner {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    padding: 0;
    scrollbar-width: none;
  }
  .stats-inner::-webkit-scrollbar { display: none; }
  .stat {
    flex: 0 0 auto;
    min-width: 160px;
    scroll-snap-align: start;
    padding: 22px 24px;
    border-right: 1px solid var(--line);
  }
  .stat:last-child { border-right: none; }
}

/* Subnav — left-align on mobile so first item isn't clipped */
@media (max-width: 780px) {
  .subnav-inner {
    justify-content: flex-start;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Aftercare stats column — hide on mobile (times in pills) */
@media (max-width: 640px) {
  .aftercare-stats { display: none !important; }
}

/* Prep: aftercare banner — stack on mobile */
@media (max-width: 640px) {
  .prep-aftercare-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  .prep-aftercare-label {
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,.2);
    padding-right: 0 !important;
    padding-bottom: 14px;
    width: 100%;
  }
}

/* Footer bottom — stack on mobile so legal links aren't cut off */
@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

/* Mobile padding */
@media (max-width: 640px) {
  .section          { padding: 48px 0; }
  .section.hero     { padding: 56px 0 40px; }
  .wrap             { padding-left: 20px; padding-right: 20px; }
}

/* Split section: image-left on desktop
   HTML order: col-photo | text-top | text-bottom */
.split-img-l {
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "photo top"
                       "photo bottom";
  gap: 0 56px;
  align-items: start;
}
.split-img-l .col-photo   { grid-area: photo; align-self: center; }
.split-img-l .text-top    { grid-area: top; align-self: end; padding-bottom: .55em; }
.split-img-l .text-bottom { grid-area: bottom; align-self: start; }

@media (max-width: 640px) {
  .split-img-l {
    grid-template-columns: 1fr;
    grid-template-areas: "top" "photo" "bottom";
    gap: 1.2rem;
  }
}

/* Split section: image-right on desktop
   HTML order: text-top | col-photo | text-bottom */
.split-img-r {
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "top    photo"
                       "bottom photo";
  gap: 0 56px;
  align-items: start;
}
.split-img-r .col-photo   { grid-area: photo; align-self: center; }
.split-img-r .text-top    { grid-area: top; align-self: end; padding-bottom: .55em; }
.split-img-r .text-bottom { grid-area: bottom; align-self: start; }

@media (max-width: 640px) {
  .split-img-r {
    grid-template-columns: 1fr;
    grid-template-areas: "top" "photo" "bottom";
    gap: 1.2rem;
  }
}

/* Contact form — select matches inputs */
.form select {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: .95rem;
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23556070' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  appearance: none;
  -webkit-appearance: none;
  color: var(--ink);
  cursor: pointer;
}
.form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,142,207,.15);
}

/* Contact form — consent checkbox */
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.5;
  margin-top: 4px;
}
.consent-label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent-dark);
  width: 16px;
  height: 16px;
}
.consent-label a { color: var(--accent-dark); }

/* Mobile — checkbox as a tappable card */
@media (max-width: 640px) {
  .consent-label {
    padding: 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    gap: 12px;
    font-size: .85rem;
  }
  .consent-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 1px;
  }
}
