:root {
	--navy: #203a92;
	--navy-dark: #16357a;
	--blue: #0e86b5;
	--gold: #facc15;
	--gold-dark: #e0b000;
	--ink: #1a1a1a;
	--muted: #5b6675;
	--bg: #ffffff;
	--bg-soft: #f4f7fb;
	--border: #e2e8f0;
	--maxw: 1200px;
	--radius: 14px;
	font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	color: var(--ink);
	background: var(--bg);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
	font-family: 'Poppins', system-ui, sans-serif;
	color: var(--navy);
	line-height: 1.2;
	font-weight: 600;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--gold-dark); }

img { max-width: 100%; height: auto; }

.container {
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 20px;
}

.btn {
	display: inline-block;
	padding: 13px 28px;
	border-radius: 999px;
	font-weight: 600;
	font-family: 'Poppins', sans-serif;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
	cursor: pointer;
	border: 0;
}
.btn--primary { background: var(--gold); color: var(--navy-dark); }
.btn--primary:hover { background: var(--gold-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(244,180,0,.35); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--bg-soft); color: var(--navy); }
.btn--ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn--ghost:hover { background: #fff; color: var(--navy); }

.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section__eyebrow { color: var(--gold-dark); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.section__title { font-size: clamp(26px, 4vw, 38px); margin: 8px 0 12px; }
.section__sub { color: var(--muted); }

/* ---------- Top bar ---------- */
.topbar {
	background: var(--navy-dark);
	color: #cdd7e6;
	font-size: 13.5px;
}
.topbar .container { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; padding-top: 9px; padding-bottom: 9px; }
.topbar a { color: #cdd7e6; }
.topbar a:hover { color: #fff; }
.topbar__left span { margin-right: 18px; white-space: nowrap; }
.topbar__left i { color: var(--gold); margin-right: 6px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255,255,255,.96);
	backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); }
.brand img { height: 46px; width: auto; }
.brand__name { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 20px; line-height: 1; }
.brand__name span { color: var(--gold-dark); }
.brand__tag { font-size: 11.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

.main-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; align-items: center; }
.main-nav a { color: var(--navy); font-weight: 500; font-family: 'Poppins', sans-serif; padding: 6px 0; position: relative; }
.main-nav a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--gold); transition: width .2s; }
.main-nav a:hover::after, .main-nav .current_page_item > a::after { width: 100%; }
.header-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 42px; height: 42px; }
.nav-toggle span { display: block; height: 2px; background: var(--navy); margin: 6px auto; width: 24px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	color: #fff;
	background: radial-gradient(1200px 600px at 80% -10%, rgba(30,77,140,.55), transparent 60%),
	            linear-gradient(135deg, var(--navy-dark), var(--navy) 55%, var(--blue));
	overflow: hidden;
}
.hero::before {
	content: '';
	position: absolute; inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 39h40M39 0v40' stroke='%23ffffff' stroke-opacity='0.05'/%3E%3C/svg%3E");
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 96px 20px; }
.hero__badge { display: inline-block; background: rgba(244,180,0,.18); color: var(--gold); border: 1px solid rgba(244,180,0,.4); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: clamp(32px, 5vw, 54px); margin: 0 0 16px; }
.hero p { font-size: 18px; color: #d6e0ee; max-width: 540px; }
.hero__actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero__card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: 28px; backdrop-filter: blur(6px); }
.hero__card h3 { color: #fff; margin: 0 0 6px; }
.hero__card ul { list-style: none; margin: 14px 0 0; padding: 0; }
.hero__card li { padding: 10px 0; border-top: 1px solid rgba(255,255,255,.12); color: #d6e0ee; display: flex; align-items: center; gap: 10px; }
.hero__card li::before { content: '✔'; color: var(--gold); }

/* ---------- Stats ---------- */
.stats { background: var(--navy); color: #fff; }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; padding: 44px 20px; }
.stat__num { font-family: 'Poppins'; font-size: 40px; font-weight: 700; color: var(--gold); }
.stat__label { color: #cdd7e6; font-size: 14px; letter-spacing: .04em; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 26px; }
.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: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 30px;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	height: 100%;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(15,42,82,.10); border-color: transparent; }
.card__icon { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-soft); color: var(--blue); font-size: 24px; margin-bottom: 18px; }
.card h3 { font-size: 19px; margin: 0 0 8px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }

.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature__icon { flex: 0 0 44px; height: 44px; width: 44px; border-radius: 10px; background: var(--gold); color: var(--navy-dark); display: grid; place-items: center; font-weight: 700; font-family: 'Poppins'; }
.feature h4 { margin: 2px 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Split/about ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split__media { border-radius: 18px; overflow: hidden; min-height: 360px; background:
	linear-gradient(135deg, rgba(15,42,82,.85), rgba(30,77,140,.7)),
	repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 18px, transparent 18px 36px), var(--navy);
	display: grid; place-items: center; color: #fff; text-align: center; padding: 30px; }
.split__media h3 { color: #fff; }
.split ul { list-style: none; padding: 0; margin: 18px 0 0; }
.split li { padding: 10px 0 10px 30px; position: relative; color: var(--muted); border-bottom: 1px solid var(--border); }
.split li::before { content: '★'; position: absolute; left: 0; color: var(--gold); }

/* ---------- News ---------- */
.post-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .18s; }
.post-card:hover { box-shadow: 0 16px 36px rgba(15,42,82,.10); }
.post-card__thumb { height: 170px; background: linear-gradient(135deg, var(--navy), var(--blue)); position: relative; }
.post-card__cat { position: absolute; top: 14px; left: 14px; background: var(--gold); color: var(--navy-dark); font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.post-card__body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.post-card__date { font-size: 12.5px; color: var(--muted); }
.post-card h3 { font-size: 18px; margin: 6px 0 10px; }
.post-card p { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; }
.post-card .more { margin-top: auto; font-weight: 600; }

/* ---------- CTA ---------- */
.cta {
	background: linear-gradient(135deg, var(--gold), var(--gold-dark));
	color: var(--navy-dark);
	border-radius: 20px;
	padding: 54px 48px;
	text-align: center;
}
.cta h2 { color: var(--navy-dark); margin: 0 0 10px; }
.cta p { max-width: 560px; margin: 0 auto 22px; }
.cta .btn--primary { background: var(--navy); color: #fff; }
.cta .btn--primary:hover { background: var(--navy-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #aebacd; font-size: 14.5px; }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 64px 20px 36px; }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { color: #aebacd; margin: 16px 0; max-width: 320px; }
.footer-social a { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; margin-right: 8px; }
.footer-social a:hover { background: var(--gold); color: var(--navy-dark); }
.footer-col h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 6px 0; }
.footer-col a { color: #aebacd; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); text-align: center; padding: 18px 20px; font-size: 13px; color: #8595ad; }

/* ---------- Page / post ---------- */
.page-hero { background: linear-gradient(135deg, var(--navy-dark), var(--blue)); color: #fff; padding: 70px 0 60px; }
.page-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 42px); margin: 0; }
.page-hero p { color: #cdd7e6; margin: 10px 0 0; max-width: 640px; }
.breadcrumbs { font-size: 13px; color: var(--gold); margin-bottom: 12px; }
.entry { max-width: 820px; margin: 0 auto; }
.entry h2 { margin-top: 36px; }
.entry p, .entry li { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.hero .container, .split { grid-template-columns: 1fr; }
	.stats .container { grid-template-columns: repeat(2, 1fr); }
	.grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
	.site-footer .container { grid-template-columns: 1fr 1fr; }
	.main-nav { position: absolute; top: 78px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); display: none; }
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; padding: 8px 20px; }
	.main-nav li { width: 100%; border-bottom: 1px solid var(--border); }
	.main-nav a { display: block; padding: 12px 0; }
	.nav-toggle { display: block; }
	.header-cta .btn { display: none; }
}
@media (max-width: 560px) {
	.grid--2, .grid--3, .grid--4, .stats .container, .site-footer .container { grid-template-columns: 1fr; }
	.section { padding: 52px 0; }
	.hero .container { padding: 64px 20px; }
}

/* ============ King's School (kingsschool.ac.tz) header ============ */
/* Higher-specificity selector so it wins over Hello Elementor's header-footer.css
   (.site-header { position: relative; padding-block: 1rem }). */
header.site-header {
	position: sticky !important;
	top: 0;
	z-index: 1000;
	display: block;
	background: #fff;
	border-bottom: none;
	box-shadow: 0 2px 20px rgba(0,0,0,.08);
	padding: 0;
}
.site-header .container { height: auto; }

/* ---------- Top bar (maroon) ---------- */
.topbar {
	background: #380f0d;
	color: #fff;
	font-family: 'Inter', sans-serif;
	font-size: 12.5px;
	font-weight: 400;
}
.topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 46px;
	padding-top: 10px;
	padding-bottom: 10px;
	flex-wrap: wrap;
}
.topbar__left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tb-brand { font-weight: 700; font-size: 14px; color: #fff; white-space: nowrap; }
.tb-sep { width: 1px; height: 14px; background: rgba(255,255,255,.22); flex: none; }
.tb-item { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.tb-item svg { width: 13px; height: 13px; fill: #fff; opacity: .9; flex: none; }
.tb-item a { color: #fff; }
.tb-item a:hover { color: #e9c46a; }
.topbar__right { display: flex; align-items: center; gap: 8px; }
.tb-social { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; transition: background .2s, transform .2s; }
.tb-social svg { width: 14px; height: 14px; fill: #fff; }
.tb-social:hover { background: rgba(255,255,255,.28); transform: translateY(-1px); }

/* ---------- Main bar (white) ---------- */
.mainbar { background: #fff; }
.mainbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 91px;
}
.mainbar__nav { display: flex; align-items: center; gap: 12px; }

.brand { display: flex; align-items: center; gap: 14px; color: #203a92; }
.brand img { height: 55px; width: auto; display: block; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 24px; color: #203a92; letter-spacing: -.5px; line-height: 1.1; }
.brand__tag { font-family: 'Inter', sans-serif; font-weight: 500; font-size: 14px; color: #52525b; letter-spacing: .5px; margin-top: 2px; }

/* ---------- Nav ---------- */
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #203a92;
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	font-size: 14px;
	padding: 9px 12px;
	border-radius: 8px;
	line-height: 1;
	transition: color .15s ease, background .15s ease;
}
.main-nav a:hover { color: #0e86b5; background: #eef3fb; }
.main-nav li.current-menu-item > a,
.main-nav li.current_page_item > a,
.main-nav li.current-menu-ancestor > a { color: #0e86b5; }

/* dropdown chevron (overrides the legacy underline ::after) */
.main-nav a::after { display: none !important; }
.main-nav li.menu-item-has-children > a::after {
	display: block !important;
	content: '';
	width: 6px; height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	margin-left: 4px;
	transition: transform .2s ease;
}
.main-nav li.menu-item-has-children:hover > a::after { transform: rotate(225deg) translateY(-2px); }

/* dropdown panels */
.main-nav ul ul {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 14px 34px rgba(15,42,82,.14);
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
	z-index: 20;
}
.main-nav li.menu-item-has-children:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav ul ul li { width: 100%; }
.main-nav ul ul a { display: block; width: 100%; color: #203a92; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.main-nav ul ul a:hover { background: #eef3fb; color: #0e86b5; }

/* hamburger */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; padding: 0; }
.nav-toggle span { display: block; height: 2px; background: #203a92; margin: 6px auto; width: 24px; transition: .25s; border-radius: 2px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.topbar__inner { justify-content: center; text-align: center; }
	.mainbar__inner { min-height: 74px; }
	.mainbar__nav { position: static; }
	.main-nav {
		position: absolute;
		top: 100%;
		left: 0; right: 0;
		background: #fff;
		border-bottom: 1px solid #e6ebf2;
		box-shadow: 0 14px 30px rgba(15,42,82,.10);
		display: none;
		padding: 10px 0;
		z-index: 30;
	}
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0 20px; }
	.main-nav li { width: 100%; border-bottom: 1px solid #eef1f6; }
	.main-nav a { display: flex; width: 100%; color: #203a92; padding: 13px 4px; font-size: 15px; }
	.main-nav ul ul {
		position: static;
		opacity: 1; visibility: visible; transform: none;
		box-shadow: none;
		padding: 0 0 6px 14px;
		min-width: 0;
	}
	.main-nav ul ul a { padding: 10px 4px; }
	.nav-toggle { display: block; }
}
