/* ═══════════════════════════════════════════════════════════════
   منصة العراقي للرياضيات — Design System & Styles
   Premium EdTech Platform — Pure CSS
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. DESIGN TOKENS (CSS Variables) ────────────────────────── */
:root {
  /* 🌿 20% Primary — Forest & Emerald Green */
  --primary-50:  #E6F4ED;
  --primary-100: #C2E5D3;
  --primary-200: #8ECEAD;
  --primary-300: #5AB888;
  --primary-400: #36A76B;
  --primary-500: #1B6B3A;
  --primary-600: #145A2E;
  --primary-700: #0F4823;
  --primary-800: #0A3518;
  --primary-900: #05220E;
  --primary-gradient: linear-gradient(135deg, #1B6B3A 0%, #2E8B57 100%);
  --primary-glow: rgba(27, 107, 58, 0.28);

  /* 🥐 40% Secondary — Warm Sand, Beige & Cream */
  --secondary-50:  #FDFCFA;
  --secondary-100: #FBF8F3;
  --secondary-200: #F7F4EE;
  --secondary-300: #EFE9DE;
  --secondary-400: #E5DDD0;
  --secondary-500: #D8CCC0;
  --secondary-600: #C5B6A5;

  /* ⚡ 20% Accent — Warm Copper, Gold & Amber */
  --accent-50:  #FFFBEB;
  --accent-100: #FEF3C7;
  --accent-200: #FDE68A;
  --accent-300: #FCD34D;
  --accent-400: #F59E0B;
  --accent-500: #D97706;
  --accent-600: #B45309;
  --accent-700: #92400E;
  --accent-800: #78350F;
  --accent-gradient: linear-gradient(135deg, #B45309 0%, #D97706 50%, #F59E0B 100%);
  --copper-gradient: linear-gradient(135deg, #92400E 0%, #D97706 60%, #FBBF24 100%);
  --shadow-copper: 0 6px 20px rgba(217, 119, 6, 0.28);

  /* 🌑 20% Dark / Slate / Luxury Black */
  --dark-950: #050811;
  --dark-900: #070B14;
  --dark-850: #0B1220;
  --dark-800: #0F172A;
  --dark-700: #1E293B;
  --dark-600: #334155;
  --dark-500: #475569;
  --dark-gradient: linear-gradient(150deg, #070B14 0%, #0F172A 60%, #13281E 100%);
  --dark-surface: #0F172A;
  --dark-card: #1E293B;
  --dark-border: rgba(245, 158, 11, 0.18);

  /* Neutral Shades */
  --neutral-50:  #F8FAFC;
  --neutral-100: #F1F5F9;
  --neutral-200: #E2E8F0;
  --neutral-300: #CBD5E1;
  --neutral-400: #94A3B8;
  --neutral-500: #64748B;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1E293B;
  --neutral-900: #0F172A;

  /* Semantic */
  --success: #16A34A;
  --success-light: #DCFCE7;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --info: #0284C7;
  --info-light: #E0F2FE;

  /* Base Surfaces */
  --bg: #F7F4EE;
  --bg-alt: #EFE9DE;
  --surface: #FFFFFF;
  --surface-warm: #FAF6F0;
  --surface-hover: #FFFDF9;

  /* Typography Colors */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;
  --text-copper: #B45309;
  --text-gold: #D97706;
  --text-green: #1B6B3A;

  /* Borders */
  --border: #E5DDD0;
  --border-light: #EFE8DC;
  --border-copper: rgba(217, 119, 6, 0.3);
  --border-green: rgba(27, 107, 58, 0.3);

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 20px 60px rgba(15, 23, 42, 0.16);
  --shadow-glow: 0 0 32px rgba(27, 107, 58, 0.22);
  --shadow-accent: 0 6px 24px rgba(217, 119, 6, 0.32);

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-2xl: 40px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Typography */
  --font-ar: 'Tajawal', 'Segoe UI', sans-serif;
  --font-en: 'Inter', 'Segoe UI', sans-serif;

  /* Z-index */
  --z-dropdown: 100;
  --z-header: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Container */
  --container-max: 1280px;
  --header-height: 76px;
}


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

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

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

::selection {
  background: var(--primary-100);
  color: var(--primary-800);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--secondary-200); }
::-webkit-scrollbar-thumb { background: var(--secondary-500); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--neutral-400); }


/* ── 3. TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ar);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

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

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: var(--primary-50);
  color: var(--primary-500);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}
.section-badge .icon { font-size: 1rem; }

.section-title {
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-2xl);
}

.text-center { text-align: center; }
.text-center .section-subtitle { margin-inline: auto; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-300), var(--accent-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── 4. LAYOUT ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.page-section {
  padding: var(--space-4xl) 0;
}

.page-section:nth-child(even) {
  background: var(--bg-alt);
}


/* ── 5. HEADER ───────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: all var(--duration-normal) var(--ease-out);
  background: rgba(7, 11, 20, 0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(217, 119, 6, 0.22);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.header.scrolled {
  background: rgba(7, 11, 20, 0.98);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.header-logo-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform var(--duration-normal) var(--ease-spring);
}
.header-logo:hover .header-logo-icon { transform: scale(1.05) rotate(-3deg); }

.header-logo-text {
  font-weight: 900;
  font-size: 1.15rem;
  color: #FFFFFF;
}
.header-logo-sub {
  font-size: 0.74rem;
  color: var(--accent-300);
  font-weight: 600;
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  color: #CBD5E1;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
}
.nav-link:hover { color: var(--accent-400); background: rgba(245, 158, 11, 0.12); }
.nav-link.active { color: var(--accent-400); background: rgba(245, 158, 11, 0.16); }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
  transition: all var(--duration-fast) var(--ease-out);
  z-index: 10;
}
.mobile-menu-btn:hover { background: rgba(245, 158, 11, 0.2); color: var(--accent-300); }

/* User Avatar (logged in) */
.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid var(--accent-400);
  transition: transform var(--duration-fast) var(--ease-spring);
  position: relative;
}
.header-avatar:hover { transform: scale(1.08); }

.avatar-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--duration-normal) var(--ease-out);
  overflow: hidden;
  z-index: var(--z-dropdown);
}
.avatar-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
}
.dropdown-name { font-weight: 700; font-size: 0.95rem; }
.dropdown-email { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
  cursor: pointer;
  width: 100%;
  text-align: right;
}
.dropdown-item:hover { background: var(--primary-50); color: var(--primary-500); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-light); }
.dropdown-divider { height: 1px; background: var(--border-light); }


