/* ============================================================
   AMBLESIDE DURBAN NORTH — Global Stylesheet
   Design system: variables → reset → typography → layout →
   components → utilities
   ============================================================ */

/* ── VARIABLES ── */
:root {
  --navy:       #003865;
  --navy-dark:  #002647;
  --brown:      #63513D;
  --brown-light:#8A7260;
  --gold:       #C8A96E;
  --gold-light: #DFC49A;
  --cream:      #F9F5F0;
  --warm-white: #FEFCFA;
  --text:       #2C2417;
  --muted:      #7A6E63;
  --border:     rgba(99,81,61,0.12);

  --font-serif: 'Lora', Georgia, serif;
  --font-sans:  'Jost', system-ui, sans-serif;

  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   7rem;

  --max-width:  1200px;
  --radius:     0;

  --nav-height: 68px;

  --transition: 0.22s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--warm-white);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.15;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
/* CHANGE: increased body text weight and size for readability */
p  { line-height: 1.85; color: var(--muted); font-weight: 400; font-size: 1.0625rem; }
em { font-style: italic; }
strong { font-weight: 600; color: var(--text); }

.serif { font-family: var(--font-serif); }
.italic { font-style: italic; }

/* Colour modifiers */
.text-navy   { color: var(--navy); }
.text-brown  { color: var(--brown); }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--muted); }
.text-white  { color: white; }
.text-white p { color: rgba(255,255,255,0.7); }
.text-center { text-align: center; }

/* Title modifiers */
.title-light { color: white; }
.title-gold  { color: var(--gold); }

/* ── LAYOUT ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 768px)  { .container { padding: 0 3rem; } }
@media (min-width: 1024px) { .container { padding: 0 5rem; } }

.section { padding: 4rem 0; }
@media (min-width: 768px)  { .section { padding: 6rem 0; } }
@media (min-width: 1024px) { .section { padding: 7rem 0; } }

.section-bg-cream      { background: var(--cream); }
.section-bg-navy       { background: var(--navy); }
.section-bg-brown      { background: var(--brown); }
.section-bg-warm-white { background: var(--warm-white); }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (min-width: 640px)  { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px)  { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ── SECTION LABELS ── */
.label {
  display: inline-flex; align-items: center; gap: 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
}
.label::before {
  content: '';
  display: block; width: 28px; height: 1px;
  background: var(--gold); flex-shrink: 0;
}
.label-brown { color: var(--brown); }
.label-brown::before { background: var(--brown); }
.label-white { color: rgba(255,255,255,0.6); }
.label-white::before { background: rgba(255,255,255,0.4); }
.label-center { display: flex; justify-content: center; }
.label-center::before { display: none; }

/* ── BUTTONS ── */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font-family: var(--font-sans); font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.9rem 2rem; transition: all var(--transition);
  border: none; cursor: pointer; white-space: nowrap;
}
.btn-primary   { background: var(--navy);  color: white; }
.btn-primary:hover { background: var(--brown); }
.btn-gold      { background: var(--gold);  color: var(--navy); }
.btn-gold:hover { background: white; }
.btn-white     { background: white; color: var(--navy); }
.btn-white:hover { background: var(--cream); }
.btn-outline   { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: white; }
.btn-outline-white { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.45); }
.btn-outline-white:hover { border-color: white; background: rgba(255,255,255,0.1); }
.btn-outline-brown { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.4); }
.btn-outline-brown:hover { border-color: white; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--nav-height);
  background: rgba(254,252,250,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.07); }
.nav-inner {
  height: 100%; display: flex; align-items: center;
  justify-content: space-between;
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 768px) { .nav-inner { padding: 0 3rem; } }

/* CHANGE: real logo image styles */
.nav-logo { text-decoration: none; display: flex; align-items: center; flex-direction: column; gap: 2px; }
.nav-logo-img { height: 42px; width: auto; display: block; }
.nav-est {
  font-family: var(--font-sans);
  font-size: 0.52rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brown); opacity: 0.75; align-self: flex-end;
}

