/* Ellen White School public site. Colours from the school crest, Lexend for easy reading.
   Loaded after the older theme CSS; every rule here is scoped to .ews-* so older pages keep working. */
:root {
  --ews-blue: #1d3fa0;      /* crest field */
  --ews-ink: #13235a;       /* crest ribbon, headings */
  --ews-gold: #f2c230;      /* crest ring */
  --ews-leaf: #4c9a2a;      /* laurel */
  --ews-sky: #f3f6fc;       /* quiet section ground */
  --ews-text: #1e2433;
  --ews-muted: #56607a;
  --ews-line: #dfe5f2;
  --ews-wrap: 1180px;
}

body { font-family: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ews-text); background: #fff; }
.ews-main { position: relative; z-index: 1; min-height: 50vh; }
.ews-wrap { max-width: var(--ews-wrap); margin: 0 auto; padding: 0 16px; }
.ews-skip { position: absolute; left: -999px; top: 8px; background: var(--ews-gold); color: var(--ews-ink); padding: 8px 14px; z-index: 100; border-radius: 6px; }
.ews-skip:focus { left: 8px; }
:where(.ews-head, .ews-strip, .ews-foot, .ews-page) a:focus-visible,
:where(.ews-page) button:focus-visible { outline: 3px solid var(--ews-gold); outline-offset: 2px; border-radius: 4px; }

