/* ============================================================
   APPLIKA: Main Stylesheet
   South African Student Academic Platform
   ============================================================ */

/* ── Google Fonts Import ───────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Applika brand, navy "A" + black pen on white (see logo) */
  --green:          #2E4172;   /* primary: logo navy */
  --green-dark:     #1F2E54;
  --green-mid:      #45619C;
  --green-light:    #EAEEF6;
  --gold:           #A9BDDE;   /* accent: steel blue (light, for dark backgrounds) */
  --gold-dark:      #47618A;
  --gold-light:     #E6ECF6;
  --navy:           #16213C;
  --navy-mid:       #24314F;
  --blue-accent:    #45619C;
  --pen-black:      #111111;
  --red-accent:     #CC0000;
  --text:           #1A1A2E;
  --text-muted:     #6B7280;
  --text-light:     #9CA3AF;
  --border:         #E5E7EB;
  --border-dark:    #D1D5DB;
  --surface:        #F8F9FA;
  --surface-2:      #F3F4F6;
  --white:          #FFFFFF;

  --shadow-xs:  0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:  0 2px 4px rgba(0,0,0,.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.12);
  --shadow-xl:  0 16px 48px rgba(0,0,0,.16);
  --shadow-green: 0 4px 20px rgba(46,65,114,.25);

  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full: 9999px;

  --font:       'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition: all 0.2s ease;
  --transition-slow: all 0.4s ease;

  --max-width:  1200px;
  --nav-height: 70px;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font-body); }
ul { list-style: none; }

/* ── Layout Utilities ─────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-lg { padding: 120px 0; }

.grid-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-gap    { display: flex; align-items: center; gap: 12px; }
.flex-wrap   { flex-wrap: wrap; }
.flex-col    { flex-direction: column; }

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Typography ───────────────────────────────────────────── */
.display-1  { font-size: clamp(2.4rem, 5vw, 4rem);   font-weight: 800; }
.display-2  { font-size: clamp(2rem, 4vw, 3rem);     font-weight: 700; }
.heading-1  { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
.heading-2  { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 600; }
.heading-3  { font-size: 1.25rem; font-weight: 600; }
.body-lg    { font-size: 1.125rem; line-height: 1.7; }
.body-sm    { font-size: 0.875rem; }
.label      { font-size: 0.75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }

.text-green  { color: var(--green); }
.text-gold   { color: var(--gold-dark); }
.text-navy   { color: var(--navy); }
.text-muted  { color: var(--text-muted); }
.text-white  { color: var(--white); }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ── Section Header ───────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-light);
  color: var(--green);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p  { color: var(--text-muted); max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); box-shadow: var(--shadow-green); }

.btn-secondary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-secondary:hover { background: var(--gold-dark); border-color: var(--gold-dark); }

.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-outline:hover { background: var(--green); color: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-dark);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-white {
  background: var(--white);
  color: var(--green);
  border-color: var(--white);
}
.btn-white:hover { background: var(--green-light); }

.btn-sm  { padding: 8px 20px; font-size: 0.85rem; }
.btn-lg  { padding: 16px 36px; font-size: 1.05rem; }
.btn-xl  { padding: 20px 48px; font-size: 1.1rem; }
.btn-full { width: 100%; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid transparent;
  height: var(--nav-height);
  transition: var(--transition);
}
.nav.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav__logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
}
.nav__logo-icon {
  /* Brand mark: white tile, navy "A" crossed by the black pen */
  width: 38px; height: 38px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext x='50' y='72' text-anchor='middle' font-family='Georgia,serif' font-size='72' font-weight='bold' fill='%232E4172'%3EA%3C/text%3E%3Cg transform='rotate(-12 50 62)'%3E%3Crect x='18' y='56' width='56' height='11' rx='2' fill='%23111'/%3E%3Cpath d='M18 56 L6 64 L18 67 Z' fill='%23111'/%3E%3Crect x='66' y='50' width='9' height='13' rx='2' fill='%23111'/%3E%3C/g%3E%3C/svg%3E") center/86% no-repeat;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0;   /* hide the fallback "A" text, the mark is the background */
  font-weight: 900;
  flex-shrink: 0;
}
/* logo is one word, no split colour */

