/* ECDOE Public Portal — site stylesheet
   Brand: Eastern Cape Department of Education
   Built by ICT Directorate
*/

/* ---------- Design tokens ---------- */
:root {
  --c-blue:       #1a3a8f;
  --c-blue-deep:  #122d6e;
  --c-blue-mid:   #2a5fc4;
  --c-yellow:     #f4c842;
  --c-yellow-pale:#fef9e7;
  --c-text:       #2d3748;
  --c-muted:      #4a5568;
  --c-faint:      #718096;
  --c-border:     #e2e8f0;
  --c-light:      #f7fafc;
  --c-white:      #ffffff;
  --radius:       4px;
  --radius-lg:    8px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:    0 10px 32px rgba(0,0,0,0.12);
  --t-fast:       0.15s ease;
  --t-base:       0.25s ease;
  --font-size:    16px;
}
html { font-size: var(--font-size); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #2d3748;
  background: #ffffff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #1a3a8f; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
:focus-visible { outline: 3px solid #f4c842; outline-offset: 2px; border-radius: 2px; }

/* Skip link for screen readers */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #1a3a8f; color: #fff; padding: 10px 16px;
  z-index: 1000; font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Layout containers ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top utility bar ---------- */
.utility-bar {
  background: #1a3a8f; color: #fff;
  font-size: 13px;
}
.utility-bar .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px; padding-bottom: 8px;
  flex-wrap: wrap; gap: 8px;
}
.utility-bar a { color: #fff; }
.utility-bar .brand-name { font-weight: 600; letter-spacing: 0.3px; }

/* ---------- Header / nav ---------- */
.site-header {
  background: #fff;
  border-bottom: 4px solid #f4c842;
  position: sticky; top: 0; z-index: 100;
}
.site-header .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding-top: 12px; padding-bottom: 12px; gap: 16px;
}
.site-header .site-logo          { grid-column: 1; justify-self: start; }
.site-header .site-nav           { grid-column: 2; justify-self: center; }
.site-header .nav-toggle         { grid-column: 2; justify-self: end; }
.site-header .site-brand-cluster { grid-column: 3; justify-self: end;
  display: flex; align-items: center; gap: 12px;
}
.site-header .site-brand-cluster img { height: 44px; width: auto; display: block; }
.site-logo {
  display: flex; align-items: center; gap: 12px;
  color: #1a3a8f; font-weight: 700; font-size: 18px;
  text-decoration: none;
}
.site-logo img { height: 44px; width: auto; }
/* When the editor has set a custom header logo (e.g. coat of arms with
   writing built-in), give it more room and drop the adjacent "ECDoE" text. */
.site-logo.site-logo-custom { gap: 0; }
.site-logo.site-logo-custom img { height: 56px; max-width: 280px; object-fit: contain; }
@media (max-width: 720px) {
  .site-logo.site-logo-custom img { height: 44px; max-width: 200px; }
}
.site-nav { display: flex; align-items: center; }
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 4px;
}
.site-nav li { position: relative; }
.site-nav a {
  display: block; padding: 12px 16px;
  color: #2d3748; font-weight: 500; font-size: 15px;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover, .site-nav a:focus, .site-nav a[aria-current="page"] {
  color: #1a3a8f; border-bottom-color: #1a3a8f; text-decoration: none;
}
.site-nav .has-submenu > a::after {
  content: " ▾"; font-size: 11px; color: #718096;
}
.site-nav .submenu {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: #fff; min-width: 220px;
  border: 1px solid #e2e8f0; border-top: 3px solid #1a3a8f;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 50; padding: 6px 0;
}
.site-nav .has-submenu:hover .submenu,
.site-nav .has-submenu:focus-within .submenu { display: block; }
.site-nav .submenu li { width: 100%; }
.site-nav .submenu a { padding: 10px 18px; border-bottom: none; font-size: 14px; }
.site-nav .submenu a:hover { background: #f0f4fa; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: transparent; border: 2px solid #1a3a8f;
  padding: 6px 10px; border-radius: 4px;
  color: #1a3a8f; font-size: 14px; font-weight: 600;
  cursor: pointer;
}

/* ---------- Brand strip (3 logos) ---------- */
/* The Growth logo + SA flag now live in the header (top-right), injected by
   site.js. Hide the legacy in-page brand-strip on every page so we don't
   show them twice. */
.brand-strip { display: none; }

