/*
  Arabic Learning Platform - Complete Design System
  ------------------------------------------------
  Light theme with teal/green accents
  Supports: Public pages (navbar) + App pages (sidebar)
*/

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

:root {
  --bg: #f5f7f9;
  --bg-sidebar: #ffffff;
  --surface: #ffffff;
  --surface-hover: #f8fafa;
  --border: #e8ecef;
  --border-light: #f0f3f5;
  --text: #1a2b3c;
  --text-secondary: #5f6d7a;
  --text-muted: #8c99a5;
  --primary: #5bad8a;
  --primary-light: #e8f5ef;
  --primary-dark: #4a9a79;
  --success: #5bad8a;
  --warning: #f0b429;
  --danger: #e85a5a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --sidebar-width: 220px;
  --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Typography */
.h1 { font-size: 48px; font-weight: 800; line-height: 1.1; letter-spacing: -1px; color: var(--text); }
.h2 { font-size: 32px; font-weight: 800; line-height: 1.2; letter-spacing: -0.5px; color: var(--text); }
.h3 { font-size: 18px; font-weight: 700; color: var(--text); }
.kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary); margin-bottom: 4px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.highlight { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius); font-weight: 600; font-size: 14px;
  border: none; cursor: pointer; transition: all 0.15s ease;
  background: var(--primary); color: white; text-decoration: none;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn.secondary { background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border); }
.btn.secondary:hover { background: var(--surface-hover); color: var(--text); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.lg { padding: 16px 32px; font-size: 16px; border-radius: var(--radius-lg); }
.btn.xl { padding: 20px 40px; font-size: 18px; border-radius: var(--radius-lg); }
.btn.full { width: 100%; }
.btn.white { background: white; color: var(--primary-dark); }
.btn.white:hover { background: var(--bg); }
.btn.outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.4); }
.btn.outline:hover { border-color: white; background: rgba(255,255,255,0.1); }

/* Cards */
.card { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.card.pad { padding: 24px; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.card-title { font-weight: 700; font-size: 16px; color: var(--text); }

/* Forms */
.input, input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text);
  outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 8px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 200px; gap: 12px; align-items: end; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge.free { background: var(--primary-light); color: var(--primary); }
.badge.paid, .badge.member { background: #fef3c7; color: #d97706; }
.badge.done { background: var(--primary-light); color: var(--primary); }
.badge.preview { background: #e0f2fe; color: #0284c7; }
.badge.lock { background: #fef2f2; color: var(--danger); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.chip.free { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.chip.member { background: #f3e8ff; border-color: #a855f7; color: #7c3aed; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.kv { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Notice */
.notice { background: var(--primary-light); border: 1px solid rgba(91, 173, 138, 0.2); border-radius: var(--radius); padding: 14px 16px; font-size: 13px; color: var(--primary-dark); }
.notice.warning { background: #fef3c7; border-color: rgba(240, 180, 41, 0.3); color: #92400e; }
.notice.error { background: #fef2f2; border-color: rgba(232, 90, 90, 0.3); color: #991b1b; }

/* Tables */
.table-wrapper { overflow-x: auto; }
table, .table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border-light); }
th { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-muted); background: var(--bg); }
td { font-size: 14px; color: var(--text-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-hover); }

.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* Public Navbar */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); padding: 0 24px; }
.navbar-inner { max-width: 1200px; margin: 0 auto; height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.navbar-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 18px; }
.logo-text { font-weight: 800; font-size: 20px; color: var(--text); }
.navbar-links { display: flex; align-items: center; gap: 32px; }
.navbar-links a { font-weight: 500; font-size: 14px; color: var(--text-secondary); transition: color 0.15s ease; }
.navbar-links a:hover { color: var(--text); }
.navbar-actions { display: flex; align-items: center; gap: 12px; }

/* App Layout (sidebar) */
.app-layout { display: flex; min-height: 100vh; }
.sidebar-left { width: var(--sidebar-width); background: var(--bg-sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; }
.sidebar-logo { padding: 20px 24px; display: flex; align-items: center; gap: 10px; }
.sidebar-logo-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 16px; }
.sidebar-logo-text { font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -0.3px; }
.sidebar-nav { flex: 1; padding: 10px 12px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); color: var(--text-secondary); font-weight: 500; font-size: 14px; transition: all 0.15s ease; margin-bottom: 4px; }
.nav-item:hover { background: var(--surface-hover); color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; opacity: 0.7; }
.nav-item.active .nav-icon { opacity: 1; }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); transition: background 0.15s ease; }
.sidebar-user:hover { background: var(--surface-hover); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 14px; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-muted); }