.nav__links {
  display: flex; align-items: center; gap: 8px;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.nav__links a:hover, .nav__links a.active { color: var(--green); background: var(--green-light); }

.nav__actions { display: flex; align-items: center; gap: 12px; }

.nav__burger {
  display: none;
  background: none; border: none;
  width: 40px; height: 40px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__burger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: var(--transition);
}
.nav__burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.active span:nth-child(2) { opacity: 0; }
.nav__burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-height); left: 0; right: 0;
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  z-index: 99;
  flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-lg);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}
.mobile-menu a:hover { background: var(--green-light); color: var(--green); }

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 80px;
  background: linear-gradient(135deg, var(--navy) 0%, #1B2745 50%, #101B33 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(0,107,60,.3) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(169,189,222,.18) 0%, transparent 50%);
}
.hero__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
  position: relative; z-index: 1;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(169,189,222,.18); color: var(--gold);
  border: 1px solid rgba(169,189,222,.35);
  padding: 6px 16px; border-radius: var(--radius-full);
  font-size: 0.8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 24px;
}
.hero h1 .highlight {
  color: var(--gold);
  position: relative;
}
.hero p {
  color: rgba(255,255,255,.75);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero__stats {
  display: flex; gap: 32px; flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.hero__stat-item { }
.hero__stat-item strong {
  display: block;
  font-size: 1.8rem; font-weight: 800; color: var(--gold);
  font-family: var(--font);
}
.hero__stat-item span { font-size: 0.85rem; color: rgba(255,255,255,.6); }

.hero__visual {
  display: flex; align-items: center; justify-content: center;
}
.hero__card-stack { position: relative; width: 100%; max-width: 400px; }

.hero-card {
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-xl);
  padding: 28px;
  color: var(--white);
}
.hero-card--main { position: relative; z-index: 2; }
.hero-card--behind {
  position: absolute;
  top: -20px; right: -20px;
  width: 85%;
  opacity: .5;
  z-index: 1;
  transform: rotate(4deg);
}
.hero-card__label { font-size: 0.75rem; font-weight: 600; letter-spacing: .06em; color: var(--gold); text-transform: uppercase; margin-bottom: 8px; }
.hero-card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.hero-card__aps {
  font-size: 3rem; font-weight: 900; color: var(--gold); font-family: var(--font);
  line-height: 1;
}
.hero-card__aps-label { font-size: 0.8rem; color: rgba(255,255,255,.6); margin-top: 4px; }
.hero-card__bar {
  height: 8px; background: rgba(255,255,255,.1); border-radius: 4px; margin: 20px 0 8px;
  overflow: hidden;
}
.hero-card__bar-fill { height: 100%; background: linear-gradient(90deg, var(--green-mid), var(--gold)); border-radius: 4px; }
.hero-card__unis { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.hero-card__uni-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,.06);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.hero-card__badge {
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 700;
}
.badge-qualify { background: rgba(0,107,60,.4); color: #5dde94; }
.badge-close   { background: rgba(169,189,222,.25); color: var(--gold); }

/* ── Features Grid ────────────────────────────────────────── */
.features-section { background: var(--surface); }
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition-slow);
  cursor: default;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green);
}
.feature-icon {
  width: 56px; height: 56px;
  background: var(--green-light);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.feature-card p  { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }
.feature-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--green); font-size: 0.85rem; font-weight: 600;
  margin-top: 16px;
  transition: var(--transition);
}
.feature-link:hover { gap: 8px; }

/* ── How It Works ─────────────────────────────────────────── */
.how-it-works { background: var(--white); }
.steps { display: flex; flex-direction: column; gap: 48px; position: relative; }
.steps::before {
  content: '';
  position: absolute; left: 27px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--green), var(--gold));
}
.step { display: flex; gap: 32px; align-items: flex-start; position: relative; }
.step-number {
  width: 56px; height: 56px; flex-shrink: 0;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 1.2rem; font-weight: 800;
  position: relative; z-index: 1;
  border: 4px solid var(--white);
  box-shadow: 0 0 0 2px var(--green);
}
.step-content h3 { margin-bottom: 8px; }
.step-content p  { color: var(--text-muted); font-size: 0.95rem; }