/* ── Mobile Menu Overlay ─────────────────────────────────────── */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,31,33,0.5);
  backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}
.mobile-menu-overlay.show { opacity: 1; visibility: visible; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: var(--surface);
  z-index: calc(var(--z-overlay) + 1);
  transition: right var(--duration-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
}
.mobile-menu.show { right: 0; }

.mobile-menu-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-menu-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
}
.mobile-menu-close:hover { background: var(--neutral-50); }

.mobile-menu-nav {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
  margin-bottom: 4px;
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--primary-50);
  color: var(--primary-500);
}
.mobile-nav-link .icon { font-size: 1.2rem; width: 24px; text-align: center; }

.mobile-menu-footer {
  padding: 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ── 6. BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-ar);
  font-size: 0.95rem;
  font-weight: 700;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--duration-fast);
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, #1B6B3A 0%, #2E8B57 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 18px rgba(27, 107, 58, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(27, 107, 58, 0.45);
  background: linear-gradient(135deg, #145A2E 0%, #1B6B3A 100%);
}
.btn-primary:active { transform: translateY(0); }

.btn-accent {
  background: linear-gradient(135deg, #B45309 0%, #D97706 50%, #F59E0B 100%);
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(217, 119, 6, 0.5);
  background: linear-gradient(135deg, #92400E 0%, #B45309 50%, #D97706 100%);
}

.btn-dark {
  background: #0F172A;
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.3);
}
.btn-dark:hover {
  background: #1E293B;
  color: #FBBF24;
  border-color: #F59E0B;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-500);
  border: 2px solid var(--primary-500);
}
.btn-outline:hover {
  background: var(--primary-50);
  border-color: var(--primary-600);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: rgba(15, 23, 42, 0.06); color: var(--text-primary); }

.btn-white {
  background: #FFFFFF;
  color: var(--primary-500);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--accent-500);
}

.btn-sm { padding: 8px 18px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-xl { padding: 18px 44px; font-size: 1.1rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 42px; height: 42px; padding: 0; border-radius: var(--radius-sm); }
.btn-icon.sm { width: 36px; height: 36px; }

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


/* ── 7. CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.card-body { padding: var(--space-lg); }
.card-flat { box-shadow: none; }
.card-flat:hover { box-shadow: var(--shadow-sm); transform: none; }


/* ── 8. BADGES ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}
.badge-primary { background: var(--primary-50); color: var(--primary-600); border: 1px solid var(--primary-200); }
.badge-accent { background: var(--accent-100); color: var(--accent-700); border: 1px solid var(--accent-200); }
.badge-copper { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.badge-dark { background: #0F172A; color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-neutral { background: var(--neutral-100); color: var(--neutral-700); }


/* ── 9. INPUTS & FORMS ───────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-lg);
}
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--surface);
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:hover { border-color: var(--secondary-500); }
.form-input:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 4px var(--primary-50);
}
.form-input.error { border-color: var(--danger); }
.form-input.error:focus { box-shadow: 0 0 0 4px var(--danger-light); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 6px; }

.form-input-icon-wrapper {
  position: relative;
}
.form-input-icon-wrapper .form-input {
  padding-right: 46px;
}
.form-input-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.form-select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--surface);
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: all var(--duration-fast) var(--ease-out);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238A9296' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 18px;
}
.form-select:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 4px var(--primary-50);
}


/* ── 10. PROGRESS BAR ────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--secondary-300);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-300));
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-out);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}
.progress-bar.sm { height: 5px; }
.progress-bar.lg { height: 12px; }


/* ── 11. SKELETON LOADING ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--secondary-300) 25%, var(--secondary-200) 50%, var(--secondary-300) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 16px; margin-bottom: 10px; }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 14px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: var(--radius-full); }
.skeleton-card { height: 280px; border-radius: var(--radius-lg); }
.skeleton-image { height: 180px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }


/* ── 12. EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-4xl) var(--space-lg);
}
.empty-state-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  background: var(--primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary-400);
  margin: 0 auto var(--space-lg);
}
.empty-state h3 { margin-bottom: var(--space-sm); }
.empty-state p { color: var(--text-muted); max-width: 400px; margin: 0 auto var(--space-lg); }


/* ═══════════════════════════════════════════════════════════════
   PAGE: HERO SECTION — Dynamic 4-Color Luxury Aesthetics
   ═══════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 85% 20%, rgba(217, 119, 6, 0.15) 0%, transparent 45%),
              radial-gradient(circle at 15% 80%, rgba(27, 107, 58, 0.22) 0%, transparent 50%),
              linear-gradient(155deg, #070B14 0%, #0B1622 45%, #0A1F16 100%);
  color: white;
  padding-top: calc(var(--header-height) + 20px);
  padding-bottom: var(--space-3xl);
}

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

.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  filter: blur(40px);
}
.hero-shape:nth-child(1) {
  width: 600px; height: 600px;
  background: var(--primary-500);
  top: -200px; left: -200px;
  animation: float-slow 20s infinite;
}
.hero-shape:nth-child(2) {
  width: 450px; height: 450px;
  background: var(--accent-500);
  bottom: -100px; right: -100px;
  animation: float-slow 25s infinite reverse;
}
.hero-shape:nth-child(3) {
  width: 300px; height: 300px;
  background: var(--accent-300);
  top: 40%; left: 60%;
  animation: float-slow 18s infinite 3s;
}

.hero-math-symbols {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.math-symbol {
  position: absolute;
  font-size: 2.2rem;
  color: var(--accent-400);
  opacity: 0.15;
  font-weight: 900;
  font-family: var(--font-en);
  animation: float-symbol 15s infinite;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-3xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 650px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-300);
  margin-bottom: var(--space-lg);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  animation: fadeInUp 0.8s var(--ease-out);
}
.hero-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-400);
  box-shadow: 0 0 10px var(--accent-400);
  animation: pulse-dot 2s infinite;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.25;
  color: #FFFFFF;
  margin-bottom: var(--space-lg);
  font-weight: 900;
  animation: fadeInUp 0.8s var(--ease-out) 0.1s both;
}

.hero-description {
  font-size: 1.15rem;
  color: #CBD5E1;
  line-height: 1.9;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.8s var(--ease-out) 0.2s both;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s var(--ease-out) 0.3s both;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
  width: fit-content;
  animation: fadeInUp 0.8s var(--ease-out) 0.4s both;
}
.hero-stat {
  text-align: center;
}
.hero-stat-num {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--accent-400);
  font-family: var(--font-en);
}
.hero-stat-label {
  font-size: 0.82rem;
  color: #94A3B8;
  font-weight: 700;
}
.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: fadeInScale 1s var(--ease-out) 0.4s both;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.hero-main-card {
  background: rgba(15, 23, 42, 0.85);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(27, 107, 58, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.35);
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 2;
  color: white;
}

.hero-main-card .card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--space-lg);
}
.hero-main-card .card-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}
.hero-main-card .card-info h4 { font-size: 1.05rem; color: #FFFFFF; margin-bottom: 2px; }
.hero-main-card .card-info span { font-size: 0.82rem; color: var(--accent-300); font-weight: 600; }

.hero-main-card .card-content {
  background: rgba(30, 41, 59, 0.8);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.hero-main-card .math-preview {
  font-family: var(--font-en);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent-300);
  text-align: center;
  direction: ltr;
  letter-spacing: 1px;
  text-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}
.hero-main-card .card-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: #CBD5E1;
  margin-bottom: 8px;
}

.hero-floating-card {
  position: absolute;
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(245, 158, 11, 0.35);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
  z-index: 3;
  animation: float-card 6s infinite;
}
.hero-floating-card .fc-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.hero-floating-card:nth-child(2) {
  top: 10%;
  left: -30px;
}
.hero-floating-card:nth-child(2) .fc-icon {
  background: rgba(22, 163, 74, 0.25);
  color: #4ADE80;
  border: 1px solid rgba(74, 222, 128, 0.4);
}
.hero-floating-card:nth-child(3) {
  bottom: 15%;
  right: -20px;
  animation-delay: 2s;
}
.hero-floating-card:nth-child(3) .fc-icon {
  background: rgba(217, 119, 6, 0.25);
  color: #FBBF24;
  border: 1px solid rgba(251, 191, 36, 0.4);
}


/* ═══════════════════════════════════════════════════════════════
   PAGE: STATS SECTION
   ═══════════════════════════════════════════════════════════════ */
.stats-section {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
  color: white;
}
.stat-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto var(--space-md);
  backdrop-filter: blur(10px);
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  font-family: var(--font-en);
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.9rem;
  opacity: 0.85;
  font-weight: 500;
}


