/* ============================================================
   THE HASSAN KHAN — PHYSICS ACADEMY
   Theme: Light · Elegant · Modern · Blue Accent
   Full Mobile Responsive — 320px to 2560px
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --blue-light:  #eaf1ff;
  --blue-soft:   #dbe9ff;
  --ink:         #0f1b35;
  --ink-soft:    #4a5872;
  --muted:       #7a869c;
  --bg:          #f6f8fc;
  --surface:     #ffffff;
  --border:      #e4eaf5;
  --success:     #16a34a;

  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius:    12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(15,27,53,0.05);
  --shadow:    0 8px 30px rgba(37,99,235,0.08);
  --shadow-lg: 0 16px 48px rgba(15,27,53,0.10);
}

/* ─── RESET ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  min-width: 320px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea, button { -webkit-appearance: none; appearance: none; }

/* ─── BACKGROUND DECOR ───────────────────── */
body::before {
  content: '';
  position: fixed; top: -200px; right: -200px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, var(--blue-light) 0%, transparent 70%);
  z-index: 0; pointer-events: none;
}
body::after {
  content: '';
  position: fixed; bottom: -200px; left: -200px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, var(--blue-light) 0%, transparent 70%);
  z-index: 0; pointer-events: none;
}

/* ═══════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; gap: 8px;
  color: var(--ink); flex-shrink: 0; z-index: 201;
}
.nav-logo-image {
  display: block;
  width: auto;
  height: 40px;
  max-width: min(220px, 48vw);
  object-fit: contain;
  flex-shrink: 0;
}
.footer-logo .nav-logo-image {
  height: 42px;
  max-width: 210px;
}

/* Desktop links */
.nav-links {
  display: flex; align-items: center; gap: 0.1rem;
  flex: 1; justify-content: center;
}
.nav-links a {
  font-family: var(--font-display); font-size: 0.88rem; font-weight: 600;
  padding: 0.45rem 0.8rem; border-radius: 8px;
  color: var(--ink-soft); transition: all 0.2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--blue); background: var(--blue-light);
}
.nav-dropdown { position: relative; }
.nav-dropdown > a::after { content: ' ▾'; font-size: 0.65rem; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.5rem; min-width: 210px;
  box-shadow: var(--shadow-lg); z-index: 300;
}
.dropdown-menu a {
  display: block; padding: 0.6rem 0.85rem; border-radius: 8px;
  font-family: var(--font-display); font-size: 0.85rem; color: var(--ink-soft);
  transition: all 0.18s; font-weight: 500;
}
.dropdown-menu a:hover { color: var(--blue); background: var(--blue-light); }
.nav-dropdown:hover .dropdown-menu { display: block; }

