/* ============================================================
   TechilyFly Institute — Main Design System CSS
   Design: Dark Navy + Teal + Glassmorphism
   Fonts: Poppins (display) · Inter (body) · JetBrains Mono
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* ─── Official Brand Colors (from TF Logo) ─── */
  --brand-navy:     #1B2B6B;   /* TF Logo navy blue  */
  --brand-orange:   #F7941D;   /* TF Logo orange     */
  --brand-navy-dark:#0F1A40;   /* Darker navy shade  */
  --brand-navy-light:#2A3F8F;  /* Lighter navy shade */

  /* Colors — Dark Theme */
  --bg-primary:     #0A192F;
  --bg-secondary:   #112240;
  --bg-card:        #162844;
  --bg-elevated:    #1D3461;
  --bg-glass:       rgba(22, 40, 68, 0.7);

  --accent:         #F7941D;   /* Brand orange as primary accent */
  --accent-dim:     rgba(247, 148, 29, 0.12);
  --accent-glow:    rgba(247, 148, 29, 0.28);
  --accent2:        #1B2B6B;   /* Brand navy as secondary accent */
  --accent2-dim:    rgba(27, 43, 107, 0.2);
  --accent3:        #4FC3F7;   /* Sky blue for info states */
  --accent3-dim:    rgba(79, 195, 247, 0.15);
  --accent-teal:    #64FFDA;   /* Kept for chart/data viz use */

  --text-primary:   #E6F1FF;
  --text-secondary: #8892B0;
  --text-muted:     #6B7C98;

  --border:         #1E3A5F;
  --border-accent:  rgba(247, 148, 29, 0.3);
  --border-subtle:  rgba(255,255,255,0.06);

  --success:        #2ECC71;
  --warning:        #F39C12;
  --danger:         #E74C3C;
  --info:           #4FC3F7;

  /* Gradients */
  --grad-primary:   linear-gradient(135deg, #0A192F 0%, #112240 50%, #0D2137 100%);
  --grad-accent:    linear-gradient(135deg, #F7941D 0%, #F5A623 100%);
  --grad-hero:      linear-gradient(135deg, rgba(247,148,29,0.08) 0%, rgba(27,43,107,0.15) 100%);
  --grad-card:      linear-gradient(135deg, rgba(22,40,68,0.9), rgba(29,52,97,0.6));
  --grad-brand:     linear-gradient(135deg, #1B2B6B 0%, #F7941D 100%);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl:64px;

  /* Border Radius */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.5);
  --shadow-accent: 0 0 30px rgba(247,148,29,0.2);
  --shadow-glow:   0 0 0 1px rgba(247,148,29,0.2), 0 4px 20px rgba(247,148,29,0.12);

  /* Transitions */
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.2s var(--ease);
  --transition-slow: 0.4s var(--ease);

  /* Typography */
  --font-display: 'Poppins', -apple-system, sans-serif;
  --font-body:    'Inter', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    1000;
  --z-toast:    1100;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

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

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -1.5px; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.8px; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 0.95rem; }

p { color: var(--text-secondary); }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text-primary); }

img { display: block; max-width: 100%; height: auto; }

button { cursor: pointer; font-family: var(--font-body); }

input, select, textarea {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-primary);          /* Always readable white text */
  background-color: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-sizing: border-box;
}

/* Select options need explicit background so they don't inherit dark theme */
select option {
  background-color: #1a2035;
  color: #E6F1FF;
}

code, pre { font-family: var(--font-mono); }

/* ─── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ─── SELECTION ─────────────────────────────────────────────── */
::selection { background: var(--accent-dim); color: var(--accent); }

/* ─── CONTAINER ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}
.container-sm { max-width: 900px; }
.container-lg { max-width: 1440px; }

@media (max-width: 768px) {
  .container { padding: 0 var(--space-md); }
}

/* ─── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: rgba(10, 25, 47, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 25, 47, 0.98);
  box-shadow: var(--shadow);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--space-xl);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.navbar-brand .logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  /* Gradient shows only if image fails (onerror restores it) */
  background: transparent;
}

