/* ==========================================================================
   Arab Episcopal School — Walker-inspired theme (green)
   Mobile-first. Breakpoints: 640px, 900px, 1200px
   ========================================================================== */

:root {
  --green-deep: #0f2e1e;
  --green: #1c5a38;
  --green-mid: #2e7d50;
  --green-soft: #e8f2ec;
  --gold: #d9a441;
  --gold-dark: #b07f1f;
  --ink: #17231c;
  --body: #55635a;
  --paper: #ffffff;
  --paper-soft: #f3f7f4;
  --line: #dde8e0;
  --white: #ffffff;
  --focus: #1e7fbf;
  --radius: 14px;
  --shadow: 0 18px 40px -20px rgba(15, 46, 30, 0.4);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.18; color: var(--green-deep); margin: 0 0 0.6em; font-weight: 900; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--green); }
img, svg, video, iframe { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  clip-path: inset(50%);
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--green); color: #fff; padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px; text-decoration: none; z-index: 120;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
  font-weight: 800; color: var(--gold-dark); margin-bottom: 0.6rem;
}

.serif { font-family: var(--font-serif); font-weight: 700; }

.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-tint { background: var(--paper-soft); }
.section-dark { background: var(--green-deep); color: rgba(255, 255, 255, 0.85); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .eyebrow { color: var(--gold); }
.section-head { max-width: 760px; margin-bottom: 2.4rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--body); font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.8rem 1.6rem; border-radius: 8px;
  text-decoration: none; font-weight: 800; font-size: 0.92rem; letter-spacing: 0.02em;
  border: 2px solid transparent; transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-mid); }
.btn-accent { background: var(--gold); color: var(--green-deep); }
.btn-accent:hover { background: var(--gold-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.14); }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn-ghost:hover { background: var(--green-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: inherit; }
.brand img { width: 46px; height: auto; }
.brand-name strong { display: block; font-size: 1.02rem; color: var(--green-deep); font-weight: 900; line-height: 1.15; }
.brand-name small { font-size: 0.74rem; color: var(--body); letter-spacing: 0.08em; text-transform: uppercase; }

.header-toplinks { display: none; margin-left: auto; }
.header-toplinks ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.2rem; }
.header-toplinks a {
  font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  text-decoration: none; color: var(--green);
}
.header-toplinks a:hover { color: var(--green-mid); }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 11px; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.nav-toggle-bar { height: 2px; width: 100%; background: var(--green); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Full-screen menu overlay */
.menu-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.9);
  padding: 1.5rem clamp(1rem, 4vw, 2rem) 3rem;
  overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}
