/*
Theme Name: Njenga Karume Senior School
Theme URI: https://nkss.sc.ke
Author: N.K.S.S Web Team
Author URI: https://nkss.sc.ke
Description: A custom WordPress theme for Njenga Karume Senior School, Molo, Nakuru County. Navy/crimson/gold brand palette, Playfair Display + Inter typography, diagonal hero, and full interior page templates. Built from the approved homepage design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nkss
Tags: education, school, custom-menu, custom-logo, featured-images, translation-ready, blog
*/

/* ============================================================
   TABLE OF CONTENTS
   1.  Root variables & reset
   2.  Base typography
   3.  Layout helpers
   4.  Header / navigation
   5.  Hero
   6.  Highlights
   7.  About strip
   8.  Values
   9.  CTA banner
   10. Footer
   11. Interior pages (page banner, content, staff, cards)
   12. News / blog
   13. Contact
   14. WordPress core classes
   15. Responsive
   ============================================================ */

/* 1. ROOT VARIABLES & RESET ---------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --navy: #0D2B5E;
  --navy-dark: #081A3D;
  --red: #C0192A;
  --red-light: #E8283C;
  --gold: #E8A020;
  --white: #FFFFFF;
  --off-white: #F4F6FA;
  --text: #1A1A2E;
  --muted: #5A6070;
  --border: rgba(13,43,94,0.12);
  --maxw: 1200px;
}

/* 2. BASE TYPOGRAPHY ---------------------------------------- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
a { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; }

/* 3. LAYOUT HELPERS ----------------------------------------- */
.container { max-width: var(--maxw); margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--red); margin-bottom: 10px;
}
.section-title {
  font-size: 34px; font-weight: 700; color: var(--navy); line-height: 1.2;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold); color: var(--navy-dark); padding: 10px 16px;
  font-weight: 600; border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn-primary, .btn-outline, .btn-gold, .btn-white {
  display: inline-block; text-decoration: none; text-align: center;
  cursor: pointer; border-radius: 4px; font-weight: 600;
  letter-spacing: 0.3px; transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-primary:hover, .btn-outline:hover, .btn-gold:hover, .btn-white:hover { opacity: 0.9; }
.btn-primary {
  background: var(--red); color: var(--white); border: none;
  padding: 12px 28px; font-size: 14px;
}
.btn-outline {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.4);
  padding: 12px 28px; font-size: 14px; font-weight: 500;
}
.btn-gold {
  background: var(--gold); color: var(--navy-dark);
  padding: 11px 26px; font-size: 14px; font-weight: 700; width: fit-content; border: none;
}
.btn-white {
  background: var(--white); color: var(--red);
  padding: 14px 32px; font-size: 15px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0; border: none;
}

/* 4. HEADER / NAVIGATION ------------------------------------ */
.topbar {
  background: var(--navy-dark); color: rgba(255,255,255,0.7);
  font-size: 12px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 7px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar-contact { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar-contact a { color: rgba(255,255,255,0.7); text-decoration: none; }
.topbar-contact a:hover { color: var(--gold); }
.topbar-right { display: flex; gap: 16px; align-items: center; }
.topbar-social a { color: rgba(255,255,255,0.6); margin-left: 10px; text-decoration: none; }
.topbar-social a:hover { color: var(--gold); }

nav.site-nav {
  background: var(--navy); position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(8,26,61,0.25);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 72px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img { width: 48px; height: 48px; border-radius: 50%; }
.nav-emblem {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-weight: 900;
  font-size: 11px; color: var(--navy-dark); letter-spacing: -0.5px; flex-shrink: 0;
}
.nav-name { font-size: 14px; font-weight: 600; color: var(--white); letter-spacing: 0.5px; line-height: 1.3; }
.nav-name span { display: block; font-size: 10px; font-weight: 400; color: var(--gold); letter-spacing: 1.5px; text-transform: uppercase; }

.nav-menu-wrap { display: flex; align-items: center; gap: 28px; }
ul.nav-menu { list-style: none; display: flex; gap: 26px; align-items: center; }
ul.nav-menu li { position: relative; }
ul.nav-menu a {
  font-size: 13px; color: rgba(255,255,255,0.78); text-decoration: none;
  font-weight: 500; transition: color 0.2s; padding: 26px 0; display: block;
}
ul.nav-menu a:hover, ul.nav-menu .current-menu-item > a,
ul.nav-menu .current-menu-ancestor > a, ul.nav-menu .current_page_parent > a { color: var(--gold); }
ul.nav-menu a:focus-visible, .nav-cta:focus-visible, .nav-toggle:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px;
}
/* Dropdown affordance */
ul.nav-menu > li.menu-item-has-children > a::after {
  content: "\25BE"; font-size: 9px; margin-left: 5px; opacity: 0.7; display: inline-block;
}
/* Dropdowns */
ul.nav-menu ul.sub-menu {
  list-style: none; position: absolute; top: 100%; left: -14px;
  background: var(--navy-dark); min-width: 220px; padding: 8px 0;
  border-top: 3px solid var(--gold); border-radius: 0 0 4px 4px;
  box-shadow: 0 12px 28px rgba(8,26,61,0.35);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all 0.18s ease; z-index: 120;
}
ul.nav-menu li:hover > ul.sub-menu,
ul.nav-menu li:focus-within > ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
ul.nav-menu ul.sub-menu li { width: 100%; }
ul.nav-menu ul.sub-menu a { padding: 10px 20px; font-size: 13px; }
ul.nav-menu ul.sub-menu a:hover { background: rgba(255,255,255,0.05); }

.nav-cta {
  background: var(--red); color: var(--white); text-decoration: none;
  padding: 9px 22px; border-radius: 4px; font-size: 13px; font-weight: 600; letter-spacing: 0.3px;
}
.nav-cta:hover { background: var(--red-light); }

/* Mobile toggle */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--white); display: block; }

