/* ================================================================
   Montessori Village International — institutional theme
   Inspired by Eagle's Landing Christian Academy (elcaonline.org):
   clean, professional, structured. Brand colors pulled from
   montessorivillageintl.com: gold #d29731, navy #1f5593, maroon #800000.
   ================================================================ */

:root {
  --navy:    #1f5593;
  --navy-d:  #143b66;
  --gold:    #d29731;
  --gold-d:  #b97f22;
  --maroon:  #5e0000;
  --maroon-d:#5e0000;
  --maroon-2:#b22222;
  --ink:     #222222;
  --gray:    #6f6e6e;
  --line:    #e2e2e2;
  --bg:      #ffffff;
  --bg-alt:  #f6f7f9;
  --bg-warm: #faf7f1;

  --maxw: 1200px;
  --radius: 4px;
  --shadow: 0 6px 22px rgba(20,40,70,.10);
  --shadow-sm: 0 2px 10px rgba(20,40,70,.07);
  --ease: cubic-bezier(.25,.8,.25,1);

  --font-head: "Lora", Georgia, serif;
  --font-body: "Libre Franklin", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0; font-family: var(--font-body); color: var(--ink);
  background: var(--bg); line-height: 1.7; font-size: 17px;
  overflow-x: hidden;
}
h1,h2,h3,h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.18; color: var(--maroon); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
p { margin: 0 0 1.1em; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold-d); }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
.muted { color: var(--gray); }
ul.plain { list-style: none; padding: 0; margin: 0; }