.nav-cta {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff !important; border-radius: 8px;
  padding: 0.5rem 1.1rem !important; font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(37,99,235,0.25); white-space: nowrap;
}
.nav-cta:hover { opacity: 0.9; color: #fff !important; }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.nav-account {
  font-family: var(--font-display); font-size: 0.82rem; font-weight: 700;
  color: var(--ink); display: flex; align-items: center; gap: 7px;
  padding: 0.4rem 0.85rem; border-radius: 100px; background: var(--blue-light);
  white-space: nowrap;
}
.nav-account .avatar-circle {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #60a5fa);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 800; flex-shrink: 0;
}
.nav-logout {
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
  color: var(--ink-soft); padding: 0.4rem 0.85rem; border-radius: 100px;
  border: 1px solid var(--border); background: var(--surface);
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.nav-logout:hover { color: #d92d2d; border-color: #fbd5d5; background: #fdecec; }

/* Mobile-only nav items (shown in burger menu) */
.nav-only-mobile { display: none; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px; z-index: 201; flex-shrink: 0;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px; transition: 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  min-height: 90vh;
  display: flex; align-items: center;
  padding: 100px 1.5rem 60px;
  position: relative; z-index: 1;
}
.hero-inner {
  max-width: 1200px; margin: auto; width: 100%;
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem; align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 700;
  color: var(--blue-dark); background: var(--blue-light);
  border: 1px solid var(--blue-soft);
  padding: 0.3rem 0.85rem; border-radius: 100px;
  margin-bottom: 1.25rem;
}
.hero-tag::before { content: '⚛'; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.15;
  margin-bottom: 1.25rem; color: var(--ink);
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--blue), #60a5fa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1rem; color: var(--ink-soft);
  max-width: 500px; margin-bottom: 2rem; line-height: 1.75;
}
.hero-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn {
  font-family: var(--font-display); font-weight: 700; font-size: 0.92rem;
  padding: 0.8rem 1.6rem; border-radius: var(--radius);
  cursor: pointer; transition: all 0.22s; border: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff; box-shadow: 0 8px 22px rgba(37,99,235,0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,99,235,0.35); }
.btn-outline {
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.hero-visual {
  display: flex; align-items: center; justify-content: center;
}
.orbit-ring {
  width: 300px; height: 300px; border-radius: 50%;
  border: 1.5px dashed var(--blue-soft);
  display: flex; align-items: center; justify-content: center;
  position: relative; animation: spin 18s linear infinite;
}
.orbit-ring::before {
  content: '⚡'; position: absolute; top: -14px; left: 50%;
  transform: translateX(-50%); font-size: 1.2rem;
  animation: counter-spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes counter-spin { to { transform: translateX(-50%) rotate(-360deg); } }
.orbit-inner {
  width: 200px; height: 200px; border-radius: 50%;
  border: 1.5px dashed var(--blue-soft);
  display: flex; align-items: center; justify-content: center;
  animation: spin 12s linear infinite reverse;
}
.orbit-core {
  width: 120px; height: 120px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #60a5fa);
  border: 5px solid #fff;
  box-shadow: 0 16px 44px rgba(37,99,235,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; color: #fff; animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 16px 44px rgba(37,99,235,0.25); }
  50% { box-shadow: 0 16px 56px rgba(37,99,235,0.45); }
}
.hero-stats {
  display: flex; gap: 1.75rem; margin-top: 2rem; flex-wrap: wrap;
}
.stat { font-family: var(--font-display); }
.stat strong { display: block; font-size: 1.7rem; font-weight: 800; color: var(--blue); line-height: 1.2; }
.stat span { font-size: 0.78rem; color: var(--muted); }

/* ═══════════════════════════════════════════
   SECTION LAYOUT
   ═══════════════════════════════════════════ */
section { position: relative; z-index: 1; }
.container { max-width: 1200px; margin: auto; padding: 0 1.5rem; }
.section-pad { padding: 80px 0; }
.section-eyebrow {
  font-family: var(--font-display); font-size: 0.75rem; font-weight: 700;
  color: var(--blue); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.65rem;
}
.section-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.2;
  margin-bottom: 0.85rem; color: var(--ink);
}
.section-sub { color: var(--ink-soft); max-width: 560px; line-height: 1.75; }
.section-header { margin-bottom: 3rem; }
.section-header.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-header.center .section-sub { margin: 0 auto; }

/* ═══════════════════════════════════════════
   CURRICULUM CARDS
   ═══════════════════════════════════════════ */
.curriculum-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.curr-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  transition: all 0.28s; box-shadow: var(--shadow-sm);
}
.curr-card:hover { transform: translateY(-4px); border-color: var(--blue-soft); box-shadow: var(--shadow-lg); }
.curr-badge {
  display: inline-block; font-family: var(--font-display); font-size: 0.7rem; font-weight: 700;
  padding: 0.22rem 0.65rem; border-radius: 100px; margin-bottom: 1rem;
}
.badge-o  { background: #e8fbf3; color: #0d9d6c; border: 1px solid #c8f3e2; }
.badge-a  { background: var(--blue-light); color: var(--blue); border: 1px solid var(--blue-soft); }
.badge-ig { background: #fff6e6; color: #c2820a; border: 1px solid #ffe6b8; }
.curr-card h3 {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 800;
  margin-bottom: 0.6rem; color: var(--ink);
}
.curr-card p { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 1.25rem; }
.topic-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.25rem; }
.topic-list li {
  font-family: var(--font-display); font-size: 0.83rem; color: var(--ink-soft); font-weight: 500;
  display: flex; align-items: center; gap: 7px;
}
.topic-list li::before { content: '→'; color: var(--blue); font-size: 0.78rem; }
.curr-link {
  font-family: var(--font-display); font-size: 0.88rem; font-weight: 700;
  color: var(--blue); display: inline-flex; align-items: center; gap: 5px;
  transition: gap 0.2s;
}
.curr-link:hover { gap: 9px; }

/* ═══════════════════════════════════════════
   FEATURES
   ═══════════════════════════════════════════ */
.features-bg { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feat-card {
  padding: 1.5rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); transition: all 0.25s;
}
.feat-card:hover { border-color: var(--blue-soft); box-shadow: var(--shadow); }
.feat-icon {
  font-size: 1.4rem; margin-bottom: 0.85rem; width: 44px; height: 44px;
  border-radius: 11px; background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
}
.feat-card h4 { font-family: var(--font-display); font-size: 0.98rem; font-weight: 700; margin-bottom: 0.45rem; color: var(--ink); }
.feat-card p { font-size: 0.86rem; color: var(--ink-soft); }

/* ═══════════════════════════════════════════
   TEACHER / TESTIMONIAL SECTION
   ═══════════════════════════════════════════ */
.testimonial-wrap {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem;
  align-items: center; color: #fff; box-shadow: var(--shadow-lg);
}
blockquote {
  font-family: var(--font-display); font-style: normal; font-weight: 500;
  font-size: 1.2rem; line-height: 1.65; color: #fff;
  margin-bottom: 1.25rem; border-left: 3px solid rgba(255,255,255,0.5); padding-left: 1.1rem;
}
.quote-author { font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; }
.quote-author span { color: rgba(255,255,255,0.75); font-weight: 400; display: block; margin-top: 3px; font-size: 0.82rem; }
.teacher-card {
  background: rgba(255,255,255,0.12); border-radius: var(--radius);
  padding: 1.75rem; border: 1px solid rgba(255,255,255,0.2); text-align: center;
}
.teacher-photo {
  width: 112px; height: 112px; border-radius: 50%;
  object-fit: cover; display: block; margin: 0 auto 0.85rem;
  border: 3px solid rgba(255,255,255,0.4); box-shadow: 0 10px 24px rgba(15,27,53,0.18);
}
.teacher-card h3 { font-family: var(--font-display); font-weight: 800; margin-bottom: 0.2rem; font-size: 1rem; }
.teacher-card p { font-size: 0.82rem; color: rgba(255,255,255,0.85); }
.qualifications { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-top: 0.85rem; }
.qual-badge {
  font-family: var(--font-display); font-size: 0.7rem; font-weight: 700;
  padding: 0.22rem 0.65rem; border-radius: 100px;
  background: rgba(255,255,255,0.18); color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

/* ═══════════════════════════════════════════
   FAQ
   ═══════════════════════════════════════════ */
.faq-tabs {
  display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2rem;
}
.faq-tab {
  font-family: var(--font-display); font-size: 0.83rem; font-weight: 700;
  padding: 0.5rem 1.1rem; border-radius: 100px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--ink-soft); transition: all 0.2s;
}
.faq-tab:hover { color: var(--blue); border-color: var(--blue-soft); }
.faq-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 6px 16px rgba(37,99,235,0.25); }
.faq-list { max-width: 780px; margin: auto; display: flex; flex-direction: column; gap: 0.8rem; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s;
}
.faq-item.open { border-color: var(--blue-soft); box-shadow: var(--shadow); }
.faq-question {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 0.94rem; color: var(--ink);
}
.faq-icon {
  width: 26px; height: 26px; border-radius: 50%; background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 1rem; font-weight: 700; transition: transform 0.25s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  padding: 0 1.25rem; color: var(--ink-soft); font-size: 0.9rem;
}
.faq-item.open .faq-answer { max-height: 500px; padding-bottom: 1.1rem; }

/* ═══════════════════════════════════════════
   FORMS (general)
   ═══════════════════════════════════════════ */
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
  box-shadow: var(--shadow); max-width: 480px; margin: auto; width: 100%;
}
.form-card h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin-bottom: 0.35rem; }
.form-card .form-sub { color: var(--ink-soft); margin-bottom: 1.75rem; font-size: 0.9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block; font-family: var(--font-display); font-size: 0.8rem;
  font-weight: 700; color: var(--ink); margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 0.75rem 0.9rem;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); color: var(--ink);
  font-family: var(--font-body); font-size: 0.92rem;
  transition: border-color 0.2s; outline: none;
}
.form-group input[type="file"] { padding: 0.5rem 0.9rem; cursor: pointer; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--blue); background: #fff;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-actions { margin-top: 0.5rem; }
.form-actions .btn { width: 100%; justify-content: center; }
.form-footnote { text-align: center; margin-top: 1.25rem; font-size: 0.86rem; color: var(--ink-soft); }
.form-footnote a { color: var(--blue); font-weight: 700; }