/* When logo-icon contains just text (fallback) */
.navbar-brand .logo-icon:not(:has(img)) {
  background: var(--grad-accent);
}

.navbar-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.navbar-brand .brand-name span {
  color: var(--brand-orange, #F7941D);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--accent-dim);
}

.nav-link.active { color: var(--brand-orange, #F7941D); }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ─── NAVBAR MOBILE (≤1024px) ─────────────────────────────── */
@media (max-width: 1024px) {
  .navbar-nav { display: none; }
  .nav-toggle { display: flex; }

  /* Mobile dropdown menu */
  .navbar-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;                        /* fixed, not absolute */
    top: 72px;                              /* below navbar height */
    left: 0;
    right: 0;
    background: #0D1B35;                    /* solid dark, no transparency */
    border-top: 2px solid var(--accent);    /* orange top border */
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 20px;
    gap: 4px;
    z-index: 9999;                          /* above everything */
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }

  /* Nav links inside mobile dropdown — force visible */
  .navbar-nav.open .nav-link {
    width: 100%;
    padding: 13px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #CCD6F6 !important;              /* always visible */
    background: transparent;
    border-radius: var(--radius);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .navbar-nav.open .nav-link:last-child { border-bottom: none; }
  .navbar-nav.open .nav-link:hover,
  .navbar-nav.open .nav-link.active {
    color: var(--accent) !important;
    background: rgba(247,148,29,0.1);
  }
  .navbar-nav.open .nav-link.active {
    color: var(--accent) !important;
    font-weight: 700;
  }

  /* Show action buttons inside the mobile menu by adding a footer area */
  /* Actions stay in navbar-actions but shrink on small screens */
  .navbar-actions .btn-ghost { display: inline-flex !important; }
}

/* ─── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: #e8870f;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border-accent);
}
.btn-outline:hover {
  background: var(--accent-dim);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c0392b; transform: translateY(-1px); }

.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }

.btn:disabled, .btn.loading {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn .btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─── HERO SECTION ─────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--grad-primary);
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(100,255,218,0.12) 0%, transparent 70%);
  top: -200px;
  right: -100px;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(121,40,202,0.15) 0%, transparent 70%);
  bottom: -100px;
  left: -80px;
  animation-delay: -3s;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(100,255,218,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,255,218,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 64px;
  padding-top: 32px;
  padding-bottom: 64px;
}

.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.hero-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

.hero h1 .highlight {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 540px;
  margin-bottom: var(--space-xl);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--space-2xl);
}

.hero-stats {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.hero-stat { display: flex; flex-direction: column; }
.hero-stat strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.hero-stat span { font-size: 0.82rem; color: var(--text-muted); }

/* Hero image panel */
.hero-visual {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 380px;
  margin: 0 auto;
  /* overflow must be visible so float cards are not clipped */
  overflow: visible;
}

.hero-main-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.hero-float-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
}

.hero-float-card.top-right {
  top: -28px;
  right: -28px;
  color: var(--accent);
  z-index: 5;
  box-shadow: 0 8px 32px rgba(247,148,29,0.25);
}
.hero-float-card.bottom-left {
  bottom: 10px;
  left: -36px;
  animation-delay: -2s;
  color: var(--warning);
  z-index: 5;
  box-shadow: 0 8px 32px rgba(243,156,18,0.2);
}

@media (max-width: 992px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 48px;
    padding-top: 24px;
  }
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
  }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    /* Extra padding so float cards are visible on sides */
    padding: 32px 40px;
  }
  .hero-card-stack { max-width: 100%; }
  .hero-float-card.top-right { right: 0; top: -10px; }
  .hero-float-card.bottom-left { left: 0; bottom: -10px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.2rem; letter-spacing: -1px; }
  .hero-float-card {
    padding: 8px 12px;
    font-size: 0.72rem;
  }
  .hero-float-card.top-right  { top: -8px;  right: 4px;  transform: scale(0.9); }
  .hero-float-card.bottom-left { bottom: -8px; left: 4px; transform: scale(0.9); }
  .hero-main-card { padding: var(--space-lg); }
}