/* eyebrow / kicker (uppercase label) */
.eyebrow, .badge, .hero-eyebrow {
  display: inline-block; font-family: var(--font-body); font-weight: 700;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-d); margin-bottom: 14px;
}
.badge::before, .eyebrow::before { content: ""; display: inline-block; width: 26px; height: 2px;
  background: var(--gold); vertical-align: middle; margin-right: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-body); font-weight: 700; font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 14px 30px; border-radius: var(--radius); cursor: pointer;
  background: var(--gold); color: #fff; border: 2px solid var(--gold);
  transition: all .2s var(--ease);
}
.btn:hover { background: var(--gold-d); border-color: var(--gold-d); color: #fff; }
.btn--coral, .btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn--coral:hover { background: var(--gold-d); border-color: var(--gold-d); }
.btn--forest { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--forest:hover { background: var(--navy-d); border-color: var(--navy-d); color:#fff; }
.btn--ghost, .btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.8); }
.btn--ghost:hover, .btn-outline-light:hover { background: #fff; color: var(--navy-d); border-color:#fff; }
.prose .btn { color:#fff; }
.prose .btn--ghost { color: var(--navy); border-color: var(--navy); }
.prose .btn--ghost:hover { background: var(--navy); color:#fff; }

/* ---------- Top utility bar ---------- */
.topbar { background: var(--maroon-d); color: #f1dede; font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 40px; }
.topbar a { color: #dfe7f2; }
.topbar a:hover { color: #fff; }
.topbar .tb-right { display: flex; gap: 16px; align-items: center; min-width: 0; }
.topbar .tb-right a { white-space: nowrap; }
@media (max-width: 860px) { .topbar .tb-left { display: none; } .topbar .container { justify-content: center; } }
@media (max-width: 520px) { .topbar .tb-right .tb-email { display: none; } }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 110px; }
.brand { display: flex; align-items: center; }
.brand-logo { height: 96px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-item > a {
  display: inline-block; padding: 12px 14px; font-weight: 700; color: var(--maroon);
  font-size: .82rem; letter-spacing: .07em; text-transform: uppercase;
  border-bottom: 3px solid transparent;
}
.nav-item > a:hover { color: var(--gold-d); border-bottom-color: var(--gold); }
.nav-menu {
  position: absolute; top: calc(100% + 1px); left: 0; min-width: 230px;
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold);
  box-shadow: var(--shadow); padding: 8px 0; opacity: 0; visibility: hidden;
  transform: translateY(8px); transition: .18s var(--ease);
}
.nav-item:hover .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu a { display: block; padding: 10px 18px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.nav-menu a:hover { background: var(--bg-alt); color: var(--gold-d); }
.header-cta { display: flex; align-items: center; }

/* Hamburger */
.nav-cta-mobile { display: none; }
.nav-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 9px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.nav-burger span { display: block; width: 24px; height: 3px; background: var(--maroon); border-radius: 2px; transition: .2s var(--ease); }
.nav-cb:checked ~ .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-cb:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
.nav-cb:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1080px) {
  .header-cta { display: none; }
  .nav-burger { display: flex; }
  .header-inner { min-height: 84px; }
  .brand-logo { height: 64px; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    align-items: stretch; gap: 0; background: #fff; border-bottom: 3px solid var(--gold);
    padding: 8px 22px 18px; box-shadow: var(--shadow); max-height: 80vh; overflow-y: auto;
  }
  .nav-cb:checked ~ .nav { display: flex; }
  .nav-item > a { display: block; padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .nav-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0 0 8px 16px; min-width: 0; }
  .nav-cta-mobile { display: inline-block; margin-top: 16px; text-align: center; }
}

/* ---------- Hero (home, full-width banner) ---------- */
.hero { position: relative; color: #fff; display: flex; align-items: center; min-height: 600px; }
.hero-bg { position: absolute; inset: 0; background-size: contain; background-repeat: no-repeat; background-position: center; background-color: var(--navy-d); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(rgba(20,40,70,.55), rgba(20,40,70,.72)); }
.hero-content { position: relative; padding: 80px 26px; max-width: 840px; margin: 0 auto; text-align: center; }
.hero .hero-eyebrow { color: var(--gold); }
.hero h1 { color: #fff; margin-bottom: 16px; }
.hero-lead { font-size: 1.2rem; color: #eef2f8; max-width: 46ch; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
/* neutralize old playful hero pieces if present */
.hero-grid { display: block; }
.blob, .divider { display: none; }
.float-badge { position: static; }
.polaroid { background: none; padding: 0; border: none; box-shadow: none; transform: none; }

/* ---------- Stats band ---------- */
.stats { background: var(--navy); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { text-align: center; padding: 12px 14px; border-right: 1px solid rgba(255,255,255,.14); min-width: 0; }
.stat:last-child { border-right: none; }
.stat .num { display: block; font-family: var(--font-head); font-size: clamp(1.4rem, 4.5vw, 1.9rem); color: var(--gold); font-weight: 600; overflow-wrap: anywhere; }
.stat .lbl { display: block; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: #cdd8e8; margin-top: 6px; }

/* ---------- Scrolling image strip ---------- */
.scroller { overflow: hidden; background: var(--maroon-d); border-bottom: 4px solid var(--gold); }
.scroller-track { display: flex; width: max-content; animation: scroll-x 55s linear infinite; }
.scroller:hover .scroller-track { animation-play-state: paused; }
.scroller-track img {
  height: 340px; width: auto; aspect-ratio: 1903 / 942; object-fit: cover;
  display: block; flex: none; border-right: 3px solid var(--navy-d);
}
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 700px) { .scroller-track img { height: 200px; } }
@media (prefers-reduced-motion: reduce) { .scroller-track { animation: none; } }

/* ---------- Flip cards ---------- */
.flip-cards { perspective: 1600px; }
.flip-card { min-height: 300px; cursor: pointer; outline: none; }
.flip-card:focus-visible .flip-inner { box-shadow: 0 0 0 3px var(--gold); border-radius: var(--radius); }
.flip-inner { position: relative; width: 100%; min-height: 300px; transition: transform .6s var(--ease); transform-style: preserve-3d; }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 34px 30px; display: flex; flex-direction: column; justify-content: center;
}
/* keep tile text dark even when the section background is a theme color */
.flip-card .flip-front h3, .flip-card .flip-back h3 { color: var(--maroon); }
.flip-card .flip-back p { color: var(--gray); }
.flip-front { align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.flip-front::before {
  content: ""; position: absolute; inset: 0;
  background: url("/assets/uploads/2024/04/logo.png") no-repeat center center;
  background-size: 78%; opacity: 0.18; pointer-events: none;
}
.flip-front > * { position: relative; z-index: 1; }
.flip-front h3 { margin: 0; }
.flip-back { transform: rotateY(180deg); border-top-color: var(--maroon); align-items: center; justify-content: center; text-align: center; }
.flip-back h3 { color: var(--navy-d); margin-bottom: 10px; }
.flip-back p { color: var(--gray); font-size: 1rem; }
.flip-hint { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-d); margin-top: 16px; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; position: relative; }
.section--top { padding-top: 60px; }
.section--paper2 { background: var(--bg-alt); }
.section--maroon { background: var(--maroon); color: #fff; }
.section--maroon h1, .section--maroon h2, .section--maroon h3 { color: #fff; }
.section--maroon .badge { color: var(--gold); }
.section--maroon .section-head h2::after { background: var(--gold); }
.section--forest { background: var(--navy-d); color: #fff; }
.section--forest h1,.section--forest h2,.section--forest h3 { color: #fff; }
.section--forest .badge { color: var(--gold); }
.section--coral { background: var(--bg-warm); border-top: 4px solid var(--gold); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 50px; }
.section-head h2 { position: relative; padding-bottom: 18px; }
/* burgundy highlight accent under section headings */
.section-head h2::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 60px; height: 3px; background: var(--maroon); border-radius: 2px; }
.section--forest .section-head h2::after { background: var(--gold); }

/* ---------- Cards (values) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 28px; }
.card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: 34px 30px; box-shadow: var(--shadow-sm); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card .knob { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; margin-bottom: 18px; background: var(--navy); }
.knob.coral, .knob.marigold { background: var(--gold); } .knob.berry { background: var(--maroon); } .knob.sky, .knob.forest { background: var(--navy); }

/* ---------- Programs (image left, text right) ---------- */
.programs { display: grid; grid-template-columns: 1fr; gap: 24px; }
.program { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s var(--ease), transform .2s var(--ease); display: flex; flex-direction: row; align-items: stretch; }
.program:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.program-img { width: 340px; flex: none; overflow: hidden; }
.program-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .5s var(--ease); }
.program:hover .program-img img { transform: scale(1.05); }
.program-body { padding: 28px 30px; flex: 1; display: flex; flex-direction: column; justify-content: center; border-left: 3px solid var(--gold); }
@media (max-width: 700px) {
  .program { flex-direction: column; }
  .program-img { width: 100%; aspect-ratio: 16/9; }
  .program-body { border-left: none; border-top: 3px solid var(--gold); }
}
.program .grades { color: var(--maroon); font-weight: 700; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.program p { color: var(--gray); }
.program .more { margin-top: auto; font-weight: 700; color: var(--navy); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Split (tour) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .frame { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); transform: none; border: none; }
.split .frame img { aspect-ratio: 4/3; object-fit: cover; object-position: center; width: 100%; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit,minmax(330px,1fr)); gap: 28px; }
.quote { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 34px; color: #eef2f8; }
.quote::before { content: ""; }
.quote p { font-size: 1.04rem; font-style: italic; }
.quote .who { font-family: var(--font-head); color: var(--gold); font-weight: 600; font-style: normal; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Interior page hero ---------- */
.page-hero { position: relative; border-bottom: 4px solid var(--gold); overflow: hidden; }
.page-hero .ph-img { height: 260px; }
.page-hero .ph-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.page-hero--short .ph-img { height: 170px; }
.page-hero .ph-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(20,40,70,.88), rgba(20,40,70,.5)); display: flex; align-items: center; }
.page-hero h1 { color: #fff; }

/* ---------- Prose ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2,.prose h3 { margin-top: 1.7em; color: var(--maroon); }
.prose p { font-size: 1.08rem; color: #3a3a3a; }
.prose ul { list-style: none; padding: 0; }
.prose ul li { position: relative; padding-left: 28px; margin-bottom: 11px; font-size: 1.05rem; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 10px; width: 12px; height: 12px; background: var(--gold); border-radius: 2px; }

/* ---------- Program pages (photos left, text right) ---------- */
.program-layout { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 54px; align-items: center; }
/* Parents page: image 25% larger */
.page-parents .program-layout { grid-template-columns: minmax(0, 450px) 1fr; }
.program-photos { display: flex; flex-direction: column; gap: 20px; }
.program-photos img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: block; }
.program-text { max-width: 100%; margin: 0; }
@media (max-width: 860px) {
  .program-layout { grid-template-columns: 1fr; gap: 30px; }
  .program-photos { flex-direction: row; flex-wrap: wrap; }
  .program-photos img { width: calc(50% - 10px); }
}
@media (max-width: 480px) { .program-photos img { width: 100%; } }

/* ---------- People (staff / board) ---------- */
.prose .person { display: grid; grid-template-columns: 200px 1fr; gap: 30px; align-items: start; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); margin: 0 0 26px; }
.prose .person-photo { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center top; border-radius: var(--radius); }
.prose .person-info h3 { margin: 0 0 4px; color: var(--maroon); }
.prose .person-info .role { color: var(--maroon); font-weight: 700; font-style: normal; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; margin: 0 0 12px; }
.prose .person { border-left-color: var(--maroon); }
.prose .person-info p { font-size: 1rem; color: var(--gray); }
@media (max-width: 640px) { .prose .person { grid-template-columns: 1fr; } .prose .person-photo { max-width: 220px; } }

/* ---------- Gallery ---------- */
.gallery-grid { columns: 3 280px; column-gap: 18px; }
.gallery-grid figure { break-inside: avoid; margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.gallery-grid figure:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-grid img { width: 100%; height: auto; display: block; }

/* ---------- Store ---------- */
.program .grades { } /* price reuses .grades */

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-sm); margin-bottom: 16px; display: flex; gap: 16px; align-items: flex-start; }
.info-card .ic { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.1rem; background: var(--navy); }
.info-card h4 { margin: 0 0 2px; font-family: var(--font-body); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gray); }
.form label { display: block; font-weight: 600; margin-bottom: 16px; }
.form input,.form textarea,.form select { width: 100%; margin-top: 6px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius); font-family: inherit; font-size: 1rem; background: #fff; }
.form input:focus,.form textarea:focus,.form select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31,85,147,.12); }
.field-error { display: block; margin-top: 5px; color: var(--maroon); font-size: .85rem; font-weight: 600; }
.alert-success { text-align: center; padding: 14px 0; }
.alert-success h3 { color: var(--navy-d); }

/* ---------- Footer ---------- */
.site-footer { background: var(--maroon-d); color: #e6cccc; padding: 70px 0 26px; border-top: 5px solid var(--gold); }
.site-footer h4 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-body); }
.site-footer a { color: var(--gold); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; line-height: 2; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.foot-brand { display: flex; align-items: center; margin-bottom: 18px; }
.foot-logo { height: 84px; width: auto; background: #fff; padding: 8px 14px; border-radius: var(--radius); }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; font-weight: 700; font-size: .85rem; }
.socials a:hover { background: var(--gold); color: var(--navy-d); }
.copyright { border-top: 1px solid rgba(255,255,255,.16); margin-top: 44px; padding-top: 20px; font-size: .85rem; color: #c9a3a3; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero-content { padding: 70px 26px; }
  .gallery-grid { columns: 2 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .hero { min-height: auto; }
  .hero-content { padding: 56px 22px; }
  .flip-card, .flip-inner { min-height: 230px; }
  .flip-front, .flip-back { padding: 26px 22px; }
  .section { padding: 48px 0; }
}
@media (max-width: 560px) { .gallery-grid { columns: 1; } .footer-grid { grid-template-columns: 1fr; } }