.main-content { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; }
.top-header { height: var(--header-height); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 32px; gap: 16px; position: sticky; top: 0; z-index: 50; }
.search-box { flex: 1; max-width: 400px; position: relative; }
.search-box input { width: 100%; padding: 10px 14px 10px 40px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-btn { padding: 8px 14px; border-radius: var(--radius); font-weight: 500; font-size: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); cursor: pointer; transition: all 0.15s ease; }
.header-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn { width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s ease; position: relative; }
.icon-btn:hover { background: var(--surface-hover); }
.notification-badge { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; background: var(--danger); border-radius: 50%; font-size: 10px; font-weight: 700; color: white; display: flex; align-items: center; justify-content: center; }
.header-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 14px; }

.page-content { flex: 1; padding: 32px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title { font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.page-subtitle { color: var(--text-muted); font-size: 14px; }

/* Hero Section */
.hero-section { padding: 140px 24px 80px; background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%); position: relative; overflow: hidden; }
.hero-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at 30% 20%, var(--primary-light) 0%, transparent 50%), radial-gradient(circle at 70% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%); pointer-events: none; }
.hero-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; }
.hero-content { max-width: 560px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--primary-light); border-radius: 24px; font-size: 13px; font-weight: 600; color: var(--primary-dark); margin-bottom: 24px; }
.hero-title { font-size: 52px; font-weight: 800; line-height: 1.1; color: var(--text); margin-bottom: 24px; letter-spacing: -1px; }
.hero-description { font-size: 18px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; }
.hero-stat-value { font-size: 28px; font-weight: 800; color: var(--text); }
.hero-stat-label { font-size: 13px; color: var(--text-muted); }