/* 5. HERO --------------------------------------------------- */
.hero {
  min-height: 560px; background: var(--navy);
  position: relative; overflow: hidden; display: flex; align-items: center;
}
.hero-diagonal {
  position: absolute; top: 0; right: 0; width: 55%; height: 100%;
  background: var(--red); clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%);
}
.hero-img {
  position: absolute; top: 0; right: 0; width: 55%; height: 100%;
  clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%);
  background-size: cover; background-position: center;
}
.hero-img-placeholder {
  position: absolute; top: 0; right: 0; width: 55%; height: 100%;
  clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%);
  background: linear-gradient(135deg, #8B1010 0%, #C0192A 40%, #9B1020 100%);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px;
}
.placeholder-icon { font-size: 48px; opacity: 0.25; color: var(--white); }
.placeholder-label { font-size: 12px; color: rgba(255,255,255,0.4); letter-spacing: 1px; text-transform: uppercase; }
.hero-content-wrap { max-width: var(--maxw); margin: 0 auto; width: 100%; position: relative; z-index: 2; }
.hero-content { padding: 60px 40px 60px 40px; width: 52%; }
.hero-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 18px;
}
.hero-title { font-size: 46px; font-weight: 900; line-height: 1.1; color: var(--white); margin-bottom: 10px; }
.hero-title em { color: var(--gold); font-style: normal; }
.hero-motto {
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.55);
  letter-spacing: 1.5px; text-transform: uppercase;
  border-left: 3px solid var(--red-light); padding-left: 12px; margin-bottom: 28px; line-height: 1.6;
}
.hero-desc { font-size: 15px; color: rgba(255,255,255,0.75); line-height: 1.7; margin-bottom: 32px; max-width: 420px; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 32px; margin-top: 40px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.12); flex-wrap: wrap;
}
.stat-num { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: var(--gold); line-height: 1; }
.stat-label { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; letter-spacing: 0.5px; }