.menu-overlay.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.menu-overlay-head { display: flex; align-items: center; justify-content: space-between; max-width: 1180px; margin-inline: auto; }
.menu-overlay-head .brand-name strong { color: var(--white); }
.menu-overlay-head .brand-name small { color: rgba(255, 255, 255, 0.6); }
.menu-close { background: none; border: 1px solid rgba(255, 255, 255, 0.35); color: var(--white); font-size: 1.5rem; line-height: 1; width: 46px; height: 46px; border-radius: 10px; cursor: pointer; }
.menu-cols { display: grid; gap: 2rem; max-width: 1180px; margin: 2.5rem auto 0; }
.menu-col-title {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem; font-weight: 800;
  color: var(--gold); margin-bottom: 0.9rem;
}
.menu-col ul { list-style: none; margin: 0; padding: 0; }
.menu-col li { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.menu-col a {
  display: block; padding: 0.8rem 0.15rem; color: var(--white); text-decoration: none;
  font-size: 1.15rem; font-weight: 700; font-family: var(--font-serif);
}
.menu-col a:hover { color: var(--gold); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(150deg, var(--green-deep) 0%, var(--green) 80%);
  color: var(--white); padding: clamp(3.5rem, 9vw, 6rem) 0;
}
.page-hero .container { max-width: 900px; }
.page-hero h1 { color: var(--white); margin-bottom: 0.4rem; }
.page-hero .eyebrow { color: var(--gold); }
.page-hero p.sub { color: rgba(255, 255, 255, 0.82); font-size: 1.08rem; max-width: 60ch; }
.breadcrumb { font-size: 0.82rem; color: rgba(255, 255, 255, 0.7); margin-bottom: 1rem; }
.breadcrumb a { color: var(--gold); text-decoration: none; }

/* ---------- Hero slider (home) ---------- */
.hero { position: relative; color: var(--white); overflow: hidden; background: var(--green-deep); }
.hero-slide {
  position: relative; min-height: clamp(420px, 78vh, 640px);
  display: flex; align-items: center;
  background-size: cover; background-position: center 30%;
}
.hero-slide::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(9, 30, 19, 0.82) 0%, rgba(9, 30, 19, 0.45) 55%, rgba(9, 30, 19, 0.25) 100%);
}
.hero-copy { position: relative; max-width: 720px; padding-block: clamp(4rem, 10vw, 7rem); }
.hero-copy .eyebrow { color: var(--gold); }
.hero-copy h1 { color: var(--white); font-family: var(--font-serif); font-weight: 700; }
.hero-copy h1 em { color: var(--gold); font-style: italic; }
.hero-copy .lede { color: rgba(255, 255, 255, 0.85); font-size: clamp(1.05rem, 2.4vw, 1.28rem); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.hero-slider { position: relative; }
.hero-slide:not(.is-active) { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.hero-slide.is-active { opacity: 1; }
.hero-slider.transition .hero-slide { transition: opacity 0.8s ease; }

.hero-nav { position: absolute; inset-inline: 0; bottom: 0; z-index: 5; }
.hero-dots { position: absolute; bottom: 1.4rem; left: clamp(1rem, 4vw, 2rem); display: flex; gap: 0.6rem; }
.hero-dots button {
  width: 34px; height: 4px; border: 0; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.35); border-radius: 2px; transition: background 0.2s ease;
}
.hero-dots button.is-active { background: var(--gold); }
.hero-arrows { position: absolute; right: clamp(1rem, 4vw, 2rem); bottom: 0.9rem; display: flex; gap: 0.6rem; }
.hero-arrows button {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: rgba(9, 30, 19, 0.55); color: var(--white); border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 1.15rem; line-height: 1; transition: background 0.15s ease;
}
.hero-arrows button:hover { background: var(--green); }

.hero-strip {
  position: relative; z-index: 4; display: flex; flex-wrap: wrap;
  background: rgba(9, 30, 19, 0.55); border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-strip span {
  flex: 1 1 25%; padding: 1.05rem 1rem; text-align: center;
  font-weight: 900; font-size: clamp(1rem, 2.4vw, 1.2rem); color: var(--gold);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.hero-strip span small { display: block; font-size: 0.7rem; color: rgba(255, 255, 255, 0.75); font-weight: 700; letter-spacing: 0.08em; }
.hero-strip span:last-child { border-right: 0; }

/* ---------- We Believe band ---------- */
.we-believe { position: relative; background: var(--paper); }
.we-believe-inner { display: grid; gap: 2rem; align-items: center; }
.we-believe-text .lead-statement { font-family: var(--font-serif); font-size: clamp(1.8rem, 4.5vw, 3rem); line-height: 1.15; color: var(--green-deep); font-weight: 700; margin-bottom: 0.6em; }
.we-believe-text .lead-statement em { color: var(--green); font-style: italic; }
.we-believe-facts { display: grid; gap: 1rem; }
.fact-chip {
  background: var(--green-soft); border-left: 4px solid var(--green); border-radius: 10px;
  padding: 1rem 1.2rem; font-weight: 700; color: var(--green-deep);
}

/* ---------- Video banner ---------- */
.video-banner { background: var(--green-deep); color: var(--white); padding-block: 0; }
.video-banner .container { display: grid; gap: 2rem; align-items: center; padding-block: clamp(3rem, 7vw, 5rem); }
.video-banner .eyebrow { color: var(--gold); }
.video-banner h2 { color: var(--white); font-family: var(--font-serif); font-weight: 700; }
.video-banner p { color: rgba(255, 255, 255, 0.82); max-width: 50ch; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.6); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Value cards ---------- */
.value-grid { display: grid; gap: 1.2rem; }
.value-card {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 320px;
  display: flex; align-items: flex-end; color: var(--white);
  background-size: cover; background-position: center;
  box-shadow: var(--shadow); text-decoration: none;
}
.value-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 30, 19, 0.05) 30%, rgba(9, 30, 19, 0.88) 100%); }
.value-card-body { position: relative; padding: 1.6rem; }
.value-number { font-family: var(--font-serif); font-size: 2.6rem; font-weight: 700; color: var(--gold); line-height: 1; display: block; margin-bottom: 0.4rem; }
.value-card h3 { color: var(--white); text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.1rem; margin-bottom: 0.3rem; }
.value-card p { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; margin-bottom: 0.7rem; }
.value-card .card-link { color: var(--gold); font-weight: 800; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Stats / cutout band ---------- */
.stats-band { background: linear-gradient(140deg, var(--green) 0%, var(--green-deep) 78%); color: var(--white); padding-block: clamp(3rem, 7vw, 5rem); }
.stats-band .container { display: grid; gap: 2.5rem; align-items: center; }
.stats-band h2 { color: var(--white); font-family: var(--font-serif); font-weight: 700; }
.stats-band h2 em { color: var(--gold); font-style: italic; }
.stats-array { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat-block {
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px; padding: 1.4rem 1.2rem; text-align: center;
}
.stat-block .num { font-family: var(--font-serif); font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 700; color: var(--gold); line-height: 1; }
.stat-block .lbl { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.85); }
.stat-note { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); margin-top: 1rem; }

