/* SGI Africa — brand stylesheet. Palette sampled from the logo artwork:
   green #046330, amber #EDA202, mint #D3E3DA. No build step: this file is
   served as-is, which is what a Hostinger shared account can do. */

:root {
  --green: #046330;
  --green-700: #034d25;
  --green-900: #02331a;
  --green-050: #edf5f0;
  --amber: #EDA202;
  --amber-700: #b87d00;
  --amber-050: #fff6e0;
  --mint: #D3E3DA;
  --mint-050: #f2f7f4;
  --ink: #16211b;
  --ink-2: #3f4b44;
  --ink-3: #6b766f;
  --line: #dfe7e2;
  --paper: #fbfcfb;
  --white: #ffffff;
  --danger: #b42318;
  --danger-050: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(2, 51, 26, .06), 0 8px 24px rgba(2, 51, 26, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.55; font-size: 16px; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--green-900); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.bold { font-weight: 700; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.section { padding: 48px 0; }
.section-tight { padding: 28px 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.center { text-align: center; }
.mt { margin-top: 20px; } .mt-lg { margin-top: 36px; } .mb { margin-bottom: 20px; } .mb-0 { margin-bottom: 0; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--green-900); }
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.nav a:hover { background: var(--mint-050); text-decoration: none; color: var(--green-900); }
.nav a.active { color: var(--green); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 1.1rem; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .nav.open { display: flex; }
  .site-header .wrap { flex-wrap: wrap; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; font-weight: 700; border: 1px solid transparent; cursor: pointer; font-size: 1rem; line-height: 1.2; transition: transform .05s ease, background .15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-700); color: var(--white); }
.btn-amber { background: var(--amber); color: var(--green-900); }
.btn-amber:hover { background: #f5b117; }
.btn-outline { background: var(--white); color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green-050); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-sm { padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card-flat { box-shadow: none; }
.card-mint { background: var(--mint-050); border-color: var(--mint); }
.card-green { background: var(--green); color: var(--white); border-color: var(--green); }
.card-green h1, .card-green h2, .card-green h3, .card-green a { color: var(--white); }
.card-amber { background: var(--amber-050); border-color: #f2d48a; }
.card h3 { margin-top: 0; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 800; color: var(--amber-700); margin-bottom: 8px; }
.kicker.green { color: var(--green); }

/* The date strip (plan §10.4): deadline louder than the start date. */
.date-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; background: var(--green-900); color: var(--white); border-radius: var(--radius); overflow: hidden; }
.date-strip > div { padding: 14px 16px; border-right: 1px solid rgba(255,255,255,.12); }
.date-strip > div:last-child { border-right: 0; }
.date-strip .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; font-weight: 700; }
.date-strip .value { font-weight: 800; font-size: 1.05rem; margin-top: 2px; }
.date-strip .deadline { background: var(--amber); color: var(--green-900); }
.date-strip .deadline .label { opacity: .85; }
.date-strip .deadline .value { font-size: 1.2rem; }
.date-strip .live { color: var(--amber); }

/* Pills, badges */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--mint); color: var(--green-900); white-space: nowrap; }
.pill-amber { background: var(--amber); color: var(--green-900); }
.pill-green { background: var(--green); color: var(--white); }
.pill-grey { background: #eef1ef; color: var(--ink-2); }
.pill-red { background: var(--danger-050); color: var(--danger); }
.seats-left { font-weight: 800; }
.seats-left.urgent { color: var(--amber-700); }

/* Price ladder */
.ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.rung { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--white); }
.rung.current { border-color: var(--amber); background: var(--amber-050); box-shadow: 0 0 0 3px rgba(237,162,2,.18); }
.rung .price { font-size: 1.5rem; font-weight: 800; color: var(--green-900); }
.rung .price small { font-size: .85rem; font-weight: 600; color: var(--ink-3); }
.tier { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--white); display: flex; flex-direction: column; }
.tier.featured { border-color: var(--green); box-shadow: 0 0 0 3px rgba(4,99,48,.12); }
.tier ul { padding-left: 18px; margin: 10px 0 16px; color: var(--ink-2); font-size: .93rem; }
.tier .price { font-size: 1.8rem; font-weight: 800; color: var(--green-900); }
.tier .split { font-size: .85rem; color: var(--ink-3); }
.tier .btn { margin-top: auto; }