.nav-right { display: flex; align-items: center; gap: 0.5rem; }
.nav-links { display: none; list-style: none; align-items: center; gap: 0.2rem; }
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-links a {
  display: block; padding: 0.5rem 0.8rem;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
  transition: color var(--transition); position: relative;
}
.nav-links a:hover { color: var(--navy); }
.nav-links .has-dropdown { position: relative; }
.nav-links .has-dropdown > a::after { content: ' ▾'; font-size: 0.6rem; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: white; border: 1px solid var(--border);
  border-top: 2px solid var(--navy);
  min-width: 220px; padding: 0.5rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  z-index: 100;
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown a {
  display: block; padding: 0.6rem 1.2rem;
  font-size: 0.78rem; color: var(--muted);
  text-decoration: none; letter-spacing: 0.04em; text-transform: none;
  transition: all var(--transition);
}
.dropdown a:hover { background: var(--cream); color: var(--navy); }
.nav-cta {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.55rem 1.2rem;
  background: var(--navy); color: white; text-decoration: none;
  transition: background var(--transition);
}
.nav-cta:hover { background: var(--brown); }

/* Mobile hamburger */
.nav-burger {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 4px;
  cursor: pointer;
}
@media (min-width: 900px) { .nav-burger { display: none; } }
.nav-burger span {
  display: block; width: 24px; height: 2px;
  background: var(--navy); transition: all var(--transition);
}
.nav-mobile {
  display: none; position: fixed;
  top: var(--nav-height); left: 0; right: 0; bottom: 0;
  background: white; overflow-y: auto; z-index: 499;
  padding: 2rem 1.5rem;
  flex-direction: column; gap: 0;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  display: block; padding: 1rem 0;
  font-size: 1rem; font-weight: 500; color: var(--text);
  text-decoration: none; border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.nav-mobile a:hover { color: var(--navy); }
.nav-mobile .mobile-sub {
  padding-left: 1rem; font-size: 0.88rem; color: var(--muted);
}
.nav-mobile .mobile-cta {
  margin-top: 2rem; display: block; text-align: center;
  background: var(--navy); color: white;
  padding: 1rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: none;
}

/* ── PAGE HEADER (inner pages) ── */
.page-header {
  background: var(--navy);
  padding: 5rem 0 4rem;
  margin-top: var(--nav-height);
  position: relative; overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px;
  border: 1px solid rgba(200,169,110,0.12); border-radius: 50%;
  pointer-events: none;
}
.page-header .label { margin-bottom: 0.8rem; }
.page-header h1 { color: white; margin-bottom: 1rem; }
.page-header p  { color: rgba(255,255,255,0.65); max-width: 560px; font-size: 1rem; }
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4); text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--gold); }

/* ── INFO STRIP ── */
.info-strip {
  background: var(--brown);
  padding: 0.9rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem;
  align-items: center; justify-content: center;
}
.info-strip-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.74rem; font-weight: 400; color: rgba(255,255,255,0.8);
  white-space: nowrap; text-decoration: none;
}
.info-strip-item:hover { color: white; }
.info-strip-item svg { flex-shrink: 0; opacity: 0.7; }

/* ── CARDS ── */
.card {
  background: white; border-top: 3px solid var(--navy);
  padding: 2rem; transition: box-shadow var(--transition);
}
.card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.07); }
.card-navy { background: var(--navy); border-top-color: var(--gold); }
.card-cream { background: var(--cream); }

/* News card */
.news-card { text-decoration: none; display: block; }
.news-card-image {
  width: 100%; aspect-ratio: 16/9; overflow: hidden;
  background: var(--cream);
}
.news-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.news-card:hover .news-card-image img { transform: scale(1.04); }
.news-card-body { padding: 1.5rem; background: white; border-top: 3px solid var(--navy); }
.news-card-meta {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brown); margin-bottom: 0.6rem;
}
.news-card-title {
  font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600;
  color: var(--navy); line-height: 1.3; margin-bottom: 0.6rem;
}
.news-card-summary { font-size: 0.84rem; color: var(--muted); line-height: 1.7; }