/* ═══════════════════════════════════════════════════════════════
   PAGE: FEATURES SECTION (High-Contrast Dark Elegance)
   ═══════════════════════════════════════════════════════════════ */
.features-section {
  background: linear-gradient(160deg, #070B14 0%, #0B1220 50%, #0A1F16 100%);
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.feature-card {
  background: rgba(15, 23, 42, 0.75);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-lg);
  border: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: all var(--duration-normal) var(--ease-out);
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1B6B3A, #D97706, #F59E0B);
  transform: scaleX(0);
  transition: transform var(--duration-slow) var(--ease-out);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 24px rgba(217, 119, 6, 0.25);
  border-color: rgba(245, 158, 11, 0.5);
}

.feature-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  margin: 0 auto var(--space-lg);
  transition: transform var(--duration-normal) var(--ease-spring);
}
.feature-card:hover .feature-icon { transform: scale(1.1) rotate(-5deg); }

.feature-icon.green {
  background: rgba(22, 163, 74, 0.2);
  color: #4ADE80;
  border: 1px solid rgba(74, 222, 128, 0.35);
  box-shadow: 0 0 20px rgba(22, 163, 74, 0.2);
}
.feature-icon.yellow {
  background: rgba(217, 119, 6, 0.2);
  color: #FBBF24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.2);
}
.feature-icon.blue {
  background: rgba(2, 132, 199, 0.2);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.2);
}

.feature-card h3 { margin-bottom: var(--space-sm); font-size: 1.2rem; color: #FFFFFF; font-weight: 800; }
.feature-card p { font-size: 0.92rem; color: #94A3B8; line-height: 1.7; }


/* ═══════════════════════════════════════════════════════════════
   PAGE: COURSES SECTION / COURSE CARDS
   ═══════════════════════════════════════════════════════════════ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.course-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  position: relative;
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-400);
}

.course-card-image {
  height: 190px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #070B14 0%, #0F172A 60%, #0A2216 100%);
  border-bottom: 2px solid rgba(217, 119, 6, 0.25);
}
.course-card-image img,
.course-card-image .course-img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course-img-placeholder {
  background: linear-gradient(135deg, #070B14 0%, #0F172A 60%, #0A2216 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  color: var(--accent-400);
  text-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
}

.course-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
}

.course-card-body {
  padding: var(--space-lg);
  background: #FFFFFF;
}
.course-card-grade {
  font-size: 0.78rem;
  font-weight: 800;
  color: #92400E;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.course-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}
.course-card-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-light);
  background: var(--surface-warm);
}

.course-price {
  font-size: 1.25rem;
  font-weight: 900;
  color: #D97706;
}
.course-price .currency { font-size: 0.8rem; font-weight: 700; }
.course-price-free { color: var(--success); font-weight: 900; }

/* Courses Page Filter */
.courses-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}
.filter-search {
  flex: 1;
  min-width: 250px;
  position: relative;
}
.filter-search input {
  width: 100%;
  padding: 14px 18px 14px 50px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--duration-fast);
}
.filter-search input:focus { border-color: var(--accent-500); box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15); }
.filter-search .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  transition: all var(--duration-fast);
  cursor: pointer;
}
.filter-chip:hover { border-color: var(--accent-400); color: var(--accent-600); }
.filter-chip.active {
  background: #0F172A;
  color: #FBBF24;
  border-color: #D97706;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}


/* ═══════════════════════════════════════════════════════════════
   PAGE: COURSE DETAILS
   ═══════════════════════════════════════════════════════════════ */
.course-details-hero {
  background: linear-gradient(160deg, var(--primary-50), var(--secondary-200), var(--accent-50));
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-3xl);
}
.course-details-hero .container {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-2xl);
  align-items: start;
}

