/* ==========================================================
   Jomo Kenyatta Girls' Senior School — Design System
   ========================================================== */
:root {
  --green-900: #0a1a3f;
  --green-800: #0f2a6b;
  --green-700: #1740a0;
  --green-600: #1f55c4;
  --green-100: #e6edfa;
  --gold: #d63a3f;
  --gold-light: #ee6a6e;
  --gold-dark: #b22a30;
  --cream: #f5f7fc;
  --ink: #151d33;
  --muted: #5b6580;
  --line: #dfe4ef;
  --white: #fff;
  --radius: 18px;
  --shadow-sm: 0 4px 14px rgba(10,26,63, .08);
  --shadow-md: 0 14px 40px rgba(10,26,63, .14);
  --shadow-lg: 0 30px 70px rgba(10,26,63, .28);
  --font-head: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { 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;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0; color: var(--green-800); }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

.container { width: min(1240px, 92%); max-width: 1240px; margin: 0 auto; padding: 0; }
.section { padding: 100px 0; }
.section-alt { background: var(--white); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-dark);
}
.eyebrow::before { content: ''; width: 34px; height: 2px; background: var(--gold); }
.section-title { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin: 14px 0 18px; letter-spacing: -.01em; }
.section-lead { color: var(--muted); max-width: 640px; font-size: 1.05rem; }
.center { text-align: center; }
.center .section-lead { margin-inline: auto; }
.center .eyebrow { justify-content: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 30px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .3s, box-shadow .3s, background .3s, color .3s;
  font-family: var(--font-body);
}
.btn:hover { transform: translateY(-3px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #fff; box-shadow: 0 10px 26px rgba(214,58,63,.4); }
.btn-gold:hover { box-shadow: 0 16px 34px rgba(214,58,63,.55); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; background: rgba(255,255,255,.08); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: #fff; color: var(--green-800); }
.btn-green { background: var(--green-800); color: #fff; }
.btn-green:hover { background: var(--green-600); box-shadow: var(--shadow-md); }

/* Top bar */
.topbar { background: var(--green-900); color: #c9d6f2; font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 9px 0; flex-wrap: wrap; }
.topbar a { text-decoration: none; transition: color .2s; }
.topbar a:hover { color: var(--gold-light); }
.topbar span { margin-right: 22px; }
.topbar i { color: var(--gold); margin-right: 7px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 8px 30px rgba(10,26,63,.12); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: auto; height: 62px; object-fit: contain; }
.brand-text strong { display: block; font-family: var(--font-head); font-size: 1.15rem; color: var(--green-800); line-height: 1.1; }
.brand-text small { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-dark); font-weight: 600; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  position: relative; padding: 10px 16px; font-size: .88rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--ink);
  transition: color .25s;
}
.main-nav a:not(.btn)::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.main-nav a:not(.btn):hover, .main-nav a.active { color: var(--green-600); }
.main-nav a:not(.btn):hover::after, .main-nav a.active::after { transform: scaleX(1); }
.main-nav .btn { margin-left: 10px; padding: 11px 24px; color: var(--green-900); }
.menu-toggle { display: none; flex-direction: column; justify-content: space-between; width: 30px; height: 21px; cursor: pointer; z-index: 1002; }
.menu-toggle span { display: block; height: 3px; background: var(--green-800); border-radius: 3px; transition: all .3s; }
.menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ================= HERO ================= */
.hero { position: relative; height: auto; width: 100%; min-height: 88vh; display: flex; align-items: center; overflow: hidden; background: var(--green-900); }
.hero-bg { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: saturate(1.08) contrast(1.04);   /* sharp photo; the overlay keeps text readable */
  opacity: 0; transform: scale(1.05);
  animation: heroFade 18s infinite;
}
.hero-slide:nth-child(2) { animation-delay: 6s; }
.hero-slide:nth-child(3) { animation-delay: 12s; }
@keyframes heroFade {
  0% { opacity: 0; transform: scale(1.05); }
  8%, 33% { opacity: 1; }
  41% { opacity: 0; }
  100% { opacity: 0; transform: scale(1.16); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,26,63,.82) 0%, rgba(10,26,63,.6) 38%, rgba(10,26,63,.15) 72%, rgba(10,26,63,.05) 100%),
    linear-gradient(180deg, rgba(10,26,63,.25) 0%, transparent 35%, transparent 70%, rgba(10,26,63,.7) 100%);
}
.hero-content { position: relative; z-index: 2; display: block; width: 100%; height: auto; padding: 90px 0 150px; color: #fff; max-width: 820px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(238,106,110,.5); backdrop-filter: blur(8px);
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-light); font-weight: 600;
}
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.8rem); line-height: 1.18; margin: 22px 0; text-shadow: 0 4px 24px rgba(0,0,0,.45); }
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero p { font-size: 1.2rem; color: #fff; max-width: 600px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 36px; }
.hero-scroll { position: absolute; bottom: 110px; right: 4%; z-index: 2; color: #fff; font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; writing-mode: vertical-rl; opacity: .8; }
.hero-scroll::after { content: ''; display: block; width: 1px; height: 60px; background: var(--gold); margin: 12px auto 0; animation: scrollLine 2s infinite; }
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Stats */
.stats-wrap { position: relative; z-index: 5; margin-top: -80px; }
/* Enrollment numbers – sits over the bottom of the hero */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: 20px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.stat { padding: 34px 28px; display: flex; align-items: center; gap: 18px; position: relative; }
.stat + .stat::before { content: ''; position: absolute; left: 0; top: 28%; height: 44%; width: 1px; background: var(--line); }
.stat-icon {
  flex: 0 0 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-800); font-size: 1.15rem;
}
.stat-num { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: var(--green-800); line-height: 1; }
.stat-label { margin-top: 6px; font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); }
.stat-desc { font-size: .82rem; color: var(--muted); }
.stat.total { background: var(--green-800); }
.stat.total::before { display: none; }
.stat.total .stat-icon { background: rgba(255,255,255,.12); color: var(--gold-light); }
.stat.total .stat-num { color: #fff; }
.stat.total .stat-label { color: var(--gold-light); }
.stat.total .stat-desc { color: #c9d6f2; }

/* Full-width photo band (home, under the numbers) */
.photo-band {
  position: relative; margin-top: 70px; height: clamp(240px, 32vw, 420px);
  background: var(--green-900) center 68% / cover no-repeat;
  display: flex; align-items: flex-end;
}
.photo-band::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10,26,63,.55)); pointer-events: none; }
.photo-band .container { position: relative; z-index: 1; padding-bottom: 26px; }
.photo-band-cap { color: #fff; font-family: var(--font-head); font-style: italic; font-size: clamp(1.1rem, 2.2vw, 1.6rem); text-shadow: 0 2px 12px rgba(0,0,0,.6); max-width: 760px; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 56px; }
.pillar {
  background: #fff; border-radius: var(--radius); padding: 40px 32px; position: relative; overflow: hidden;
  border: 1px solid var(--line); transition: transform .4s, box-shadow .4s;
}
.pillar::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--gold), var(--green-600)); }
.pillar:hover { transform: translateY(-10px); box-shadow: var(--shadow-md); }
.pillar-icon {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 1.5rem;
  background: var(--green-800); color: var(--gold-light); margin-bottom: 24px; transition: transform .4s;
}
.pillar:hover .pillar-icon { transform: rotate(-8deg) scale(1.08); }
.pillar h3 { font-size: 1.5rem; margin-bottom: 12px; }
.pillar p { color: var(--muted); }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.split-img { position: relative; }
.split-img img { border-radius: 24px; width: 100%; height: 520px; object-fit: cover; box-shadow: var(--shadow-lg); }
.split-img::before { content: ''; position: absolute; inset: 24px -24px -24px 24px; border: 3px solid var(--gold); border-radius: 24px; z-index: -1; }
.split-img .float-card {
  position: absolute; bottom: -28px; left: -28px; background: var(--green-800); color: #fff;
  padding: 22px 28px; border-radius: 18px; box-shadow: var(--shadow-md);
}
.float-card strong { display: block; font-family: var(--font-head); font-size: 2.2rem; color: var(--gold-light); line-height: 1; }
.float-card span { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.split-text p { color: var(--muted); margin-bottom: 18px; }
.split-text p b { color: var(--green-800); }
.check-list { margin: 22px 0 32px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; font-weight: 500; }
.check-list i { color: var(--gold-dark); margin-top: 5px; }

/* Principal */
.principal { background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; position: relative; overflow: hidden; }
.principal::after { content: '\201C'; position: absolute; top: -40px; right: 5%; font-family: var(--font-head); font-size: 28rem; color: rgba(238,106,110,.08); line-height: 1; }
.principal .section-title, .principal h3, .principal h4 { color: #fff; }
.principal-grid { display: grid; grid-template-columns: 360px 1fr; gap: 64px; align-items: start; position: relative; z-index: 1; }
.principal-photo img { width: 100%; height: 460px; object-fit: cover; border-radius: 24px; border: 4px solid var(--gold); box-shadow: var(--shadow-lg); }
.principal-name { margin-top: 22px; text-align: center; }
.principal-name h4 { font-size: 1.5rem; }
.principal-name span { color: var(--gold-light); font-size: .85rem; letter-spacing: .15em; text-transform: uppercase; }
.principal-quote { color: #dbe5f8; font-size: 1.05rem; }
.principal-quote p + p { margin-top: 16px; }
.deputy-grid { display: grid; grid-template-columns: 360px 1fr 360px; gap: 48px; align-items: center; }
.deputy-card img { width: 100%; height: 460px; object-fit: cover; object-position: top center; border-radius: 24px; border: 4px solid var(--gold); box-shadow: var(--shadow-lg); display: block; }
.deputy-center { text-align: center; }
.deputy-info { margin-top: 22px; text-align: center; }
.deputy-info h3 { font-size: 1.5rem; }
.deputy-info span { color: var(--gold); font-size: .85rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 600; }
.deputy-msg { margin-top: 18px; font-family: var(--font-head); font-style: italic; color: var(--muted); font-size: 1rem; line-height: 1.7; border-left: 4px solid var(--gold); padding-left: 18px; text-align: left; }
.deputy-msg p + p { margin-top: 12px; }
.deputy-grid { align-items: start; }
.deputy-center { align-self: center; }
@media (max-width: 1000px) {
  .deputy-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .deputy-center { grid-column: 1 / -1; grid-row: 1; }
  .deputy-card img { height: 380px; }
}
@media (max-width: 600px) { .deputy-grid { grid-template-columns: 1fr; } .deputy-card { max-width: 360px; margin: 0 auto; } }
.principal-quote p:first-child { font-family: var(--font-head); font-style: italic; font-size: 1.35rem; color: #fff; border-left: 4px solid var(--gold); padding-left: 22px; }

/* ================= GALLERY MARQUEE ================= */
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
.marquee-wrap { overflow: hidden; padding: 6px 0; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee { overflow: hidden; padding: 38px 0; }          /* vertical padding gives room for the enlarged image */
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee.to-right .marquee-track { animation: scrollRight 45s linear infinite; }   /* left -> right */
.marquee.to-left  .marquee-track { animation: scrollLeft 45s linear infinite; }    /* right -> left */
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollLeft  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes scrollRight { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.m-item {
  position: relative; flex: 0 0 auto; margin-right: 22px; width: 340px; height: 235px; border-radius: 20px; overflow: visible;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s; box-shadow: var(--shadow-sm);
  cursor: zoom-in;
}
.m-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.m-item:hover { transform: scale(1.28); z-index: 20; box-shadow: 0 30px 60px rgba(10,26,63,.45); }
.m-item .m-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px; border-radius: 0 0 20px 20px;
  background: linear-gradient(transparent, rgba(10,26,63,.85)); color: #fff; font-size: .85rem; font-weight: 600;
  opacity: 0; transition: opacity .35s;
}
.m-item:hover .m-cap { opacity: 1; }

/* CTA */
.cta {
  position: relative; text-align: center; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--green-900), var(--green-600));
}
.cta::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(var(--gold), transparent 70%); opacity: .18; top: -200px; left: -120px; }
.cta .container { position: relative; padding: 90px 0; }
.cta h2 { color: #fff; font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin-bottom: 14px; }
.cta p { color: #d6e1f7; max-width: 600px; margin: 0 auto 34px; }
.cta .hero-actions { justify-content: center; margin-top: 0; }

/* ================= PAGE HERO (inner pages) ================= */
.page-hero { position: relative; padding: 120px 0 110px; text-align: center; color: #fff; overflow: hidden; background: var(--green-900); }
.page-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: saturate(1.08); }
.page-hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10,26,63,.7) 0%, rgba(10,26,63,.55) 60%, rgba(10,26,63,.75) 100%); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.25; margin: 14px 0; text-shadow: 0 3px 18px rgba(0,0,0,.55); }
.page-hero p { max-width: 680px; margin: 0 auto; color: #fff; font-size: 1.1rem; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.page-hero .eyebrow, .page-hero .crumbs { text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.page-hero .eyebrow { color: var(--gold-light); }
.crumbs { margin-top: 22px; font-size: .85rem; color: #b4c6ec; }
.crumbs a { text-decoration: none; color: var(--gold-light); }

/* Values */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 50px; }
.value { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 28px; text-align: center; transition: transform .35s, box-shadow .35s, background .35s; }
.value i { font-size: 2rem; color: var(--gold-dark); margin-bottom: 18px; transition: transform .35s; }
.value h3 { font-size: 1.3rem; margin-bottom: 10px; }
.value p { color: var(--muted); font-size: .95rem; }
.value:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); background: var(--green-800); }
.value:hover h3, .value:hover p { color: #fff; }
.value:hover i { color: var(--gold-light); transform: scale(1.2); }

/* Table */
.table-card { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-md); overflow-x: auto; margin-top: 50px; }
.perf-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; text-align: center; min-width: 620px; }
.perf-table th { background: var(--green-800); color: #fff; padding: 16px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.perf-table th:first-child { border-radius: 12px 0 0 12px; }
.perf-table th:last-child { border-radius: 0 12px 12px 0; }
.perf-table td { padding: 16px; background: var(--cream); font-weight: 500; }
.perf-table td:first-child { border-radius: 12px 0 0 12px; font-weight: 800; color: var(--green-800); }
.perf-table td:last-child { border-radius: 0 12px 12px 0; }
.perf-table tr:hover td { background: var(--green-100); }
.grade { display: inline-block; min-width: 40px; padding: 4px 14px; border-radius: 999px; background: var(--gold); color: var(--green-900); font-weight: 800; }
.pos { color: #1b8a4b; font-weight: 700; }
.neg { color: #c0392b; font-weight: 700; }

/* Gallery page grid */
.masonry { columns: 4 260px; column-gap: 20px; }
.g-item { position: relative; margin-bottom: 20px; border-radius: 18px; overflow: hidden; break-inside: avoid; box-shadow: var(--shadow-sm); cursor: zoom-in; transition: box-shadow .4s, transform .4s; }
.g-item img { width: 100%; height: auto; transition: transform .7s; }
.g-item:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.g-item:hover img { transform: scale(1.1); }
.g-cap { position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; color: #fff; font-weight: 600; background: linear-gradient(transparent, rgba(10,26,63,.9)); transform: translateY(100%); transition: transform .4s; }
.g-item:hover .g-cap { transform: translateY(0); }
.lightbox { position: fixed; inset: 0; background: rgba(5,12,32,.92); z-index: 3000; display: none; align-items: center; justify-content: center; padding: 30px; backdrop-filter: blur(6px); }
.lightbox.open { display: flex; animation: fadeIn .3s; }
.lightbox img { max-height: 88vh; max-width: 92vw; border-radius: 14px; box-shadow: var(--shadow-lg); }
.lightbox button { position: absolute; top: 24px; right: 30px; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; }
@keyframes fadeIn { from { opacity: 0; } }

/* Admissions / contact */
.two-col { display: grid; grid-template-columns: 1fr 1.8fr; gap: 40px; align-items: start; }
.two-col.even { grid-template-columns: 1fr 1fr; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 42px; box-shadow: var(--shadow-sm); }
.card.dark { background: linear-gradient(160deg, var(--green-800), var(--green-900)); color: #fff; border: 0; }
.card.dark h2, .card.dark h3 { color: #fff; }
.card h2 { font-size: 1.8rem; margin-bottom: 26px; }
.req-list li { display: flex; gap: 14px; margin-bottom: 18px; color: #d6e1f7; }
.req-list i { color: var(--gold-light); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.field, .form-input, .form-select, textarea.form-input {
  width: 100%; padding: 15px 18px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--cream);
  font: inherit; color: var(--ink); outline: none; transition: border-color .25s, box-shadow .25s, background .25s;
}
.form-input:focus, .form-select:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(214,58,63,.18); }
textarea.form-input { resize: vertical; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--green-800); font-size: .9rem; }
.btn-block { width: 100%; }
.contact-item { display: flex; gap: 18px; align-items: center; margin-bottom: 26px; }
.contact-icon { flex: 0 0 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--green-800); color: var(--gold-light); font-size: 1.2rem; transition: transform .3s; }
.contact-item:hover .contact-icon { transform: rotate(-8deg) scale(1.08); }
.contact-item h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; }
.contact-item p { color: var(--muted); }
.map-frame { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-md); height: 460px; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* Footer */
.site-footer { background: var(--green-900); color: #b4c6ec; position: relative; }
.site-footer::before { content: ''; display: block; height: 5px; background: linear-gradient(90deg, var(--gold), var(--green-600), var(--gold)); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1.2fr; gap: 50px; padding: 80px 0 50px; }
.site-footer h3 { color: #fff; font-size: 1.2rem; margin-bottom: 22px; position: relative; padding-bottom: 12px; }
.site-footer h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; background: var(--gold); }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-brand img { width: auto; height: 74px; object-fit: contain; }
.footer-brand strong { color: #fff; font-family: var(--font-head); font-size: 1.2rem; line-height: 1.2; }
.footer-motto { font-style: italic; color: var(--gold-light); margin-top: 14px; }
.site-footer li { margin-bottom: 12px; }
.site-footer a { text-decoration: none; transition: color .2s, padding-left .2s; }
.site-footer li a:hover { color: var(--gold-light); padding-left: 6px; }
.site-footer li i { color: var(--gold); width: 22px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 24px 0; text-align: center; font-size: .85rem; }
.footer-bottom .credit { display: block; margin-top: 6px; font-size: .75rem; color: #7f8db0; letter-spacing: .04em; }

/* At a glance (about) */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 46px; text-align: left; }
.fact { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: transform .3s, box-shadow .3s; }
.fact:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.fact i { flex: 0 0 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--green-800); color: var(--gold-light); font-size: 1.1rem; }
.fact small { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-dark); font-weight: 700; }
.fact strong { font-size: 1.02rem; color: var(--green-900); }
.location-note { max-width: 760px; margin: 36px auto 0; color: var(--muted); }
.location-note p + p { margin-top: 10px; }
.location-note i { color: var(--gold); margin-right: 8px; }

/* KCSE target banner (academics) */
.kcse { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; border-radius: 26px; padding: 40px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.kcse::after { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(var(--gold), transparent 70%); opacity: .2; right: -120px; top: -160px; }
.kcse-box { text-align: center; position: relative; z-index: 1; }
.kcse-box small { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: #b4c6ec; font-weight: 700; }
.kcse-box strong { display: block; font-family: var(--font-head); font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1.1; }
.kcse-box .grade { margin-top: 14px; }
.kcse-box.target strong { color: var(--gold-light); }
.kcse-arrow { font-size: 2rem; color: var(--gold-light); position: relative; z-index: 1; text-align: center; }
.kcse-arrow span { display: block; font-family: var(--font-head); font-style: italic; font-size: 1rem; color: #fff; margin-top: 6px; }

/* Pathways */
.pathways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 50px; text-align: left; }
.pathway { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; transition: transform .35s, box-shadow .35s; }
.pathway:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.pathway-head { background: var(--green-800); color: #fff; padding: 22px 26px; display: flex; align-items: center; gap: 14px; }
.pathway:nth-child(2) .pathway-head { background: var(--gold-dark); }
.pathway:nth-child(3) .pathway-head { background: var(--green-600); }
.pathway-head i { font-size: 1.4rem; opacity: .9; }
.pathway-head h3 { color: #fff; font-size: 1.4rem; }
.pathway ul { padding: 10px 26px 24px; }
.pathway li { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.pathway li:last-child { border-bottom: 0; }
.pathway li b { color: var(--green-800); display: block; }
.pathway li span { color: var(--muted); font-size: .92rem; }
.subject-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.subject-cols .card h3 { font-size: 1.4rem; margin-bottom: 18px; }
.card.dark .check-list i { color: var(--gold-light); }

/* Student life */
.pill-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; color: var(--green-800); font-size: .92rem; transition: background .25s, color .25s, transform .25s; }
.pill i { color: var(--gold); }
.pill:hover { background: var(--green-800); color: #fff; transform: translateY(-2px); }
.societies { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 40px; }
.society { background: linear-gradient(160deg, var(--green-800), var(--green-900)); color: #fff; border-radius: var(--radius); padding: 26px 20px; text-align: center; }
.society i { font-size: 1.6rem; color: var(--gold-light); margin-bottom: 12px; }
.society strong { display: block; font-family: var(--font-head); font-size: 1.15rem; }
.games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.games-grid img { width: 100%; height: 440px; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-lg); }
.games-grid h3 { font-size: 1.3rem; margin: 26px 0 14px; }
.facilities { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 46px; text-align: left; }
.facility { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .35s, box-shadow .35s; }
.facility:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.facility img { width: 100%; height: 200px; object-fit: cover; }
.facility div { padding: 20px 22px 24px; }
.facility h3 { font-size: 1.2rem; margin-bottom: 8px; }
.facility p { color: var(--muted); font-size: .92rem; }

@media (max-width: 1024px) {
  .facts, .pathways { grid-template-columns: 1fr 1fr; }
  .facilities, .societies { grid-template-columns: 1fr 1fr; }
  .games-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .facts, .pathways, .subject-cols, .facilities { grid-template-columns: 1fr; }
  .kcse { grid-template-columns: 1fr; padding: 30px 22px; }
  .kcse-arrow i { transform: rotate(90deg); }
  .games-grid img { height: 300px; }
}

/* ================= NEWS ================= */
.home-news { padding-top: 90px; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.news-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; transition: transform .35s, box-shadow .35s;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.news-card-img { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg, var(--green-800), var(--green-600)); overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.news-card:hover .news-card-img img { transform: scale(1.06); }
.news-card-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; color: rgba(255,255,255,.35); }
.news-cat {
  position: absolute; left: 14px; bottom: 14px; background: #fff; color: var(--green-800); font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.news-cat i { color: var(--gold); margin-right: 4px; }
.news-pin { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #fff; font-size: .85rem; }
.news-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--muted); }
.news-meta i { color: var(--gold); margin-right: 4px; }
.news-meta .upcoming { color: var(--gold-dark); font-weight: 700; }
.news-card h3 { font-size: 1.3rem; line-height: 1.3; }
.news-card p { color: var(--muted); font-size: .94rem; }
.news-more { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: .88rem; color: var(--green-700); }
.news-more i { transition: transform .3s; margin-left: 4px; }
.news-card:hover .news-more i { transform: translateX(5px); }

.news-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.news-filters a { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 600; font-size: .88rem; color: var(--green-800); transition: .25s; }
.news-filters a:hover { border-color: var(--green-800); }
.news-filters a.on { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.news-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.news-empty i { font-size: 3rem; color: var(--gold); margin-bottom: 16px; }
.news-empty h2 { font-size: 1.8rem; margin-bottom: 8px; }
.news-pager { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 50px; color: var(--muted); font-size: .9rem; }
.news-pager .btn { padding: 11px 22px; }
.news-pager .disabled { opacity: .35; pointer-events: none; }

/* Key dates strip */
.key-dates-wrap { position: relative; z-index: 5; margin-top: -50px; }
.key-dates { display: flex; align-items: stretch; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.key-dates-title { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 20px 26px; background: var(--green-800); color: #fff; font-family: var(--font-head); font-size: 1.15rem; line-height: 1.1; }
.key-dates-title i { font-size: 1.6rem; color: var(--gold-light); }
.key-date { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 18px 20px; text-decoration: none; color: inherit; border-left: 1px solid var(--line); transition: background .25s; }
.key-date:hover { background: var(--green-100); }
.kd-cal { flex: 0 0 56px; height: 60px; border-radius: 12px; background: #fdeeee; color: var(--gold-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.kd-cal b { font-family: var(--font-head); font-size: 1.5rem; line-height: 1; letter-spacing: 0; color: var(--green-800); }
.kd-text { min-width: 0; }
.kd-text strong { display: block; font-size: .92rem; color: var(--green-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kd-text small { color: var(--muted); font-size: .78rem; }

/* Article */
.news-hero h1 { max-width: 900px; margin-inline: auto; }
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 50px; align-items: start; }
.article { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 40px; box-shadow: var(--shadow-sm); }
.article-img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 16px; margin-bottom: 30px; }
.article p { color: #3a4560; font-size: 1.05rem; line-height: 1.8; margin-bottom: 18px; }
.article .article-lead { font-size: 1.2rem; color: var(--green-900); font-weight: 500; border-left: 4px solid var(--gold); padding-left: 18px; }
.article-date { display: flex; align-items: center; gap: 16px; background: var(--cream); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin-bottom: 28px; }
.article-date.upcoming { background: #fdeeee; border-color: #f4c5c7; }
.article-date small { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); font-weight: 700; }
.article-date strong { font-size: 1.1rem; color: var(--green-900); }
.article-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 30px; font-size: .88rem; color: var(--muted); }
.share { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .85rem; color: #fff; }
.share.wa { background: #25d366; }
.share.fb { background: #1877f2; }
.share.back { background: var(--cream); color: var(--green-800); border: 1px solid var(--line); margin-left: auto; }
.article-side { position: sticky; top: 110px; }
.side-box { background: linear-gradient(160deg, var(--green-800), var(--green-900)); color: #fff; border-radius: 20px; padding: 28px; }
.side-box h3 { color: #fff; font-size: 1.3rem; margin-bottom: 6px; }
.side-box p { color: #c9d6f2; margin-bottom: 16px; font-size: .92rem; }
.side-box a { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: .92rem; word-break: break-all; }
.side-box a i { color: var(--gold-light); }

@media (max-width: 1024px) {
  .news-grid { grid-template-columns: 1fr 1fr; }
  .article-wrap { grid-template-columns: 1fr; }
  .article-side { position: static; }
  .key-dates { flex-wrap: wrap; }
  .key-dates-title { flex-basis: 100%; padding: 14px 22px; }
  .key-date { flex-basis: 50%; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; }
  .article { padding: 24px 20px; }
  .key-date { flex-basis: 100%; border-left: 0; }
  .share.back { margin-left: 0; }
}

/* Reveal animations */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .12s; } .js .reveal.d2 { transition-delay: .24s; }

/* Responsive */
@media (max-width: 1024px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .split, .principal-grid, .two-col, .two-col.even { grid-template-columns: 1fr; }
  .principal-photo { max-width: 360px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pillars, .values { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .topbar .hide-sm { display: none; }
}
@media (max-width: 1100px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 0; right: -100%; height: 100vh; width: 80%; max-width: 320px; background: #fff;
    flex-direction: column; align-items: flex-start; padding: 100px 28px 30px; gap: 4px;
    box-shadow: -10px 0 40px rgba(0,0,0,.2); transition: right .4s ease;
  }
  .main-nav.active { right: 0; }
  .main-nav a { width: 100%; border-bottom: 1px solid var(--line); padding: 14px 4px; }
  .main-nav .btn { margin: 18px 0 0; width: 100%; border: 0; }
  .hero-scroll { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 70px 0; }
  .brand-text small { display: none; }
  .pillars, .values, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .stat { padding: 22px 16px; flex-direction: column; text-align: center; gap: 10px; }
  .stat-icon { flex-basis: 44px; width: 44px; height: 44px; }
  .stat-num { font-size: 1.9rem; }
  .m-item { width: 250px; height: 175px; }
  .split-img img { height: 380px; }
  .split-img .float-card { left: 10px; bottom: -20px; }
  .card { padding: 28px 22px; }
  .hero-content { padding: 70px 0 130px; }
  .hero-overlay { background: linear-gradient(180deg, rgba(10,26,63,.55) 0%, rgba(10,26,63,.6) 50%, rgba(10,26,63,.8) 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .hero-slide { animation: none !important; }
  .hero-slide:first-child { opacity: 1; }
}