/* ── Stats Banner ─────────────────────────────────────────── */
.stats-banner {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  padding: 60px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat-item { text-align: center; }
.stat-item strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--gold);
  font-family: var(--font);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-item span { color: rgba(255,255,255,.75); font-size: 0.9rem; }

/* ── University Cards (Browse) ────────────────────────────── */
.uni-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-slow);
}
.uni-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.uni-card__header {
  height: 80px; display: flex; align-items: center; padding: 0 24px;
  background: var(--navy);
}
.uni-card__badge-type {
  margin-left: auto;
  padding: 4px 12px; border-radius: var(--radius-full);
  background: rgba(255,255,255,.15); color: rgba(255,255,255,.85);
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
}
.uni-card__body { padding: 24px; }
.uni-card__name { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.uni-card__location { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.uni-card__programs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.uni-card__program-tag {
  padding: 4px 10px; border-radius: var(--radius-full);
  background: var(--surface-2); color: var(--text-muted);
  font-size: 0.72rem; font-weight: 500;
}
.uni-card__aps {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.uni-card__aps-label { font-size: 0.8rem; color: var(--text-muted); }
.uni-card__aps-range {
  font-size: 0.9rem; font-weight: 700; color: var(--green);
}

/* ── APS Calculator ───────────────────────────────────────── */
.calc-page { padding-top: var(--nav-height); background: var(--surface); min-height: 100vh; }
.calc-header {
  background: linear-gradient(135deg, var(--navy) 0%, #1B2745 100%);
  padding: 48px 0;
  text-align: center;
}
.calc-header h1 { color: var(--white); margin-bottom: 12px; }
.calc-header p  { color: rgba(255,255,255,.7); font-size: 1.05rem; }

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  padding: 40px 0 80px;
}

.calc-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .04em;
}
.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  appearance: none;
}
.form-control:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,107,60,.1); }
.form-control::placeholder { color: var(--text-light); }

.grade-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px;
}
.grade-tab {
  padding: 8px 20px; border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: var(--white); color: var(--text-muted);
  font-family: var(--font); font-size: 0.9rem; font-weight: 600;
  transition: var(--transition);
}
.grade-tab:hover      { border-color: var(--green); color: var(--green); }
.grade-tab.active     { background: var(--green); color: var(--white); border-color: var(--green); }

.subject-rows { display: flex; flex-direction: column; gap: 12px; }
.subject-row  {
  display: grid; grid-template-columns: 1fr 120px auto;
  gap: 12px; align-items: center;
}
.subject-row__badge {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: var(--white);
  flex-shrink: 0;
}

.pct-input {
  position: relative;
}
.pct-input input {
  width: 100%; padding: 11px 36px 11px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  text-align: center;
  transition: var(--transition);
}
.pct-input input:focus { outline: none; border-color: var(--green); }
.pct-input::after {
  content: '%';
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 0.85rem;
  pointer-events: none;
}

.aps-points-badge {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 1rem; font-weight: 800;
  flex-shrink: 0;
  transition: var(--transition);
}

/* ── APS Result Panel ─────────────────────────────────────── */
.result-panel {
  position: sticky; top: calc(var(--nav-height) + 20px);
  display: flex; flex-direction: column; gap: 20px;
}
.result-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.result-card--highlight {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border-color: transparent;
  color: var(--white);
}

.aps-display {
  text-align: center; padding: 12px 0;
}
.aps-display__number {
  font-size: 5rem; font-weight: 900;
  font-family: var(--font); line-height: 1;
  color: var(--gold);
}
.aps-display__label { font-size: 0.85rem; color: rgba(255,255,255,.65); margin-top: 4px; }
.aps-display__category {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15);
  padding: 6px 16px; border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 600;
}