/* ─── SECTION COMMON ─────────────────────────────────────────── */
.section {
  padding: var(--space-2xl) 0;
}

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: var(--space-md);
}

.section-lead {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.8;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header .section-lead { margin: 0 auto; }

/* ─── CARDS ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--shadow-accent);
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-color: var(--border-subtle);
}

.card-accent {
  background: linear-gradient(135deg, var(--accent-dim), var(--bg-card));
  border-color: var(--border-accent);
}

/* ─── COURSE CARD ─────────────────────────────────────────────── */
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(100,255,218,0.08);
}

.course-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-elevated);
}

.course-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.course-card:hover .course-card-thumb img { transform: scale(1.05); }

.course-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.course-card-free {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--success);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.course-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card-category {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.course-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 8px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-instructor {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.course-card-instructor img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.course-card-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.course-card-meta .meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.course-card-meta .meta-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.course-card-meta .meta-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-start;
  color: var(--text-secondary);
}

.course-card-meta .meta-stats i {
  color: var(--accent);
  margin-right: 4px;
}

.course-card-meta .rating {
  color: var(--warning);
  font-weight: 700;
}

.course-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
}

.course-price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.course-price .original {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-right: 6px;
}

.course-price.free { color: var(--success); }

/* ─── GRIDS ─────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-lg); }

/* ─── STATS BAR ─────────────────────────────────────────────── */
.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-xl) 0;
}

.stats-bar .container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: var(--space-xl);
}

.stat-item {
  text-align: center;
}

.stat-item .stat-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1;
  display: block;
}

.stat-item .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ─── FEATURE ICONS ─────────────────────────────────────────── */
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: var(--space-md);
  transition: all var(--transition);
}

.card:hover .feature-icon {
  background: var(--accent);
  transform: scale(1.05);
}

/* ─── TESTIMONIAL CARD ─────────────────────────────────────── */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 4rem;
  line-height: 1;
  font-family: var(--font-display);
  color: var(--accent-dim);
  font-weight: 900;
}

.testimonial-stars { color: var(--warning); font-size: 0.9rem; margin-bottom: 12px; }

.testimonial-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
  font-style: italic;
}

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

.testimonial-author img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-accent);
}

.testimonial-author strong {
  font-size: 0.9rem;
  color: var(--text-primary);
  display: block;
}

.testimonial-author span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-success   { background: rgba(46,204,113,0.15); color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.badge-warning   { background: rgba(243,156,18,0.15); color: var(--warning); border: 1px solid rgba(243,156,18,0.3); }
.badge-danger    { background: rgba(231,76,60,0.15);  color: var(--danger);  border: 1px solid rgba(231,76,60,0.3); }
.badge-info      { background: rgba(79,195,247,0.15); color: var(--info);    border: 1px solid rgba(79,195,247,0.3); }
.badge-accent    { background: var(--accent-dim);     color: var(--accent);  border: 1px solid var(--border-accent); }
.badge-purple    { background: var(--accent2-dim);    color: #BD93F9;        border: 1px solid rgba(121,40,202,0.3); }
.badge-secondary { background: var(--bg-elevated);    color: var(--text-secondary); border: 1px solid var(--border); }
.badge-dark      { background: var(--bg-primary);     color: var(--text-muted); border: 1px solid var(--border); }

/* ─── FORMS ─────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-lg); }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-label.required::after {
  content: ' *';
  color: var(--danger);
}

.form-control {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  appearance: none;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(231,76,60,0.15); }

.form-error {
  display: block;
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 4px;
}

.form-help {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.input-group {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  transition: all var(--transition);
}

.input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.input-group .form-control {
  border: none;
  background: transparent;
  box-shadow: none;
  flex: 1;
}

.input-group .input-group-icon {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ─── ALERTS ─────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: var(--space-lg);
  border-left: 4px solid transparent;
}

.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: rgba(46,204,113,0.1); border-color: var(--success); color: #55d98d; }
.alert-error   { background: rgba(231,76,60,0.1);  border-color: var(--danger);  color: #e74c3c; }
.alert-warning { background: rgba(243,156,18,0.1); border-color: var(--warning); color: #f1c40f; }
.alert-info    { background: rgba(79,195,247,0.1); border-color: var(--info);    color: var(--info); }

/* ─── TABS ─────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  overflow-x: auto;
}

.tab {
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  border: none;
  background: none;
}

.tab:hover { color: var(--text-primary); background: var(--bg-card); }
.tab.active { background: var(--accent); color: var(--bg-primary); }

/* ─── PROGRESS BAR ─────────────────────────────────────────── */
.progress-bar-wrap {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  height: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--grad-accent);
  transition: width 0.6s var(--ease);
}

/* ─── RATING STARS ─────────────────────────────────────────── */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--warning);
}