/* Utility strip */
.ews-strip { background: var(--ews-ink); color: #dfe6ff; font-size: .85rem; }
.ews-strip-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; flex-wrap: wrap; }
.ews-strip-motto { opacity: .85; }
.ews-strip-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.ews-strip-links a { color: #fff; text-decoration: none; padding: 8px 0; }
.ews-strip-links a:hover { color: var(--ews-gold); }
.ews-strip-links .ews-strip-cta { background: var(--ews-gold); color: var(--ews-ink); padding: 6px 12px; border-radius: 999px; font-weight: 600; }
.ews-strip-links .ews-strip-cta:hover { color: var(--ews-ink); background: #ffd655; }

/* Header and menu */
.ews-head { background: #fff; border-bottom: 4px solid var(--ews-gold); position: sticky; top: 0; z-index: 50; }
.ews-head-in { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.ews-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ews-ink); line-height: 1.05; font-size: 1.05rem; }
.ews-brand b { font-weight: 800; font-size: 1.35rem; color: var(--ews-blue); }
.ews-brand:hover { color: var(--ews-ink); }
.ews-menu { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.ews-menu a { color: var(--ews-ink); text-decoration: none; padding: 12px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.ews-menu a:hover { background: var(--ews-sky); color: var(--ews-blue); }
.ews-menu a.on { color: var(--ews-blue); box-shadow: inset 0 -3px 0 var(--ews-blue); border-radius: 0; }
.ews-menu-btn { display: none; margin-left: auto; background: var(--ews-ink); color: #fff; border: 0; border-radius: 8px; padding: 10px 14px; font: inherit; min-height: 44px; }
@media (max-width: 980px) {
  .ews-menu-btn { display: inline-flex; gap: 8px; align-items: center; }
  .ews-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; padding: 8px 16px 16px; border-bottom: 4px solid var(--ews-gold); box-shadow: 0 12px 24px rgba(19, 35, 90, .12); }
  .ews-menu.open { display: flex; }
  .ews-menu a { padding: 14px 8px; border-bottom: 1px solid var(--ews-line); border-radius: 0; }
  .ews-menu a.on { box-shadow: inset 4px 0 0 var(--ews-blue); padding-left: 14px; }
  .ews-strip-motto { display: none; }
}

/* Page scaffolding */
.ews-page { padding: 40px 0 64px; }
.ews-page h1 { font-weight: 800; color: var(--ews-ink); font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.01em; }
.ews-page h2 { font-weight: 600; color: var(--ews-ink); font-size: 1.35rem; margin: 0 0 12px; }
.ews-lead { font-size: 1.1rem; color: var(--ews-muted); max-width: 62ch; line-height: 1.6; margin: 0 0 28px; }
.ews-back { display: inline-block; margin-bottom: 16px; color: var(--ews-blue); text-decoration: none; padding: 8px 0; }

/* The ribbon: the crest's blue banner with a gold edge. Used for the main actions and section titles. */
.ews-ribbon { position: relative; display: block; background: var(--ews-ink); color: #fff; text-decoration: none; padding: 20px 22px 20px 26px;
  border-left: 8px solid var(--ews-gold); clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 50%, 100% 100%, 0 100%); min-height: 44px; }
.ews-ribbon strong { display: block; font-size: 1.15rem; font-weight: 600; padding-right: 28px; }
.ews-ribbon span { display: block; color: #c9d4ff; font-size: .9rem; margin-top: 4px; padding-right: 28px; }
.ews-ribbon:hover, .ews-ribbon:focus-visible { background: var(--ews-blue); color: #fff; }
.ews-ribbon.leaf { border-left-color: var(--ews-leaf); }
.ews-ribbons { display: grid; gap: 12px; }
.ews-section-title { display: inline-block; background: var(--ews-ink); color: #fff; padding: 8px 34px 8px 16px; border-left: 6px solid var(--ews-gold);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%); font-size: 1.05rem; font-weight: 600; margin-bottom: 18px; }

/* Home hero */
.ews-hero { background: var(--ews-sky); padding: 44px 0; }
.ews-hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.ews-hero h1 { font-weight: 800; color: var(--ews-ink); font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08; margin: 0 0 14px; letter-spacing: -.02em; }
.ews-hero p { font-size: 1.1rem; color: var(--ews-muted); line-height: 1.6; max-width: 46ch; margin: 0 0 24px; }
.ews-arch { aspect-ratio: 4 / 5; max-height: 520px; width: 100%; border-radius: 999px 999px 18px 18px; overflow: hidden; border: 8px solid var(--ews-gold); background: var(--ews-ink); }
.ews-arch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ews-arch-empty { display: grid; place-items: center; height: 100%; }
.ews-arch-empty img { width: 60%; height: auto; object-fit: contain; }
@media (max-width: 860px) {
  .ews-hero-in { grid-template-columns: 1fr; }
  .ews-arch { max-height: 300px; aspect-ratio: 4 / 3; border-radius: 160px 160px 14px 14px; }
}

/* Lists */
.ews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.ews-item { border: 1px solid var(--ews-line); border-radius: 12px; padding: 20px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.ews-item h3 { font-size: 1.1rem; font-weight: 600; color: var(--ews-ink); margin: 0; line-height: 1.35; }
.ews-item p { margin: 0; color: var(--ews-muted); line-height: 1.55; }
.ews-item .ews-link { margin-top: auto; }
.ews-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ews-muted); font-size: .9rem; margin: 0; padding: 0; list-style: none; }
.ews-meta b { color: var(--ews-text); font-weight: 600; }
.ews-deadline { color: #8a4b00; }
.ews-link { color: var(--ews-blue); font-weight: 600; text-decoration: none; padding: 6px 0; display: inline-block; }
.ews-link:hover { text-decoration: underline; }
.ews-empty { border: 2px dashed var(--ews-line); border-radius: 12px; padding: 28px; color: var(--ews-muted); text-align: center; }

/* Buttons */
.ews-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 10px;
  background: var(--ews-blue); color: #fff; font-weight: 600; text-decoration: none; border: 0; }
.ews-btn:hover { background: var(--ews-ink); color: #fff; }
.ews-btn.ghost { background: transparent; color: var(--ews-blue); box-shadow: inset 0 0 0 2px var(--ews-blue); }
.ews-btn.ghost:hover { background: var(--ews-sky); }

/* Admissions */
.ews-schools { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ews-school { border: 1px solid var(--ews-line); border-top: 8px solid var(--ews-blue); border-radius: 12px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.ews-school.sec { border-top-color: var(--ews-leaf); }
.ews-school h2 { margin: 0; }
.ews-school p { color: var(--ews-muted); line-height: 1.6; margin: 0; }
.ews-school .ews-btn { align-self: flex-start; margin-top: 8px; }
.ews-school small { color: var(--ews-muted); }
@media (max-width: 720px) { .ews-schools { grid-template-columns: 1fr; } }

/* Job detail */
.ews-job { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 32px; align-items: start; }
.ews-prose { line-height: 1.7; max-width: 70ch; }
.ews-prose p { margin: 0 0 1em; }
.ews-aside { background: var(--ews-sky); border-radius: 12px; padding: 22px; position: sticky; top: 100px; }
.ews-aside ol { padding-left: 20px; line-height: 1.6; margin: 0 0 18px; }
.ews-aside .ews-btn { width: 100%; margin-bottom: 10px; }
.ews-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 24px; }
.ews-facts dt { color: var(--ews-muted); font-weight: 400; }
.ews-facts dd { margin: 0; font-weight: 600; }
@media (max-width: 860px) { .ews-job { grid-template-columns: 1fr; } .ews-aside { position: static; } }

/* Kuitwa Kazini */
.ews-notice-head { border-left: 8px solid var(--ews-gold); padding-left: 18px; margin-bottom: 24px; }
.ews-report { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0 0 24px; }
.ews-report div { background: var(--ews-sky); border-radius: 10px; padding: 14px 16px; }
.ews-report dt { color: var(--ews-muted); font-size: .85rem; font-weight: 400; }
.ews-report dd { margin: 4px 0 0; font-weight: 600; color: var(--ews-ink); }
.ews-names { width: 100%; border-collapse: collapse; margin: 0 0 24px; }
.ews-names th { text-align: left; background: var(--ews-ink); color: #fff; font-weight: 600; padding: 12px 14px; }
.ews-names td { padding: 12px 14px; border-bottom: 1px solid var(--ews-line); }
.ews-names tr:nth-child(even) td { background: #fafbfe; }
.ews-names td:first-child, .ews-names th:first-child { width: 3.5em; color: var(--ews-muted); }
@media (max-width: 560px) {
  .ews-names thead { display: none; }
  .ews-names tr { display: grid; grid-template-columns: 2.5em 1fr; padding: 10px 0; border-bottom: 1px solid var(--ews-line); }
  .ews-names td { border: 0; padding: 2px 6px; background: none !important; }
  .ews-names td:nth-child(3) { grid-column: 2; color: var(--ews-muted); }
}

/* Footer */
.ews-foot { background: var(--ews-ink); color: #dfe6ff; margin-top: 0; border-top: 6px solid var(--ews-gold); position: relative; z-index: 1; }
.ews-foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; padding-top: 40px; padding-bottom: 28px; }
.ews-foot h2 { color: #fff; font-size: 1rem; font-weight: 600; margin: 0 0 10px; }
.ews-foot a { display: block; color: #dfe6ff; text-decoration: none; padding: 6px 0; }
.ews-foot a:hover { color: var(--ews-gold); }
.ews-foot-motto { margin: 10px 0 0; color: #c9d4ff; }
.ews-foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 16px; padding-bottom: 20px; font-size: .85rem; color: #b8c3ea; }
.ews-visitors b { color: #fff; font-weight: 600; }
@media (max-width: 720px) { .ews-foot-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