.aps-bar-wrap { padding: 8px 0; }
.aps-bar-track {
  height: 12px; background: rgba(255,255,255,.15);
  border-radius: var(--radius-full); position: relative; overflow: visible;
}
.aps-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; }
.aps-bar-markers { position: absolute; top: 18px; left: 0; right: 0; }
.aps-bar-markers span {
  position: absolute; font-size: 0.65rem; color: rgba(255,255,255,.5);
  transform: translateX(-50%);
}
.aps-bar-label { margin-top: 28px; font-size: 0.9rem; }

/* ── Upload Box ───────────────────────────────────────────── */
.upload-box {
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface);
}
.upload-box:hover, .upload-box.dragover {
  border-color: var(--green);
  background: var(--green-light);
}
.upload-box__icon { font-size: 3rem; margin-bottom: 12px; }
.upload-box__title { font-weight: 600; margin-bottom: 6px; }
.upload-box__sub   { font-size: 0.85rem; color: var(--text-muted); }
.upload-box input  { display: none; }

/* ── Tutor Cards ──────────────────────────────────────────── */
.tutor-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: var(--transition-slow);
}
.tutor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--green); }

.tutor-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 1.2rem; font-weight: 800;
  color: var(--white); flex-shrink: 0;
}
.tutor-header { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.tutor-header__info { flex: 1; }
.tutor-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 2px; }
.tutor-location { font-size: 0.8rem; color: var(--text-muted); }
.tutor-rating  { font-size: 0.82rem; color: var(--gold-dark); font-weight: 600; }

.tutor-subjects { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.subject-tag {
  padding: 4px 12px; border-radius: var(--radius-full);
  background: var(--surface-2); color: var(--text-muted);
  font-size: 0.75rem; font-weight: 500;
}
.subject-tag--active { background: var(--green-light); color: var(--green); }

.tutor-modes { display: flex; gap: 6px; margin-bottom: 20px; }
.mode-tag {
  padding: 3px 10px; border-radius: var(--radius-full);
  border: 1px solid var(--border); font-size: 0.72rem; color: var(--text-muted);
}

.tutor-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.tutor-rate { font-size: 1rem; font-weight: 700; color: var(--navy); }
.tutor-rate small { font-size: 0.75rem; font-weight: 400; color: var(--text-muted); }

.tutor-avail {
  font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-full);
}
.tutor-avail--available { background: var(--green-light); color: var(--green); }
.tutor-avail--busy { background: #fef2f2; color: #dc2626; }

/* ── Career Card ──────────────────────────────────────────── */
.career-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: var(--transition-slow);
  cursor: pointer;
}
.career-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--green); }
.career-card__icon { font-size: 2.5rem; margin-bottom: 16px; }
.career-card h3    { font-size: 1.05rem; margin-bottom: 6px; }
.career-card__cat  { font-size: 0.75rem; font-weight: 600; color: var(--green); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.career-card p     { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 16px; }
.career-card__meta { display: flex; flex-direction: column; gap: 4px; }
.career-meta-row {
  display: flex; align-items: center; gap: 8px; font-size: 0.82rem;
}
.career-meta-row .meta-label { color: var(--text-muted); min-width: 80px; }
.career-meta-row .meta-value { font-weight: 600; color: var(--navy); }

/* ── Gap Analysis ─────────────────────────────────────────── */
.gap-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
}
.gap-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.gap-item:last-child { border-bottom: none; }
.gap-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.gap-icon--warn  { background: #FEF3C7; }
.gap-icon--error { background: #FEE2E2; }
.gap-icon--ok    { background: var(--green-light); }
.gap-text h4  { font-size: 0.9rem; margin-bottom: 4px; }
.gap-text p   { font-size: 0.82rem; color: var(--text-muted); }
.gap-bar {
  height: 6px; background: var(--surface-2); border-radius: 3px;
  margin-top: 8px; overflow: hidden;
}
.gap-bar-fill { height: 100%; border-radius: 3px; transition: width .5s ease; }

/* ── Search & Filters ─────────────────────────────────────── */
.search-bar {
  position: relative;
}
.search-bar input {
  width: 100%; padding: 14px 20px 14px 48px;
  border: 2px solid var(--border); border-radius: var(--radius-full);
  font-size: 1rem; background: var(--white);
  transition: var(--transition);
}
.search-bar input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,107,60,.1); }
.search-bar__icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 1.1rem; pointer-events: none;
}

