/* ═══════════════════════════════════════════════════════════
   Learn Tank Academy
   Mobile-first · RTL · Dark Mode
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@500;600;700&family=Tajawal:wght@400;500;700&display=swap');

:root {
  --primary: #0078B8;
  --primary-dark: #005f91;
  --primary-light: #1e94d2;
  --secondary: #B57A00;
  --accent: #B57A00;
  --accent-soft: #e8f4fb;
  --success: #15803d;
  --warning: #B57A00;
  --danger: #b91c1c;
  --dark: #050505;
  --light: #FFFFFF;

  --bg: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-muted: #f2f7fb;
  --text: #050505;
  --text-muted: #4a5560;
  --text-light: #6b7280;
  --border: #dce8f0;
  --shadow: 0 1px 2px rgba(5, 5, 5, 0.06);
  --shadow-md: 0 6px 18px rgba(5, 5, 5, 0.07);
  --shadow-lg: 0 14px 32px rgba(5, 5, 5, 0.09);
  --radius: 8px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --transition: 0.2s ease;
  --nav-height: 78px;
  --sidebar-width: 250px;
}

[data-theme="dark"] {
  --bg: #050505;
  --bg-elevated: #121212;
  --bg-muted: #1a1a1a;
  --text: #FFFFFF;
  --text-muted: #a3a3a3;
  --text-light: #737373;
  --border: #2a2a2a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.55);
  --accent-soft: #0a2a3d;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  background-image: radial-gradient(circle at 20% 10%, rgba(0, 120, 184, 0.05), transparent 40%);
  color: var(--text);
  line-height: 1.75;
  direction: inherit;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

h1, h2, h3, .logo span {
  font-family: 'El Messiri', 'Tajawal', sans-serif;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* ─── Typography ─── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
.section-title { margin-bottom: 0.5rem; }
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: none;
  border: 1px solid var(--primary-dark);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: none;
}
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-accent {
  background: linear-gradient(135deg, var(--secondary), #d49400);
  color: #fff;
}
.btn-ghost {
  color: var(--text-muted);
  padding: 0.5rem 1rem;
}
.btn-ghost:hover { color: var(--primary); background: var(--bg-muted); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-icon {
  width: 40px; height: 40px;
  padding: 0;
  border-radius: var(--radius);
  background: var(--bg-muted);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--primary); color: #fff; }

/* ─── Navbar ─── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all var(--transition);
}
[data-theme="dark"] .navbar {
  background: var(--bg-elevated);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 6px 10px 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: 'El Messiri', sans-serif;
  flex-shrink: 0;
  letter-spacing: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  background: var(--accent-soft);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.nav-mobile-link { display: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ─── Hero ─── */
.hero {
  padding: calc(var(--nav-height) + 2.5rem) 0 3.5rem;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--primary-dark);
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border: 1px solid rgba(0, 120, 184, 0.18);
}
.hero h1 {
  margin-bottom: 1rem;
  max-width: 12ch;
  line-height: 1.15;
}
.hero h1 span {
  color: var(--primary);
  background: none;
  -webkit-text-fill-color: currentColor;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
  max-width: 34rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.hero-stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--text);
  font-family: 'El Messiri', sans-serif;
}
.hero-stat span { font-size: 0.82rem; color: var(--text-muted); }
.hero-visual {
  position: relative;
}
.hero.hero-no-visual .hero-grid {
  grid-template-columns: 1fr;
  max-width: 48rem;
}
.hero-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: var(--bg-muted);
  aspect-ratio: 4 / 3;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-preview {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero-preview-top {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-muted);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.hero-preview-body { padding: 1.25rem; }
.hero-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.hero-card-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
}
.hero-note {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-muted);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-muted);
  border-right: 3px solid var(--primary);
}
.progress-bar {
  height: 8px;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0.75rem 0;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 1s ease;
}
.xp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-muted);
  color: var(--text-muted);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ─── Search ─── */