.course-details-info h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: var(--space-md); }
.course-details-info .course-desc-hero {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}
.course-details-meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
.course-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.course-detail-meta-item .icon {
  color: var(--primary-400);
}

/* Course Sidebar Card */
.course-sidebar-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
  border: 1px solid var(--border-light);
}
.course-sidebar-card .price-section {
  padding: var(--space-lg);
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}
.course-sidebar-card .price-big {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary-500);
}
.course-sidebar-card .price-big .currency {
  font-size: 1rem;
  font-weight: 600;
}
.course-sidebar-card .price-section .btn { margin-top: var(--space-md); }
.course-sidebar-card .sidebar-details {
  padding: var(--space-lg);
}
.sidebar-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}
.sidebar-detail-row:last-child { border-bottom: none; }
.sidebar-detail-row .label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}
.sidebar-detail-row .value { font-weight: 700; }

/* Course Content Tabs */
.course-content-section {
  padding: var(--space-3xl) 0;
}
.course-content-section .container {
  max-width: 900px;
}

.course-tabs {
  display: flex;
  gap: 4px;
  background: var(--secondary-200);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: var(--space-xl);
}
.course-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
  cursor: pointer;
}
.course-tab:hover { color: var(--text-primary); }
.course-tab.active {
  background: var(--surface);
  color: var(--primary-500);
  box-shadow: var(--shadow-sm);
}

/* Curriculum */
.curriculum-package {
  margin-bottom: var(--space-lg);
}
.package-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
}
.package-header:hover { border-color: var(--primary-200); }
.package-header.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--primary-200);
  background: var(--primary-50);
}
.package-header h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
}
.package-header .lesson-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.package-header .toggle-icon {
  transition: transform var(--duration-normal) var(--ease-out);
  color: var(--text-muted);
}
.package-header.open .toggle-icon { transform: rotate(180deg); }

.package-lessons {
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--duration-slow) var(--ease-out);
}
.package-lessons.open { max-height: 2000px; }

.lesson-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--duration-fast);
  cursor: pointer;
}
.lesson-item:last-child { border-bottom: none; }
.lesson-item:hover { background: var(--secondary-50); }

.lesson-item .lesson-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.lesson-icon.video { background: var(--info-light); color: var(--info); }
.lesson-icon.quiz { background: var(--accent-50); color: var(--accent-500); }
.lesson-icon.pdf { background: var(--danger-light); color: var(--danger); }

.lesson-item .lesson-info { flex: 1; }
.lesson-item .lesson-title { font-size: 0.92rem; font-weight: 600; }
.lesson-item .lesson-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.lesson-item .lesson-status { font-size: 1.1rem; }
.lesson-item .lesson-status.completed { color: var(--success); }
.lesson-item .lesson-status.locked { color: var(--text-muted); }


/* ═══════════════════════════════════════════════════════════════
   PAGE: LESSON VIEW (Dark Theater Mode & Copper/Emerald Details)
   ═══════════════════════════════════════════════════════════════ */
.lesson-page {
  padding-top: var(--header-height);
  display: grid;
  grid-template-columns: 330px 1fr;
  min-height: 100vh;
  background: var(--bg);
}

/* Lesson Sidebar */
.lesson-sidebar {
  background: var(--surface);
  border-left: 1px solid var(--border);
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.lesson-sidebar-header {
  padding: var(--space-lg);
  background: #0F172A;
  color: #FFFFFF;
  border-bottom: 2px solid rgba(217, 119, 6, 0.35);
}
.lesson-sidebar-header h3 { font-size: 1.05rem; color: #FFFFFF; margin-bottom: var(--space-sm); font-weight: 800; }
.lesson-sidebar-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--accent-300);
  font-weight: 700;
}
.lesson-sidebar-progress .progress-bar { flex: 1; height: 8px; background: rgba(255, 255, 255, 0.15); border-radius: 99px; }
.lesson-sidebar-progress .progress-fill { background: linear-gradient(90deg, #1B6B3A, #2E8B57); border-radius: 99px; }

.lesson-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm);
}

.sidebar-lesson-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  transition: all var(--duration-fast);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.sidebar-lesson-item:hover { background: var(--secondary-100); }
.sidebar-lesson-item.active {
  background: #FEF3C7;
  color: #92400E;
  font-weight: 800;
  border-right: 4px solid #D97706;
}
.sidebar-lesson-item.completed { color: var(--success); font-weight: 700; }
.sidebar-lesson-item.locked { opacity: 0.5; cursor: not-allowed; }

.sidebar-lesson-item .sl-icon { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-lesson-item .sl-title { flex: 1; }
.sidebar-lesson-item .sl-duration { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

/* Lesson Content Area */
.lesson-content {
  padding: var(--space-xl);
  max-width: 960px;
}

.lesson-content-header {
  margin-bottom: var(--space-xl);
}
.lesson-content-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: var(--space-md);
}
.lesson-content-header .breadcrumb a:hover { color: var(--accent-500); }
.lesson-content-header h1 { font-size: 1.7rem; color: #0F172A; font-weight: 900; }

/* Video Player — Sleek Dark Theater Mode */
.video-player-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #070B14;
  aspect-ratio: 16/9;
  margin-bottom: var(--space-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(217, 119, 6, 0.25);
  position: relative;
}
.video-player-wrap .video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  gap: var(--space-md);
  background: radial-gradient(circle at center, #1E293B 0%, #070B14 100%);
}
.video-placeholder .play-btn-big {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #B45309, #D97706, #F59E0B);
  box-shadow: 0 0 30px rgba(217, 119, 6, 0.6);
  border: 3px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  transition: all var(--duration-normal) var(--ease-spring);
  cursor: pointer;
}
.video-placeholder .play-btn-big:hover {
  transform: scale(1.15);
  box-shadow: 0 0 45px rgba(245, 158, 11, 0.8);
}

/* Quiz Section */
.quiz-section {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--border-light);
}
.quiz-question {
  margin-bottom: var(--space-xl);
}
.quiz-question .q-number {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-600);
  background: #FEF3C7;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: var(--space-sm);
}
.quiz-question .q-text {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
  font-size: 0.95rem;
}
.quiz-option:hover { border-color: var(--primary-300); background: var(--primary-50); }
.quiz-option.selected { border-color: var(--primary-500); background: var(--primary-50); }
.quiz-option.correct { border-color: var(--success); background: var(--success-light); }
.quiz-option.wrong { border-color: var(--danger); background: var(--danger-light); }
.quiz-option .option-letter {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--secondary-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.quiz-option.selected .option-letter { background: var(--primary-500); color: white; }

/* Lesson Navigation */
.lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-xl);
}