.star-empty { color: var(--border); }

/* ─── AVATAR ─────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-accent);
  flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 72px; height: 72px; }
.avatar-xl { width: 96px; height: 96px; }

.avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--bg-primary);
  flex-shrink: 0;
}

/* ─── TABLE ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  background: var(--bg-elevated);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border-accent);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.table tbody tr:hover td {
  background: var(--accent-dim);
  color: var(--text-primary);
}

.table tbody tr:last-child td { border-bottom: none; }

/* ─── PAGINATION ─────────────────────────────────────────────── */
.pagination-nav { margin-top: var(--space-xl); }

.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  list-style: none;
}

.pagination li a,
.pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: all var(--transition);
  text-decoration: none;
}

.pagination li.active a,
.pagination li a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-primary);
}

.pagination li.disabled span {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.5fr;
  gap: var(--space-2xl);
  margin-bottom: 48px;
}

.footer-brand .brand-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 12px 0 20px;
  max-width: 280px;
  line-height: 1.8;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.social-link {
  width: 38px;
  height: 38px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition);
  text-decoration: none;
}

.social-link:hover {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-heading {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  text-decoration: none;
}

.footer-links a:hover { color: var(--accent); padding-left: 4px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 16px;
}

.footer-legal a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-legal a:hover { color: var(--accent); }

/* ─── WHATSAPP FLOAT — bottom LEFT ──────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  width: 52px;
  height: 52px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform .25s ease, box-shadow .25s ease;
  text-decoration: none;
  animation: pulse-wa 3s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 8px 32px rgba(37,211,102,0.65);
  color: #fff;
}

@keyframes pulse-wa {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50%       { box-shadow: 0 6px 32px rgba(37,211,102,0.7); }
}

/* ─── BACK TO TOP — above WhatsApp, perfectly centered ──────── */
#backToTop {
  position: fixed;
  bottom: 86px;       /* 24px + 52px WA + 10px gap */
  left: 24px;         /* same left as WhatsApp → perfectly centered */
  z-index: 9999;
  width: 52px;        /* SAME width as WhatsApp for perfect alignment */
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #F7941D, #e57c0b);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  box-shadow: 0 4px 18px rgba(247,148,29,.4);
  transition: transform .25s ease, box-shadow .25s ease;
  display: none;
  align-items: center;
  justify-content: center;
}

#backToTop:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 28px rgba(247,148,29,.6);
}

#backToTop.visible {
  display: flex;
}


/* ─── SEARCH BOX ─────────────────────────────────────────────── */
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  max-width: 520px;
  transition: all var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-box input {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}

.search-box input::placeholder { color: var(--text-muted); }