/* ---------- ICT banner ---------- */
.ict-banner {
  background: linear-gradient(135deg, #1a3a8f 0%, #2a5fc4 100%);
  color: #fff; text-align: center;
  padding: 40px 24px; margin: 24px auto; max-width: 1200px;
  border-radius: 6px;
  position: relative; overflow: hidden;
}
.ict-banner h2 { font-size: 22px; margin: 0 0 6px; font-weight: 600; }
.ict-banner p { margin: 0; font-size: 14px; opacity: 0.9; }

/* ---------- Hero section ---------- */
.hero {
  background: #2d3748 center/cover no-repeat;
  color: #fff;
  position: relative;
  min-height: 420px;
  display: flex; align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.2) 100%);
}
.hero .container { position: relative; z-index: 1; padding: 60px 24px; }
.hero h1 { font-size: 42px; margin: 0 0 16px; line-height: 1.15; font-weight: 700; }
.hero p { font-size: 18px; margin: 0; max-width: 640px; }
.hero .tag { display: inline-block; background: #f4c842; color: #1a3a8f; padding: 4px 12px; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; border-radius: 3px; margin-bottom: 14px; }

/* Twin hero (home page: 2 image cards side by side) */
.twin-hero {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; min-height: 360px;
}
.twin-hero .card {
  position: relative; color: #fff;
  background: #2d3748 center/cover no-repeat;
  display: flex; align-items: flex-end; padding: 24px;
  min-height: 340px;
}
.twin-hero .card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 70%);
}
.twin-hero .card .label,
.twin-hero .card .title { position: relative; z-index: 1; }
.twin-hero .card .label {
  display: inline-block; background: #f4c842; color: #1a3a8f;
  padding: 2px 10px; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; border-radius: 3px; margin-bottom: 8px;
}
.twin-hero .card .title { font-size: 22px; font-weight: 700; line-height: 1.25; }