/* ═══════════════════════════════════════════════════════════════
   PAGE: DASHBOARD
   ═══════════════════════════════════════════════════════════════ */
.dashboard-page {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-3xl);
}

.dashboard-welcome {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-400), var(--primary-300));
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-2xl);
  color: white;
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}
.dashboard-welcome::after {
  content: '📐';
  position: absolute;
  left: 40px;
  bottom: -10px;
  font-size: 6rem;
  opacity: 0.1;
}
.dashboard-welcome h2 { color: white; font-size: 1.5rem; margin-bottom: 6px; }
.dashboard-welcome p { color: rgba(255,255,255,0.85); font-size: 0.95rem; }

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.dash-stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--duration-normal);
}
.dash-stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.dash-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.dash-stat-icon.green { background: var(--primary-50); color: var(--primary-500); }
.dash-stat-icon.yellow { background: var(--accent-50); color: var(--accent-500); }
.dash-stat-icon.blue { background: var(--info-light); color: var(--info); }
.dash-stat-icon.red { background: var(--danger-light); color: var(--danger); }

.dash-stat-info .stat-val { font-size: 1.6rem; font-weight: 900; font-family: var(--font-en); }
.dash-stat-info .stat-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-xl);
}

/* Enrolled Courses List */
.enrolled-courses-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}
.enrolled-courses-card .card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.enrolled-courses-card .card-header h3 { font-size: 1.1rem; }

.enrolled-course-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--duration-fast);
  cursor: pointer;
}
.enrolled-course-item:last-child { border-bottom: none; }
.enrolled-course-item:hover { background: var(--secondary-50); }

.enrolled-course-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-100), var(--accent-50));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.enrolled-course-info { flex: 1; }
.enrolled-course-info h4 { font-size: 0.95rem; margin-bottom: 4px; }
.enrolled-course-info .progress-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* Activity Feed */
.activity-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}
.activity-card .card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}
.activity-card .card-header h3 { font-size: 1.1rem; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.activity-text { font-size: 0.88rem; font-weight: 600; }
.activity-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }


/* ═══════════════════════════════════════════════════════════════
   PAGE: PROFILE
   ═══════════════════════════════════════════════════════════════ */
.profile-page {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-3xl);
}

.profile-header-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: var(--space-2xl);
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary-400), var(--accent-400));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  font-weight: 900;
  flex-shrink: 0;
}
.profile-info h2 { font-size: 1.5rem; margin-bottom: 4px; }
.profile-info .profile-email {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.profile-info .profile-badges {
  display: flex;
  gap: 8px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}
.profile-section {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: var(--space-xl);
  box-shadow: var(--shadow-xs);
}
.profile-section h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}


/* ═══════════════════════════════════════════════════════════════
   PAGE: AUTH (LOGIN / REGISTER)
   ═══════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-visual {
  background: linear-gradient(160deg, var(--primary-600), var(--primary-500), var(--primary-400));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  position: relative;
  overflow: hidden;
}
.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-visual-content {
  text-align: center;
  color: white;
  position: relative;
  z-index: 1;
  max-width: 420px;
}
.auth-visual-icon {
  font-size: 4rem;
  margin-bottom: var(--space-xl);
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.2));
}
.auth-visual-content h2 {
  color: white;
  font-size: 1.8rem;
  margin-bottom: var(--space-md);
}
.auth-visual-content p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  line-height: 1.8;
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  background: var(--bg);
}

.auth-form-container {
  width: 100%;
  max-width: 440px;
}
.auth-form-container .auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-2xl);
}
.auth-form-container h2 {
  font-size: 1.6rem;
  margin-bottom: var(--space-sm);
}
.auth-form-container .auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-xl);
}

.auth-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-xl);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-footer a {
  color: var(--primary-500);
  font-weight: 700;
}
.auth-footer a:hover { text-decoration: underline; }

.password-toggle {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  z-index: 2;
}
.password-toggle:hover { color: var(--text-primary); }


/* ═══════════════════════════════════════════════════════════════
   TESTIMONIALS
   ═══════════════════════════════════════════════════════════════ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.testimonial-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  transition: all var(--duration-normal) var(--ease-out);
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.testimonial-stars {
  color: var(--accent-400);
  font-size: 1rem;
  margin-bottom: var(--space-md);
  letter-spacing: 2px;
}
.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-200), var(--accent-200));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--primary-700);
}
.testimonial-name { font-weight: 700; font-size: 0.9rem; }
.testimonial-grade { font-size: 0.78rem; color: var(--text-muted); }


/* ═══════════════════════════════════════════════════════════════
   CTA SECTION (Dark Emerald & Copper Glowing Gradient)
   ═══════════════════════════════════════════════════════════════ */
.cta-section {
  background: radial-gradient(circle at 85% 20%, rgba(217, 119, 6, 0.25) 0%, transparent 50%),
              radial-gradient(circle at 15% 80%, rgba(27, 107, 58, 0.3) 0%, transparent 50%),
              linear-gradient(150deg, #050811 0%, #0B1220 50%, #0F2E1E 100%);
  padding: var(--space-4xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(217, 119, 6, 0.25);
  border-bottom: 1px solid rgba(217, 119, 6, 0.25);
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--accent-500);
  opacity: 0.08;
  filter: blur(60px);
}
.cta-section h2 { color: #FFFFFF; font-size: 2.2rem; font-weight: 900; margin-bottom: var(--space-md); position: relative; }
.cta-section p { color: #CBD5E1; font-size: 1.1rem; margin-bottom: var(--space-xl); position: relative; max-width: 550px; margin-inline: auto; }
.cta-section .btn { position: relative; }


/* ═══════════════════════════════════════════════════════════════
   FOOTER (Luxury Slate-Black with Copper Accents)
   ═══════════════════════════════════════════════════════════════ */
.footer {
  background: #050811;
  color: #94A3B8;
  padding: var(--space-3xl) 0 var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-md);
}
.footer-brand .footer-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-400));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1.1rem;
}
.footer-brand .footer-logo-text { color: white; font-weight: 800; font-size: 1.05rem; }
.footer-brand p { font-size: 0.88rem; line-height: 1.8; max-width: 300px; }