.search-box button {
  background: var(--accent);
  border: none;
  padding: 10px 20px;
  color: var(--bg-primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}

.search-box button:hover { background: #4eeec8; }

/* ─── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: all var(--transition);
}

.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  padding: 20px var(--space-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 1.1rem; font-weight: 700; }

.modal-close {
  width: 32px;
  height: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition);
}

.modal-close:hover { background: var(--danger); color: white; border-color: var(--danger); }
.modal-body { padding: var(--space-lg); }
.modal-footer { padding: var(--space-lg); border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ─── TOAST NOTIFICATIONS ─────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s var(--ease), fadeOut 0.4s 3s forwards;
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }

/* ─── LOADING SPINNER ─────────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-elevated);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm { width: 20px; height: 20px; border-width: 2px; }

/* ─── BREADCRUMB ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  list-style: none;
}

.breadcrumb li::after { content: '/'; margin-left: 8px; }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li:last-child { color: var(--text-primary); }

/* ─── SKILL PILL TAGS ─────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.tag:hover {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
}

/* ─── DIVIDER ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-lg) 0;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.95); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* AOS Animations */
[data-aos] { opacity: 0; transform: translateY(30px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
[data-aos].aos-animate { opacity: 1; transform: translateY(0); }
[data-aos="fade-left"] { transform: translateX(-30px); }
[data-aos="fade-left"].aos-animate { transform: translateX(0); }
[data-aos="fade-right"] { transform: translateX(30px); }
[data-aos="fade-right"].aos-animate { transform: translateX(0); }
[data-aos="zoom-in"] { transform: scale(0.9); }
[data-aos="zoom-in"].aos-animate { transform: scale(1); }

/* ─── SKELETON LOADING ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

/* ─── UTILITY CLASSES ─────────────────────────────────────── */
.text-accent    { color: var(--accent) !important; }
.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-success   { color: var(--success) !important; }
.text-warning   { color: var(--warning) !important; }
.text-danger    { color: var(--danger) !important; }
.text-center    { text-align: center; }
.text-right     { text-align: right; }

.bg-card        { background: var(--bg-card) !important; }
.bg-secondary   { background: var(--bg-secondary) !important; }

.d-flex         { display: flex; }
.d-grid         { display: grid; }
.d-none         { display: none !important; }
.d-block        { display: block !important; }
.flex-center    { display: flex; align-items: center; justify-content: center; }
.align-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-sm         { gap: var(--space-sm); }
.gap-md         { gap: var(--space-md); }
.gap-lg         { gap: var(--space-lg); }

.fw-bold        { font-weight: 700; }
.fw-black       { font-weight: 900; }
.fs-sm          { font-size: 0.85rem; }
.fs-xs          { font-size: 0.75rem; }

.mb-0  { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.rounded-full   { border-radius: var(--radius-full); }
.overflow-hidden{ overflow: hidden; }
.position-relative { position: relative; }

.w-100 { width: 100%; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */

/* Large Desktop */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
}

/* Tablet landscape */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 40px; }
}

/* Tablet portrait */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 100px 0 60px; }
  .hero .container { flex-direction: column; gap: var(--space-2xl); }
  .hero-card-stack { width: 100%; max-width: 460px; }
  .stats-bar .container { flex-wrap: wrap; gap: 24px; justify-content: center; }
  .stat-item { min-width: 120px; }
}

/* ─── NAVBAR SMALL PHONE (≤480px) ─────────────────────────── */
@media (max-width: 480px) {
  .navbar-inner { height: 58px; gap: 8px; }
  .navbar-nav.open { top: 58px; }
  .navbar-brand .brand-name { font-size: 1rem; }
  /* On very small screens, hide Login & show only Start Learning */
  .navbar-actions .btn-ghost { display: none !important; }
  .navbar-actions .btn-primary,
  .navbar-actions .btn-outline { font-size: 0.78rem; padding: 7px 12px; }
}

/* Mobile landscape / large phones */
@media (max-width: 768px) {
  .container { padding: 0 var(--space-md); }
  h1 { font-size: clamp(1.8rem, 7vw, 2.8rem); }
  h2 { font-size: clamp(1.4rem, 5vw, 2rem); }

  /* Hero */
  .hero { min-height: auto; padding-top: 80px; }
  .hero-inner { padding-top: 16px; padding-bottom: 40px; gap: 32px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  .hero-desc { font-size: 0.95rem; }
  .hero-visual { padding: 28px 36px; }
  .hero-badge { font-size: 0.72rem; }

  /* Hero actions stack on mobile */
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-actions .btn { text-align: center; justify-content: center; }

  /* Stats bar */
  .stats-bar { padding: var(--space-lg) 0; }
  .stats-bar .container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; text-align: center; }
  .stat-item .stat-number { font-size: 1.8rem; }

  /* Grids */
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }

  /* Section */
  .section { padding: var(--space-xl) 0; }
  .section-title { font-size: clamp(1.4rem, 5vw, 1.9rem); }

  /* Testimonials: show 1 slide on mobile */
  .slider-slide { min-width: 100% !important; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer-legal { justify-content: center; }

  /* Auth */
  .auth-card { padding: var(--space-lg); }

  /* Course filter bar */
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-select { width: 100%; }
}

/* Small phones */
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero-card-stack { max-width: 320px; }
  .hero-main-card { padding: var(--space-md); }
  .stats-bar .container { grid-template-columns: repeat(2, 1fr); }

  /* Course card compact on tiny screens */
  .course-card-body { padding: 14px; }
  .course-card-footer { padding: 10px 14px; }
  .course-card-title { font-size: 0.9rem; }
}

