/* ==========================================================================
   Siyakhula Primary School — stylesheet
   Palette drawn from the school crest:
   deep teal-green, leaf green, gold, warm cream
   ========================================================================== */

:root {
  --green-deep: #163832;     /* wreath / dark shield half */
  --green: #2b6b45;          /* leaf green — primary brand colour */
  --green-light: #eaf3ea;    /* pale green tint for section backgrounds */
  --gold: #e0b23d;           /* bright gold — bottom-left of crest */
  --gold-dark: #a97a2b;      /* muted gold — bottom-right of crest */
  --cream: #fbf8f1;          /* warm off-white background */
  --ink: #1e2622;            /* near-black text */
  --ink-soft: #4b564f;       /* softer body text */
  --white: #ffffff;
  --line: #e4e0d3;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(22, 56, 50, 0.25);
  --shadow-sm: 0 4px 14px -6px rgba(22, 56, 50, 0.18);

  --font-head: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--green-deep);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--green {
  background: var(--green-light);
}
.section--deep {
  background: var(--green-deep);
  color: var(--white);
}
.section--deep h2, .section--deep h3 { color: var(--white); }
.section--deep p { color: #cfe1d8; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--gold-dark);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--gold);
  display: inline-block;
}

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-primary {
  background: var(--gold);
  color: var(--green-deep);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-outline-dark {
  background: transparent;
  border-color: var(--green-deep);
  color: var(--green-deep);
}
.btn-outline-dark:hover { background: var(--green-deep); color: var(--white); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 241, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  height: 56px;
  width: 56px;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--green-deep);
}
.brand-text span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav a:hover { background: var(--green-light); color: var(--green-deep); }
.nav a.active { background: var(--green-deep); color: var(--white); }

.header-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: var(--green-deep);
  border-radius: 3px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  color: var(--white);
  overflow: hidden;
}
.hero-content-row {
  flex: 1;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15,38,33,0.55) 0%, rgba(15,38,33,0.72) 55%, rgba(15,38,33,0.88) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  width: 100%;
  padding: 120px 0 90px;
}
.hero-content .eyebrow { color: var(--gold); }
.hero-content .eyebrow::before { background: var(--gold); }
.hero-content h1 { color: var(--white); }
.hero-content p.lead {
  font-size: 1.15rem;
  color: #e7efe9;
  max-width: 540px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-facts {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.22);
}
.hero-facts .fact {
  flex: 1 1 160px;
  padding: 22px 0;
  border-right: 1px solid rgba(255,255,255,0.22);
}
.hero-facts .fact:last-child { border-right: none; }
.hero-facts .fact strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--gold);
}
.hero-facts .fact span { font-size: 0.85rem; color: #d9e6df; }

/* inner page hero (no full viewport) */
.page-hero {
  position: relative;
  color: var(--white);
  padding: 150px 0 80px;
  overflow: hidden;
}
.page-hero .hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.page-hero .hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,38,33,0.75), rgba(15,38,33,0.85)); }
.page-hero-content { position: relative; z-index: 2; max-width: 700px; }
.page-hero h1 { color: var(--white); margin-bottom: 14px; }
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.breadcrumb span { color: #cfe1d8; }

/* ==========================================================================
   Cards / grids
   ========================================================================== */
.grid {
  display: grid;
  gap: 28px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--green);
}
.icon-badge svg { width: 28px; height: 28px; }

.card.card--gold .icon-badge { background: #fbf0d8; color: var(--gold-dark); }

/* photo card */
.photo-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px;
  background: linear-gradient(180deg, transparent, rgba(10,26,22,0.85));
  color: var(--white);
}
.photo-card .cap h3 { color: var(--white); margin-bottom: 2px; font-size: 1.05rem; }
.photo-card .cap span { font-size: 0.82rem; color: #d9e6df; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 14px;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.gallery .tall { grid-row: span 2; }
.gallery .wide { grid-column: span 2; }

/* Split section */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split--story { grid-template-columns: 1fr 1.15fr; }
.split-media { position: relative; }
.split-media .badge {
  position: absolute;
  bottom: -22px;
  left: -22px;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--green-deep);
  display: flex;
  align-items: center;
  gap: 12px;
}
.split-media .badge .num { font-size: 1.6rem; color: var(--gold-dark); }

/* Timeline */
.timeline {
  position: relative;
  margin-top: 10px;
  padding-left: 34px;
  border-left: 3px solid var(--line);
}
.timeline-item { position: relative; padding-bottom: 42px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -43px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--green);
}
.timeline-item .year {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--gold-dark);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: block;
}
.timeline-item h3 { margin-bottom: 6px; }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--green-deep);
}

/* Value / trait cards used on About */
.trait {
  text-align: center;
  padding: 28px 18px;
}
.trait .icon-badge { margin: 0 auto 16px; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--green-deep), #1f4a41);
  border-radius: 28px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.cta-banner::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(224,178,61,0.15);
}
.cta-banner h2 { color: var(--white); margin-bottom: 6px; }
.cta-banner p { color: #cfe1d8; margin: 0; }

/* Notice banner (used for placeholder callouts, kept subtle) */
.notice {
  background: #fbf0d8;
  border: 1px solid #eccf8a;
  color: #6b4f16;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.92rem;
}

/* ==========================================================================
   Services page cards
   ========================================================================== */
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card .service-icon {
  height: 8px;
  background: linear-gradient(90deg, var(--green), var(--gold));
}
.service-card .body { padding: 30px 26px; }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.contact-info-list { display: flex; flex-direction: column; gap: 22px; margin-top: 28px; }
.contact-info-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-info-item .icon-badge { flex-shrink: 0; margin-bottom: 0; }
.contact-info-item h3 { margin-bottom: 4px; font-size: 1.02rem; }
.contact-info-item p { margin: 0; }

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green-deep);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: var(--cream);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-light);
}
.field textarea { min-height: 130px; resize: vertical; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  margin-top: 40px;
}
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--green-deep);
  color: #cfe1d8;
  padding: 64px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr 0.9fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.footer-brand img { height: 48px; width: 48px; object-fit: contain; }
.footer-brand strong { font-family: var(--font-head); color: var(--white); font-size: 1.1rem; }
.site-footer h4 {
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1rem;
  margin-bottom: 16px;
}
.site-footer ul li { margin-bottom: 10px; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: #9db5ab;
}
.social-row { display: flex; gap: 10px; margin-top: 16px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.social-row a:hover { background: var(--gold); color: var(--green-deep); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Hero slide rotation */
.hero-slide { display: none; }
.hero-slide.active { display: block; }

@media (max-width: 760px) {
  .nav, .header-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .site-header.open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--cream);
    padding: 14px 24px 22px;
    border-bottom: 1px solid var(--line);
  }
  .site-header.open .nav a { padding: 12px 8px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-content { padding: 100px 0 60px; }
  .hero-facts { flex-direction: column; }
  .hero-facts .fact { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.22); }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .cta-banner { padding: 36px 26px; flex-direction: column; text-align: center; }
  .section { padding: 60px 0; }
}