.footer-col h4 { color: white; font-size: 0.95rem; margin-bottom: var(--space-md); }
.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: all var(--duration-fast);
}
.footer-col a:hover { color: var(--primary-300); padding-right: 6px; }

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}
.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--duration-fast);
}
.footer-social a:hover {
  background: var(--primary-500);
  color: white;
  transform: translateY(-2px);
}


/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float-slow {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(30px, -20px); }
  50% { transform: translate(-15px, 15px); }
  75% { transform: translate(20px, 10px); }
}

@keyframes float-symbol {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.06; }
  50% { transform: translateY(-20px) rotate(10deg); opacity: 0.1; }
}

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

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

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

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Page Transitions */
.page-transition {
  animation: fadeInUp 0.5s var(--ease-out);
}


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

/* Tablet */
@media (max-width: 1200px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-content { max-width: 100%; margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-stats-row { justify-content: center; }
  .hero-visual { display: none; }

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

  .course-details-hero .container { grid-template-columns: 1fr; }
  .course-sidebar-card { position: static; }

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

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

/* Mobile */
@media (max-width: 768px) {
  :root { --header-height: 66px; }

  .header-nav { display: none; }
  .header-actions .btn { display: none; }
  .mobile-menu-btn { display: flex; }

  .hero { min-height: auto; padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-2xl); }
  .hero h1 { font-size: 1.8rem; }
  .hero-description { font-size: 1rem; }
  .hero-stats-row { flex-wrap: wrap; gap: var(--space-md); }
  .hero-stat-divider { display: none; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
  .stat-number { font-size: 1.8rem; }

  .features-grid { grid-template-columns: 1fr; }
  .courses-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }

  .lesson-page { grid-template-columns: 1fr; }
  .lesson-sidebar {
    position: fixed;
    right: -320px;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    width: 300px;
    z-index: var(--z-overlay);
    transition: right var(--duration-slow) var(--ease-out);
    box-shadow: var(--shadow-xl);
  }
  .lesson-sidebar.show { right: 0; }
  .lesson-sidebar-toggle {
    display: flex;
  }

  .dashboard-stats { grid-template-columns: 1fr; }
  .dashboard-welcome { padding: var(--space-lg); }

  .profile-header-card {
    flex-direction: column;
    text-align: center;
  }

  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-side { padding: var(--space-lg); }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-md); text-align: center; }

  .courses-filter-bar { flex-direction: column; }
  .filter-search { min-width: 100%; }

  .course-details-meta { flex-direction: column; align-items: flex-start; gap: var(--space-sm); }
}

@media (max-width: 480px) {
  .container { padding-inline: var(--space-md); }
  .hero h1 { font-size: 1.5rem; }
  .hero-badge { font-size: 0.78rem; padding: 6px 14px; }
  .btn-xl { padding: 14px 28px; font-size: 1rem; }
  .auth-form .form-row { grid-template-columns: 1fr; }
}

/* Lesson sidebar toggle - hidden by default on desktop */
.lesson-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: calc(var(--z-overlay) + 2);
}

@media (max-width: 768px) {
  .lesson-sidebar-toggle { display: flex; }
}

/* Toast / notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--neutral-800);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  z-index: var(--z-toast);
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-out);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ═══════════════════════════════════════════════════════════════
   LICENSE PAGE — Accordion Styles
   ═══════════════════════════════════════════════════════════════ */

/* Course header on license page */
.license-course-header {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-2xl);
  align-items: start;
  margin-bottom: var(--space-xl);
}

@media (max-width: 900px) {
  .license-course-header { grid-template-columns: 1fr; }
}

/* Status card */
.license-status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.license-activate-form { text-align: right; }

/* Accordion container */
.license-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Package (accordion item) */
.accordion-package {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--duration-fast);
}
.accordion-package:hover {
  box-shadow: var(--shadow-md);
}
.accordion-package.open {
  border-color: var(--primary-300);
}

/* Package header (clickable) */
.accordion-pkg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  background: var(--bg-alt);
  transition: background var(--duration-fast);
  user-select: none;
}
.accordion-pkg-header:hover {
  background: var(--primary-50);
}
.accordion-package.open .accordion-pkg-header {
  background: var(--primary-50);
  border-bottom: 1px solid var(--border);
}

.accordion-pkg-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.accordion-pkg-arrow {
  color: var(--primary-500);
  font-size: 0.85rem;
  transition: transform var(--duration-fast);
  display: inline-block;
}