.alert {
  padding: 0.85rem 1.1rem; border-radius: var(--radius); font-size: 0.88rem;
  margin-bottom: 1.1rem; font-weight: 600;
}
.alert-success { background: #e9fbf1; color: #0d9d6c; border: 1px solid #c8f3e2; }
.alert-error   { background: #fdecec; color: #d92d2d; border: 1px solid #fbd5d5; }
.alert-info    { background: var(--blue-light); color: var(--blue-dark); border: 1px solid var(--blue-soft); }

/* ═══════════════════════════════════════════
   AUTH PAGES (login / signup)
   ═══════════════════════════════════════════ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 90px 1rem 2rem;
}
.auth-page .form-card { width: 100%; }

/* ═══════════════════════════════════════════
   PAGE HERO (inner pages)
   ═══════════════════════════════════════════ */
.page-hero {
  padding: 110px 1.5rem 50px;
  text-align: center; position: relative; z-index: 1;
}
.page-hero h1 {
  font-family: var(--font-display); font-weight: 800; color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 2.9rem); margin-bottom: 0.85rem;
}
.page-hero p { color: var(--ink-soft); max-width: 580px; margin: 0 auto; font-size: 1rem; }
.breadcrumb {
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 600; color: var(--muted);
  margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.4rem;
  justify-content: center; flex-wrap: wrap;
}
.breadcrumb a { color: var(--blue); }

/* ═══════════════════════════════════════════
   LEVEL CARDS (lectures / notes landing)
   ═══════════════════════════════════════════ */
.level-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.level-card {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  transition: all 0.28s; box-shadow: var(--shadow-sm);
}
.level-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.level-card-head { padding: 2rem 1.75rem 1.25rem; color: #fff; }
.lc-o  { background: linear-gradient(135deg, #0d9d6c, #0a7a54); }
.lc-a  { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.lc-ig { background: linear-gradient(135deg, #f5a623, #d6890a); }
.level-icon { font-size: 2.2rem; margin-bottom: 0.65rem; }
.level-card-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.level-card-head p { font-size: 0.82rem; color: rgba(255,255,255,0.85); margin-top: 0.3rem; }
.level-card-body { padding: 1.1rem 1.75rem 1.75rem; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.chip {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 600;
  padding: 0.25rem 0.7rem; border-radius: 100px;
  background: var(--bg); border: 1px solid var(--border); color: var(--ink-soft);
}
.level-card-btn {
  display: block; width: 100%; padding: 0.75rem; border-radius: var(--radius);
  font-family: var(--font-display); font-size: 0.88rem; font-weight: 700;
  cursor: pointer; border: none; transition: all 0.22s; text-align: center;
}
.lbtn-o  { background: #e8fbf3; color: #0d9d6c; border: 1px solid #c8f3e2; }
.lbtn-a  { background: var(--blue-light); color: var(--blue); border: 1px solid var(--blue-soft); }
.lbtn-ig { background: #fff6e6; color: #c2820a; border: 1px solid #ffe6b8; }
.lbtn-o:hover  { background: #d4f6e9; }
.lbtn-a:hover  { background: var(--blue-soft); }
.lbtn-ig:hover { background: #ffecc4; }

/* ═══════════════════════════════════════════
   TOPIC TABS
   ═══════════════════════════════════════════ */
.topic-tabs {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem;
  border-bottom: 1px solid var(--border); padding-bottom: 1.25rem;
}
.topic-tab {
  font-family: var(--font-display); font-size: 0.82rem; font-weight: 700;
  padding: 0.5rem 1.1rem; border-radius: 100px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--ink-soft); transition: all 0.2s;
}
.topic-tab:hover { color: var(--blue); border-color: var(--blue-soft); }
.topic-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 6px 16px rgba(37,99,235,0.25); }

/* ═══════════════════════════════════════════
   VIDEO CARDS
   ═══════════════════════════════════════════ */
.video-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.video-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: all 0.25s;
  box-shadow: var(--shadow-sm);
}
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.video-thumb {
  width: 100%; aspect-ratio: 16/9;
  background: var(--blue-light); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.video-thumb iframe { width: 100%; height: 100%; border: none; display: block; }
.video-info { padding: 1.1rem; }
.video-info h4 { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem; color: var(--ink); }
.video-info p { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 0.65rem; }
.video-meta { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.video-tag {
  font-family: var(--font-display); font-size: 0.68rem; font-weight: 700; padding: 0.16rem 0.55rem;
  border-radius: 100px; background: var(--blue-light); color: var(--blue);
  border: 1px solid var(--blue-soft);
}

/* ═══════════════════════════════════════════
   LOCKED CONTENT CARD
   ═══════════════════════════════════════════ */
.locked-card {
  background: var(--surface); border: 1.5px dashed var(--blue-soft);
  border-radius: var(--radius-lg); padding: 2.5rem 1.5rem; text-align: center;
  max-width: 520px; margin: 2rem auto;
}
.locked-card .lock-icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--blue-light);
  color: var(--blue); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 1.1rem;
}
.locked-card h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.locked-card p { color: var(--ink-soft); margin-bottom: 1.25rem; font-size: 0.9rem; }
.locked-card .btn-row { display: flex; gap: 0.65rem; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════
   NOTES GRID
   ═══════════════════════════════════════════ */
.notes-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}
.note-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  display: flex; gap: 0.85rem; align-items: flex-start;
  transition: all 0.25s; box-shadow: var(--shadow-sm);
}
.note-card:hover { border-color: var(--blue-soft); box-shadow: var(--shadow); }
.note-icon {
  width: 44px; height: 44px; border-radius: 9px; flex-shrink: 0;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.note-info { flex: 1; min-width: 0; }
.note-info h4 { font-family: var(--font-display); font-size: 0.93rem; font-weight: 700; margin-bottom: 0.22rem; color: var(--ink); word-break: break-word; }
.note-info p { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 0.65rem; }
.note-meta { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.note-tag {
  font-family: var(--font-display); font-size: 0.68rem; font-weight: 700; padding: 0.16rem 0.55rem;
  border-radius: 100px; background: var(--bg); color: var(--ink-soft);
  border: 1px solid var(--border);
}
.download-btn {
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
  color: var(--blue); display: inline-flex; align-items: center; gap: 4px;
  padding: 0.3rem 0.75rem; border: 1px solid var(--blue-soft);
  border-radius: 8px; background: var(--blue-light);
  cursor: pointer; transition: all 0.2s; text-decoration: none; white-space: nowrap;
}
.download-btn:hover { background: var(--blue-soft); }

/* ═══════════════════════════════════════════
   PAST PAPERS TABLE
   ═══════════════════════════════════════════ */
.papers-table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow-x: auto; box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
.papers-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.papers-table th, .papers-table td { text-align: left; padding: 0.85rem 1.1rem; font-size: 0.87rem; }
.papers-table thead th {
  font-family: var(--font-display); font-weight: 700; color: var(--ink);
  background: var(--blue-light); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.04em; white-space: nowrap;
}
.papers-table tbody tr { border-top: 1px solid var(--border); }
.papers-table tbody tr:hover { background: var(--bg); }
.papers-table td { color: var(--ink-soft); vertical-align: middle; }
.papers-table td strong { color: var(--ink); }

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 2.5rem 1rem; color: var(--muted);
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
}

/* ═══════════════════════════════════════════
   CONTACT PAGE
   ═══════════════════════════════════════════ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2.5rem; align-items: start; }
.contact-info h2 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; margin-bottom: 0.85rem; }
.contact-info p { color: var(--ink-soft); margin-bottom: 1.75rem; }
.contact-items { display: flex; flex-direction: column; gap: 0.85rem; }
.contact-item {
  display: flex; gap: 0.85rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow-sm);
}
.ci-icon {
  width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.ci-text strong { font-family: var(--font-display); font-size: 0.85rem; display: block; color: var(--ink); }
.ci-text span   { font-size: 0.8rem; color: var(--ink-soft); }
.contact-form {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-sm);
}
.contact-form h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; margin-bottom: 1.75rem; }

/* ═══════════════════════════════════════════
   DASHBOARD GRID (My Account shortcuts)
   ═══════════════════════════════════════════ */
.dashboard-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.1rem; margin-bottom: 2rem; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 50px 1.5rem 24px; position: relative; z-index: 1;
}
.footer-grid {
  max-width: 1200px; margin: 0 auto 2.5rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem;
}
.footer-brand .nav-logo { margin-bottom: 0.85rem; }
.footer-brand p { font-size: 0.85rem; color: var(--ink-soft); max-width: 270px; }
.footer-col h5 {
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 800;
  margin-bottom: 0.85rem; color: var(--ink); text-transform: uppercase; letter-spacing: 0.05em;
}
.footer-col ul li { margin-bottom: 0.45rem; }
.footer-col ul li a { font-size: 0.85rem; color: var(--ink-soft); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--blue); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding-top: 1.25rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.85rem;
}
.footer-bottom p { font-size: 0.78rem; color: var(--muted); }
.social-links { display: flex; gap: 0.65rem; }
.social-link {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
  transition: all 0.2s;
}
.social-link:hover { background: var(--blue); color: #fff; }

/* ═══════════════════════════════════════════
   WHATSAPP FLOAT
   ═══════════════════════════════════════════ */
.whatsapp-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 999;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; box-shadow: 0 6px 20px rgba(37,211,102,0.45);
  transition: transform 0.2s; animation: wa-pulse 2.4s infinite;
  text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.08); }
@keyframes wa-pulse {
  0%   { box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 0 0 0 rgba(37,211,102,0.5); }
  70%  { box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 0 0 12px rgba(37,211,102,0); }
  100% { box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 0 0 0 rgba(37,211,102,0); }
}

/* ═══════════════════════════════════════════
   MISC
   ═══════════════════════════════════════════ */
.divider { height: 1px; background: var(--border); margin: 0; }

.fade-up { opacity: 0; transform: translateY(22px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--blue-soft); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ═══════════════════════════════════════════
   ██████████  RESPONSIVE  ██████████
   ═══════════════════════════════════════════ */

/* ── Tablet landscape (≤ 1100px) ── */
@media (max-width: 1100px) {
  .curriculum-grid  { grid-template-columns: repeat(2, 1fr); }
  .features-grid    { grid-template-columns: repeat(2, 1fr); }
  .level-cards      { grid-template-columns: repeat(2, 1fr); }
  .footer-grid      { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .testimonial-wrap { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero-inner       { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; }
  .hero-visual      { display: none; }
  .hero-btns        { justify-content: center; }
  .hero-stats       { justify-content: center; }
  .hero-sub         { margin: 0 auto 2rem; }
  .contact-grid     { grid-template-columns: 1fr; }
  .dashboard-grid   { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablet portrait (≤ 860px) ── */
@media (max-width: 860px) {
  /* Nav collapses to burger */
  .nav { padding: 0 1rem; height: 60px; }
  .nav-logo-image { height: 34px; max-width: min(160px, 58vw); }
  .nav-links {
    display: none;
    position: fixed; top: 60px; left: 0; right: 0;
    height: calc(100dvh - 60px);
    max-height: calc(100dvh - 60px);
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column; align-items: flex-start;
    justify-content: flex-start;
    padding: 1.25rem 1rem 2rem;
    gap: 0.15rem; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-top: 1px solid var(--border);
    z-index: 199;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links > li {
    width: 100%;
  }
  .nav-links a { width: 100%; font-size: 1rem; padding: 0.75rem 1rem; border-radius: 10px; }
  .nav-links a:hover, .nav-links a.active { background: var(--blue-light); color: var(--blue); }
  .nav-only-mobile {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }
  .nav-only-mobile a { display: block; }
  .nav-dropdown {
    width: 100%;
  }
  .nav-dropdown > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav-account { display: none; }
  .nav-logout  { display: none; }
  .nav-actions .nav-cta { display: none; }
  .nav-actions { display: none; }
  .hamburger { display: flex; }

  /* Dropdown becomes flat list inside mobile menu */
  .nav-dropdown > a::after { content: ''; }
  .dropdown-menu {
    position: static; box-shadow: none; border: none;
    background: var(--blue-light); border-radius: 10px;
    padding: 0.4rem 0.4rem; margin-top: 0.15rem; min-width: unset;
    width: 100%;
  }
  .dropdown-menu a {
    white-space: normal;
  }
  .dropdown-menu a { font-size: 0.92rem; padding: 0.6rem 0.9rem; }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }

  /* Page layout */
  .hero { padding: 80px 1rem 50px; min-height: unset; }
  .hero h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
  .hero-sub { font-size: 0.95rem; }
  .hero-btns .btn { padding: 0.75rem 1.3rem; font-size: 0.88rem; }

  .section-pad { padding: 60px 0; }
  .container { padding: 0 1rem; }

  .curriculum-grid { grid-template-columns: 1fr; }
  .features-grid   { grid-template-columns: 1fr; }
  .level-cards     { grid-template-columns: 1fr; }

  .page-hero { padding: 90px 1rem 40px; }
  .page-hero h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .testimonial-wrap { padding: 1.75rem; }
  blockquote { font-size: 1.05rem; }
  .contact-form { padding: 1.5rem; }
  .form-card { padding: 1.5rem; }

  .video-grid { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr; }

  .faq-question { font-size: 0.9rem; padding: 0.9rem 1rem; }
  .faq-answer { padding: 0 1rem; }
  .faq-item.open .faq-answer { padding-bottom: 1rem; }

  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ── Mobile (≤ 600px) ── */
@media (max-width: 600px) {
  .nav-logo em { display: inline; font-size: 0.95rem; }

  .hero { padding: 75px 1rem 40px; }
  .hero h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 1.25rem; }
  .stat strong { font-size: 1.5rem; }

  .section-pad { padding: 48px 0; }
  .section-title { font-size: clamp(1.4rem, 5vw, 1.9rem); }

  .curr-card { padding: 1.4rem; }
  .feat-card { padding: 1.25rem; }
  .locked-card { padding: 2rem 1.1rem; }
  .locked-card .btn-row { flex-direction: column; }
  .locked-card .btn-row .btn { width: 100%; justify-content: center; }

  .topic-tabs { gap: 0.4rem; }
  .topic-tab { font-size: 0.78rem; padding: 0.45rem 0.85rem; }
  .faq-tabs  { gap: 0.4rem; }
  .faq-tab   { font-size: 0.78rem; padding: 0.45rem 0.9rem; }

  .note-card { flex-direction: column; gap: 0.75rem; }
  .note-icon { width: 40px; height: 40px; font-size: 1.1rem; }

  .papers-table th, .papers-table td { padding: 0.7rem 0.85rem; font-size: 0.82rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  footer { padding: 40px 1rem 20px; }

  .page-hero { padding: 85px 1rem 35px; }
  .breadcrumb { font-size: 0.74rem; }

  .form-card { padding: 1.25rem; border-radius: var(--radius); }
  .auth-page { padding: 80px 0.75rem 1.5rem; }

  .level-card-head { padding: 1.5rem 1.4rem 1rem; }
  .level-card-body { padding: 1rem 1.4rem 1.5rem; }
  .level-card-head h2 { font-size: 1.1rem; }

  .contact-grid { gap: 1.75rem; }
  .contact-info h2 { font-size: 1.35rem; }

  .testimonial-wrap { padding: 1.5rem; }
  blockquote { font-size: 1rem; }

  .whatsapp-float { width: 48px; height: 48px; font-size: 1.4rem; bottom: 16px; right: 16px; }
}

/* ── Small mobile (≤ 400px) ── */
@media (max-width: 400px) {
  .nav { padding: 0 0.75rem; }
  .nav-logo-image { height: 30px; max-width: 140px; }

  .hero h1 { font-size: 1.55rem; }
  .hero-sub { font-size: 0.9rem; }
  .btn { font-size: 0.85rem; padding: 0.7rem 1.1rem; }

  .section-title { font-size: 1.35rem; }
  .form-card { padding: 1rem; }
  .curr-card { padding: 1.1rem; }
  .curr-card h3 { font-size: 1.05rem; }
  .topic-tab, .faq-tab { font-size: 0.74rem; padding: 0.4rem 0.75rem; }
}