.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 20px 0;
}
.filter-chip {
  padding: 8px 18px; border-radius: var(--radius-full);
  border: 2px solid var(--border); background: var(--white);
  font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
  transition: var(--transition); cursor: pointer;
}
.filter-chip:hover  { border-color: var(--green); color: var(--green); }
.filter-chip.active { background: var(--green); color: var(--white); border-color: var(--green); }

/* ── Dashboard ────────────────────────────────────────────── */
.dashboard-page {
  padding-top: var(--nav-height);
  background: var(--surface);
  min-height: 100vh;
}
.dashboard-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 32px 0 80px;
  align-items: start;
}

.sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  position: sticky; top: calc(var(--nav-height) + 20px);
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-md);
  font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
  transition: var(--transition); cursor: pointer;
}
.sidebar-nav-item:hover, .sidebar-nav-item.active {
  background: var(--green-light); color: var(--green);
}
.sidebar-nav-item span { font-size: 1.1rem; }

.dash-content { display: flex; flex-direction: column; gap: 24px; }

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}
.stat-card__label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.stat-card__value { font-size: 2.2rem; font-weight: 900; font-family: var(--font); color: var(--navy); line-height: 1; }
.stat-card__sub   { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }
.stat-card--green  .stat-card__value { color: var(--green); }
.stat-card--gold   .stat-card__value { color: var(--gold-dark); }
.stat-card--navy   .stat-card__value { color: var(--navy); }

/* ── Modal ────────────────────────────────────────────────── */
.modal {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 24px;
}
.modal.open { display: flex; }
.modal-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface-2); border: none;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 1rem; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--border); }

/* ── Toast ────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px;
  background: var(--navy); color: var(--white);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  box-shadow: var(--shadow-xl);
  transform: translateX(120%); transition: transform .3s ease;
  min-width: 280px;
}
.toast.show { transform: translateX(0); }
.toast--success { background: var(--green); }
.toast--error   { background: #dc2626; }
.toast--warning { background: var(--gold-dark); }
.toast button { background: none; border: none; color: rgba(255,255,255,.7); font-size: 1rem; line-height: 1; }

/* ── Tags / Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.badge-green   { background: var(--green-light); color: var(--green); }
.badge-gold    { background: var(--gold-light); color: var(--gold-dark); }
.badge-navy    { background: rgba(26,26,46,.08); color: var(--navy); }
.badge-red     { background: #fee2e2; color: #dc2626; }
.badge-blue    { background: #dbeafe; color: #1d4ed8; }

/* ── Progress Bar ─────────────────────────────────────────── */
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; transition: width .6s ease; }

