/* ==========================================================================
   AeroLearn Rwanda — shared chapter theme
   Loaded last on every chapter page so all subjects share one look:
   fonts, colours, hero banner, cards, sidebar, tables, callouts, figures, quiz.
   ========================================================================== */
:root{
  --al-navy:#0b1f35; --al-navy2:#173b5d; --al-blue:#2878a8; --al-gold:#d6ad55;
  --al-ink:#1d2935; --al-muted:#5f6f80; --al-line:#e1e6eb; --al-paper:#f4f6f8; --al-soft:#f3f7fa;
  --al-green:#16794b; --al-red:#a83232;
  --al-sans:"DM Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  --al-display:"Manrope","DM Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  --al-hero-img:url("img/hero-wing.jpg");
}
body.subj-air-law{--al-hero-img:url("img/control-tower.jpg")}
body.subj-ops{--al-hero-img:url("img/airliner-gate.jpg")}
body.subj-rt{--al-hero-img:url("img/air-traffic-controller.jpg")}
body.subj-hpl{--al-hero-img:url("img/cockpit-classic.jpg")}
body.subj-fpp{--al-hero-img:url("img/airliner-approach.jpg")}
body.subj-agk{--al-hero-img:url("img/turbofan-nacelle.jpg")}
body.subj-met{--al-hero-img:url("img/lightning-storm.jpg")}
body.subj-pof{--al-hero-img:url("img/wing-sunset.jpg")}
body.subj-nav{--al-hero-img:url("img/glass-cockpit.jpg")}