/* ---------- Sections ---------- */
section { padding: 48px 0; }
.section-yellow { background: #fef9e7; }
.section-blue   { background: #1a3a8f; color: #fff; }
.section-blue h2, .section-blue h3 { color: #fff; }
.section-light  { background: #f7fafc; }

h1 { font-size: 32px; margin: 0 0 16px; color: #1a3a8f; }
h2 { font-size: 26px; margin: 0 0 14px; color: #1a3a8f; }
h3 { font-size: 20px; margin: 18px 0 8px; color: #2d3748; }
p  { margin: 0 0 14px; }

/* ---------- Two-column layout ---------- */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px; align-items: start;
}
.two-col-narrow {
  display: grid; grid-template-columns: 320px 1fr;
  gap: 32px; align-items: start;
}

/* ---------- Welcome / about block ---------- */
.welcome { padding: 40px 0; }
.welcome .two-col { gap: 48px; }
.welcome h2 { font-size: 22px; }

/* ---------- Quick-link tile grid ---------- */
.tile-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.tile {
  display: flex; align-items: center; gap: 10px;
  background: #1a3a8f; color: #fff;
  padding: 14px 18px; border-radius: 4px;
  font-weight: 500; font-size: 15px;
  transition: background 0.15s ease;
}
.tile:hover, .tile:focus {
  background: #2a5fc4; text-decoration: none; color: #fff;
}
.tile .icon { font-size: 18px; }

/* ---------- Values strapline ---------- */
.values {
  background: #fff; text-align: center;
  padding: 32px 24px;
  font-size: 15px; color: #2d3748;
  border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0;
}
.values strong { color: #1a3a8f; }

/* ---------- Weather widget grid ---------- */
.weather-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: #f4c842; padding: 24px; border-radius: 4px;
}
.weather-card {
  background: #fff; padding: 12px 14px; border-radius: 4px;
  font-size: 13px; display: flex; align-items: center; gap: 10px;
  border: 1px solid #e2e8f0;
}
.weather-card .city { font-weight: 600; color: #2d3748; }
.weather-card .temp { font-size: 20px; font-weight: 700; color: #1a3a8f; margin-left: auto; }
.weather-card .meta { font-size: 11px; color: #718096; }

/* ---------- Contact strip ---------- */
.contact-strip { background: #fff; padding: 32px 0; }
.contact-strip .two-col { gap: 48px; }
.contact-strip h3 { color: #1a3a8f; margin-top: 0; }
.contact-strip .divider { width: 1px; background: #e2e8f0; }

/* ---------- Social cards row ---------- */
.social-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2px; overflow: hidden; border-radius: 4px;
}
.social-card {
  position: relative; padding: 60px 24px;
  background: #2d3748 center/cover no-repeat;
  color: #fff; min-height: 160px;
  display: flex; align-items: flex-end;
  font-weight: 600; font-size: 18px;
  text-decoration: none;
  transition: transform .15s ease;
}
.social-card:hover { transform: translateY(-2px); }
.social-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 100%);
}
.social-card span { position: relative; z-index: 1; }

/* TikTok brand-style card (no logo image needed) */
.social-card[data-platform="tiktok"] {
  background: linear-gradient(135deg, #25F4EE 0%, #000 35%, #000 65%, #FE2C55 100%);
}
.social-card[data-platform="tiktok"]::before { background: rgba(0,0,0,0.35); }

/* LinkedIn fallback gradient if the image asset is missing */
.social-card[data-platform="linkedin"] {
  background: #0A66C2 center/cover no-repeat;
}

/* ---------- Partner logos ---------- */
.partners {
  display: flex; align-items: center; justify-content: center;
  gap: 60px; flex-wrap: wrap; padding: 40px 24px;
}
.partners img { max-height: 90px; width: auto; }

/* ---------- Leadership profile ---------- */
.leader-block {
  display: grid; grid-template-columns: 320px 1fr;
  gap: 32px; align-items: start; padding: 32px 0;
}
.leader-block .photo {
  background: #f7fafc; border: 1px solid #e2e8f0;
  border-radius: 4px; overflow: hidden; text-align: center;
}
.leader-block .photo img { width: 100%; height: auto; }
.leader-block .photo .caption {
  padding: 10px; font-size: 13px; color: #4a5568; font-weight: 600;
  background: #fff; border-top: 1px solid #e2e8f0;
}
.leader-block .bio h2 { margin-top: 0; }
.leader-block.reverse { grid-template-columns: 1fr 320px; }

/* ---------- Card grid (events, news, branches) ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.card-grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.event-card {
  padding: 20px; border-radius: 4px;
  display: flex; flex-direction: column;
  min-height: 200px;
}
.event-card.yellow { background: #f4c842; color: #2d3748; }
.event-card.blue   { background: #1a3a8f; color: #fff; }
.event-card .tag {
  display: inline-block; padding: 3px 8px; font-size: 10px;
  font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 12px; border-radius: 2px;
}
.event-card.yellow .tag { background: #1a3a8f; color: #fff; }
.event-card.blue   .tag { background: #f4c842; color: #1a3a8f; }
.event-card h3 { margin: 0 0 10px; font-size: 18px; }
.event-card.blue h3 { color: #fff; }
.event-card p { font-size: 14px; flex-grow: 1; }
.event-card .btn {
  align-self: flex-start; margin-top: 10px;
  background: #fff; color: #1a3a8f; padding: 8px 18px;
  font-size: 13px; font-weight: 600; border-radius: 3px;
  text-decoration: none;
}
.event-card.yellow .btn { background: #1a3a8f; color: #fff; }
.event-card .btn:hover { opacity: 0.9; text-decoration: none; }

/* ---------- News / article cards ---------- */
.news-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 4px; overflow: hidden;
  display: flex; flex-direction: column;
}
.news-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.news-card .body { padding: 18px; }
.news-card .meta { font-size: 12px; color: #718096; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.news-card h3 { margin: 0 0 8px; font-size: 18px; color: #1a3a8f; }
.news-card p { font-size: 14px; color: #4a5568; margin-bottom: 12px; }
.news-card a.more { font-weight: 600; font-size: 14px; }

/* ---------- Video grid ---------- */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.video-grid figure { margin: 0; }
.video-grid video { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 4px; }
.video-grid figcaption { font-size: 14px; color: #2d3748; padding: 10px 4px; font-weight: 500; }

/* ---------- YouTube click-to-play thumbnail cards ---------- */
/* Used as either an <a> (open YouTube) or a <button> (swap to autoplay iframe).
   Button defaults (border, padding, font, background) are reset so the two
   variants look identical. */
.yt-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16/9;
  background: #000; border: 0; padding: 0; margin: 0;
  border-radius: 4px; overflow: hidden;
  text-decoration: none; cursor: pointer; font: inherit; color: inherit;
}
.yt-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 250ms ease, filter 250ms ease;
}
.yt-thumb:hover img, .yt-thumb:focus-visible img { transform: scale(1.04); filter: brightness(0.85); }
.yt-thumb .yt-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none; opacity: 0.92;
  transition: opacity 200ms ease, transform 200ms ease;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.yt-thumb:hover .yt-play, .yt-thumb:focus-visible .yt-play {
  opacity: 1; transform: translate(-50%, -50%) scale(1.08);
}
.yt-thumb:focus-visible { outline: 3px solid #1a3a8f; outline-offset: 2px; }

/* ---------- Photo gallery ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.gallery-grid img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  border-radius: 3px; cursor: pointer;
}

/* ---------- Documents list ---------- */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li {
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 0;
  display: flex; align-items: center; gap: 16px;
}
.doc-list .icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: #1a3a8f; color: #fff; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
}
.doc-list .info { flex-grow: 1; }
.doc-list h3 { margin: 0 0 4px; font-size: 16px; }
.doc-list .meta { font-size: 12px; color: #718096; }
.doc-list a.btn-download {
  background: #1a3a8f; color: #fff; padding: 8px 16px;
  border-radius: 3px; font-size: 13px; font-weight: 600;
}
.doc-list a.btn-download:hover { background: #2a5fc4; text-decoration: none; }

/* ---------- Amenities icons row ---------- */
.amenities {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 24px; text-align: center; padding: 32px 0;
}
.amenity .icon-circle {
  width: 64px; height: 64px; margin: 0 auto 10px;
  background: #1a3a8f; color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.amenity .label { font-size: 13px; color: #2d3748; font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  background: #1a3a8f; color: #cbd5e0;
  padding: 48px 0 0;
}
.site-footer .container { padding-bottom: 32px; }
.site-footer h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: 14px; }
.site-footer a { color: #cbd5e0; }
.site-footer a:hover { color: #f4c842; text-decoration: none; }
.footer-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.footer-bottom {
  background: #122d6e; padding: 16px 0; font-size: 13px; color: #cbd5e0;
  text-align: center;
}
.footer-bottom a { color: #cbd5e0; margin: 0 8px; }

/* ---------- Tables ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.data-table th { background: #1a3a8f; color: #fff; font-weight: 600; }
.data-table tr:nth-child(even) td { background: #f7fafc; }

/* ---------- Utility ---------- */
.muted { color: #718096; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-32 { margin-top: 32px; }
.lead { font-size: 17px; color: #4a5568; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .twin-hero, .two-col, .leader-block, .leader-block.reverse,
  .card-grid, .card-grid-3, .video-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .two-col-narrow { grid-template-columns: 1fr; }
  .weather-grid { grid-template-columns: 1fr 1fr; }
  .social-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .amenities { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 32px; }
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; width: 100%; gap: 0; }
  .site-nav li { width: 100%; border-bottom: 1px solid #e2e8f0; }
  .site-nav a { padding: 14px 4px; border-bottom: none; }
  .site-nav .submenu { position: static; box-shadow: none; border: none; padding-left: 16px; }
  .site-nav .has-submenu:focus-within .submenu { display: block; }
  /* On mobile the header collapses to: [logo] [hamburger] / [nav opens below].
     Hide the Growth + flag cluster to save horizontal space. */
  .site-header .container {
    grid-template-columns: auto 1fr;
    grid-auto-rows: auto;
  }
  .site-header .site-logo          { grid-column: 1; grid-row: 1; }
  .site-header .nav-toggle         { grid-column: 2; grid-row: 1; justify-self: end; }
  .site-header .site-nav           { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .site-header .site-brand-cluster { display: none; }
}
@media (max-width: 560px) {
  .weather-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .amenities { grid-template-columns: 1fr 1fr; }
  .tile-grid { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  .partners { gap: 24px; }
  .partners img { max-height: 60px; }
}

/* ============================================================
   POLISH PASS — new components
   ============================================================ */

/* ---------- Accessibility toolbar ---------- */
.a11y-bar {
  background: #122d6e; color: #fff;
  font-size: 12px;
}
.a11y-bar .container {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 6px; padding-top: 6px; padding-bottom: 6px;
  flex-wrap: wrap;
}
.a11y-bar button {
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 4px 10px; font-size: 12px; font-weight: 600;
  border-radius: 3px; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.a11y-bar button:hover, .a11y-bar button:focus {
  background: rgba(255,255,255,0.15); border-color: #fff;
}
.a11y-bar button[aria-pressed="true"] {
  background: var(--c-yellow); color: var(--c-blue-deep); border-color: var(--c-yellow);
}
.a11y-bar .label { opacity: 0.8; margin-right: 4px; }

/* Larger / largest font size modes (toggled on <html>) */
html.a11y-larger  { --font-size: 18px; }
html.a11y-largest { --font-size: 20px; }

/* High-contrast mode (toggled on <body>) */
body.a11y-high-contrast {
  background: #000 !important; color: #fff !important;
}
body.a11y-high-contrast a { color: #ffe066 !important; text-decoration: underline; }
body.a11y-high-contrast .site-header,
body.a11y-high-contrast .brand-strip,
body.a11y-high-contrast .welcome,
body.a11y-high-contrast section,
body.a11y-high-contrast .news-card,
body.a11y-high-contrast .weather-card,
body.a11y-high-contrast .data-table tr:nth-child(even) td,
body.a11y-high-contrast .ict-banner {
  background: #000 !important; color: #fff !important; border-color: #fff !important;
}
body.a11y-high-contrast .section-yellow,
body.a11y-high-contrast .section-light,
body.a11y-high-contrast .section-blue {
  background: #000 !important; color: #fff !important;
}
body.a11y-high-contrast h1,
body.a11y-high-contrast h2,
body.a11y-high-contrast h3,
body.a11y-high-contrast .site-logo,
body.a11y-high-contrast .values strong { color: #ffe066 !important; }
body.a11y-high-contrast .site-nav a { color: #fff !important; }
body.a11y-high-contrast .site-nav a:hover,
body.a11y-high-contrast .site-nav a[aria-current="page"] { border-bottom-color: #ffe066 !important; }
body.a11y-high-contrast .tile,
body.a11y-high-contrast .event-card.blue,
body.a11y-high-contrast .doc-list a.btn-download,
body.a11y-high-contrast .btn {
  background: #ffe066 !important; color: #000 !important;
}
body.a11y-high-contrast img { filter: contrast(1.1); }

/* ---------- POPIA / cookie banner ---------- */
.popia-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--c-blue-deep); color: #fff;
  padding: 18px 24px;
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.18);
  transform: translateY(100%);
  transition: transform var(--t-base);
}
.popia-banner.is-visible { transform: translateY(0); }
.popia-banner .inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap;
}
.popia-banner p { margin: 0; font-size: 14px; flex: 1 1 320px; min-width: 280px; }
.popia-banner a { color: var(--c-yellow); text-decoration: underline; }
.popia-banner .actions { display: flex; gap: 10px; }
.popia-banner button {
  background: var(--c-yellow); color: var(--c-blue-deep);
  border: 0; padding: 9px 18px; font-weight: 700; font-size: 14px;
  border-radius: 3px; cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast);
}
.popia-banner button:hover { transform: translateY(-1px); }
.popia-banner button.secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.5); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 20px; bottom: 20px;
  width: 48px; height: 48px;
  background: var(--c-blue); color: #fff;
  border: 0; border-radius: 50%;
  font-size: 22px; cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-fast), background var(--t-fast);
  z-index: 60;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--c-blue-mid); transform: translateY(-2px); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  background: var(--c-light); border-bottom: 1px solid var(--c-border);
  font-size: 13px; color: var(--c-muted);
}
.breadcrumbs .container { padding-top: 10px; padding-bottom: 10px; }
.breadcrumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "›"; color: var(--c-faint); }
.breadcrumbs a { color: var(--c-blue); font-weight: 500; }
.breadcrumbs [aria-current="page"] { color: var(--c-muted); }

/* ---------- Page intro band (under hero) ---------- */
.intro-band {
  background: var(--c-blue); color: #fff;
  padding: 24px 0;
}
.intro-band p {
  max-width: 880px; margin: 0 auto;
  font-size: 15px; line-height: 1.65; text-align: center;
  padding: 0 24px;
}

/* ---------- DDG branch profile (How we work) ---------- */
.branch-block {
  padding: 48px 0;
}
.branch-block.yellow { background: var(--c-yellow); }
.branch-block.blue   { background: var(--c-blue); color: #fff; }
.branch-block.blue h3, .branch-block.blue h4 { color: #fff; }
.branch-block .inner {
  display: grid; grid-template-columns: 1fr 280px;
  gap: 40px; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.branch-block .accent {
  width: 60px; height: 3px;
  background: var(--c-blue);
  margin-bottom: 14px;
}
.branch-block.blue .accent { background: var(--c-yellow); }
.branch-block h3 {
  font-size: 22px; margin: 0 0 18px; color: var(--c-blue);
}
.branch-block h4 { font-size: 14px; margin: 16px 0 4px; color: var(--c-blue); }
.branch-block.blue h4 { color: var(--c-yellow); }
.branch-block p { font-size: 14.5px; margin-bottom: 12px; line-height: 1.65; }
.branch-block .ddg {
  background: rgba(255,255,255,0.6);
  padding: 14px; border-radius: var(--radius);
  text-align: center;
}
.branch-block.blue .ddg { background: rgba(255,255,255,0.1); }
.branch-block .ddg img {
  width: 180px; height: 180px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 10px;
  box-shadow: var(--shadow-md);
  border: 4px solid #fff;
}
.branch-block .ddg .name {
  font-size: 14px; font-weight: 600; color: var(--c-text);
}
.branch-block.blue .ddg .name { color: #fff; }

/* ---------- "Education is a societal matter" callout ---------- */
.societal-callout {
  background: var(--c-yellow);
  padding: 56px 24px;
}
.societal-callout .inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 200px 1fr;
  gap: 32px; align-items: center;
}
.societal-callout .photo {
  width: 200px; height: 200px; border-radius: 50%;
  background: #2d3748 center/cover no-repeat;
  box-shadow: var(--shadow-md);
  border: 6px solid #fff;
}
.societal-callout blockquote {
  margin: 0; padding: 0;
  font-size: 28px; font-weight: 700; color: var(--c-blue-deep);
  line-height: 1.25; font-style: italic;
}
.societal-callout blockquote::before { content: "\201C"; }
.societal-callout blockquote::after  { content: "\201D"; }
.societal-callout .body { font-size: 15px; color: var(--c-text); margin-top: 14px; line-height: 1.65; }

/* ---------- News article — large featured ---------- */
.featured-article {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.featured-article:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.featured-article .image {
  background: #2d3748 center/cover no-repeat;
  min-height: 320px;
}
.featured-article .body { padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.featured-article .byline { font-size: 12px; color: var(--c-faint); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.featured-article h3 { color: var(--c-blue); font-size: 24px; margin: 0 0 12px; line-height: 1.25; }
.featured-article p { font-size: 15px; color: var(--c-muted); margin-bottom: 14px; }
.featured-article .read-more { color: var(--c-blue); font-weight: 600; font-size: 14px; }

/* News split-card (image left or right) */
.split-card {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; background: #fff;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--c-border);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.split-card.image-right { direction: rtl; }
.split-card.image-right > * { direction: ltr; }
.split-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.split-card .image { background: #2d3748 center/cover no-repeat; min-height: 240px; }
.split-card .body { padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.split-card .byline { font-size: 12px; color: var(--c-faint); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.split-card h3 { color: var(--c-blue); font-size: 20px; margin: 0 0 10px; line-height: 1.3; }
.split-card p { font-size: 14px; color: var(--c-muted); margin-bottom: 12px; }
.split-card .read-more { color: var(--c-blue); font-weight: 600; font-size: 14px; }

/* ---------- Image carousel ---------- */
.carousel { position: relative; max-width: 900px; margin: 0 auto; }
.carousel .stage {
  position: relative; aspect-ratio: 4/3; overflow: hidden;
  background: #2d3748; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.carousel .stage img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.5s ease;
}
.carousel .stage img.is-active { opacity: 1; }
.carousel .controls {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 14px; font-size: 14px;
}
.carousel .controls button {
  background: var(--c-blue); color: #fff; border: 0;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; cursor: pointer;
  transition: background var(--t-fast);
}
.carousel .controls button:hover { background: var(--c-blue-mid); }
.carousel .counter { font-weight: 600; color: var(--c-muted); min-width: 60px; text-align: center; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  display: none; align-items: center; justify-content: center;
  z-index: 2000; padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.lightbox .close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.1); color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  width: 44px; height: 44px; border-radius: 50%; font-size: 22px;
  cursor: pointer;
}

/* ---------- Hover animations on cards (subtle) ---------- */
.event-card, .doc-list li, .news-card, .tile, .amenity, .weather-card {
  transition: transform var(--t-base), box-shadow var(--t-base), background var(--t-fast);
}
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.amenity .icon-circle { transition: transform var(--t-base), background var(--t-fast); }
.amenity:hover .icon-circle { transform: scale(1.08); background: var(--c-blue-mid); }
.news-card { box-shadow: var(--shadow-sm); }
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ---------- Fade-in on scroll (progressive enhancement) ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Image fallback placeholder ---------- */
.img-fallback {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-blue-mid) 100%);
  color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 24px;
  border-radius: var(--radius);
  position: relative;
}
.img-fallback svg { margin-bottom: 14px; }
.img-fallback-name { font-size: 16px; font-weight: 600; color: #fff; }
.img-fallback-sub  { font-size: 13px; color: rgba(255,255,255,0.85); margin-top: 4px; }
.leader-block .photo .img-fallback { aspect-ratio: 3/4; border-radius: var(--radius) var(--radius) 0 0; }
.ddg .img-fallback { width: 180px; height: 180px; aspect-ratio: 1/1; border-radius: 50%; padding: 16px; }
.ddg .img-fallback svg { width: 50px; height: 50px; margin-bottom: 6px; }
.ddg .img-fallback-name { font-size: 13px; }
.ddg .img-fallback-sub  { font-size: 11px; }

/* ---------- Brand footer strip (mimics SharePoint video footer) ---------- */
.brand-footer-strip {
  display: flex; align-items: center; justify-content: center;
  gap: 40px; padding: 18px 24px;
  background: linear-gradient(180deg, #fff 0%, #f7fafc 100%);
  border-top: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.brand-footer-strip img { max-height: 48px; width: auto; }

/* ---------- Responsive adjustments for new components ---------- */
@media (max-width: 960px) {
  .branch-block .inner { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .branch-block .ddg img { width: 140px; height: 140px; }
  .societal-callout .inner { grid-template-columns: 1fr; text-align: center; }
  .societal-callout .photo { margin: 0 auto; }
  .societal-callout blockquote { font-size: 22px; }
  .featured-article { grid-template-columns: 1fr; }
  .featured-article .image { min-height: 220px; }
  .split-card { grid-template-columns: 1fr; }
  .split-card.image-right { direction: ltr; }
  .a11y-bar .container { justify-content: center; }
}
@media (max-width: 560px) {
  .a11y-bar .label { display: none; }
  .a11y-bar button { padding: 3px 8px; font-size: 11px; }
  .popia-banner { padding: 14px; }
  .popia-banner .inner { flex-direction: column; align-items: stretch; }
  .popia-banner .actions { justify-content: stretch; }
  .popia-banner button { flex: 1; }
  .back-to-top { right: 12px; bottom: 12px; width: 42px; height: 42px; }
  .brand-footer-strip { gap: 20px; }
  .brand-footer-strip img { max-height: 36px; }
}

/* ---------- Print stylesheet ---------- */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .utility-bar, .a11y-bar, .site-header, .site-footer, .footer-bottom,
  .popia-banner, .back-to-top, .nav-toggle, .ict-banner,
  .social-row, .brand-footer-strip,
  .doc-list a.btn-download, .event-card .btn,
  .breadcrumbs { display: none !important; }
  .site-logo, .partners { display: none; }
  h1, h2, h3 { color: #000; page-break-after: avoid; }
  a { color: #000; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  a[href^="#"]::after, a[href^="javascript:"]::after { content: ""; }
  section { padding: 16pt 0; page-break-inside: avoid; }
  .container, .container-narrow { max-width: 100%; padding: 0; }
  .twin-hero, .hero { background: none !important; color: #000 !important; min-height: 0; padding: 20pt 0; }
  .hero h1 { font-size: 22pt; }
  .branch-block.blue, .branch-block.yellow, .section-blue, .section-yellow,
  .societal-callout, .intro-band { background: #fff !important; color: #000 !important; }
  .branch-block .ddg img { max-width: 100pt; }
  table { font-size: 10pt; }
  img { max-width: 100% !important; height: auto !important; page-break-inside: avoid; }
  .news-card, .event-card, .featured-article, .split-card { border: 1pt solid #888 !important; box-shadow: none !important; page-break-inside: avoid; }
}