/* ── Page Header (inner pages) ────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1B2745 100%);
  padding: calc(var(--nav-height) + 40px) 0 60px;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero p  { color: rgba(255,255,255,.7); max-width: 520px; margin: 0 auto; font-size: 1.05rem; }

/* ── Auth Page ────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
}
.auth-visual {
  background: linear-gradient(135deg, var(--navy) 0%, #101B33 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px;
  position: relative; overflow: hidden;
}
.auth-visual::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(0,107,60,.4) 0%, transparent 60%);
}
.auth-form-section {
  display: flex; align-items: center; justify-content: center;
  padding: 60px; background: var(--surface);
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px;
  width: 100%; max-width: 460px;
}
.auth-tabs { display: flex; gap: 0; margin-bottom: 32px; border-bottom: 2px solid var(--border); }
.auth-tab {
  flex: 1; padding: 12px 0; text-align: center;
  font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  color: var(--text-muted); border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: var(--transition); cursor: pointer;
}
.auth-tab.active { color: var(--green); border-bottom-color: var(--green); }

.input-group {
  position: relative; margin-bottom: 16px;
}
.input-group label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em;
}
.input-group input {
  width: 100%; padding: 13px 16px;
  border: 2px solid var(--border); border-radius: var(--radius-md);
  font-size: 0.95rem; font-family: var(--font-body);
  transition: var(--transition);
}
.input-group input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,107,60,.1); }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 0.8rem; color: var(--text-light); }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  padding: 64px 0 32px;
  color: rgba(255,255,255,.7);
}
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  margin-bottom: 48px;
}
.footer__brand { }
.footer__brand .nav__logo { color: var(--white); margin-bottom: 16px; }
.footer__brand p { font-size: 0.9rem; line-height: 1.7; max-width: 280px; }
.footer__col h4 {
  font-family: var(--font); font-size: 0.9rem; font-weight: 700;
  color: var(--white); margin-bottom: 16px; text-transform: uppercase; letter-spacing: .05em;
}
.footer__col a {
  display: block; font-size: 0.88rem; color: rgba(255,255,255,.6);
  padding: 4px 0; transition: var(--transition);
}
.footer__col a:hover { color: var(--gold); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 32px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: 0.82rem;
}
.footer__bottom a { color: rgba(255,255,255,.5); }
.footer__bottom a:hover { color: var(--gold); }

/* ── Animations ───────────────────────────────────────────── */
.fade-in  { opacity: 0; transition: opacity .6s ease; }
.slide-up { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.card-animate { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }

.fade-in.visible, .slide-up.visible, .card-animate.visible {
  opacity: 1; transform: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
.float { animation: float 4s ease-in-out infinite; }

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,107,60,.4); }
  50%       { box-shadow: 0 0 0 12px rgba(0,107,60,0); }
}
.pulse { animation: pulse-green 2s ease-in-out infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin .8s linear infinite; }

/* ── Testimonials ─────────────────────────────────────────── */
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
}
.testimonial-card__quote {
  font-size: 0.95rem; line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-style: italic;
}
.testimonial-card__author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 0.9rem; font-weight: 700; color: var(--white);
}
.testimonial-name { font-weight: 700; font-size: 0.9rem; }
.testimonial-sub  { font-size: 0.78rem; color: var(--text-muted); }

/* ── CTA Section ──────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  padding: 80px 0;
  text-align: center;
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(169,189,222,.18) 0%, transparent 70%);
}
.cta-section > .container { position: relative; z-index: 1; }
.cta-section h2 { color: var(--white); margin-bottom: 16px; }
.cta-section p  { color: rgba(255,255,255,.8); max-width: 480px; margin: 0 auto 36px; font-size: 1.05rem; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-muted);
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--green); }
.breadcrumb .sep { color: var(--text-light); }

/* ── Dividers ─────────────────────────────────────────────── */
.hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .calc-layout        { grid-template-columns: 1fr; }
  .result-panel       { position: static; }
  .dashboard-grid     { grid-template-columns: 1fr; }
  .sidebar            { position: static; }
  .footer__grid       { grid-template-columns: 1fr 1fr; }
  .stats-grid         { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .section    { padding: 56px 0; }
  .section-lg { padding: 80px 0; }

  .nav__links, .nav__actions .btn { display: none; }
  .nav__burger { display: flex; }

  .hero__grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero p     { margin: 0 auto 36px; }
  .hero__actions { justify-content: center; }
  .hero__visual { order: -1; }
  .hero__card-stack { max-width: 320px; margin: 0 auto; }
  .hero__stats { justify-content: center; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-section { padding: 24px 20px; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .subject-row { grid-template-columns: 1fr 90px auto; }

  .calc-layout { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding-bottom: 48px; }
  .hero h1 { font-size: 2rem; }
  .auth-card { padding: 28px 20px; }
  .modal-card { padding: 28px 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Utility helpers ──────────────────────────────────────── */
.mt-4  { margin-top: 4px; }  .mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-4  { margin-bottom: 4px; }  .mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.gap-8  { gap: 8px; }  .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.w-full { width: 100%; }
.rounded { border-radius: var(--radius-md); }
.rounded-full { border-radius: var(--radius-full); }