.search-section { padding: 0 0 4rem; margin-top: -1rem; }
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition);
  max-width: 700px;
  margin: 0 auto;
}
.search-box:focus-within { border-color: var(--primary); }
.search-box input {
  flex: 1;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  padding: 0.75rem;
}
.search-box input::placeholder { color: var(--text-light); }
.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}
.search-tag {
  padding: 0.35rem 0.9rem;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.search-tag:hover { background: var(--primary); color: #fff; }

/* ─── Sections ─── */
section { padding: 4rem 0; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ─── Categories ─── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.category-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: none;
}
.category-icon {
  width: 44px; height: 44px;
  margin: 0 auto 0.75rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.category-card h4 { font-size: 0.95rem; font-weight: 600; }
.category-card span { font-size: 0.8rem; color: var(--text-muted); }

/* ─── Course Cards ─── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}
.dash-reco-grid {
  grid-template-columns: 1fr 1fr;
}
.course-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.course-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: none;
}
.course-thumb {
  height: 168px;
  position: relative;
  overflow: hidden;
  background: var(--bg-muted);
}
.course-thumb img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}
.course-thumb-bg {
  position: absolute;
  inset: auto 0 0 0;
  width: auto;
  height: auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  background: linear-gradient(transparent, rgba(5, 5, 5, 0.55));
}
.course-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.course-badge.free { background: var(--success); }
.course-body { padding: 1.25rem; }
.course-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.course-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.course-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}
.course-price {
  font-weight: 700;
  color: var(--primary);
}
.course-price.free { color: var(--success); }
.instructor-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.instructor-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.instructor-row span { font-size: 0.85rem; color: var(--text-muted); }

/* ─── Stats ─── */
.stats-section {
  background: var(--bg-elevated);
  color: var(--text);
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 2rem;
  text-align: center;
}
.stat-item strong {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-family: 'El Messiri', sans-serif;
}
.stat-item span { color: var(--text-muted); font-size: 0.92rem; }

/* ─── Testimonials ─── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
}
.testimonial-card:hover { box-shadow: var(--shadow-md); }
.testimonial-stars { color: var(--primary); margin-bottom: 1rem; font-size: 0.85rem; letter-spacing: 0.08em; }
.testimonial-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.8;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
}

/* ─── CTA ─── */
.cta-section {
  padding: 5rem 0;
}
.cta-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before { display: none; }
.cta-box > * { position: relative; z-index: 1; }
.cta-box h2 { margin-bottom: 0.75rem; }
.cta-box p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-inline: auto;
}
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── Footer ─── */
.footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 280px;
}
.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ─── Dashboard Layout ─── */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-height);
}
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  padding: 1.5rem 1rem;
  position: fixed;
  top: var(--nav-height);
  bottom: 0;
  right: 0;
  overflow-y: auto;
  transition: transform var(--transition);
  z-index: 100;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.25rem;
  transition: all var(--transition);
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--accent-soft);
  color: var(--primary-dark);
}
.sidebar-nav .icon {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  flex-shrink: 0;
}
.sidebar-nav a.active .icon { opacity: 1; background: var(--primary); }
.sidebar-section {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  padding: 1.25rem 1rem 0.5rem;
  font-weight: 600;
}
.dashboard-main {
  flex: 1;
  margin-right: var(--sidebar-width);
  padding: 2rem;
  min-width: 0;
}