/* ---------- base ---------- */
body.al-chapter{font-family:var(--al-sans)!important;color:var(--al-ink)!important;background:var(--al-paper)!important;line-height:1.72;-webkit-font-smoothing:antialiased}
body.al-chapter h1,body.al-chapter h2,body.al-chapter h3,body.al-chapter h4{font-family:var(--al-display)!important;letter-spacing:-.015em}
body.al-chapter main h2,body.al-chapter article h2{color:var(--al-navy)!important}
body.al-chapter main h3,body.al-chapter article h3{color:var(--al-navy2)!important}
body.al-chapter main a:not(.button):not(.btn),body.al-chapter article a{color:var(--al-blue)}
body.al-chapter img{max-width:100%;height:auto}
body.al-chapter ::selection{background:#d6ad5555}

/* ---------- hero banner (every subject) ---------- */
body.al-chapter > header,
body.al-chapter header.hero,
body.al-chapter section.hero,
body.al-chapter div.hero,
body.al-chapter main > header.hero{
  position:relative;overflow:hidden;color:#fff!important;border:0!important;
  background:linear-gradient(110deg,rgba(7,24,42,.96) 0%,rgba(11,35,60,.90) 45%,rgba(15,52,86,.30) 100%),var(--al-hero-img) center 45%/cover no-repeat!important;
}
body.al-chapter > header{padding:clamp(34px,5vw,64px) clamp(18px,6vw,7%) clamp(30px,4vw,52px)!important;margin:0!important}
body.al-chapter > header .hero,body.al-chapter > header .wrap,body.al-chapter > header > div{background:none!important;box-shadow:none!important;border:0!important;color:#fff!important}
body.al-chapter header .hero,body.al-chapter .hero .hero,body.al-chapter .hero-inner,body.al-chapter .heroIn,body.al-chapter section.hero > div{background:none!important;box-shadow:none!important;border:0!important;color:#fff!important}
body.al-chapter > header .hero,body.al-chapter > header .wrap.hero{padding:0!important}
body.al-chapter section.hero,body.al-chapter > div.hero,body.al-chapter main > div.hero{padding:clamp(30px,5vw,60px) clamp(18px,5vw,56px)!important}
body.al-chapter main section.hero,body.al-chapter main div.hero,body.al-chapter main > header.hero{border-radius:20px!important}
body.al-chapter > header h1,body.al-chapter header.hero h1,body.al-chapter .hero h1{color:#fff!important;font-size:clamp(2rem,4.2vw,3.2rem)!important;line-height:1.12!important;margin:.35em 0 .4em!important;max-width:900px}
body.al-chapter > header h1 *, body.al-chapter header.hero h1 *{color:inherit}
body.al-chapter > header h1 em,body.al-chapter > header h1 span{color:var(--al-gold)!important;font-style:normal}
body.al-chapter > header p,body.al-chapter header.hero p,body.al-chapter .hero p{color:#dbe6ef!important;max-width:780px;font-size:1.04rem}
body.al-chapter > header .eyebrow,body.al-chapter > header .kicker,body.al-chapter .hero .eyebrow,body.al-chapter header .label{color:var(--al-gold)!important;text-transform:uppercase;letter-spacing:.16em;font-size:.74rem!important;font-weight:800}
body.al-chapter > header .meta span,body.al-chapter > header .chips span,body.al-chapter > header .pill,body.al-chapter > header .tag,
body.al-chapter .hero .meta span,body.al-chapter .hero-meta span,body.al-chapter > header .hero-meta span{
  display:inline-block;background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.28)!important;color:#eaf1f6!important;border-radius:999px!important;padding:6px 12px!important;font-size:.78rem!important;margin:4px 6px 0 0}
body.al-chapter > header a{color:#fff}
body.al-chapter > header a.btn,body.al-chapter > header a.button,body.al-chapter > header .cta{background:var(--al-gold)!important;color:var(--al-navy)!important;border-radius:6px;font-weight:700}

/* ---------- content cards ---------- */
body.al-chapter .panel,body.al-chapter .lesson,body.al-chapter .lesson-section,body.al-chapter section.card,
body.al-chapter section.section,body.al-chapter .chapter-section,body.al-chapter main > section:not(.hero),body.al-chapter article > section{
  background:#fff!important;border:1px solid var(--al-line)!important;border-radius:16px!important;box-shadow:0 6px 22px rgba(16,36,58,.04)!important}
body.al-chapter main section section,body.al-chapter article section section{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
body.al-chapter .lesson-section h2,body.al-chapter .panel h2,body.al-chapter section.card h2,body.al-chapter section.section h2,body.al-chapter main > section > h2{font-size:clamp(1.3rem,2.2vw,1.6rem)!important;line-height:1.25}

/* ---------- sidebar / contents ---------- */
body.al-chapter aside,body.al-chapter .sidebar,body.al-chapter .toc,body.al-chapter main > nav,body.al-chapter .lesson-nav{
  background:#fff!important;border:1px solid var(--al-line)!important;border-radius:16px!important;box-shadow:0 8px 26px rgba(16,36,58,.05)!important}
body.al-chapter aside a,body.al-chapter .sidebar a,body.al-chapter .toc a,body.al-chapter main > nav a,body.al-chapter .lesson-nav a{color:#41536a!important;text-decoration:none!important;border-radius:8px}
body.al-chapter aside a:hover,body.al-chapter .sidebar a:hover,body.al-chapter .toc a:hover,body.al-chapter main > nav a:hover,body.al-chapter .lesson-nav a:hover{background:var(--al-soft)!important;color:var(--al-blue)!important}

/* ---------- tables ---------- */
body.al-chapter table{border-collapse:collapse;width:100%;font-size:.93rem;background:#fff}
body.al-chapter th{background:#edf3f7!important;color:var(--al-navy)!important;font-family:var(--al-display);font-weight:700;text-align:left}
body.al-chapter th,body.al-chapter td{border-bottom:1px solid var(--al-line)!important;padding:10px 12px;vertical-align:top}

/* ---------- callouts ---------- */
body.al-chapter .callout,body.al-chapter .note,body.al-chapter .key,body.al-chapter .tip,body.al-chapter .focus,body.al-chapter .info,body.al-chapter .remember{
  background:#eef6fc!important;border:0!important;border-left:4px solid var(--al-blue)!important;border-radius:0 10px 10px 0!important;color:var(--al-ink)!important}
body.al-chapter .warning,body.al-chapter .notice,body.al-chapter .callout.warning,body.al-chapter .caution,body.al-chapter .important{
  background:#fff9e9!important;border:0!important;border-left:4px solid var(--al-gold)!important;border-radius:0 10px 10px 0!important;color:var(--al-ink)!important}
body.al-chapter .danger,body.al-chapter .callout.danger,body.al-chapter .alert{background:#fff2f1!important;border-left:4px solid var(--al-red)!important}
body.al-chapter .success,body.al-chapter .callout.success{background:#effaf4!important;border-left:4px solid var(--al-green)!important}
body.al-chapter .example,body.al-chapter .worked,body.al-chapter .case{background:#f7fafc!important;border:1px solid #cbd9e5!important;border-radius:12px!important}
body.al-chapter .formula,body.al-chapter .equation{background:var(--al-navy)!important;color:#fff!important;border-radius:10px!important}

/* ---------- figures ---------- */
body.al-chapter figure{border-radius:14px;overflow:hidden}
body.al-chapter figure.photo img,body.al-chapter figure.photo-wrap img,body.al-chapter .lesson-image img,body.al-chapter figure > img{border-radius:12px;display:block;width:100%;max-height:460px;object-fit:cover}
body.al-chapter figcaption{color:var(--al-muted)!important;font-size:.85rem!important;line-height:1.5}
body.al-chapter figcaption .credit{display:block;font-size:.78rem;opacity:.85;margin-top:2px}
body.al-chapter svg text{font-family:var(--al-sans)}

/* ---------- quiz ---------- */
body.al-chapter .question,body.al-chapter .quiz-question{background:#fff!important;border:1px solid var(--al-line)!important;border-radius:12px!important}
body.al-chapter .question label:hover,body.al-chapter .quiz-question label:hover,body.al-chapter .option:hover{background:var(--al-soft)!important}
body.al-chapter main button,body.al-chapter article button,body.al-chapter .quiz button{background:var(--al-navy)!important;color:#fff!important;border:0!important;border-radius:9px!important;font-weight:700;font-family:var(--al-sans)}
body.al-chapter main button:hover,body.al-chapter article button:hover{background:#1b4d72!important}
body.al-chapter .correct,body.al-chapter .feedback.correct{color:var(--al-green)!important}
body.al-chapter .incorrect,body.al-chapter .wrong,body.al-chapter .feedback.incorrect{color:var(--al-red)!important}

/* ---------- footer ---------- */
body.al-chapter > footer,body.al-chapter > .footer{background:transparent!important;color:var(--al-muted)!important;border-top:1px solid var(--al-line)!important;font-size:.84rem;text-align:center;padding:22px 16px!important}
body.al-chapter > footer a{color:var(--al-blue)}

@media print{body.al-chapter > header{background:#0b1f35!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}}
body.al-chapter aside,body.al-chapter aside *,body.al-chapter .sidebar *,body.al-chapter .toc *,body.al-chapter main > nav *{font-family:var(--al-sans)!important}
body.al-chapter aside h2,body.al-chapter aside h3,body.al-chapter aside h4,body.al-chapter .toc h2,body.al-chapter .toc h3,body.al-chapter .sidebar h3{font-family:var(--al-display)!important;color:var(--al-navy)!important;text-transform:uppercase;letter-spacing:.1em;font-size:.74rem!important}

/* photo credit for the banner image (required by the image licences) */
body.al-chapter > header::after,body.al-chapter > section.hero::after,body.al-chapter header.hero::after,body.al-chapter > div.hero::after,body.al-chapter main > section.hero::after,body.al-chapter main > div.hero::after{
  content:var(--al-hero-credit,"Photo: Unsplash");position:absolute;right:12px;bottom:8px;font:500 10px/1.2 var(--al-sans);color:rgba(255,255,255,.55);pointer-events:none}
body.al-chapter header .hero::after,body.al-chapter .hero .hero::after{content:none}
body.subj-air-law{--al-hero-credit:"Photo: Theronr, CC BY-SA 4.0, Wikimedia Commons"}
body.subj-rt{--al-hero-credit:"Photo: U.S. Navy, public domain, Wikimedia Commons"}
body.subj-hpl{--al-hero-credit:"Photo: Wilfredor, CC0, Wikimedia Commons"}
body.subj-agk{--al-hero-credit:"Photo: Olivier Cleynen, CC BY 4.0, Wikimedia Commons"}
body.subj-met{--al-hero-credit:"Photo: NOAA Photo Library, public domain, Wikimedia Commons"}
body.subj-nav{--al-hero-credit:"Photo: Matti Blume, CC BY-SA 4.0, Wikimedia Commons"}