/* Event card */
.event-card {
  display: flex; gap: 1.5rem; padding: 1.5rem;
  background: white; border-left: 3px solid var(--navy);
  text-decoration: none; transition: box-shadow var(--transition);
  align-items: flex-start;
}
.event-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.event-date-block {
  flex-shrink: 0; width: 56px; text-align: center;
  background: var(--navy); padding: 0.6rem 0.4rem;
}
.event-date-day {
  font-family: var(--font-serif); font-size: 1.6rem;
  font-weight: 700; color: white; line-height: 1;
}
.event-date-month {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold);
}
.event-body {}
.event-cat {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brown); margin-bottom: 0.3rem;
}
.event-title {
  font-family: var(--font-serif); font-size: 1rem; font-weight: 600;
  color: var(--navy); line-height: 1.3; margin-bottom: 0.3rem;
}
.event-meta { font-size: 0.78rem; color: var(--muted); }

/* ── QUOTE / PULLOUT ── */
.pullquote {
  padding-left: 1.8rem;
  border-left: 3px solid var(--gold);
  margin: 2.5rem 0;
}
.pullquote blockquote {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.05rem; color: var(--text); line-height: 1.75;
  margin-bottom: 0.6rem;
}
.pullquote cite {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold); font-style: normal;
}
.pullquote-white blockquote { color: rgba(255,255,255,0.85); }
.pullquote-white cite { color: var(--gold); }

/* ── TEAM PHOTOS ── */
/* CHANGE: team photo circle styles for our-team page */
.team-photo-wrap {
  width: 140px; height: 140px;
  border-radius: 50%; overflow: hidden;
  margin: 0 auto 1.2rem;
  border: 3px solid var(--cream);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  background: var(--cream);
}
.team-photo-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
}

/* ── FOOTER ── */
.footer {
  background: var(--navy);
  padding: 5rem 0 0;
  border-top: 3px solid var(--gold);
}
.footer-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.8fr 1fr 1fr 1fr; }
}

/* CHANGE: real footer logo image */
.footer-logo-img {
  width: 160px; height: auto;
  display: block; margin-bottom: 1rem;
  /* Logo has transparent bg — render clearly on navy */
  filter: brightness(0) invert(1);
  opacity: 0.88;
}
/* CHANGE: ASI badge in footer */
.footer-asi-badge {
  display: block;
  width: 280px; height: auto;
  margin-top: 1.5rem;
  opacity: 0.75;
}

.footer-tagline {
  font-size: 0.8rem; color: rgba(255,255,255,0.38); line-height: 1.75;
  font-weight: 300; margin-bottom: 1.5rem; max-width: 280px;
}
.footer-social { display: flex; gap: 0.6rem; }
.footer-social-btn {
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.4); text-decoration: none;
  font-size: 0.68rem; font-weight: 700;
  transition: all var(--transition);
}
.footer-social-btn:hover { border-color: var(--gold); color: var(--gold); }
.footer-col h4 {
  font-family: var(--font-sans); font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col li a {
  font-size: 0.8rem; font-weight: 300;
  color: rgba(255,255,255,0.48); text-decoration: none;
  transition: color var(--transition);
}
.footer-col li a:hover { color: white; }
.footer-address {
  font-style: normal; font-size: 0.8rem; font-weight: 300;
  color: rgba(255,255,255,0.48); line-height: 1.85;
}
.footer-address a { color: rgba(255,255,255,0.48); text-decoration: none; transition: color var(--transition); }
.footer-address a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 1.4rem 0;
}
.footer-bottom-inner {
  display: flex; flex-direction: column; gap: 0.4rem;
  font-size: 0.7rem; color: rgba(255,255,255,0.22);
}
@media (min-width: 640px) {
  .footer-bottom-inner { flex-direction: row; justify-content: space-between; }
}