.accordion-pkg-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Package lessons (collapsible) */
.accordion-pkg-lessons {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.accordion-pkg-lessons.open {
  max-height: 2000px;
}

/* Individual lesson row inside accordion */
.accordion-lesson-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--duration-fast);
}
.accordion-lesson-item:last-child { border-bottom: none; }
.accordion-lesson-item:hover { background: var(--primary-50); }
.accordion-lesson-item.locked {
  opacity: 0.65;
  cursor: not-allowed;
}
.accordion-lesson-item.locked:hover { background: transparent; }
.accordion-lesson-item.completed { background: var(--success-light); }
.accordion-lesson-item.completed:hover { background: #d1fae5; }

.accordion-lesson-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.accordion-lesson-num {
  font-size: 0.78rem;
  color: var(--text-muted);
  min-width: 28px;
  font-weight: 600;
}
.accordion-lesson-icon {
  font-size: 1.1rem;
  min-width: 26px;
  text-align: center;
}
.accordion-lesson-title {
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.accordion-lesson-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.accordion-lesson-right {
  flex-shrink: 0;
}

/* Responsive license page */
@media (max-width: 640px) {
  .accordion-pkg-header { padding: var(--space-sm) var(--space-md); }
  .accordion-lesson-item { padding: 12px var(--space-md); flex-wrap: wrap; gap: 6px; }
  .accordion-lesson-right { width: 100%; text-align: left; }
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN SYSTEM — Admin Dashboard + Lessons Manager
   ═══════════════════════════════════════════════════════════════ */

/* ── Admin Nav Link ─────────────────────────────────────────── */
.admin-nav-link {
  background: linear-gradient(135deg, var(--accent-400), var(--accent-600)) !important;
  color: #fff !important;
  border-radius: 8px;
  padding: 6px 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  transition: opacity 0.2s;
}
.admin-nav-link:hover { opacity: 0.88; }

/* ── Admin Page (Course List) ───────────────────────────────── */
.admin-page {
  padding-top: calc(var(--header-height) + var(--space-2xl));
  padding-bottom: var(--space-4xl);
  min-height: 100vh;
}

.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}
.admin-page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: var(--space-sm) 0;
}
.admin-page-header p {
  color: var(--text-secondary);
}

.admin-header-stats {
  display: flex;
  gap: var(--space-md);
  flex-shrink: 0;
}
.admin-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-md) var(--space-lg);
  min-width: 70px;
  text-align: center;
}
.admin-stat-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary-500);
  line-height: 1;
}
.admin-stat-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Admin Course Row ───────────────────────────────────────── */
.admin-courses-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.admin-course-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-lg) var(--space-xl);
  transition: all 0.2s;
  cursor: default;
}
.admin-course-row:hover {
  border-color: var(--primary-300);
  box-shadow: 0 4px 20px rgba(27,107,58,0.08);
  transform: translateY(-1px);
}
.admin-course-row-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  border-radius: 14px;
}
.admin-course-row-info {
  flex: 1;
  min-width: 0;
}
.admin-course-row-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-course-row-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.admin-meta-stat {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.admin-course-row-actions {
  flex-shrink: 0;
}

/* ── Admin Course Page ──────────────────────────────────────── */
.admin-course-page {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-4xl);
  min-height: 100vh;
}

.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-xl);
  font-size: 0.92rem;
  color: var(--text-muted);
}
.admin-breadcrumb-link {
  color: var(--primary-500);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.admin-breadcrumb-link:hover { opacity: 0.75; }
.admin-breadcrumb-sep {
  font-size: 1.1rem;
  color: var(--border);
}

.admin-course-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.admin-course-page-info {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.admin-course-page-icon {
  font-size: 2.8rem;
  background: var(--primary-50);
  border-radius: 16px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.admin-course-page-info h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.admin-course-page-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ── Empty Lessons State ────────────────────────────────────── */
.admin-empty-lessons {
  text-align: center;
  padding: var(--space-4xl) var(--space-2xl);
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: 20px;
  color: var(--text-muted);
}
.admin-empty-lessons h3 {
  font-size: 1.3rem;
  margin: var(--space-md) 0 var(--space-sm);
  color: var(--text-secondary);
}

/* ── Lessons List ───────────────────────────────────────────── */
.admin-lessons-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ── Lesson Box (Accordion Card) ────────────────────────────── */
.lesson-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.lesson-box:hover {
  border-color: var(--primary-300);
  box-shadow: 0 4px 24px rgba(27,107,58,0.07);
}
.lesson-box.open {
  border-color: var(--primary-400);
  box-shadow: 0 6px 30px rgba(27,107,58,0.10);
}
.lesson-box.draft {
  border-color: var(--accent-300);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-50) 100%);
}

/* Lesson Box Header */
.lesson-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.lesson-box-header:hover {
  background: var(--bg-alt);
}
.lesson-box-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
  min-width: 0;
}
.lesson-box-drag {
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: grab;
  padding: 4px;
  opacity: 0.5;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.lesson-box-drag:hover { opacity: 1; }

.lesson-box-order {
  width: 34px;
  height: 34px;
  background: var(--primary-500);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}
.lesson-box.draft .lesson-box-order {
  background: var(--accent-500);
}

.lesson-box-toggle-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.lesson-box.open .lesson-box-toggle-icon {
  transform: rotate(0deg);
}

.lesson-box-title-wrap {
  flex: 1;
  min-width: 0;
}
.lesson-box-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lesson-box-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lesson-box-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-radius: 6px;
  padding: 2px 8px;
}
.lesson-box-desc-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.lesson-box-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}
.btn.danger-hover:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}

/* Lesson Box Body */
.lesson-box-body {
  display: none;
  padding: 0 var(--space-xl) var(--space-xl);
  border-top: 1px solid var(--border);
  animation: slideDown 0.25s ease;
}
.lesson-box.open .lesson-box-body {
  display: block;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lesson-box-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: var(--space-md) 0;
  padding: var(--space-md);
  background: var(--bg-alt);
  border-radius: 10px;
  border-right: 3px solid var(--primary-400);
}

/* ── Lesson Contents List ───────────────────────────────────── */
.lesson-contents-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: var(--space-md) 0;
}

.lesson-box-empty {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg-alt);
  border-radius: 10px;
  border: 1.5px dashed var(--border);
}

/* ── Lesson Content Item ─────────────────────────────────────── */
.lesson-content-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--space-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s;
}
.lesson-content-item:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
  transform: translateX(-2px);
}

.lci-drag-handle {
  color: var(--text-muted);
  cursor: grab;
  font-size: 1rem;
  opacity: 0.4;
  transition: opacity 0.2s;
  flex-shrink: 0;
  padding: 2px 4px;
}
.lci-drag-handle:hover { opacity: 0.9; }

.lci-order {
  width: 24px;
  height: 24px;
  background: var(--neutral-200);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.lci-type-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.lci-info {
  flex: 1;
  min-width: 0;
}
.lci-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lci-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}
.lci-duration {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

/* ── Small Icon Button ──────────────────────────────────────── */
.btn-icon-sm {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.btn-icon-sm:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-600);
  transform: scale(1.08);
}
.btn-icon-sm.danger:hover {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger);
}

/* ── Lesson Box Footer ──────────────────────────────────────── */
.lesson-box-footer {
  display: flex;
  justify-content: flex-start;
  padding-top: var(--space-md);
  border-top: 1px dashed var(--border);
  margin-top: var(--space-sm);
}

/* ── Admin Modals ───────────────────────────────────────────── */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,15,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: var(--space-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.admin-modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.admin-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.3s;
}
.admin-modal-overlay.show .admin-modal {
  transform: scale(1) translateY(0);
}
.admin-modal-sm {
  max-width: 400px;
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border);
}
.admin-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.admin-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  transition: all 0.2s;
}
.admin-modal-close:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}