/* ---------- Photo showcases ---------- */
.photo-grid { display: grid; gap: 1rem; }
.photo-item { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--green-soft); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.photo-item:hover img { transform: scale(1.05); }
.photo-item figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 2.2rem 1rem 0.8rem;
  background: linear-gradient(180deg, transparent, rgba(9, 30, 19, 0.82));
  color: var(--white); font-size: 0.88rem; font-weight: 700;
}

/* Auto-rotating featured slider */
.feature-slider { position: relative; overflow: hidden; }
.feature-slide { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--green-soft); }
.feature-slide img { width: 100%; height: 100%; object-fit: cover; }
.feature-slide:not(.is-active) { display: none; }
.feature-slide .f-caption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 3rem 1.4rem 1.2rem;
  background: linear-gradient(180deg, transparent, rgba(9, 30, 19, 0.85));
  color: var(--white); font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700;
}
.feature-slider .f-thumbs { position: absolute; bottom: 0.8rem; left: 0; right: 0; display: flex; gap: 0.5rem; padding: 0 1.4rem; z-index: 3; }
.feature-slider .f-thumbs button {
  flex: 1; height: 3px; border: 0; padding: 0; cursor: pointer; border-radius: 2px;
  background: rgba(255, 255, 255, 0.4); transition: background 0.2s ease;
}
.feature-slider .f-thumbs button.is-active { background: var(--gold); }

/* ---------- Two-col / prose ---------- */
.two-col { display: grid; gap: 2rem; }
.prose p { color: var(--body); }
.prose strong { color: var(--ink); }
.photo-duo { display: grid; gap: 1rem; }
.photo-duo figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo-duo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.photo-duo.at-50 figure:nth-child(2) { margin-top: 2rem; }

/* ---------- Mission section ---------- */
.mission-statement {
  background: var(--green-soft); border-radius: var(--radius); border-top: 6px solid var(--green);
  padding: clamp(1.6rem, 5vw, 3rem); margin-top: 1.5rem;
}
.mission-statement p { font-family: var(--font-serif); font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 700; color: var(--green-deep); line-height: 1.35; margin: 0; }
.mission-statement p em { color: var(--green); }

/* ---------- Divisions cards ---------- */
.div-grid { display: grid; gap: 1.2rem; }
.div-card {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column;
}
.div-card figure { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.div-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.div-card:hover img { transform: scale(1.05); }
.div-card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.div-card-body h3 { color: var(--green); text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.08rem; }
.div-card-body p { color: var(--body); font-size: 0.96rem; }
.div-card-body .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Tab panel (divisions) ---------- */
.tab-panel { display: grid; gap: 1.5rem; }
.tab-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.tab-list button {
  border: 1px solid var(--line); background: var(--white); color: var(--green-deep);
  padding: 0.65rem 1.1rem; border-radius: 999px; font-weight: 800; font-size: 0.9rem;
  cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tab-list button:hover { border-color: var(--green); }
.tab-list button.is-active { background: var(--green); border-color: var(--green); color: var(--white); }
.tab-pane { display: none; }
.tab-pane.is-active { display: grid; gap: 1.6rem; align-items: center; }
.tab-pane .pane-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.tab-pane .pane-media img { width: 100%; height: 100%; object-fit: cover; }
.tab-pane h3 { color: var(--green); text-transform: uppercase; letter-spacing: 0.05em; }
.tab-pane p { color: var(--body); }
.tab-pane ul.tick-list { margin-top: 0.4rem; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; color: var(--white);
  background-size: cover; background-position: center;
  padding-block: clamp(4rem, 9vw, 6.5rem); text-align: center;
}
.cta-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 30, 19, 0.78), rgba(9, 30, 19, 0.9)); }
.cta-band .container { position: relative; }
.cta-band .eyebrow { color: var(--gold); }
.cta-band h2 { color: var(--white); font-family: var(--font-serif); font-weight: 700; }
.cta-band p.lede { color: rgba(255, 255, 255, 0.85); max-width: 54ch; margin-inline: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 1.5rem; }