/* ─── Dashboard Cards ─── */
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.dash-greeting h1 { font-size: 1.75rem; margin-bottom: 0.25rem; }
.dash-greeting p { color: var(--text-muted); }
.user-level-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.25rem;
}
.level-ring {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--level-pct, 65%), var(--bg-muted) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.level-ring::after {
  content: attr(data-level);
  position: absolute;
  width: 36px; height: 36px;
  background: var(--bg-elevated);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.stat-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.stat-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.stat-card-label { font-size: 0.85rem; color: var(--text-muted); }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.card-header h3 { font-size: 1.05rem; }

/* ─── Progress Courses ─── */
.progress-course {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.progress-course:last-child { border-bottom: none; }
.progress-course-thumb {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.progress-course-info { flex: 1; min-width: 0; }
.progress-course-info h4 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.progress-course-info .progress-bar { margin: 0; }

/* ─── Tasks ─── */
.task-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }
.task-checkbox {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  cursor: pointer;
}
.task-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.task-item.done .task-text {
  text-decoration: line-through;
  color: var(--text-light);
}
.task-xp {
  margin-right: auto;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

/* ─── Badges ─── */
.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.badge-item {
  width: 58px; height: 58px;
  border-radius: 10px;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  cursor: default;
  border: 1px solid var(--border);
}
.badge-item.unlocked { background: var(--accent-soft); color: var(--primary-dark); border-color: rgba(0, 120, 184, 0.22); }
.badge-item.locked { opacity: 0.4; }
.badge-item:hover { transform: none; }
.badge-item::after {
  content: attr(data-name);
  position: absolute;
  bottom: -1.4rem;
  font-size: 0.62rem;
  white-space: nowrap;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── Streak ─── */
.streak-display {
  text-align: center;
  padding: 1rem;
}
.streak-flame { font-size: 1.5rem; }
.streak-count {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}
.streak-label { font-size: 0.85rem; color: var(--text-muted); }
.streak-days {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1rem;
}
.streak-day {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-muted);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.streak-day.active { background: var(--accent); color: #fff; }

/* ─── WhatsApp FAB ─── */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.whatsapp-fab:hover {
  background: #1ebe57;
  transform: translateY(-2px);
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle-btn svg {
  display: block;
}
.lang-toggle-btn {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

/* ─── Course Page ─── */
.course-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 3rem;
}
.course-video {
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 4rem;
  margin-bottom: 1.5rem;
}
.course-video-play {
  position: absolute;
  width: 72px; height: 72px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.course-video-play:hover { background: var(--primary); transform: scale(1.05); }
.course-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.course-tab {
  padding: 0.75rem 1.25rem;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.course-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInUp 0.3s ease; }
.lesson-list { display: flex; flex-direction: column; gap: 0.5rem; }
.lesson-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.lesson-item:hover, .lesson-item.active {
  border-color: var(--primary);
  background: rgba(13, 148, 136, 0.05);
}
.lesson-item.completed .lesson-icon { background: var(--success); color: #fff; }
.lesson-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.lesson-info { flex: 1; }
.lesson-info h4 { font-size: 0.95rem; margin-bottom: 0.15rem; }
.lesson-info span { font-size: 0.8rem; color: var(--text-muted); }
.lesson-duration { font-size: 0.8rem; color: var(--text-muted); }
.course-sidebar-card { margin-bottom: 1rem; }
.course-progress-circle {
  width: 100px; height: 100px;
  margin: 0 auto 1rem;
  position: relative;
}
.course-progress-circle svg { transform: rotate(-90deg); }
.course-progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

/* ─── Teacher Dashboard ─── */
.teacher-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.chart-placeholder {
  height: 200px;
  background: var(--bg-muted);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 1rem;
  gap: 0.5rem;
}
.chart-bar {
  flex: 1;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  transition: height 1s ease;
  min-height: 20px;
  opacity: 0.85;
}
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th, .data-table td {
  padding: 0.85rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
}
.data-table tr:hover td { background: var(--bg-muted); }
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.status-badge.success { background: rgba(16,185,129,0.15); color: var(--success); }
.status-badge.warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.status-badge.danger { background: rgba(239,68,68,0.15); color: var(--danger); }

/* ─── Pricing ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.5rem;
}
.pricing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
}
.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: none;
}
.pricing-card.featured::before {
  content: 'الأكثر شعبية';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1rem 0;
}
.pricing-price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.pricing-features {
  text-align: right;
  margin: 1.5rem 0;
}
.pricing-features li {
  padding: 0.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

/* ─── Vision Doc Section (embedded) ─── */
.vision-section { background: var(--bg-muted); }
.vision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.5rem;
}
.vision-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.vision-card h3 {
  color: var(--text);
  margin-bottom: 0.75rem;
}
.lesson-icon {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.vision-card ul { padding-right: 1.25rem; }
.vision-card li {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  list-style: disc;
}
.sitemap-tree {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 2;
  background: var(--bg-muted);
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.animate-on-scroll {
  opacity: 1;
  transform: none;
  transition: none;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: none;
}

/* ─── Mobile Responsive ─── */
/* ─── Landing: 3 tracks ─── */
body.landing {
  background: var(--dark);
  color: var(--light);
  background-image: none;
}
body.landing .navbar,
body.landing .landing-nav {
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.landing .logo span,
body.landing .nav-links a { color: var(--light); }
body.landing .nav-links a.active,
body.landing .nav-links a:hover {
  color: var(--secondary);
  background: transparent;
  border-bottom: 2px solid var(--secondary);
  border-radius: 0;
}
body.landing .nav-toggle span { background: var(--light); }
body.landing .logo-icon {
  background: var(--secondary);
  color: var(--dark);
}
.btn-gold {
  background: var(--secondary);
  color: var(--dark);
  border: none;
  border-radius: 999px;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
}
.btn-gold:hover { background: #d49400; color: var(--dark); }

.landing-main {
  padding: calc(var(--nav-height) + 1.5rem) 0 3rem;
}
.tracks-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.track-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 340px;
  border-radius: 28px;
  overflow: hidden;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  position: relative;
  isolation: isolate;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.track-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}
.track-chem { border-color: #bfdbfe; }
.track-biz { border-color: #bbf7d0; }
.track-pharma { border-color: #e9d5ff; }
[data-theme="dark"] .track-chem { border-color: rgba(59, 130, 246, 0.35); }
[data-theme="dark"] .track-biz { border-color: rgba(34, 197, 94, 0.35); }
[data-theme="dark"] .track-pharma { border-color: rgba(168, 85, 247, 0.35); }
.track-copy {
  padding: 2.4rem 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}
.track-kicker {
  font-size: 0.82rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.track-chem .track-kicker { color: #1d4ed8; }
.track-biz .track-kicker { color: #15803d; }
.track-pharma .track-kicker { color: #7e22ce; }
[data-theme="dark"] .track-chem .track-kicker { color: #60a5fa; }
[data-theme="dark"] .track-biz .track-kicker { color: #4ade80; }
[data-theme="dark"] .track-pharma .track-kicker { color: #c084fc; }
.tracks-wrap {
  background: var(--bg);
  padding: 3.5rem 0;
}
.tracks-heading,
.tracks-sub { color: var(--text); }
.tracks-sub { color: var(--text-muted); }
.track-card h2 {
  font-family: 'Tajawal', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  line-height: 1.1;
  color: var(--text);
}
.track-lead {
  max-width: 34rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.02rem;
}
.track-points {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}
.track-points li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-size: 0.95rem;
}
.track-ico {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.track-chem .track-ico { border-color: #1d4ed8; color: #1d4ed8; }
.track-biz .track-ico { border-color: #15803d; color: #15803d; }
.track-pharma .track-ico { border-color: #7e22ce; color: #7e22ce; }
[data-theme="dark"] .track-chem .track-ico { border-color: #60a5fa; color: #60a5fa; }
[data-theme="dark"] .track-biz .track-ico { border-color: #4ade80; color: #4ade80; }
[data-theme="dark"] .track-pharma .track-ico { border-color: #c084fc; color: #c084fc; }
.track-cta {
  align-self: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.track-card:hover .track-cta {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.track-visual {
  position: relative;
  min-height: 280px;
  min-width: 0;
  overflow: hidden;
  background: #0b1a3a center / cover no-repeat;
}
.track-chem .track-visual { background-image: url('images/chem-hero.png'); background-color: #0b1a3a; }
.track-biz .track-visual { background-image: url('images/biz-hero.png'); background-color: #0c2a1c; }
.track-pharma .track-visual { background-image: url('images/pharma-hero.png'); background-color: #2a1248; }
.track-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}
.landing-foot {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.landing-foot .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.track-page-hero {
  padding: calc(var(--nav-height) + 2.5rem) 0 2rem;
  color: #fff;
}
.track-page-hero h1 { margin-bottom: 0.5rem; }
.track-page-hero p { color: rgba(255,255,255,0.78); max-width: 40rem; }
.chem-page { background: linear-gradient(135deg, #0b1a3a, #163a7a); }
.biz-page { background: linear-gradient(135deg, #0c2a1c, #166534); }
.pharma-page { background: linear-gradient(135deg, #2a1248, #6b21a8); }
.track-page-body { padding: 2rem 0 4rem; }
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.type-bar { margin-bottom: 1.75rem; }
.filter-btn {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.page-hero {
  padding: calc(var(--nav-height) + 2.5rem) 0 1.5rem;
}
.page-kicker {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}
.page-hero p { color: var(--text-muted); max-width: 40rem; }
.sections-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.section-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0;
  align-items: stretch;
}
.section-row:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.section-row-visual {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 200px;
  overflow: hidden;
  background: var(--bg-muted) center / cover no-repeat;
}
.section-row-visual img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.section-row-copy { padding: 1.5rem 1.5rem 1.5rem 0; }
.section-row-copy h2 { font-size: 1.45rem; margin-bottom: 0.5rem; }
.section-row-copy p { color: var(--text-muted); margin-bottom: 0.85rem; }
.section-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.section-detail-hero {
  padding: calc(var(--nav-height) + 2rem) 0 2rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.section-detail-top {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}
.back-link {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.back-link:hover { color: var(--primary); }
.section-detail-lead {
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0.75rem 0 1rem;
}
.section-detail-image {
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 240px;
}
.section-detail-image img {
  width: 100%;
  height: 100%;
  max-width: none;
  min-height: 240px;
  object-fit: cover;
  display: block;
}
.section-detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.75rem;
  align-items: start;
}
.include-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.92rem;
}
.include-list li:last-child { border-bottom: none; }

.about-wrap { max-width: 900px; }
.about-story { margin-bottom: 1.75rem; }
.about-story h2 { margin-bottom: 0.75rem; }
.about-story p { color: var(--text-muted); margin-bottom: 0.75rem; }
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
}
.team-card { text-align: center; padding: 1.5rem; }
.team-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
}
.team-card p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.35rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}
.contact-form, .profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.contact-form label, .profile-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.contact-form input, .contact-form select, .contact-form textarea,
.profile-form input, .profile-form select {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-weight: 400;
}
.form-note { color: var(--success); font-size: 0.9rem; }

.profile-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}
.profile-stat {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.profile-stat:last-child { border-bottom: none; }

@media (max-width: 1024px) {
  .contact-grid, .profile-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-visual:has(.hero-photo) { display: block; }
  .navbar .logo-academy { display: none; }
  .track-card { grid-template-columns: 1fr; min-height: auto; }
  .track-visual {
    order: -1;
    min-height: 220px;
    height: 220px;
  }
  .dash-grid { grid-template-columns: 1fr; }
  .course-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-row { grid-template-columns: 1fr; }
  .section-row-copy { padding: 1.25rem; }
  .section-detail-top,
  .section-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-height: 68px; }
  .container { width: min(1200px, 92%); }
  section { padding: 2.5rem 0; }
  .tracks-wrap { padding: 2.5rem 0; }
  .hero {
    padding: calc(var(--nav-height) + 1.5rem) 0 2rem;
  }
  .hero h1 {
    max-width: none;
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }
  .hero-desc { font-size: 0.98rem; margin-bottom: 1.25rem; }
  .hero-stats { gap: 1.25rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; white-space: normal; }
  .btn { white-space: normal; }
  .btn-lg { padding: 0.85rem 1.25rem; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .navbar .logo-academy { display: none; }
  .navbar .container { gap: 0.5rem; }
  .nav-actions { gap: 0.3rem; }
  .nav-actions .nav-cta { display: none; }
  .nav-mobile-link { display: block; }
  .btn-icon { width: 36px; height: 36px; }
  .logo { font-size: 0.95rem; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: var(--nav-height);
    right: 0;
    left: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
    box-shadow: var(--shadow-md);
    z-index: 1000;
  }
  .nav-links.open a {
    padding: 0.85rem 1rem;
  }
  body.landing .nav-links.open {
    background: var(--dark);
    border-bottom-color: rgba(255,255,255,0.08);
  }

  .search-section { padding: 0 0 2.5rem; }
  .search-box {
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem;
    gap: 0.5rem;
  }
  .search-box input { padding: 0.65rem 0.75rem; width: 100%; }
  .search-box .btn { width: 100%; }

  .track-copy { padding: 1.35rem 1.25rem 1.5rem; }
  .track-card { border-radius: 18px; }
  .track-card h2 { font-size: clamp(1.45rem, 7vw, 2rem); letter-spacing: 0.02em; }
  .track-visual {
    min-height: 180px;
    height: 180px;
  }
  .track-lead { font-size: 0.95rem; margin-bottom: 1rem; }
  .section-subtitle { font-size: 0.95rem; margin-bottom: 1.5rem; }

  .sidebar {
    transform: translateX(100%);
    width: min(var(--sidebar-width), 86vw);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .dashboard-main {
    margin-right: 0;
    padding: 1.15rem 1rem 5rem;
  }
  .dash-greeting h1 { font-size: 1.4rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .dash-reco-grid { grid-template-columns: 1fr; }
  .progress-course { flex-wrap: wrap; }
  .progress-course .btn { width: 100%; }

  .course-layout { padding-top: calc(var(--nav-height) + 1.25rem); padding-bottom: 5rem; }
  .course-tabs {
    margin-inline: -4%;
    padding-inline: 4%;
  }
  .page-hero { padding: calc(var(--nav-height) + 1.5rem) 0 1.25rem; }
  .section-detail-hero { padding: calc(var(--nav-height) + 1.5rem) 0 1.5rem; }
  .section-row-visual { min-height: 180px; }
  .section-detail-image img { min-height: 180px; }

  .cta-box { padding: 1.75rem 1.15rem; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }
  .pricing-card { padding: 1.5rem 1.15rem; }
  .pricing-price { font-size: 2rem; }
  .pricing-features { text-align: start; }

  .footer { padding: 2.25rem 0 5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-brand .logo span { white-space: normal; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .profile-hero { flex-direction: column; align-items: flex-start; }
  .card { padding: 1.15rem; }
  .hero-stats { flex-wrap: wrap; gap: 1.25rem; }
  .whatsapp-fab { bottom: 16px; left: 16px; }

  html[dir="ltr"] .sidebar { transform: translateX(-100%); }
  html[dir="ltr"] .sidebar.open { transform: translateX(0); }
  html[dir="ltr"] .dashboard-main { margin-left: 0; }
  html[dir="ltr"] .whatsapp-fab { right: 16px; left: auto; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .hero-stat strong { font-size: 1.15rem; }
  .container { width: 92%; }
}

html[dir="ltr"] .hero-note {
  border-right: none;
  border-left: 3px solid var(--primary);
}
html[dir="ltr"] .sidebar {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--border);
}
html[dir="ltr"] .dashboard-main {
  margin-right: 0;
  margin-left: var(--sidebar-width);
}
html[dir="ltr"] .whatsapp-fab {
  left: auto;
  right: 24px;
}
html[dir="ltr"] .course-badge {
  right: auto;
  left: 12px;
}
html[dir="ltr"] .vision-card ul {
  padding-right: 0;
  padding-left: 1.25rem;
}
html[dir="ltr"] .badge-item::after {
  text-align: left;
}

@media (max-width: 768px) {
  html[dir="ltr"] .dashboard-main { margin-left: 0; }
}

/* ─── PHP student UI polish ─── */
a.course-card {
  display: block;
  color: inherit;
  text-decoration: none;
}
.course-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.35rem 0 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nav-logout { display: inline; margin: 0; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.announce-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.announce-item:last-child { border-bottom: none; }
.announce-item p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.notify-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.notify-row:last-child { border-bottom: none; }
.notify-row.is-read { opacity: 0.72; }
.notify-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.notify-body {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.notify-meta { margin-top: 0.35rem; color: var(--text-muted); }
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.profile-list { display: grid; gap: 0.85rem; }
.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.profile-row span { color: var(--text-muted); }
.course-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.75rem 0 1.25rem;
  font-weight: 600;
}
.course-hero-meta .old-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: 500;
}
.course-hero-meta .dot { color: var(--text-light); }
.course-detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}
.curriculum-card { padding: 1.15rem 1.25rem; }
.curriculum-section { margin-top: 0.75rem; }
.curriculum-section h4 {
  font-size: 1rem;
  margin: 0.75rem 0 0.35rem;
  color: var(--primary-dark);
}
.lesson-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.lesson-row:last-child { border-bottom: none; }
.lesson-row-info small {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}
.locked-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.sticky-side-card {
  padding: 1.25rem;
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
}
.content-card { padding: 1.35rem; line-height: 1.9; }
.content-card .muted,
.muted { color: var(--text-muted); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.empty-state { padding: 1.35rem; }
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  text-align: start;
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.data-table th { color: var(--text-muted); font-weight: 600; }
.status-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  background: var(--bg-muted);
}
.status-pill.status-approved,
.status-pill.status-paid { background: #dcfce7; color: #166534; }
.status-pill.status-pending { background: #fef3c7; color: #92400e; }
.status-pill.status-rejected { background: #fee2e2; color: #991b1b; }
.reject-note {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 0.25rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}
.alert {
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.alert.success { background: #ecfdf5; color: #065f46; }
.alert.error { background: #fef2f2; color: #991b1b; }

/* Site logo */
.logo-img-link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0.15rem 0;
}
.site-logo {
  height: 68px;
  width: auto;
  max-width: min(280px, 58vw);
  object-fit: contain;
  display: block;
}
.site-logo-footer {
  height: 84px;
  max-width: 300px;
  margin-bottom: 0.75rem;
}
.site-logo-auth {
  height: 110px;
  max-width: 320px;
}
[data-theme="dark"] .site-logo,
[data-theme="dark"] .site-logo-footer,
[data-theme="dark"] .site-logo-auth {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}

/* Student auth (separate from admin login) */
.student-auth-body {
  min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(0, 120, 184, 0.1), transparent 42%),
    radial-gradient(circle at 88% 80%, rgba(181, 122, 0, 0.08), transparent 40%);
}
.student-auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.student-auth-visual {
  padding: 2rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  justify-content: space-between;
  border-inline-end: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(0, 120, 184, 0.06), transparent 55%);
}
.student-auth-logo { display: inline-flex; width: fit-content; }
.student-auth-copy .page-kicker { margin-bottom: 0.65rem; }
.student-auth-copy h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  max-width: 16ch;
  margin-bottom: 0.85rem;
  line-height: 1.25;
}
.student-auth-copy > p {
  color: var(--text-muted);
  max-width: 34rem;
  margin-bottom: 1.25rem;
}
.student-auth-points {
  display: grid;
  gap: 0.65rem;
}
.student-auth-points li {
  position: relative;
  padding-inline-start: 1.35rem;
  color: var(--text);
  font-weight: 500;
}
.student-auth-points li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--primary);
}
.student-auth-preview { max-width: 420px; }
.student-auth-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.student-auth-card {
  width: min(440px, 100%);
  margin-inline: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem 1.4rem 1.6rem;
  box-shadow: var(--shadow-md);
}
.student-auth-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}
.student-auth-heading h1 {
  font-size: 1.45rem;
  margin: 0 0 0.35rem;
}
.student-auth-heading p {
  color: var(--text-muted);
  margin: 0 0 1.15rem;
  font-size: 0.95rem;
}
.student-auth-form .form-group {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}
.student-auth-form label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}
.student-auth-form input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font: inherit;
}
.student-auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 120, 184, 0.12);
}
.student-auth-form .btn {
  width: 100%;
  margin-top: 0.35rem;
}
.student-auth-links {
  margin-top: 1.1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.student-auth-links a {
  color: var(--primary);
  font-weight: 700;
  margin-inline-start: 0.35rem;
}
.student-auth-foot {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
}
.student-auth-foot a { color: var(--text-muted); text-decoration: underline; }

@media (max-width: 900px) {
  .student-auth-page { grid-template-columns: 1fr; }
  .student-auth-visual {
    border-inline-end: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
  }
  .student-auth-preview { display: none; }
  .student-auth-copy h1 { max-width: none; }
  .site-logo { height: 56px; }
}

.faq-item {
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

/* Udemy-like course page */
.udemy-hero {
  padding: calc(var(--nav-height) + 1.75rem) 0 2rem;
  background: linear-gradient(160deg, #0b1a2e 0%, #12355a 55%, #0d4f78 100%);
  color: #fff;
}
.udemy-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}
.udemy-hero .page-kicker { color: #93c5fd; }
.udemy-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  margin: 0.35rem 0 0.75rem;
  max-width: 18ch;
  line-height: 1.2;
}
.udemy-lead {
  color: rgba(255,255,255,0.82);
  max-width: 40rem;
  margin-bottom: 1rem;
}
.udemy-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  color: rgba(255,255,255,0.78);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}
.udemy-buy-card {
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
[data-theme="dark"] .udemy-buy-card {
  background: #161616;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.udemy-cover { aspect-ratio: 16/10; background: #0b1220; }
.udemy-cover img { width: 100%; height: 100%; object-fit: cover; }
.udemy-buy-body { padding: 1.1rem 1.15rem 1.25rem; }
.udemy-buy-body .old-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
}
.udemy-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.35rem;
}
[data-theme="dark"] .udemy-price {
  color: #4db3e8;
}
.udemy-includes {
  margin-top: 1rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.udemy-includes li {
  position: relative;
  padding-inline-start: 1.1rem;
}
.udemy-includes li::before {
  content: '✓';
  position: absolute;
  inset-inline-start: 0;
  color: var(--success);
  font-weight: 700;
}
.udemy-body-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  gap: 1.25rem;
  align-items: start;
}
.udemy-panel { padding: 1.15rem 1.2rem; }
.udemy-acc {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 0.65rem;
  overflow: hidden;
  background: var(--bg-muted);
}
.udemy-acc > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: var(--bg-elevated);
  font-weight: 700;
}
.udemy-acc > summary::-webkit-details-marker { display: none; }
.udemy-acc-count { color: var(--text-muted); font-weight: 600; font-size: 0.85rem; }
.udemy-acc-body { padding: 0.35rem 0.5rem 0.65rem; }
.udemy-lesson {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 8px;
  margin-bottom: 0.3rem;
}
.udemy-lesson:last-child { border-bottom: none; margin-bottom: 0; }
.udemy-lesson-main { display: flex; gap: 0.65rem; align-items: flex-start; min-width: 0; }
.udemy-lesson-ico { color: var(--primary); flex-shrink: 0; }
.udemy-lesson small { display: block; color: var(--text-muted); margin-top: 0.15rem; }
.udemy-lesson.is-locked { opacity: 0.72; }

/* Homepage promo banners */
.promo-banners-section {
  padding: 0.35rem 0 1.25rem;
}
.promo-banners-stack {
  display: grid;
  gap: 0.85rem;
}
.promo-banner {
  margin: 0;
}
.promo-banner-link {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: var(--bg-muted);
  transition: transform var(--transition), box-shadow var(--transition);
}
a.promo-banner-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.promo-banner-link img {
  width: 100%;
  height: clamp(120px, 22vw, 220px);
  object-fit: cover;
  display: block;
}
.promo-banner-caption {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  bottom: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(5, 5, 5, 0.72));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
[data-theme="dark"] .promo-banner-link {
  border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 960px) {
  .udemy-hero-grid,
  .udemy-body-grid { grid-template-columns: 1fr; }
  .udemy-hero h1 { max-width: none; }
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  line-height: 1.8;
}
@media (max-width: 900px) {
  .course-detail-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .sticky-side-card { position: static; }
}
@media (max-width: 768px) {
  .section-header { align-items: flex-start; }
  .profile-row { flex-direction: column; gap: 0.2rem; }
}