/* Extra small phones */
@media (max-width: 380px) {
  .hero h1 { font-size: 1.9rem; }
  .btn-lg { padding: 12px 22px; font-size: 0.9rem; }
  .hero-visual { padding: 20px 24px; }
  .hero-float-card { display: none; } /* Hide floats on very tiny screens */
  .stats-bar .container { grid-template-columns: 1fr 1fr; gap: 14px; }
  .stat-item .stat-number { font-size: 1.5rem; }
}

/* ─── PAGE-SPECIFIC: AUTH ─────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
  background: var(--grad-primary);
  position: relative;
  overflow: hidden;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}

.auth-card-logo {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-card-title {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}

.auth-card-sub {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

/* ─── PAGE-SPECIFIC: COURSE CATALOG ──────────────────────── */
.courses-header {
  background: var(--bg-secondary);
  padding: 100px 0 48px;
  border-bottom: 1px solid var(--border);
}

.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-xl);
}

.filter-select {
  appearance: none;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  padding: 9px 36px 9px 14px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238892B0'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px;
}

.filter-select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-dim);
  color: var(--text-primary);
}

/* ─── SECTION BACKGROUNDS ─────────────────────────────────── */
.bg-gradient-section {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

/* ─── FAQ ACCORDION ─────────────────────────────────────── */
.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  overflow: hidden;
}

.accordion-header {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background var(--transition);
  user-select: none;
}

.accordion-header:hover { background: var(--accent-dim); }
.accordion-header .icon { font-size: 1.2rem; transition: transform var(--transition); }
.accordion-item.open .accordion-header .icon { transform: rotate(180deg); }

.accordion-body {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), padding 0.3s;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.accordion-item.open .accordion-body {
  padding: 0 20px 18px;
  max-height: 500px;
}

/* ═══════════════════════════════════════════════════════════════
   TEXT VISIBILITY IMPROVEMENTS — Global overrides
   ═══════════════════════════════════════════════════════════════ */

/* ─── Form Controls — maximum readability ───────────────────── */
.form-control,
.form-control:not(:disabled) {
  color: #E6F1FF !important;
  background-color: #141d30 !important;
  border-color: rgba(100,120,180,0.3) !important;
  caret-color: #F7941D;
}

.form-control:focus {
  background-color: #162038 !important;
  border-color: #F7941D !important;
  box-shadow: 0 0 0 3px rgba(247,148,29,.15) !important;
  color: #E6F1FF !important;
}

.form-control::placeholder {
  color: rgba(136,146,176,0.65) !important;
  font-style: italic;
}