.hero-visual { position: relative; }
.hero-card { background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg), 0 20px 60px rgba(0,0,0,0.1); padding: 32px; }
.hero-card-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.hero-card-icon { width: 56px; height: 56px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.hero-card-title { font-weight: 700; font-size: 20px; color: var(--text); }
.hero-card-subtitle { font-size: 13px; color: var(--text-muted); }
.floating-card { position: absolute; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 16px 20px; }
.floating-card.top-right { top: -20px; right: -40px; display: flex; align-items: center; gap: 12px; }
.floating-card.bottom-left { bottom: 40px; left: -30px; display: flex; align-items: center; gap: 10px; }

/* Sections */
.section { padding: 80px 24px; }
.section.sm { padding: 40px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 60px; }
.section-badge { display: inline-flex; padding: 6px 14px; background: var(--primary-light); border-radius: 20px; font-size: 12px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.section-title { font-size: 40px; font-weight: 800; color: var(--text); margin-bottom: 16px; letter-spacing: -0.5px; }
.section-subtitle { font-size: 18px; color: var(--text-secondary); line-height: 1.7; }
.container { max-width: 1200px; margin: 0 auto; }

/* Features */
.features-section { padding: 100px 24px; background: var(--surface); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.feature-card { padding: 32px; background: var(--bg); border-radius: var(--radius-xl); transition: all 0.2s ease; }
.feature-card:hover { background: var(--surface); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.feature-icon { width: 56px; height: 56px; background: var(--primary-light); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 20px; }
.feature-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.feature-description { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.feature { padding: 20px; background: var(--bg); border-radius: var(--radius); }
.feature h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* Courses */
.courses-section { padding: 100px 24px; background: var(--bg); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.course-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; transition: all 0.2s ease; }
.course-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.course-thumbnail { height: 160px; display: flex; align-items: center; justify-content: center; position: relative; }
.course-thumbnail-img { padding: 0; }
.course-thumbnail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-icon { width: 64px; height: 64px; background: rgba(255,255,255,0.2); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 32px; }
.course-badge { position: absolute; top: 12px; right: 12px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.course-badge.free { background: white; color: var(--primary); }
.course-badge.popular { background: #fef3c7; color: #d97706; }
.course-body { padding: 24px; }
.course-title { font-weight: 700; font-size: 18px; color: var(--text); margin-bottom: 8px; }
.course-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.course-meta span { font-size: 13px; color: var(--text-muted); }
.course-description { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
.course-actions { display: flex; gap: 10px; }
.course-actions .btn { flex: 1; }

/* Legacy course */
.course { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.course .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.course h3 { font-size: 18px; font-weight: 700; color: var(--text); margin: 0; }
.course p { color: var(--text-secondary); font-size: 14px; margin-bottom: 12px; }
.course .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.course .meta span { font-size: 12px; color: var(--text-muted); background: var(--bg); padding: 4px 10px; border-radius: 12px; }
.course .actions { display: flex; gap: 10px; }

/* Testimonials */
.testimonials-section { padding: 100px 24px; background: var(--surface); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { padding: 32px; background: var(--bg); border-radius: var(--radius-xl); }
.testimonial-stars { color: #f0b429; font-size: 16px; letter-spacing: 2px; margin-bottom: 16px; }
.testimonial-text { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 16px; }
.testimonial-name { font-weight: 600; font-size: 14px; color: var(--text); }
.testimonial-role { font-size: 12px; color: var(--text-muted); }

/* CTA */
.cta-section { padding: 100px 24px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); text-align: center; position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%), radial-gradient(circle at 80% 50%, rgba(255,255,255,0.1) 0%, transparent 50%); }
.cta-inner { max-width: 700px; margin: 0 auto; position: relative; }
.cta-title { font-size: 44px; font-weight: 800; color: white; margin-bottom: 16px; letter-spacing: -0.5px; }
.cta-subtitle { font-size: 18px; color: rgba(255,255,255,0.9); margin-bottom: 32px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.footer { padding: 60px 24px 32px; background: var(--text); color: rgba(255,255,255,0.7); }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand { max-width: 280px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo-icon { width: 36px; height: 36px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; }
.footer-logo-text { font-weight: 800; font-size: 18px; color: white; }
.footer-description { font-size: 14px; line-height: 1.7; }
.footer-title { font-weight: 700; font-size: 14px; color: white; margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; transition: color 0.15s ease; }
.footer-links a:hover { color: white; }
.footer-bottom { padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-copy { font-size: 13px; }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 13px; transition: color 0.15s ease; }
.footer-legal a:hover { color: white; }

/* Accordion */
.accordion { margin-top: 16px; }
.acc-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.acc-head { width: 100%; padding: 16px 20px; background: var(--bg); border: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text); text-align: left; font-family: inherit; }
.acc-head span { font-weight: 400; color: var(--text-muted); font-size: 12px; margin-left: 8px; }
.chev { color: var(--text-muted); transition: transform 0.2s ease; }
.acc-item.acc-open .chev { transform: rotate(180deg); }
.acc-body { padding: 0 20px 16px; display: none; }
.acc-item.acc-open .acc-body { display: block; }

/* Lesson List */
.lesson-list { list-style: none; margin-top: 12px; }
.lesson-list li { padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.lesson-list li:last-child { border-bottom: none; }
.lesson-link { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); transition: color 0.15s ease; font-size: 13px; }
.lesson-link:hover { color: var(--primary); }
.lesson-link.locked { color: var(--text-muted); cursor: not-allowed; }
.lesson-link.locked:hover { color: var(--text-muted); }
.lesson-title { flex: 1; font-weight: 500; }
.lesson-meta { display: flex; align-items: center; gap: 8px; }
.lesson-list.compact li { padding: 8px 0; }
.lesson-list.compact .lesson-link { gap: 10px; font-size: 13px; }
.lesson-list li.is-current .lesson-link { color: var(--primary); font-weight: 600; }
.lesson-list li.is-done .lesson-link { color: var(--text-muted); }
.lesson-list li.is-done .lesson-link:hover { color: var(--primary); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.dot.done { background: var(--primary); }
.dot.todo { background: var(--border); }
.dot.lock { background: var(--danger); opacity: 0.5; }

/* Video */
.video-wrapper { position: relative; padding-top: 56.25%; background: linear-gradient(135deg, #1a2b3c 0%, #2d3e50 100%); border-radius: var(--radius-lg); overflow: hidden; }
.video-placeholder { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; }
.play-btn { width: 80px; height: 80px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; backdrop-filter: blur(10px); }
.play-btn:hover { background: var(--primary); transform: scale(1.1); }
.video { margin-top: 16px; }
.video iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: var(--radius-lg); }
.video video { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); background: rgba(0,0,0,0.2); }

/* Progress */
.progress-bar, .progressbar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-fill, .progressbar > div { height: 100%; background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: 4px; }
.progress-text { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.progress-text b { color: var(--primary); }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; font-weight: 600; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text); }
.stat-change { font-size: 12px; color: var(--success); margin-top: 4px; }
.stat-change.down { color: var(--danger); }
.stat { padding: 16px; background: var(--bg); border-radius: var(--radius); }
.stat b { display: block; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.stat span { font-size: 13px; color: var(--text-muted); }

/* Checklist */
.checklist { list-style: none; }
.checklist li { padding: 8px 0; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.checklist li::before { content: '✓'; width: 20px; height: 20px; background: var(--primary-light); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }

/* Comments */
.comment-form textarea { min-height: 100px; resize: vertical; }
.form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.comment-list { margin-top: 20px; }
.comment { padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.comment:last-child { border-bottom: none; }
.comment-meta, .comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 12px; }
.comment-name { font-weight: 600; font-size: 13px; }
.comment-time { font-size: 11px; color: var(--text-muted); }
.comment-body { color: var(--text-secondary); font-size: 13px; line-height: 1.6; }

/* Curriculum */
.curriculum { margin-top: 12px; }
.unit-block { margin-bottom: 16px; }
.unit-block.is-current { background: var(--primary-light); margin: -12px; padding: 12px; border-radius: var(--radius); margin-bottom: 4px; }
.unit-title { font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 8px; }

/* Layouts */
.layout-2 { display: grid; grid-template-columns: 1fr 340px; gap: 32px; }
.lesson-layout { display: grid; grid-template-columns: 320px 1fr; gap: 32px; margin-top: 24px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }

/* Course Sidebar */
.course-sidebar { position: sticky; top: 100px; }
.course-sidebar .card { padding: 24px; }
.course-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.course-title { font-weight: 700; font-size: 14px; color: var(--text); }
.course-name { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.nav-btns { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.nav-btns .btn { flex: 1; min-width: 50px; padding: 8px 12px; font-size: 12px; }

/* Video Player */
.video-container { margin-bottom: 24px; padding: 24px; }
.video-wrapper { position: relative; padding-top: 56.25%; background: linear-gradient(135deg, #1a2b3c 0%, #2d3e50 100%); border-radius: var(--radius-lg); overflow: hidden; }
.video-placeholder { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; }
.play-btn { width: 80px; height: 80px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; backdrop-filter: blur(10px); }
.play-btn:hover { background: var(--primary); transform: scale(1.1); }
.play-btn svg { margin-left: 4px; }
.video-title { margin-top: 16px; font-weight: 600; font-size: 16px; }
.video-duration { margin-top: 4px; font-size: 13px; opacity: 0.7; }
.video-controls { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px 20px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); display: flex; align-items: center; gap: 12px; }
.video-player { width: 100%; border-radius: var(--radius-lg); background: #000; }
.video-iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: var(--radius-lg); }
.time { font-size: 12px; color: white; opacity: 0.9; }

/* Lesson Notes */
.lesson-notes { background: var(--bg); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.lesson-notes p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 12px; }
.lesson-notes p:last-child { margin-bottom: 0; }

/* Quiz Section */
.quiz-card { margin-top: 24px; padding: 24px; }
.quiz-question { font-weight: 600; margin-bottom: 16px; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option { padding: 14px 16px; background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all 0.15s ease; display: flex; align-items: center; gap: 12px; user-select: none; }
.quiz-option:hover { border-color: var(--primary); background: var(--primary-light); }
.quiz-option.selected { border-color: var(--primary); background: var(--primary-light); }
.quiz-radio { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s ease; }
.quiz-option.selected .quiz-radio { border-color: var(--primary); background: var(--primary); }
.quiz-option.selected .quiz-radio::after { content: '✓'; color: white; font-size: 12px; font-weight: bold; }

/* Comments Section */
.comments-section { margin-top: 24px; padding: 24px; }
.comment-form { margin-top: 16px; }
.comment-form textarea { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; font-family: inherit; resize: vertical; min-height: 100px; outline: none; }
.comment-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* Sidebar sticky */
.sticky { position: sticky; top: 100px; }
.price { font-size: 28px; font-weight: 800; color: var(--text); }
.price small { font-size: 14px; font-weight: 500; color: var(--text-muted); }

/* Rating */
.stars, .pstars, .rating-stars { color: #f0b429; font-size: 16px; letter-spacing: 2px; }
.rating-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.rating-text { font-size: 13px; color: var(--text-secondary); }

/* Status */
.status { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status.free { background: var(--primary-light); color: var(--primary); }
.status.member { background: #fef3c7; color: #d97706; }
.status.yes { background: var(--primary-light); color: var(--primary); }
.status.no { background: #fef2f2; color: var(--danger); }

/* Pills */
.pill { display: inline-flex; padding: 6px 14px; background: var(--primary-light); border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--primary); margin-bottom: 16px; }

/* Hero trust */
.hero-trust { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.trust-item { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

/* Auth pages */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.auth-container { width: 100%; max-width: 440px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 24px; }
.auth-title { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.auth-subtitle { color: var(--text-muted); font-size: 14px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* Responsive */
/* ═══════════════════════════════════════════════
   MOBILE ELEMENTS — all hidden by default (desktop)
   Only shown inside @media (max-width: 768px)
   ═══════════════════════════════════════════════ */

/* Sidebar top row: logo left, close btn right */
.sidebar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Hamburger button in top header */
.hamburger-btn {
  display: none;  /* ← HIDDEN on desktop */
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
  padding: 0;
}
.hamburger-btn:hover { background: var(--surface-hover, #eee); }

/* Close (X) button inside sidebar */
.sidebar-close-btn {
  display: none;  /* ← HIDDEN on desktop */
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 8px;
  padding: 0;
}
.sidebar-close-btn:hover { background: var(--surface-hover, #eee); color: var(--text); }

/* Dark overlay behind sidebar */
.sidebar-overlay {
  display: none;  /* ← HIDDEN on desktop */
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

/* Bottom tab bar */
.mobile-bottom-nav {
  display: none;  /* ← HIDDEN on desktop */
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 90;
  justify-content: space-around;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
}
.mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.mob-nav-item.active { color: var(--primary); }
.mob-nav-item svg { flex-shrink: 0; }

/* Prevent body scroll when sidebar open */
body.sidebar-open { overflow: hidden; }


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

@media (max-width: 1200px) {
  .hero-inner, .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .split-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .layout-2 { grid-template-columns: 1fr; }
  .layout-2 .sticky { position: static; }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-layout .course-sidebar { order: 2; }
  .profile-layout { grid-template-columns: 1fr !important; }
  .form-grid { grid-template-columns: 1fr !important; }
}

/* ─── MOBILE ≤768px ─── */
@media (max-width: 768px) {

  /* === Sidebar becomes slide-out drawer === */
  .sidebar-left {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    box-shadow: none;
  }
  .sidebar-left.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
  }

  /* === Show mobile-only elements === */
  .hamburger-btn    { display: flex; }
  .sidebar-close-btn { display: flex; }
  .mobile-bottom-nav { display: flex; }
  .sidebar-overlay   { display: block; }
  .sidebar-overlay.open { opacity: 1; pointer-events: auto; }

  /* === Main content full width === */
  .main-content { margin-left: 0; }

  /* === Header === */
  .top-header { padding: 0 12px; gap: 8px; }
  .search-box { max-width: none; }
  .header-btn { display: none; }
  .header-avatar { width: 34px; height: 34px; font-size: 13px; }

  /* === Page content === */
  .page-content { padding: 16px; }
  .page-title { font-size: 22px; }

  /* === Footer: space for bottom nav === */
  .app-footer { margin-bottom: 60px; padding: 16px; }
  .app-footer-inner { flex-direction: column; gap: 8px; align-items: center; text-align: center; }
  .app-footer-links { flex-wrap: wrap; justify-content: center; gap: 12px; }

  /* === Landing page === */
  .navbar-links { display: none; }
  .hero-title { font-size: 32px; }
  .section-title { font-size: 24px; }
  .cta-title { font-size: 24px; }
  .floating-card { display: none; }

  /* === Grids → single column === */
  .features-grid, .course-grid, .testimonials-grid, .stats-row,
  .split, .split-grid, .grid-2, .grid-3, .hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions, .cta-actions { flex-direction: column; }
  .course-grid { grid-template-columns: 1fr !important; }
  .profile-layout { grid-template-columns: 1fr !important; }
  .form-grid { grid-template-columns: 1fr !important; }
  .matching-container { grid-template-columns: 1fr !important; gap: 12px !important; }

  /* === Tables: horizontal scroll === */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* === Forms === */
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 20px; }

  /* === Notification dropdown === */
  .notif-dropdown { right: -60px; width: 300px; }

  /* === Admin === */
  .admin-grid-row { grid-template-columns: 1fr !important; }
}

/* ─── Small phones ≤480px ─── */
@media (max-width: 480px) {
  .page-content { padding: 12px; }
  .top-header { padding: 0 8px; gap: 6px; }
  .search-box input { font-size: 14px; padding: 8px 12px 8px 36px; }
  .hero-title { font-size: 26px; }
  .page-title { font-size: 20px; }
  .btn { padding: 10px 18px; font-size: 13px; }
  .btn.sm { padding: 6px 12px; }
  .notif-dropdown { right: -100px; width: 280px; }
  .course-thumbnail { height: 120px; }
  .page-header { flex-direction: column; align-items: stretch; }
}


/* RTL */
[dir="rtl"] { direction: rtl; }
[dir="rtl"] .sidebar-left { left: auto; right: 0; border-right: none; border-left: 1px solid var(--border); }
[dir="rtl"] .main-content { margin-left: 0; margin-right: var(--sidebar-width); }
[dir="rtl"] .search-box input { padding-left: 14px; padding-right: 40px; }
[dir="rtl"] .search-icon { left: auto; right: 14px; }
@media (max-width: 768px) {
  [dir="rtl"] .sidebar-left { transform: translateX(100%); left: auto; right: 0; }
  [dir="rtl"] .sidebar-left.open { transform: translateX(0); }
  [dir="rtl"] .main-content { margin-right: 0; }
}

/* Utilities */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* Notification Badge */
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; background: #ef4444; color: white; font-size: 10px; font-weight: 700; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }


/* Notification Dropdown */
.notif-wrapper { position: relative; }
.notif-trigger { position: relative; }
.notif-dropdown { 
  position: absolute; 
  top: 100%; 
  right: 0; 
  width: 320px; 
  background: var(--surface); 
  border: 1px solid var(--border-light); 
  border-radius: var(--radius); 
  box-shadow: 0 10px 40px rgba(0,0,0,0.12); 
  opacity: 0; 
  visibility: hidden; 
  transform: translateY(10px); 
  transition: all 0.2s ease; 
  z-index: 1000; 
  margin-top: 8px;
}
.notif-wrapper:hover .notif-dropdown,
.notif-wrapper.open .notif-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.notif-dropdown-header { 
  padding: 14px 16px; 
  border-bottom: 1px solid var(--border-light); 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}
.notif-dropdown-title { font-weight: 600; font-size: 14px; }
.notif-dropdown-count { font-size: 12px; color: var(--primary); font-weight: 500; }
.notif-dropdown-list { max-height: 300px; overflow-y: auto; }
.notif-dropdown-empty { padding: 32px 16px; text-align: center; color: var(--text-muted); font-size: 14px; }
.notif-dropdown-item { 
  display: block; 
  padding: 12px 16px; 
  border-bottom: 1px solid var(--border-light); 
  text-decoration: none; 
  color: var(--text); 
  transition: background 0.15s ease; 
}
.notif-dropdown-item:hover { background: var(--bg); }
.notif-dropdown-item.unread { background: var(--primary-light); border-left: 3px solid var(--primary); }
.notif-dropdown-item-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; line-height: 1.4; }
.notif-dropdown-item-time { font-size: 11px; color: var(--text-muted); }
.notif-dropdown-footer { 
  display: block; 
  padding: 12px 16px; 
  text-align: center; 
  font-size: 13px; 
  color: var(--primary); 
  font-weight: 500; 
  text-decoration: none; 
  border-top: 1px solid var(--border-light); 
}
.notif-dropdown-footer:hover { background: var(--bg); }

/* Exam items in sidebar */
.exam-item .lesson-link.exam-link { background: rgba(91, 173, 138, 0.05); border-left: 2px solid var(--primary); }
.exam-item.is-done .lesson-link.exam-link { background: rgba(91, 173, 138, 0.1); }
.exam-item .dot.exam { background: var(--primary); display: flex; align-items: center; justify-content: center; }
.exam-item .dot.exam svg { color: white; }
.badge.exam { background: var(--primary-light); color: var(--primary); font-size: 10px; padding: 2px 6px; }
.badge.exam.final { background: #fef3c7; color: #92400e; }
.exam-block { border-top: 2px dashed var(--border); padding-top: 8px; margin-top: 8px; }
.exam-block .unit-title.exam-title { color: var(--primary); font-weight: 600; font-size: 13px; }
.exam-block .unit-title.exam-title.final { color: #92400e; }
.final-exam-block { border-top: 2px solid var(--primary); background: rgba(91, 173, 138, 0.03); margin: 8px -12px -12px; padding: 12px; border-radius: 0 0 var(--radius) var(--radius); }

/* App Footer (logged in pages) */
.app-footer { 
  padding: 20px 32px; 
  background: var(--surface); 
  border-top: 1px solid var(--border); 
  margin-top: auto;
}
.app-footer-inner { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  max-width: 1400px; 
  margin: 0 auto; 
}
.app-footer-left { 
  font-size: 13px; 
  color: var(--text-muted); 
}
.app-footer-links { 
  display: flex; 
  gap: 24px; 
}
.app-footer-links a { 
  font-size: 13px; 
  color: var(--text-muted); 
  text-decoration: none; 
}
.app-footer-links a:hover { 
  color: var(--primary); 
}

/* Clickable stat cards */
a.stat-card { 
  text-decoration: none; 
  transition: all 0.2s ease; 
}
a.stat-card:hover { 
  border-color: var(--primary); 
  transform: translateY(-2px); 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
}


/* Unit test item highlighting */
.unit-test-item { 
  margin-top: 8px; 
  padding-top: 8px; 
  border-top: 1px dashed var(--border); 
}
.unit-test-item .lesson-link.exam-link { 
  background: rgba(91, 173, 138, 0.08); 
  border-left: 3px solid var(--primary); 
  font-weight: 500;
}
.unit-test-item:hover .lesson-link.exam-link { 
  background: rgba(91, 173, 138, 0.15); 
}