/* 6. HIGHLIGHTS --------------------------------------------- */
.highlights { background: var(--off-white); padding: 72px 40px; }
.highlight-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  max-width: var(--maxw); margin: 0 auto;
}
.highlight-card { background: var(--white); border-radius: 6px; border: 1px solid var(--border); overflow: hidden; }
.card-img { height: 140px; background-size: cover; background-position: center; }
.card-img-placeholder { height: 140px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; }
.card-img-placeholder.navy { background: var(--navy); }
.card-img-placeholder.red  { background: var(--red); }
.card-img-placeholder.dark { background: #0A1F45; }
.card-img-placeholder.deep { background: #8B1010; }
.card-img-icon { font-size: 36px; color: rgba(255,255,255,0.2); }
.card-img-text { font-size: 10px; color: rgba(255,255,255,0.3); letter-spacing: 1px; text-transform: uppercase; }
.card-body { padding: 20px; }
.card-tag { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.card-title { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.3; }
.card-text { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* 7. ABOUT STRIP ------------------------------------------- */
.about-strip { display: grid; grid-template-columns: 1fr 1fr; min-height: 380px; }
.about-img { background: var(--navy-dark); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; background-size: cover; background-position: center; }
.about-img span { font-size: 11px; color: rgba(255,255,255,0.2); letter-spacing: 1.5px; text-transform: uppercase; }
.about-content { padding: 56px 48px; background: var(--navy); display: flex; flex-direction: column; justify-content: center; }
.about-content .section-eyebrow { color: var(--gold); text-align: left; }
.about-content .section-title { color: var(--white); text-align: left; margin-bottom: 20px; }
.about-text { font-size: 15px; color: rgba(255,255,255,0.7); line-height: 1.8; margin-bottom: 32px; }
.about-facts { display: flex; gap: 32px; margin-bottom: 32px; flex-wrap: wrap; }
.about-fact-num { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--gold); }
.about-fact-label { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 2px; }

/* 8. VALUES ------------------------------------------------- */
.values { padding: 72px 40px; background: var(--white); }
.values-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 48px; max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.value-chip { border: 1.5px solid var(--navy); border-radius: 4px; padding: 20px 16px; text-align: center; }
.value-chip:nth-child(3n+1) { border-color: var(--navy); }
.value-chip:nth-child(3n+2) { border-color: var(--red); }
.value-chip:nth-child(3n)   { border-color: var(--gold); }
.value-num { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.value-chip:nth-child(3n+1) .value-num { color: var(--navy); }
.value-chip:nth-child(3n+2) .value-num { color: var(--red); }
.value-chip:nth-child(3n)   .value-num { color: var(--gold); }
.value-name { font-size: 12px; font-weight: 600; color: var(--text); letter-spacing: 0.5px; }

/* 9. CTA BANNER -------------------------------------------- */
.cta-banner { background: var(--red); padding: 56px 40px; }
.cta-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-title { font-size: 30px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.cta-sub { font-size: 15px; color: rgba(255,255,255,0.8); line-height: 1.6; max-width: 520px; }

/* 10. FOOTER ----------------------------------------------- */
footer.site-footer { background: var(--navy-dark); padding: 48px 40px 24px; color: rgba(255,255,255,0.6); }
.footer-top { max-width: var(--maxw); margin: 0 auto 40px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand img { width: 56px; height: 56px; border-radius: 50%; margin-bottom: 12px; }
.footer-brand-name { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.footer-brand-motto { font-size: 12px; color: var(--gold); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px; }
.footer-about { font-size: 13px; line-height: 1.7; }
.footer-col-title { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--white); margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.55); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { max-width: var(--maxw); margin: 0 auto; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-copy { font-size: 12px; }
.footer-location { font-size: 12px; color: var(--gold); }

/* 11. INTERIOR PAGES --------------------------------------- */
.page-banner {
  background: var(--navy); position: relative; overflow: hidden;
  padding: 64px 40px; text-align: center;
}
.page-banner::after {
  content: ""; position: absolute; top: 0; right: 0; width: 40%; height: 100%;
  background: var(--red); clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 0% 100%); opacity: 0.35;
}
.page-banner-inner { max-width: var(--maxw); margin: 0 auto; position: relative; z-index: 2; }
.page-banner .breadcrumb { font-size: 12px; color: rgba(255,255,255,0.55); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.page-banner .breadcrumb a { color: var(--gold); text-decoration: none; }
.page-banner h1 { font-size: 40px; font-weight: 900; color: var(--white); line-height: 1.15; }
.page-banner .banner-sub { font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 10px; }

.page-body { max-width: 860px; margin: 0 auto; padding: 64px 40px; }
.page-body.wide { max-width: var(--maxw); }
.page-content { font-size: 16px; line-height: 1.8; color: var(--text); }
.page-content h2 { font-size: 28px; color: var(--navy); margin: 36px 0 16px; }
.page-content h3 { font-size: 20px; color: var(--navy); margin: 28px 0 12px; }
.page-content p { margin-bottom: 18px; }
.page-content ul, .page-content ol { margin: 0 0 20px 22px; }
.page-content li { margin-bottom: 8px; }
.page-content img { border-radius: 6px; margin: 20px 0; }
.page-content a { color: var(--red); }
.page-content blockquote {
  border-left: 4px solid var(--gold); background: var(--off-white);
  padding: 18px 24px; margin: 24px 0; font-style: italic; color: var(--muted);
}

/* Staff / team grid */
.staff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 32px; }
.staff-card { background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; text-align: center; }
.staff-photo { height: 200px; background: var(--off-white); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; background-size: cover; background-position: center; }
.staff-photo .placeholder-icon { color: var(--navy); opacity: 0.15; }
.staff-photo .placeholder-label { color: var(--muted); }
.staff-info { padding: 16px; }
.staff-name { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--navy); }
.staff-role { font-size: 12px; color: var(--red); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Info cards (facilities, programmes) */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.info-card { background: var(--white); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 6px; padding: 24px; }
.info-card h3 { font-size: 18px; color: var(--navy); margin-bottom: 10px; }
.info-card p { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* 12. NEWS / BLOG ------------------------------------------ */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.news-card { background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.news-thumb { height: 180px; background: var(--off-white); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.news-card-body { padding: 20px; }
.news-date { font-size: 11px; color: var(--red); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.news-title { font-size: 18px; color: var(--navy); margin-bottom: 10px; line-height: 1.3; }
.news-title a { color: var(--navy); text-decoration: none; }
.news-title a:hover { color: var(--red); }
.news-excerpt { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.read-more { font-size: 13px; font-weight: 600; color: var(--red); text-decoration: none; }

.post-meta { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.post-meta span { margin-right: 16px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--border); border-radius: 4px; text-decoration: none; color: var(--navy); font-size: 14px; }
.pagination .current { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* 13. CONTACT ---------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-info-block { background: var(--off-white); border-radius: 8px; padding: 32px; }
.contact-item { margin-bottom: 22px; }
.contact-item .label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--red); font-weight: 600; margin-bottom: 4px; }
.contact-item .value { font-size: 15px; color: var(--text); }
.contact-map { width: 100%; height: 320px; border: 0; border-radius: 8px; margin-top: 32px; }
.contact-form-note { background: var(--off-white); border: 1px dashed var(--border); border-radius: 8px; padding: 24px; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* 14. WORDPRESS CORE CLASSES -------------------------------- */
.alignleft { float: left; margin: 6px 24px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 24px; }
.aligncenter { display: block; margin: 12px auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; margin-top: 6px; }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
}
.sticky, .gallery-caption, .bypostauthor { display: block; }
.wp-block-image img { border-radius: 6px; }

/* 15. RESPONSIVE ------------------------------------------- */
/* 13. ABOUT PAGE ------------------------------------------- */
.about-intro { max-width: 760px; margin: 0 auto; text-align: center; }
.about-intro .section-eyebrow { color: var(--red); }
.about-intro-text { font-size: 17px; line-height: 1.9; color: var(--muted); margin-top: 18px; }

/* Mission / Vision / Motto */
.mvm-section { background: var(--navy); padding: 72px 40px; }
.mvm-inner { max-width: var(--maxw); margin: 0 auto; }
.mvm-section .section-eyebrow { color: var(--gold); }
.mvm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mvm-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-top: 3px solid var(--gold); border-radius: 6px; padding: 32px 28px;
}
.mvm-card:nth-child(2) { border-top-color: var(--red-light); }
.mvm-card:nth-child(3) { border-top-color: var(--white); }
.mvm-label {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.mvm-card:nth-child(2) .mvm-label { color: var(--red-light); }
.mvm-card:nth-child(3) .mvm-label { color: rgba(255,255,255,0.75); }
.mvm-card p { font-size: 15px; line-height: 1.8; color: rgba(255,255,255,0.75); }
.mvm-card .mvm-motto {
  font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700;
  line-height: 1.4; color: var(--white); font-style: italic;
}

/* History */
.history-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.history-media img.history-photo, .history-photo-placeholder {
  width: 100%; height: 300px; border-radius: 6px; object-fit: cover; display: block;
}
.history-photo-placeholder {
  background: var(--off-white); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px;
}
.history-photo-placeholder .placeholder-icon { font-size: 40px; color: var(--navy); opacity: 0.15; }
.history-photo-placeholder .placeholder-label { color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.history-timeline { margin-top: 28px; border-left: 2px solid var(--border); padding-left: 20px; }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -26px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--gold);
}
.timeline-item:last-child::before { background: var(--red); }
.timeline-year {
  display: block; font-family: 'Playfair Display', serif; font-size: 15px;
  font-weight: 700; color: var(--navy);
}
.timeline-text { display: block; font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.history-copy .section-eyebrow { color: var(--red); }
.history-copy .section-title { margin-bottom: 20px; }

/* Fact strip */
.fact-strip { background: var(--off-white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 48px 40px; }
.fact-strip-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.fact-block { text-align: center; border-right: 1px solid var(--border); padding: 0 12px; }
.fact-block:last-child { border-right: none; }
.fact-num { display: block; font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 700; color: var(--navy); line-height: 1; }
.fact-label { display: block; font-size: 13px; font-weight: 600; color: var(--red); margin-top: 8px; }
.fact-detail { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Principal's message */
.principal-layout { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
.principal-media img.principal-photo, .principal-photo-placeholder {
  width: 100%; height: 340px; border-radius: 6px; object-fit: cover; display: block;
}
.principal-photo-placeholder {
  background: var(--off-white); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px;
}
.principal-photo-placeholder .placeholder-icon { font-size: 40px; color: var(--navy); opacity: 0.15; }
.principal-photo-placeholder .placeholder-label { color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.principal-caption { border-left: 3px solid var(--gold); padding-left: 14px; margin-top: 18px; }
.principal-name { display: block; font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; color: var(--navy); }
.principal-role { display: block; font-size: 12px; color: var(--red); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px; }
.principal-copy .section-eyebrow { color: var(--red); }
.principal-copy .section-title { margin-bottom: 20px; }

/* Board of Management */
.bom-section { background: var(--off-white); padding: 72px 40px; }
.bom-inner { max-width: var(--maxw); margin: 0 auto; }
.bom-section .section-eyebrow { color: var(--red); }
.bom-intro { max-width: 760px; margin: 0 auto; text-align: center; font-size: 15px; line-height: 1.8; color: var(--muted); }
.bom-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.bom-card {
  background: var(--white); border: 1px solid var(--border);
  border-left: 4px solid var(--navy); border-radius: 6px; padding: 22px;
}
.bom-card:nth-child(2) { border-left-color: var(--red); }
.bom-card:nth-child(3) { border-left-color: var(--gold); }
.bom-card-muted { border-left-color: var(--border); background: transparent; border-style: dashed; }
.bom-name { display: block; font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--navy); }
.bom-role { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.bom-note { text-align: center; margin-top: 40px; }

/* 14. ACADEMICS PAGE --------------------------------------- */
.curriculum-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.curriculum-note {
  max-width: 760px; margin: 32px auto 0; text-align: center;
  font-size: 14px; line-height: 1.8; color: rgba(255,255,255,0.6);
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px;
}

/* Department cards */
.dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.dept-card {
  background: var(--white); border: 1px solid var(--border);
  border-top: 3px solid var(--navy); border-radius: 6px; padding: 26px 24px;
}
.dept-card:nth-child(3n+2) { border-top-color: var(--red); }
.dept-card:nth-child(3n)   { border-top-color: var(--gold); }
.dept-name { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 700; color: var(--navy); margin-bottom: 14px; }
.dept-hod { border-left: 3px solid var(--gold); padding-left: 12px; margin-bottom: 14px; }
.dept-hod-label { display: block; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.dept-hod-name { display: block; font-size: 14px; font-weight: 600; color: var(--red); margin-top: 3px; }
.dept-text { font-size: 13px; color: var(--muted); line-height: 1.7; }

.support-strip { grid-template-columns: repeat(4, 1fr); }

/* Results placeholder */
.results-placeholder {
  max-width: 640px; margin: 40px auto 0; text-align: center;
  background: var(--white); border: 1px dashed var(--border);
  border-radius: 6px; padding: 40px 32px;
}
.results-placeholder .placeholder-icon { font-size: 40px; color: var(--navy); opacity: 0.15; display: block; margin-bottom: 12px; }
.results-placeholder-title { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.results-placeholder-text { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* 15. STUDENT LIFE PAGE ------------------------------------ */
.chip-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: 0.5px; color: var(--navy);
  border: 1.5px solid var(--navy); border-radius: 20px; padding: 7px 16px;
}
.chip:nth-child(2n) { border-color: var(--red); color: var(--red); }
.chip-muted {
  border-style: dashed; border-color: var(--border) !important;
  color: var(--muted) !important; font-weight: 500; font-style: italic;
}

/* 16. GALLERY PAGE ----------------------------------------- */
.gallery-body { padding-top: 0; }

/* Style core WP gallery blocks to brand */
.gallery-content .wp-block-gallery { gap: 14px !important; margin-bottom: 48px; }
.gallery-content .wp-block-image img,
.gallery-content .wp-block-gallery img {
  border-radius: 6px; display: block; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.gallery-content .wp-block-gallery .wp-block-image { overflow: hidden; border-radius: 6px; }
.gallery-content .wp-block-gallery .wp-block-image:hover img {
  transform: scale(1.04); box-shadow: 0 8px 24px rgba(13,43,94,0.18);
}
.gallery-content .wp-block-gallery figcaption,
.gallery-content .wp-block-image figcaption {
  font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px;
}
/* Category headings between galleries */
.gallery-content h2, .gallery-content h3 {
  font-family: 'Playfair Display', serif; color: var(--navy);
  border-left: 4px solid var(--gold); padding-left: 14px;
  margin: 48px 0 20px;
}
.gallery-content > h2:first-child, .gallery-content > h3:first-child { margin-top: 0; }

/* Empty state */
.gallery-empty {
  max-width: 640px; margin: 0 auto; text-align: center;
  background: var(--off-white); border: 1px dashed var(--border);
  border-radius: 6px; padding: 48px 32px;
}
.gallery-empty .placeholder-icon { font-size: 44px; color: var(--navy); opacity: 0.15; display: block; margin-bottom: 14px; }
.gallery-empty-title { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.gallery-empty-text { font-size: 13px; color: var(--muted); line-height: 1.8; margin-bottom: 22px; }

/* Video gallery */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.video-card { background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; background: var(--navy-dark); }
.video-embed iframe, .video-embed video, .video-embed object, .video-embed embed {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.video-fallback { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); text-align: center; }
.video-fallback a { color: var(--gold); font-size: 14px; font-weight: 600; }
.video-title { font-size: 14px; font-weight: 600; color: var(--navy); padding: 16px 18px; line-height: 1.5; }

/* 17. ADMISSIONS PAGE -------------------------------------- */
/* Steps */
.step-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
.step-card {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--border);
  border-left: 4px solid var(--navy); border-radius: 6px; padding: 24px;
}
.step-card:nth-child(2n) { border-left-color: var(--red); }
.step-card-todo { border-style: dashed; border-left-style: solid; background: var(--off-white); }
.step-num {
  font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 900;
  color: var(--gold); line-height: 1; flex-shrink: 0;
}
.step-title { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.step-text { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* Shared "needs confirming" note */
.todo-note {
  max-width: 700px; margin: 28px auto 0; text-align: center;
  font-size: 12px; font-style: italic; color: var(--muted);
  border: 1px dashed var(--border); border-radius: 4px; padding: 12px 18px;
}
.mvm-card-todo { border-style: dashed; max-width: 640px; margin: 0 auto; }

/* Fees table */
.fees-wrap { max-width: 900px; margin: 40px auto 0; }
.fees-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.fees-table thead th {
  background: var(--navy); color: var(--white);
  font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
  text-align: left; padding: 14px 16px;
}
.fees-table tbody td { padding: 16px; font-size: 14px; color: var(--text); border-top: 1px solid var(--border); }
.fees-empty {
  text-align: center !important; color: var(--muted) !important;
  font-style: italic; padding: 40px 16px !important; background: var(--off-white);
}
.fees-note { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 16px; font-style: italic; }

/* Downloads */
.download-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.download-card {
  display: block; text-decoration: none;
  background: var(--white); border: 1px solid var(--border);
  border-top: 3px solid var(--red); border-radius: 6px; padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.download-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(13,43,94,0.12); }
.download-icon { display: block; font-size: 26px; color: var(--gold); margin-bottom: 10px; }
.download-title { display: block; font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.download-desc { display: block; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* Enquiry */
.enquiry-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.enquiry-item { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 22px; }
.enquiry-label { display: block; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.enquiry-value { display: block; font-size: 14px; color: var(--text); line-height: 1.6; }

@media (max-width: 1024px) {
  .highlight-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(3, 1fr); }
  .staff-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .topbar-inner { padding: 7px 20px; }
  .nav-inner { padding: 0 20px; }
  /* Collapse menu */
  .nav-toggle { display: flex; }
  .nav-menu-wrap {
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--navy-dark); flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 0; display: none; box-shadow: 0 12px 24px rgba(0,0,0,0.3);
  }
  .nav-menu-wrap.open { display: flex; }
  ul.nav-menu { flex-direction: column; gap: 0; width: 100%; }
  ul.nav-menu > li { border-bottom: 1px solid rgba(255,255,255,0.06); }
  ul.nav-menu a { padding: 14px 24px; }
  ul.nav-menu ul.sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border-top: none; padding: 0 0 8px 12px; min-width: auto; background: transparent;
  }
  .nav-cta { margin: 12px 24px; }

  .hero { min-height: auto; }
  .hero-diagonal, .hero-img, .hero-img-placeholder { position: relative; width: 100%; height: 220px; clip-path: none; }
  .hero-content-wrap { display: flex; flex-direction: column-reverse; }
  .hero-content { width: 100%; padding: 40px 24px; }
  .hero-title { font-size: 34px; }

  .about-strip { grid-template-columns: 1fr; }
  .about-img { min-height: 240px; }
  .about-content { padding: 40px 24px; }

  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .highlights, .values, .cta-banner { padding-left: 24px; padding-right: 24px; }
  .page-banner, .page-body { padding-left: 24px; padding-right: 24px; }
  .page-banner h1 { font-size: 30px; }
  .info-grid, .news-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .highlight-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .staff-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-contact { display: none; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

/* About page responsive */
@media (max-width: 900px) {
  .mvm-grid { grid-template-columns: 1fr; }
  .history-layout { grid-template-columns: 1fr; gap: 32px; }
  .principal-layout { grid-template-columns: 1fr; gap: 32px; }
  .principal-media { max-width: 300px; }
  .fact-strip-inner { grid-template-columns: repeat(3, 1fr); gap: 28px 16px; }
  .fact-block { border-right: none; }
  .bom-grid { grid-template-columns: repeat(2, 1fr); }
  .mvm-section, .bom-section { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 560px) {
  .fact-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .bom-grid { grid-template-columns: 1fr; }
  .about-intro-text { font-size: 15px; }
}

/* Academics page responsive */
@media (max-width: 900px) {
  .curriculum-grid { grid-template-columns: 1fr; }
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .support-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .dept-grid { grid-template-columns: 1fr; }
}

/* Gallery page responsive */
@media (max-width: 900px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .video-grid { grid-template-columns: 1fr; }
  .gallery-empty { padding: 36px 22px; }
}

/* Admissions page responsive */
@media (max-width: 900px) {
  .step-list { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: repeat(2, 1fr); }
  .enquiry-grid { grid-template-columns: repeat(2, 1fr); }
  .fees-table thead { display: none; }
  .fees-table tbody td { display: block; }
}
@media (max-width: 560px) {
  .download-grid, .enquiry-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   KCSE Performance Trend table — Academics page
   ========================================================================== */

.kcse-trend {
	max-width: 860px;
	margin: 0 auto;
}

.kcse-trend-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--white);
}

.kcse-trend-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.kcse-trend-table thead th {
	background: var(--navy);
	color: var(--white);
	text-align: left;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	padding: 14px 18px;
}

.kcse-trend-table tbody td {
	padding: 12px 18px;
	border-bottom: 1px solid var(--border);
	color: var(--text);
}

.kcse-trend-table tbody tr:last-child td {
	border-bottom: none;
}

.kcse-trend-table tbody tr:nth-child(even) {
	background: var(--off-white);
}

.kcse-trend-table tbody td:first-child {
	font-weight: 600;
	color: var(--navy);
}

.kcse-trend-download {
	display: inline-block;
	margin-top: 24px;
}

/* Stacked layout on small screens */
@media (max-width: 600px) {
	.kcse-trend-table thead {
		display: none;
	}
	.kcse-trend-table,
	.kcse-trend-table tbody,
	.kcse-trend-table tr,
	.kcse-trend-table td {
		display: block;
		width: 100%;
	}
	.kcse-trend-table tr {
		border-bottom: 1px solid var(--border);
		padding: 10px 0;
	}
	.kcse-trend-table td {
		border-bottom: none;
		padding: 4px 18px;
		display: flex;
		justify-content: space-between;
		gap: 12px;
	}
	.kcse-trend-table td::before {
		content: attr(data-label);
		font-weight: 600;
		color: var(--muted);
		font-size: 11px;
		text-transform: uppercase;
		letter-spacing: 0.5px;
	}
}