/* ── HERO ── */
.hero {
  margin-top: var(--nav-height);
  background: var(--navy);
  padding: 5rem 0 4rem;
  position: relative; overflow: hidden;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 380px; height: 380px;
  border: 1px solid rgba(200,169,110,0.12); border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: -80px; left: -80px;
  width: 280px; height: 280px;
  border: 1px solid rgba(200,169,110,0.08); border-radius: 50%;
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 1.5rem; display: inline-block;
}
.hero h1 { color: white; margin-bottom: 1.2rem; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-sub {
  font-size: 1rem; font-weight: 300; color: rgba(255,255,255,0.68);
  line-height: 1.85; max-width: 520px;
  margin: 0 auto 2.5rem;
}
.hero-ctas { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.hero-pills {
  display: flex; flex-direction: column; gap: 0.8rem;
  max-width: 480px; margin: 3rem auto 0;
}
@media (min-width: 560px) { .hero-pills { flex-direction: row; max-width: 620px; } }
.hero-pill {
  flex: 1; display: flex; align-items: center; gap: 1rem;
  background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.18);
  padding: 0.9rem 1.2rem; text-decoration: none;
  transition: background var(--transition);
}
.hero-pill:hover { background: rgba(255,255,255,0.16); }
.hero-pill-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--gold); display: flex; align-items: center;
  justify-content: center; font-size: 1rem;
}
.hero-pill-sub {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 0.2rem;
}
.hero-pill-name {
  font-family: var(--font-serif); font-size: 0.92rem;
  font-weight: 600; color: white;
}

/* ── PLACEHOLDER IMAGE ── */
.img-placeholder {
  width: 100%; background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.img-placeholder::after {
  content: 'Photo coming soon';
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.img-placeholder-16-9  { aspect-ratio: 16/9; }
.img-placeholder-4-3   { aspect-ratio: 4/3; }
.img-placeholder-square { aspect-ratio: 1/1; }
.img-placeholder-tall  { aspect-ratio: 3/4; }

/* ── SCROLL ANIMATIONS ── */
.fade-up {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.visible { opacity: 1; transform: none; }
.fade-up.d1 { transition-delay: 0.1s; }
.fade-up.d2 { transition-delay: 0.2s; }
.fade-up.d3 { transition-delay: 0.3s; }
.fade-up.d4 { transition-delay: 0.4s; }

/* ── UTILITIES ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── BATCH 2 FIXES ── */

/* Hide Apply Now nav CTA on mobile — overlaps logo */
@media (max-width: 899px) {
  .nav-cta { display: none !important; }
}

/* ── HORIZONTAL SCROLL CARDS (mobile browse sections) ── */
.cards-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 1.2rem;
  padding-bottom: 1.2rem;
  /* hide scrollbar but keep functional */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cards-scroll::-webkit-scrollbar { display: none; }
.cards-scroll > * {
  scroll-snap-align: start;
  min-width: min(280px, 78vw);
  flex-shrink: 0;
}

/* Scroll hint dots */
.scroll-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 1rem;
}
.scroll-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
  cursor: pointer;
}
.scroll-dots span.active { background: var(--navy); }

/* On tablet+ revert to grid */
@media (min-width: 640px) {
  .cards-scroll {
    display: grid !important;
    overflow-x: visible;
    scroll-snap-type: none;
  }
  .scroll-dots { display: none; }
}

/* Contact h1 — single line on mobile */
.contact-h1 { white-space: nowrap; }
@media (max-width: 480px) {
  .contact-h1 { font-size: 2rem; }
}

/* Grade range label — single line on mobile */
.grade-range-label { white-space: nowrap; }
@media (max-width: 360px) {
  .grade-range-label { font-size: 0.58rem; letter-spacing: 0.1em; }
}
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.max-600 { max-width: 600px; }
.max-700 { max-width: 700px; }
.mx-auto { margin-left: auto; margin-right: auto; }