.admin-modal-body {
  padding: var(--space-xl);
}

.admin-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 0 0 20px 20px;
}

/* ── Content Type Grid ──────────────────────────────────────── */
.content-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: var(--space-sm);
}

.content-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-sm) var(--space-xs);
  background: var(--bg-alt);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.content-type-btn:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
}
.content-type-btn.active {
  border-color: var(--primary-500);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px var(--primary-100);
}
.ct-icon {
  font-size: 1.6rem;
}
.ct-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.2;
}
.content-type-btn.active .ct-label {
  color: var(--primary-600);
}

/* ── Badge Ghost ────────────────────────────────────────────── */
.badge-ghost {
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── Danger Button ──────────────────────────────────────────── */
.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover {
  background: #c43b4c;
  transform: translateY(-1px);
}

/* ── Responsive Admin ───────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-header-stats {
    justify-content: center;
  }
  .admin-course-row {
    flex-wrap: wrap;
  }
  .admin-course-page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-course-page-info {
    flex-direction: column;
    text-align: center;
  }
  .admin-course-page-meta {
    justify-content: center;
  }
  .lesson-box-header {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
  .lesson-box-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: var(--space-sm);
    border-top: 1px dashed var(--border);
  }
  .content-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-course-row-actions {
    width: 100%;
  }
  .admin-course-row-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .lci-title {
    white-space: normal;
  }
}

}

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE ENHANCEMENTS — المنصة الرئيسية
   ═══════════════════════════════════════════════════════════════ */

/* ── Trust / Quick Highlights Bar ────────────────────────────── */
.trust-bar {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-xl) 0;
  box-shadow: var(--shadow-xs);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: #FFFFFF;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all var(--duration-normal) var(--ease-out);
}
.trust-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-400);
}
.trust-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius-md);
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.trust-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 2px;
}
.trust-desc {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.4;
}

/* ── Stages Grid ─────────────────────────────────────────────── */
.stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}
.stage-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all var(--duration-normal) var(--ease-spring);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.stage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1B6B3A 0%, #D97706 50%, #F59E0B 100%);
  opacity: 1;
}
.stage-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-400);
}
.stage-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #92400E;
  border: 1px solid #FCD34D;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.2);
  transition: transform var(--duration-normal) var(--ease-spring);
}
.stage-card:hover .stage-icon {
  transform: scale(1.1) rotate(5deg);
}
.stage-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #0F172A;
}
.stage-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  flex: 1;
}
.stage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: var(--space-lg);
}
.stage-tag-pill {
  font-size: 0.76rem;
  font-weight: 700;
  background: #F7F4EE;
  color: #0F172A;
  border: 1px solid #E5DDD0;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.stage-btn {
  width: 100%;
}

/* ── Steps Section ───────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  position: relative;
}
.step-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-400);
}
.step-badge {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #B45309, #D97706, #F59E0B);
  color: white;
  font-weight: 900;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.4);
  border: 2px solid white;
}
.step-icon {
  font-size: 2.6rem;
  margin-top: 10px;
  margin-bottom: var(--space-md);
}
.step-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 8px;
}
.step-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Teacher Bio Section ─────────────────────────────────────── */
.teacher-section-card {
  background: linear-gradient(150deg, #070B14 0%, #0F172A 60%, #0A2216 100%);
  color: #FFFFFF;
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: var(--radius-2xl);
  padding: var(--space-3xl) var(--space-2xl);
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--space-3xl);
  align-items: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 24px rgba(217, 119, 6, 0.2);
  position: relative;
  overflow: hidden;
}
.teacher-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.teacher-avatar-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: white;
  box-shadow: 0 12px 36px rgba(217, 119, 6, 0.4);
  border: 4px solid #D97706;
  margin-bottom: var(--space-md);
}
.teacher-name-badge {
  font-size: 1.45rem;
  font-weight: 900;
  color: #FFFFFF;
}
.teacher-role-badge {
  font-size: 0.92rem;
  color: var(--accent-300);
  font-weight: 700;
  margin-top: 2px;
}
.teacher-content h2 {
  font-size: 1.85rem;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: var(--space-md);
}
.teacher-content p {
  font-size: 1rem;
  line-height: 1.9;
  color: #CBD5E1;
  margin-bottom: var(--space-lg);
}
.teacher-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: var(--space-xl);
}
.teacher-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1E293B;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  color: #F1F5F9;
}

/* ── FAQ Accordion ───────────────────────────────────────────── */
.faq-grid {
  max-width: 820px;
  margin: var(--space-2xl) auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-fast) var(--ease-out);
}
.faq-item.open {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-sm);
}
.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: right;
  font-family: var(--font-ar);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--duration-fast);
}
.faq-question:hover {
  color: var(--primary-500);
}
.faq-icon {
  font-size: 1.2rem;
  color: var(--primary-500);
  transition: transform var(--duration-normal) var(--ease-spring);
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-normal) var(--ease-out), padding var(--duration-normal);
  padding: 0 24px;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 20px 24px;
}
.faq-answer p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

/* ── Floating WhatsApp Support ───────────────────────────────── */
.floating-support-btn {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 8900;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  border-radius: 50px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ar);
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
  text-decoration: none;
  user-select: none;
}
.floating-support-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 32px rgba(37,211,102,0.5);
  color: #fff;
}
.floating-support-icon {
  font-size: 20px;
}

/* ── Home Search & Filters ───────────────────────────────────── */
.home-search-box {
  max-width: 520px;
  margin: 0 auto var(--space-xl);
  position: relative;
}
.home-search-input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  font-family: var(--font-ar);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  transition: all var(--duration-fast);
  box-shadow: var(--shadow-xs);
}
.home-search-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px var(--primary-50);
}
.home-search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* ── Course Card Enrolled Indicator ──────────────────────────── */
.course-enrolled-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--success-light);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-top: 6px;
}

/* ── Responsive Additions ────────────────────────────────────── */
@media (max-width: 992px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .teacher-section-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
  }
  .teacher-pills {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .floating-support-btn {
    bottom: 16px;
    right: 16px;
    padding: 10px 14px;
    font-size: 12px;
  }
  .teacher-avatar-circle {
    width: 120px;
    height: 120px;
    font-size: 3.5rem;
  }
}