/* ---------- News cards ---------- */
.news-grid { display: grid; gap: 1.2rem; }
.news-card {
  border-left: 4px solid var(--gold); background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  padding: 1.2rem 1.4rem; box-shadow: var(--shadow);
}
.news-date { font-size: 0.75rem; font-weight: 800; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.09em; }
.news-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; font-family: var(--font-serif); font-weight: 700; }
.news-card p:last-child { margin: 0; color: var(--body); font-size: 0.95rem; }

/* ---------- Cards (general) ---------- */
.card-grid { display: grid; gap: 1.2rem; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.5rem; color: var(--green); }
.card p { color: var(--body); }
.card .role { color: var(--gold-dark); font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem; }

.tick-list { list-style: none; margin: 0; padding: 0; }
.tick-list li { padding-left: 1.6em; position: relative; margin-bottom: 0.5em; color: var(--body); }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 0.42em;
  width: 0.78em; height: 0.78em; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--green) 32%, transparent 33%);
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 1.6rem 2.2rem; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--green);
}
.timeline .t-year { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: var(--green); }
.timeline p { color: var(--body); margin: 0.2rem 0 0; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; gap: 1rem; }
.gallery-item { cursor: pointer; position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--green-soft); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 2rem 0.8rem 0.6rem;
  background: linear-gradient(180deg, transparent, rgba(9, 30, 19, 0.8));
  color: var(--white); font-size: 0.82rem; font-weight: 700;
}

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(9, 20, 14, 0.94);
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(1000px, 92vw); max-height: 82vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.lightbox-caption { position: absolute; bottom: 1.4rem; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.9); font-size: 0.95rem; }
.lightbox button.lb-btn {
  position: absolute; background: rgba(255, 255, 255, 0.14); color: var(--white); border: 1px solid rgba(255, 255, 255, 0.3);
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.3rem; cursor: pointer;
}
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 1.2rem; }
.contact-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.contact-card .k { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-dark); }
.contact-card .v { font-size: 1.05rem; font-weight: 700; color: var(--green-deep); margin-top: 0.2rem; }
.contact-card .v a { text-decoration: none; }
.map-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 1rem; }
.map-frame iframe { width: 100%; height: 380px; border: 0; display: block; }

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 4vw, 2.2rem); box-shadow: var(--shadow); }
.form-row { display: grid; gap: 1rem; margin-bottom: 1rem; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 800; margin-bottom: 0.3rem; color: var(--green-deep); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 0.95rem; color: var(--ink); background: var(--paper);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }

.well { background: var(--green-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem; }
.well p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: rgba(255, 255, 255, 0.75); padding-block: 3rem 1.6rem; }
.footer-cols { display: grid; gap: 2rem; }
.footer-col h4 { color: var(--gold); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a { color: rgba(255, 255, 255, 0.8); text-decoration: none; font-size: 0.95rem; }
.footer-col a:hover { color: var(--gold); }
.footer-brand img { width: 52px; margin-bottom: 0.6rem; }
.footer-brand p { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; max-width: 34ch; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.footer-social a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.12); color: var(--white); text-decoration: none; font-weight: 900;
}
.footer-social a:hover { background: var(--green-mid); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.14); margin-top: 2.2rem; padding-top: 1.3rem; display: flex; flex-direction: column; gap: 0.4rem; align-items: center; text-align: center; font-size: 0.85rem; }
.footer-bottom p { margin: 0; }
.staff-login { color: rgba(255, 255, 255, 0.5); text-decoration: none; font-size: 0.8rem; }
.staff-login:hover { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .value-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr 1fr; }
  .photo-duo { grid-template-columns: 1fr 1fr; }
  .div-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-block { padding: 1.8rem 1.4rem; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .header-toplinks { display: block; }
  .nav-toggle { display: none; }
  .menu-overlay { display: none; }
  .stats-band .container { grid-template-columns: 1.1fr 1fr; }
  .we-believe-inner { grid-template-columns: 1.4fr 1fr; }
  .tab-pane.is-active { grid-template-columns: 1fr 1fr; }
  .video-banner .container { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .form-row.two { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .value-grid { grid-template-columns: repeat(4, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .div-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Background image utilities (replaces inline style="" so the CSP stays strict)
   ========================================================================== */
.bg-kindergarten        { background-image: url('../images/kindergarten.jpg'); }
.bg-kids-and-kites      { background-image: url('../images/kids-and-kites.jpg'); }
.bg-christmas-2016a     { background-image: url('../images/christmas-2016a.jpg'); }
.bg-classroom-1         { background-image: url('../images/classroom-1.jpg'); }
.bg-blue-day            { background-image: url('../images/blue-day.jpg'); }
.bg-german-visitors     { background-image: url('../images/german-visitors.jpg'); }
.bg-solar-panels        { background-image: url('../images/solar-panels.jpg'); }
.bg-second-grade        { background-image: url('../images/second-grade.jpg'); }
.bg-petra               { background-image: url('../images/petra.jpg'); }
.bg-easter              { background-image: url('../images/easter.jpg'); }
.bg-guest-visit         { background-image: url('../images/guest-visit.jpg'); }

/* ---------- Layout / spacing utilities ---------- */
.m-0 { margin: 0 !important; }
.mb-xs { margin-bottom: 0.4rem !important; }
.mt-s { margin-top: 1.1rem !important; }
.mt-m { margin-top: 1.4rem !important; }
.mt-l { margin-top: 2rem !important; }
.section.section-pad-sm { padding-block: 2rem; }

.text-body { color: var(--body); }
.text-green-deep { color: var(--green-deep); }
.text-light { color: rgba(255, 255, 255, 0.85); }
.maxw-48 { max-width: 48ch; }
.maxw-52 { max-width: 52ch; }
.maxw-54 { max-width: 54ch; }
.inline-flex { display: inline-flex; flex-wrap: wrap; gap: 0.6rem; }
.u-auto-x { margin-inline: auto; }

/* ---------- Announcement bar (top of public pages) ---------- */
.announcement-bar {
  display: block; text-align: center;
  background: var(--green); color: #fff;
  padding: 0.6rem 1rem; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; line-height: 1.4;
}
.announcement-bar:hover { background: var(--green-mid); color: #fff; }
.announcement-bar-static { display: block; position: static; margin: 0 0 1rem; }

/* ---------- Contact form status ---------- */
.form-status {
  margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 8px;
  font-weight: 700; font-size: 0.9rem;
  background: var(--green-soft); color: var(--green-deep);
}
.form-status.is-error { background: #fbe9e9; color: #b23a3a; }
.form-status.is-ok { background: var(--green-soft); color: var(--green); }

/* ==========================================================================
   Staff Area (admin dashboard) — private pages only
   ========================================================================== */
.admin-body { background: var(--paper-soft); }
.admin-topbar { position: sticky; top: 0; z-index: 90; background: var(--green-deep); }
.admin-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.admin-brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; }
.admin-brand img { width: 38px; height: auto; }
.admin-brand strong { display: block; color: #fff; font-size: 1rem; line-height: 1.15; }
.admin-brand small { display: block; color: rgba(255, 255, 255, 0.6); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.admin-top-right { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.admin-session-chip { font-size: 0.78rem; color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.12); padding: 0.35rem 0.7rem; border-radius: 999px; }
.admin-logout {
  background: none; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff;
  padding: 0.45rem 0.9rem; border-radius: 8px; cursor: pointer; font-weight: 800; font-size: 0.85rem;
}
.admin-logout:hover { background: rgba(255, 255, 255, 0.12); }
.admin-main { padding: clamp(1.5rem, 4vw, 2.5rem) 0 3rem; outline: none; }
.admin-foot { background: var(--green-deep); color: rgba(255, 255, 255, 0.5); padding: 1rem 0; font-size: 0.8rem; }
.admin-foot p { margin: 0; }

.admin-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.6rem; box-shadow: var(--shadow); margin-bottom: 1.2rem;
}
.admin-card h3 { color: var(--green); font-size: 1.1rem; margin-bottom: 0.4rem; }
.admin-card h4 { font-size: 0.95rem; margin: 1.1rem 0 0.3rem; color: var(--green-deep); }
.admin-muted { color: var(--body); font-size: 0.92rem; margin-bottom: 0.5rem; }
.admin-note { margin-top: 1rem; font-size: 0.8rem; }
.admin-card code, .admin-muted code { background: var(--green-soft); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.85em; }
.login-error { color: #a33; font-weight: 700; }
.admin-btn-block { width: 100%; }
.admin-lock-count { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 700; color: var(--gold-dark); margin: 0.3rem 0; }

.admin-login-wrap { max-width: 480px; margin: 3vh auto 0; padding-inline: 1rem; }
.admin-login-card { padding: clamp(1.5rem, 4vw, 2.2rem); }
.admin-login-card h2 { margin-bottom: 0.3rem; }
.admin-login-card .form-field { margin-bottom: 1rem; }

.admin-head { margin-bottom: 1.4rem; }
.admin-head h1 { margin-bottom: 0.1rem; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.admin-tab {
  border: 1px solid var(--line); background: var(--white); color: var(--green-deep);
  padding: 0.6rem 1.1rem; border-radius: 999px; font: inherit; font-weight: 800; font-size: 0.9rem;
  cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.admin-tab:hover { border-color: var(--green); }
.admin-tab.is-active { background: var(--green); border-color: var(--green); color: var(--white); }

.admin-card-grid { display: grid; gap: 1rem; }
.admin-big { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--green); line-height: 1.1; }
.admin-big.ok { color: var(--green-mid); }
.admin-big.warn { color: var(--gold-dark); }
.admin-big.bad { color: #b23a3a; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.2rem; }
.admin-link { background: none; border: 0; color: var(--green); font: inherit; font-size: 0.85rem; font-weight: 800; text-decoration: underline; cursor: pointer; padding: 0; }

.admin-msg { padding: 1.1rem 1.3rem; }
.admin-msg-meta { font-size: 0.85rem; color: var(--body); margin-bottom: 0.4rem; }
.admin-msg-body { color: var(--ink); white-space: pre-wrap; margin-bottom: 0.4rem; }

.admin-steps { margin: 0.4rem 0 0 1.1rem; padding: 0; color: var(--body); font-size: 0.92rem; }
.admin-steps li { margin-bottom: 0.5rem; }

.admin-code { background: var(--green-deep); color: var(--green-soft); padding: 1rem; border-radius: 8px; overflow: auto; font-size: 0.84rem; line-height: 1.5; white-space: pre-wrap; }
.admin-code-block textarea {
  width: 100%; box-sizing: border-box; min-height: 2.6em; font-family: inherit; font-size: 0.9rem;
  background: var(--green-deep); color: var(--green-soft); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.7rem;
}

.audit-score { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; margin: 0.2rem 0; }
.audit-score.ok { color: var(--green-mid); }
.audit-score.bad { color: #b23a3a; }
.admin-audit-page h3 { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.audit-chip { font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 999px; font-weight: 800; }
.audit-chip.ok { background: var(--green-soft); color: var(--green-mid); }
.audit-chip.bad { background: #fbe9e9; color: #b23a3a; }
.admin-check-list { margin: 0.6rem 0 0; padding-left: 1.1rem; font-size: 0.9rem; }
.admin-check-list.info { color: var(--body); }
.admin-check-list.bad { color: #b23a3a; }

.strength-ok { color: var(--green-mid) !important; }
.strength-mid { color: var(--gold-dark) !important; }
.strength-bad { color: #b23a3a !important; }
.badtext { color: #b23a3a; }

@media (min-width: 700px) { .admin-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .admin-card-grid { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================================
   404 page
   ========================================================================== */
.notfound { text-align: center; padding: 5rem 0 4rem; }
.notfound .nf-code { font-family: var(--font-serif); font-size: clamp(3rem, 12vw, 6rem); font-weight: 700; color: var(--green); line-height: 1; }
.notfound h1 { margin: 0.4rem 0; }

/* ==========================================================================
   Small-screen refinements
   ========================================================================== */
@media (max-width: 639px) {
  .hero-strip span {
    flex: 1 1 50%; border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }
  .hero-strip span:nth-child(n+3) { border-bottom: 0; }
  .hero-strip span:nth-child(2n) { border-right: 0; }
}

@media (max-width: 640px) {
  .lightbox img { max-width: 96vw; }
  .lb-btn { width: 42px; height: 42px; font-size: 1.1rem; }
  .lb-prev { left: 0.6rem; }
  .lb-next { right: 0.6rem; }
}

/* ==========================================================================
   i18n toolbar (language + text size)
   ========================================================================== */
.aes-toolbar {
  position: relative; z-index: 95;
  background: var(--green-deep); color: #e8f0ea;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.aes-toolbar-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.4rem 0.9rem;
  padding-block: 0.35rem;
}
.aes-lang, .aes-fs { display: flex; align-items: center; gap: 0.35rem; }
.aes-lang-btn, .aes-fs-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.2em; padding: 0.24em 0.7em;
  font-size: 0.78rem; font-weight: 800; line-height: 1.2;
  letter-spacing: 0.04em; color: var(--gold);
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px; cursor: pointer; text-transform: uppercase;
}
.aes-lang-btn:hover, .aes-fs-btn:hover,
.aes-lang-btn:focus-visible, .aes-fs-btn:focus-visible {
  border-color: var(--gold); color: #fff;
}
.aes-lang-btn.is-active {
  background: var(--gold); border-color: var(--gold); color: var(--green-deep);
}
.aes-fs-btn { font-size: 0.9rem; padding: 0.1em 0.62em; }

/* ---------- Text-size engine (rem-based layout scales along) ---------- */
html:not([data-aes-fs]) { font-size: 16px; }
html[data-aes-fs="15"] { font-size: 15px; }
html[data-aes-fs="16"] { font-size: 16px; }
html[data-aes-fs="17"] { font-size: 17px; }
html[data-aes-fs="18.5"] { font-size: 18.5px; }
html[data-aes-fs="20"] { font-size: 20px; }

/* ---------- Arabic typography ---------- */
html[lang="ar"] {
  --font-sans: "Noto Kufi Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-serif: "Noto Kufi Arabic", "Segoe UI", Tahoma, Georgia, serif;
}
html[lang="ar"] body { letter-spacing: normal; }

/* ==========================================================================
   RTL overrides
   ========================================================================== */
html[dir="rtl"] .skip-link { left: auto; right: 1rem; }
html[dir="rtl"] .header-toplinks { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .nav-toggle { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .hero-dots { left: auto; right: clamp(1rem, 4vw, 2rem); }
html[dir="rtl"] .hero-arrows { right: auto; left: clamp(1rem, 4vw, 2rem); }
html[dir="rtl"] .hero-strip span { border-right: 0; border-left: 1px solid rgba(255, 255, 255, 0.18); }
html[dir="rtl"] .hero-strip span:last-child { border-left: 0; }
html[dir="rtl"] .fact-chip { border-left: 0; border-right: 4px solid var(--green); }
html[dir="rtl"] .news-card {
  border-left: 1px solid var(--line); border-right: 4px solid var(--gold);
  border-radius: var(--radius) 0 0 var(--radius);
}
html[dir="rtl"] .tick-list li { padding-left: 0; padding-right: 1.6em; }
html[dir="rtl"] .tick-list li::before { left: auto; right: 0; }
html[dir="rtl"] .timeline::before { left: auto; right: 8px; }
html[dir="rtl"] .timeline li { padding: 0 2.2rem 1.6rem 0; }
html[dir="rtl"] .timeline li::before { left: auto; right: 0; }
html[dir="rtl"] .lb-close { right: auto; left: 1rem; }
html[dir="rtl"] .lb-prev { left: auto; right: 1rem; }
html[dir="rtl"] .lb-next { right: auto; left: 1rem; }

@media (max-width: 639px) {
  html[dir="rtl"] .hero-strip span:nth-child(odd) { border-left: 1px solid rgba(255, 255, 255, 0.18); }
  html[dir="rtl"] .hero-strip span:nth-child(even) { border-left: 0; }
}
@media (max-width: 640px) {
  html[dir="rtl"] .lb-prev { left: auto; right: 0.6rem; }
  html[dir="rtl"] .lb-next { right: auto; left: 0.6rem; }
}