/* Forms */
label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
.field { margin-bottom: 16px; }
.input, select, textarea { width: 100%; padding: 11px 13px; border: 1px solid #c9d3cd; border-radius: 10px; font: inherit; background: var(--white); color: var(--ink); }
.input:focus, select:focus, textarea:focus { outline: 2px solid rgba(4,99,48,.35); border-color: var(--green); }
.help { font-size: .8rem; color: var(--ink-3); margin-top: 4px; }
.error { color: var(--danger); font-size: .85rem; margin-top: 4px; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.checkbox input { margin-top: 4px; }
.hp { position: absolute; left: -9999px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; }
.alert-ok { background: var(--green-050); border-color: #b7d9c4; color: var(--green-900); }
.alert-warn { background: var(--amber-050); border-color: #f2d48a; color: #6b4a00; }
.alert-err { background: var(--danger-050); border-color: #f3b4ae; color: var(--danger); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--mint-050); color: var(--green-900); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* Hero */
.hero { background: linear-gradient(135deg, var(--green-900) 0%, var(--green) 60%, #0a7a3d 100%); color: var(--white); padding: 64px 0 56px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(237,162,2,.35), transparent 65%); }
.hero h1 { color: var(--white); max-width: 720px; }
.hero p.lead { font-size: 1.15rem; max-width: 640px; opacity: .92; }
.hero .amber { color: var(--amber); }
.hero .wrap { position: relative; z-index: 1; }

/* Footer */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.85); padding: 40px 0 28px; margin-top: 60px; font-size: .9rem; }
.site-footer a { color: var(--white); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.14); margin-top: 24px; padding-top: 16px; font-size: .8rem; opacity: .8; }

/* Student portal */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 68px); }
.app-side { background: var(--white); border-right: 1px solid var(--line); padding: 20px 14px; }
.app-side a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; }
.app-side a:hover, .app-side a.active { background: var(--green-050); color: var(--green-900); text-decoration: none; }
.app-main { padding: 28px 24px; max-width: 1000px; }
@media (max-width: 860px) { .app-shell { grid-template-columns: 1fr; } .app-side { border-right: 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px; } .app-side a { padding: 8px 10px; } }
.stat { padding: 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.stat .n { font-size: 1.6rem; font-weight: 800; color: var(--green-900); }
.stat .l { font-size: .8rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.progress { height: 10px; background: var(--mint); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); }
.video { position: relative; padding-top: 56.25%; background: #000; border-radius: var(--radius); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.locked { background: var(--amber-050); border: 1px dashed var(--amber); border-radius: var(--radius); padding: 20px; }
.session-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.session-row:last-child { border-bottom: 0; }
.session-n { width: 44px; height: 44px; border-radius: 12px; background: var(--mint); color: var(--green-900); display: grid; place-items: center; font-weight: 800; }
.att-P { background: var(--green); color: #fff; } .att-R { background: var(--amber); color: var(--green-900); } .att-A { background: #eef1ef; color: var(--ink-3); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--mint-050); padding: 2px 6px; border-radius: 6px; }
.checklist li { list-style: none; padding: 6px 0; display: flex; gap: 10px; }
.checklist { padding: 0; margin: 0; }
.tick { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 800; flex: none; }
.tick.ok { background: var(--green); color: #fff; } .tick.no { background: #eef1ef; color: var(--ink-3); }
.testimonial { border-left: 4px solid var(--amber); padding: 6px 0 6px 16px; }
.testimonial .who { font-size: .85rem; color: var(--ink-3); margin-top: 6px; }
.logo-mark { height: 120px; }
.wa { background: #25D366; color: #fff; }
.wa:hover { background: #1fb457; color: #fff; }

/* Cards that are one big link: only the title is green, the text stays ink. */
a.card-link, a.card { display: block; color: var(--ink); }
a.card-link:hover, a.card:hover { text-decoration: none; border-color: var(--green); }
a.card-link h3, a.card h3 { color: var(--green-900); }
a.card-link p, a.card p { color: var(--ink-2); }

/* WhatsApp — floating button on every page (toggle in Admin → Website → Site settings). */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: inline-flex; align-items: center; gap: 10px;
  background: #25D366; color: #fff; border-radius: 999px; padding: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.22); font-weight: 700; transition: transform .15s ease, box-shadow .15s ease; }
.wa-float:hover { color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.28); }
.wa-float-label { display: none; padding-right: 6px; }
.wa-float:hover .wa-float-label { display: inline; }
@media (min-width: 861px) { .wa-float { padding: 14px 18px 14px 14px; } .wa-float-label { display: inline; } }
@media print { .wa-float { display: none; } }

/* Course thumbnails (uploaded in Admin → Catalogue → Courses). */
.card-thumb { display: block; width: calc(100% + 44px); max-width: none; margin: -22px -22px 16px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; background: var(--mint); }
.hero-with-thumb { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.hero-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.28); border: 3px solid rgba(255,255,255,.15); }
@media (max-width: 860px) { .hero-with-thumb { grid-template-columns: 1fr; } .hero-thumb { order: -1; } }

/* Catalogue 2026–27: categories and pathways */
.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.cat-nav a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--mint); background: var(--white); color: var(--green-900); font-weight: 700; font-size: .85rem; text-decoration: none; }
.cat-nav a:hover { background: var(--mint-050); }
.cat-section { scroll-margin-top: 90px; }
.pathway-steps { margin: 12px 0; padding-left: 20px; color: var(--ink-2); font-size: .92rem; }
.pathway-steps li { margin: 3px 0; }
.pathway-steps li::marker { color: var(--green); font-weight: 800; }
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: .92rem; margin: 0; }
.facts dt { font-weight: 700; color: var(--green-900); }
.facts dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; gap: 2px 0; } .facts dd { margin-bottom: 8px; } }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding-left: 26px; position: relative; margin: 6px 0; font-size: .95rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }


/* Installable app (PWA) and the phone tab bar in the student portal */
.install-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border-radius: 12px; background: var(--mint-050); border: 1px solid var(--mint); }
.install-card[hidden] { display: none; }
.app-tabs { display: none; }
.app-main { min-width: 0; }
@media (max-width: 860px) {
  .app-side { display: none; }
  .app-main { padding: 18px 16px calc(84px + env(safe-area-inset-bottom)); }
  .app-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--white); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(2, 51, 26, .06); }
  .app-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: .72rem; font-weight: 700; color: var(--ink-3, #5b6b62); text-decoration: none; border-radius: 10px; }
  .app-tabs a.active { color: var(--green); background: var(--green-050, #e8f3ec); }
  .app-tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  body:has(.app-tabs) .wa-float { display: none; } /* Help is in the tab bar */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  input, select, textarea { font-size: 16px; } /* stops iPhone zooming into form fields */
}

/* Portal header: name + log out stay on the logo's row on a phone */
.app-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
@media (max-width: 860px) {
  .site-header .wrap:has(.app-nav) { flex-wrap: nowrap; }
  .app-nav { display: flex; width: auto; flex-direction: row; padding-bottom: 0; }
  .app-nav .small { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Buttons inside the menu keep their own colours (the menu's link colour made "My portal" green on green). */
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--white); background: var(--green); }
.nav a.btn-primary:hover { background: var(--green-700); }
