/* =========================================================
   The Guardian Christian Academy — main stylesheet
   ---------------------------------------------------------
   1. Fonts (self-hosted, no outside requests)
   2. Design tokens: change colors and fonts here
   3. Base
   4. Buttons
   5. Header and navigation
   6. Sections (hero, about, academics, CTA, gallery, events, testimonials)
   7. Interior pages, event page, login
   8. Footer
   ========================================================= */

/* 1. Fonts ------------------------------------------------ */
@font-face { font-family: "Bree Serif"; src: url("../fonts/bree-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

/* 2. Design tokens ---------------------------------------- */
:root {
  --navy: #1F3468;
  --navy-deep: #15244A;
  --red: #C4302B;
  --red-dark: #A3251F;
  --gold: #E8B23C;
  --paper: #FFFFFF;
  --tint: #F3F5FA;
  --ink: #17213A;
  --muted: #5B6478;
  --line: #DDE2EC;

  --font-display: "Bree Serif", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1160px;
  --gutter: 20px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(21, 36, 74, 0.10);
  --header-h: 130px;
}

/* 3. Base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.container { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Saved edits load in a moment after the page; hide editable text until then
   (reveals on its own after 1.5s even if scripts are off). */
.cms-wait [data-edit] { opacity: 0; animation: cms-reveal 0s 1.5s forwards; }
@keyframes cms-reveal { to { opacity: 1; } }
[data-multiline] { white-space: pre-line; }

.section { padding-block: 88px; }
.section-tint { background: var(--tint); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 44px; display: grid; gap: 10px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.eyebrow-light { color: var(--gold); }
.section-title { font-size: clamp(30px, 4vw, 44px); color: var(--navy); }
.section-title-light { color: #fff; }
.subhead { font: 400 22px/1.3 var(--font-display); color: var(--red); }
.body-text { color: var(--muted); max-width: 64ch; }
.list-status { color: var(--muted); text-align: center; grid-column: 1 / -1; padding: 24px 0; }
.list-status-light { color: rgba(255,255,255,0.8); }

/* 4. Buttons ---------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 800 14px/1 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 14px 24px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.85); }
.btn-ghost-light:hover { background: #fff; color: var(--navy); }
.btn-lg { padding: 17px 30px; font-size: 15px; }
.btn-sm { padding: 10px 18px; font-size: 12px; }
.btn-block { width: 100%; }

/* 5. Header and navigation -------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); flex-shrink: 0; }
.brand-logo { height: 100px; width: auto; max-width: 240px; object-fit: contain; }
.brand-name { display: grid; font: 400 18px/1.05 var(--font-display); max-width: 15ch; }
.brand-the { font: 800 10px/1 var(--font-body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); margin-bottom: 3px; }
.site-nav { flex: 1; display: flex; justify-content: center; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.site-nav a { display: block; padding: 8px 9px; border-radius: 6px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; }
.site-nav a:hover { color: var(--red); }
.site-nav a[aria-current="page"] { color: var(--red); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.site-nav .nav-enroll-mobile { display: none; }
.nav-toggle { display: none; align-items: center; gap: 8px; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font: 700 14px var(--font-body); color: var(--navy); cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .header-enroll { display: none; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 12px var(--gutter) 20px; flex-direction: column; gap: 12px; display: none; }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 12px 8px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: none; }
  .site-nav .nav-enroll-mobile { display: inline-flex; align-self: flex-start; padding: 14px 24px; font-size: 14px; color: #fff; border: 0; border-radius: 999px; }
}

/* 6. Sections --------------------------------------------- */

/* Hero */
.hero { position: relative; color: #fff; background: var(--navy) var(--bg-image) center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(21,36,74,0.92) 0%, rgba(21,36,74,0.72) 45%, rgba(21,36,74,0.15) 100%); }
.hero-inner { position: relative; padding-block: 120px 128px; display: grid; gap: 22px; justify-items: start; }
.hero-title { font-size: clamp(40px, 6.4vw, 76px); max-width: 14ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }

/* About */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.split-reverse .split-media { order: 2; }
.split-media { margin: 0; position: relative; isolation: isolate; }
.split-media img { width: 100%; aspect-ratio: 9 / 10; object-fit: cover; border-radius: var(--radius); }
.split-media::after { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 3px solid var(--gold); border-radius: var(--radius); z-index: -1; }
.split-body { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.split-body .btn { margin-top: 8px; }

/* Academics */
.academics { background: var(--navy); }
.card-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.program-card { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 14px 34px rgba(0,0,0,0.18); }
.program-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.program-card-body { padding: 24px; display: grid; gap: 12px; justify-items: start; flex: 1; align-content: start; }
.program-card h3 { font-size: 24px; color: var(--navy); }
.program-card p { color: var(--muted); font-size: 16px; }
.program-card .btn { margin-top: auto; }

/* CTA band */
.cta-band { position: relative; color: #fff; background: var(--navy-deep) var(--bg-image) center / cover no-repeat; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: rgba(21,36,74,0.78); }
.cta-band-inner { position: relative; padding-block: 96px; display: grid; gap: 24px; justify-items: center; text-align: center; }
.cta-title { font-size: clamp(36px, 5.5vw, 64px); }
.cta-title::after { content: ""; display: block; width: 72px; height: 4px; background: var(--gold); margin: 18px auto 0; border-radius: 2px; }

/* Gallery */
.gallery-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.gallery-tab { font: 700 14px var(--font-body); padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.gallery-tab:hover { border-color: var(--navy); }
.gallery-tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery-item { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 12px 10px; font-size: 14px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(21,36,74,0.85)); }
.gallery-more { display: flex; justify-content: center; margin-top: 28px; }

/* Events */
.events { background: var(--tint); }
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.event-card { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); position: relative; }
.event-card img { width: 100%; aspect-ratio: 10 / 7; object-fit: cover; background: var(--tint); }
.event-date { position: absolute; top: 14px; left: 14px; background: #fff; border-radius: 8px; padding: 6px 10px; text-align: center; box-shadow: var(--shadow); min-width: 56px; }
.event-date-month { display: block; font: 800 11px/1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
.event-date-day { display: block; font: 400 26px/1.1 var(--font-display); color: var(--navy); font-variant-numeric: tabular-nums; }
.event-card-body { padding: 20px; display: grid; gap: 6px; flex: 1; align-content: start; }
.event-card h3 { font-size: 21px; color: var(--navy); }
.event-meta { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-card .btn { margin: 0 20px 20px; }

/* Testimonials */
.testimonials { background: var(--navy); }
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.quote-card { background: #fff; border-radius: var(--radius); padding: 30px 28px; display: grid; gap: 16px; align-content: start; position: relative; }
.quote-card::before { content: "\201C"; position: absolute; top: 8px; right: 22px; font: 400 84px/1 var(--font-display); color: var(--gold); opacity: 0.55; }
.quote-stars { color: var(--gold); letter-spacing: 3px; font-size: 18px; }
.quote-text { margin: 0; font-size: 17px; color: var(--ink); }
.quote-name { font-weight: 800; color: var(--navy); }

/* 7. Interior pages --------------------------------------- */
.page-banner { position: relative; color: #fff; background: var(--navy) var(--bg-image) center / cover no-repeat; }
.page-banner::before { content: ""; position: absolute; inset: 0; background: rgba(21,36,74,0.8); }
.page-banner .container { position: relative; padding-block: 72px; display: grid; gap: 12px; }
.page-banner-plain::before { display: none; }
.page-title { font-size: clamp(36px, 5vw, 56px); }
.page-lead { font-size: 19px; color: rgba(255,255,255,0.88); max-width: 60ch; }
.prose { max-width: 820px; display: grid; gap: 18px; justify-items: start; }
.back-link { color: var(--gold); font-weight: 700; text-decoration: none; font-size: 15px; }
.back-link:hover { text-decoration: underline; }

/* Event page */
.event-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.event-detail-media { margin: 0; }
.event-detail-media img { width: 100%; border-radius: var(--radius); aspect-ratio: 10 / 7; object-fit: cover; }
.event-detail-body { display: grid; gap: 22px; justify-items: start; min-width: 0; }
.event-facts { margin: 0; display: grid; gap: 12px; width: 100%; border-top: 3px solid var(--navy); padding-top: 16px; }
.event-facts div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.event-facts dt { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.event-facts dd { margin: 0; font-weight: 700; color: var(--navy); }
.event-detail .body-text { white-space: pre-line; }

/* Login */
.login-page { background: var(--tint); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gutter); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 36px 32px; display: grid; gap: 14px; }
.login-card img { justify-self: center; }
.login-card h1 { font-size: 30px; color: var(--navy); text-align: center; }
.login-help { color: var(--muted); font-size: 15px; text-align: center; }
.login-card label { font-weight: 700; font-size: 15px; margin-top: 6px; }
.login-card input { font: 400 17px var(--font-body); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px; width: 100%; }
.login-card input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(31,52,104,0.18); }
.login-error { color: var(--red-dark); font-weight: 700; font-size: 15px; }
.login-back { text-align: center; font-size: 15px; }

/* 8. Footer ----------------------------------------------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.82); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 48px; padding-block: 64px 48px; }
.footer-brand { display: grid; gap: 16px; align-content: start; max-width: 36ch; }
.footer-heading { font-size: 20px; color: #fff; margin-bottom: 16px; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.site-footer a { color: rgba(255,255,255,0.9); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-contact li { display: grid; gap: 2px; }
.footer-contact a, .footer-contact span:not(.footer-label) { overflow-wrap: anywhere; }
.footer-label { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px; font-size: 14px; }
.footer-staff { opacity: 0.7; }

/* Responsive ---------------------------------------------- */
@media (max-width: 900px) {
  .section { padding-block: 64px; }
  .split, .event-detail { grid-template-columns: 1fr; gap: 40px; }
  .split-reverse .split-media { order: 0; }
  .split-media::after { inset: 12px -12px -12px 12px; }
  .card-row { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; --header-h: 68px; }
  body { font-size: 16px; }
  .hero-inner { padding-block: 80px 88px; }
  .brand-name { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .split-media::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation-duration: 0s !important; }
}


/* Staff (About Us page) -------------------------------- */
.staff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; max-width: 980px; margin: 0 auto; }
.staff-card { margin: 0; position: relative; display: grid; justify-items: center; gap: 18px; text-align: center; }
.staff-photo { width: 100%; max-width: 220px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: var(--tint); box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--gold); }
.staff-card figcaption { display: grid; gap: 4px; min-width: 0; }
.staff-name { font: 400 22px/1.2 var(--font-display); color: var(--navy); overflow-wrap: anywhere; }
.staff-title { font-size: 15px; font-weight: 700; letter-spacing: 0.04em; color: var(--red); }
@media (max-width: 900px) { .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .staff-grid { gap: 36px 16px; } .staff-name { font-size: 18px; } .staff-title { font-size: 14px; } }

/* Page banner with a button on the right ----------------- */
.page-banner .page-banner-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.page-banner-text { display: grid; gap: 12px; min-width: 0; }


/* Contact page ----------------------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 56px; align-items: start; }
.contact-info { display: grid; gap: 20px; justify-items: start; min-width: 0; }
.contact-list { margin: 0; display: grid; gap: 20px; width: 100%; border-top: 3px solid var(--navy); padding-top: 22px; }
.contact-list div { display: grid; gap: 4px; }
.contact-list dt { font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
.contact-list dd { margin: 0; font: 400 22px/1.35 var(--font-display); color: var(--navy); overflow-wrap: anywhere; }
.contact-list a { color: var(--navy); text-decoration: none; border-bottom: 2px solid var(--gold); }
.contact-list a:hover { color: var(--red); border-bottom-color: var(--red); }
.contact-map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--tint); aspect-ratio: 4 / 3; }
.contact-map iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