/* Textarea specific */
textarea.form-control {
  line-height: 1.7;
  resize: vertical;
}

/* ─── Select readability ─────────────────────────────────────── */
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23F7941D' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 38px !important;
  cursor: pointer;
}

/* ─── Admin table text ───────────────────────────────────────── */
.table td, .table th {
  color: #c8d6f0;
}

.table td strong, .table td b {
  color: #E6F1FF;
}

/* ─── Card / section descriptions ───────────────────────────── */
.admin-form-section-desc,
.card-body p,
.card p,
.form-label small,
small {
  color: rgba(136,146,176,0.8) !important;
}

/* ─── Input group icons ──────────────────────────────────────── */
.input-group-icon {
  color: rgba(136,146,176,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
}

/* ─── Badge contrast fix ─────────────────────────────────────── */
.badge {
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: .3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge-secondary { background: rgba(100,120,180,.15); color: #a0b0d0; border: 1px solid rgba(100,120,180,.2); }
.badge-success   { background: rgba(68,207,136,.15);  color: #44cf88; border: 1px solid rgba(68,207,136,.2); }
.badge-danger    { background: rgba(231,76,60,.15);   color: #e74c3c; border: 1px solid rgba(231,76,60,.2); }
.badge-warning   { background: rgba(243,156,18,.15);  color: #f39c12; border: 1px solid rgba(243,156,18,.2); }
.badge-accent    { background: rgba(247,148,29,.18);  color: #F7941D; border: 1px solid rgba(247,148,29,.25); }
.badge-blue      { background: rgba(52,152,219,.15);  color: #3498db; border: 1px solid rgba(52,152,219,.2); }

/* ─── Alert text visibility ──────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  padding: 13px 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  margin-bottom: 18px;
}

.alert-success { background: rgba(68,207,136,.12); border: 1px solid rgba(68,207,136,.3);  color: #7de8b0; }
.alert-error   { background: rgba(231,76,60,.12);  border: 1px solid rgba(231,76,60,.3);   color: #f4a09a; }
.alert-warning { background: rgba(243,156,18,.12); border: 1px solid rgba(243,156,18,.3);  color: #f8c471; }
.alert-info    { background: rgba(52,152,219,.12); border: 1px solid rgba(52,152,219,.3);  color: #85c1e9; }
.alert-icon    { font-weight: 800; flex-shrink: 0; }

/* ─── Stat card values ───────────────────────────────────────── */
.admin-stat-value { color: #E6F1FF; font-size: 1.7rem; font-weight: 800; }
.admin-stat-label { color: rgba(136,146,176,0.8); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.admin-stat-change { font-size: .75rem; margin-top: 4px; }
.admin-stat-change.up   { color: #44cf88; }
.admin-stat-change.down { color: #e74c3c; }

/* ─── Page header subtitle ───────────────────────────────────── */
.admin-page-title small {
  font-size: .6em;
  font-weight: 400;
  color: rgba(136,146,176,0.7);
  margin-left: 8px;
}

/* ─── Disabled inputs ────────────────────────────────────────── */
.form-control:disabled,
.form-control[readonly] {
  opacity: .55;
  cursor: not-allowed;
  background-color: rgba(20,29,48,.6) !important;
}

/* ─── Admin form section titles ──────────────────────────────── */
.admin-form-section-title {
  font-size: .9rem;
  font-weight: 700;
  color: #E6F1FF;
  margin-bottom: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(100,120,180,.15);
}

/* ─── Floating button tooltip label ─────────────────────────── */
.whatsapp-float::after,
#backToTop::after {
  content: attr(title);
  position: absolute;
  left: 60px;
  white-space: nowrap;
  background: rgba(15,22,40,.92);
  color: #E6F1FF;
  font-size: .72rem;
  padding: 4px 10px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  border: 1px solid rgba(100,120,180,.2);
}

.whatsapp-float:hover::after,
#backToTop:hover::after {
  opacity: 1;
}
