/* =============================================
   FDT Education - Style Guide
   Brand: Orange (#FF6B35) + Dark (#1a1a2e) + White
   ============================================= */

/* ---- CSS Variables ---- */
:root {
  --primary: #FF6B35;
  --primary-dark: #e55a2b;
  --primary-light: #ff8c5a;
  --dark: #1a1a2e;
  --dark-2: #16213e;
  --dark-3: #0f3460;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --white: #ffffff;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --bg-main: var(--white);
  --bg-card: var(--white);
  --bg-section: var(--gray-100);
  --text-main: var(--gray-800);
  --text-muted: var(--gray-600);
  --border-color: var(--gray-200);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.08);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-main: #0d1117;
  --bg-card: #161b22;
  --bg-section: #0d1117;
  --text-main: #e6edf3;
  --text-muted: #8b949e;
  --border-color: #30363d;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --dark: #0d1117;
  --dark-2: #161b22;
  --dark-3: #1c2128;
  --white: #e6edf3;
  --gray-100: #161b22;
  --gray-200: #21262d;
  --gray-300: #30363d;
  --gray-400: #484f58;
  --gray-500: #8b949e;
  --gray-600: #8b949e;
  --gray-700: #c9d1d9;
  --gray-800: #e6edf3;
  --bg-main: #0d1117;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --transition: 0.3s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Typography ---- */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), #FF8C5A, #FFB088);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--gray-300);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 0 20px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
}
.header__logo span { background: linear-gradient(135deg, var(--primary), #FFB088); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.header__nav ul { display: flex; gap: 32px; }
.header__nav a {
  color: var(--gray-400);
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
  position: relative;
}
.header__nav a:hover, .header__nav a.active { color: var(--white); }
.header__nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}
.header__nav a:hover::after, .header__nav a.active::after { width: 100%; }

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

.header__avatar { position: relative; }
.header__avatar img {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
}
.header__notif-badge {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: white;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
}

.header__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 5px;
}
.header__toggle span {
  width: 24px; height: 2px; background: var(--white);
  border-radius: 2px; transition: var(--transition);
}

.avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

/* ---- Hero ---- */
.hero {
  padding: 160px 0 100px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 50%, var(--dark-3) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,107,53,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero__title {
  font-size: 52px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero__subtitle {
  font-size: 18px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.hero__desc {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__image-wrapper img {
  max-width: 100%;
  border-radius: var(--radius);
}

/* ---- Section Common ---- */
.section {
  padding: 80px 0;
}
.section__header {
  text-align: center;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.section__badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.section__title {
  font-size: 36px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}
.section__desc {
  color: var(--gray-600);
  font-size: 16px;
}

/* ---- Courses Section ---- */
.courses { background: var(--gray-100); }

.courses__filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.courses__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.course-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.course-card__image {
  position: relative;
  height: 180px;
  overflow: hidden;
}
.course-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
}
.course-card__badge.free { background: var(--success); }
.course-card__badge.paid { background: var(--primary); }
.course-card__level {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(0,0,0,0.7);
  color: var(--white);
  font-size: 11px;
}
.course-card__body { padding: 20px; }
.course-card__title { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--dark); }
.course-card__desc { font-size: 13px; color: var(--gray-600); margin-bottom: 12px; line-height: 1.5; }
.course-card__meta { display: flex; gap: 16px; margin-bottom: 12px; }
.course-card__meta span { font-size: 12px; color: var(--gray-500); display: flex; align-items: center; gap: 4px; }
.course-card__rating { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.course-card__rating span { font-size: 12px; color: var(--gray-500); }
.course-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}
.course-card__price { font-size: 16px; font-weight: 700; color: var(--primary); }

.courses__more { text-align: center; margin-top: 48px; }

/* ---- Stars ---- */
.stars { display: flex; gap: 2px; }
.stars-sm { gap: 1px; }
.stars i { font-size: 13px; }
.stars-sm i { font-size: 11px; }
.star-filled { color: #f59e0b; }
.star-empty { color: var(--gray-300); }

/* ---- About Section ---- */
.about { background: var(--white); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about__content .section__badge { margin-bottom: 12px; }
.about__text {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 32px;
}
.about__features { display: flex; flex-direction: column; gap: 20px; }
.about__feature {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  transition: var(--transition);
}
.about__feature:hover { background: rgba(255,107,53,0.05); transform: translateX(4px); }
.about__feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
}
.about__feature h4 { font-size: 15px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.about__feature p { font-size: 13px; color: var(--gray-600); }

.about__image-wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
}
.about__image-wrapper img { width: 100%; border-radius: var(--radius); }

.about__video-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,107,53,0.4);
  transition: var(--transition);
}
.about__video-btn:hover { transform: translate(-50%, -50%) scale(1.1); }

.about__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-item {
  text-align: center;
  padding: 20px 12px;
  background: linear-gradient(135deg, var(--dark), var(--dark-2));
  border-radius: var(--radius-sm);
  color: var(--white);
}
.stat-number { display: block; font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--gray-400); }

/* ---- Blog Section ---- */
.blog { background: var(--gray-100); }
.blog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card__image {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.blog-card__image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card__category {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
}
.blog-card__body { padding: 20px; }
.blog-card__body h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.blog-card__body p { font-size: 13px; color: var(--gray-600); margin-bottom: 12px; }
.blog-card__meta { display: flex; gap: 16px; }
.blog-card__meta span { font-size: 12px; color: var(--gray-500); display: flex; align-items: center; gap: 4px; }

/* ---- Reviews Section ---- */
.reviews-section { background: var(--white); }
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.review-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.review-card:hover { box-shadow: var(--shadow); }
.review-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.review-card__header img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.review-card__header h4 { font-size: 14px; font-weight: 600; }
.review-card__text {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  font-style: italic;
}

/* ---- CTA Section ---- */
.cta-section { padding: 0; }
.cta-box {
  text-align: center;
  padding: 60px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  margin: 80px auto;
  max-width: 800px;
}
.cta-box h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.cta-box p { font-size: 16px; margin-bottom: 24px; opacity: 0.9; }
.cta-box .btn-primary {
  background: var(--white);
  color: var(--primary);
}
.cta-box .btn-primary:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.2); }

/* ---- Footer ---- */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 60px 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.footer__brand h3 { font-size: 22px; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.footer__brand p { font-size: 14px; line-height: 1.7; margin-bottom: 20px; }

.footer__social { display: flex; gap: 12px; }
.footer__social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  transition: var(--transition);
}
.footer__social a:hover { background: var(--primary); color: var(--white); }

.footer__col h4 { font-size: 16px; color: var(--white); margin-bottom: 20px; }
.footer__col ul li { margin-bottom: 10px; }
.footer__col ul li a { font-size: 14px; transition: var(--transition); }
.footer__col ul li a:hover { color: var(--primary); }

.footer__contact li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.footer__contact li i { color: var(--primary); width: 16px; }

.footer__bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: var(--gray-600);
}

/* ---- Flash Messages ---- */
.flash {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 999;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  max-width: 400px;
  animation: slideInRight 0.3s ease;
}
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(255,107,53,0.3);
  transition: var(--transition);
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { transform: translateY(-3px); }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 16px; }

/* ---- Auth Pages ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dark), var(--dark-2));
  padding: 20px;
}
.auth-box {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-box__header { text-align: center; margin-bottom: 32px; }
.auth-box__header h1 { font-size: 24px; font-weight: 800; color: var(--dark); }
.auth-box__header p { font-size: 14px; color: var(--gray-600); margin-top: 8px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  background: var(--gray-100);
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}

.auth-box .btn-primary { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
.auth__footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--gray-600); }
.auth__footer a { color: var(--primary); font-weight: 600; }

/* ---- Dashboard ---- */
.dashboard {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
  padding-top: 70px;
}
.dashboard__sidebar {
  background: var(--dark);
  padding: 24px;
  color: var(--white);
}
.dashboard__sidebar h3 { font-size: 14px; color: var(--gray-500); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.dashboard__sidebar nav ul li { margin-bottom: 4px; }
.dashboard__sidebar nav ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--gray-400);
  font-size: 14px;
  transition: var(--transition);
}
.dashboard__sidebar nav ul li a:hover, .dashboard__sidebar nav ul li a.active {
  background: rgba(255,107,53,0.1);
  color: var(--primary);
}
.dashboard__content { padding: 32px; background: var(--gray-100); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}
.stat-card__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(255,107,53,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 12px;
}
.stat-card__number { font-size: 28px; font-weight: 800; color: var(--dark); }
.stat-card__label { font-size: 13px; color: var(--gray-500); }

/* ---- 404 ---- */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 20px;
}
.error-page h1 { font-size: 120px; font-weight: 900; color: var(--primary); margin-bottom: 8px; }
.error-page h2 { font-size: 24px; margin-bottom: 16px; }
.error-page p { color: var(--gray-500); margin-bottom: 32px; }

/* ---- Responsive ---- */
@media (max-width: 968px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero__title { font-size: 36px; }
  .hero__actions { justify-content: center; }
  .hero__image { display: none; }
  .about__grid { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .dashboard { grid-template-columns: 1fr; }
  .dashboard__sidebar { display: none; }
  .section__title { font-size: 28px; }
}

@media (max-width: 768px) {
  .header__nav { display: none; }
  .header__toggle { display: flex; }
  .header__nav.open {
    display: flex;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--dark);
    padding: 20px;
    flex-direction: column;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .header__nav.open ul { flex-direction: column; gap: 16px; }
  .courses__grid { grid-template-columns: 1fr; }
  .blog__grid { grid-template-columns: 1fr; }
  .reviews__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta-box { padding: 40px 20px; margin: 40px 20px; }
  .cta-box h2 { font-size: 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--gray-400);
  padding: 6px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}
.theme-toggle:hover {
  background: rgba(255,107,53,0.1);
  color: var(--primary);
}

/* ---- Dark mode overrides ---- */
body {
  background: var(--bg-main);
  color: var(--text-main);
  transition: background 0.3s, color 0.3s;
}

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

.course-card, .blog-card, .review-card, .stat-card,
.auth-box, .dashboard__content > div,
table, tr, td, th {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  color: var(--text-main);
}

.courses, .blog, .dashboard__content {
  background: var(--bg-section) !important;
}

.course-card__body, .blog-card__body, .review-card__header h4,
.course-card__title, .blog-card__body h3, .stat-card__number {
  color: var(--text-main) !important;
}

.section__title, .section__desc, .about__text,
.blog-card__body p, .review-card__text {
  color: var(--text-muted) !important;
}

.form-group input, .form-group select, .form-group textarea {
  background: var(--bg-section);
  border-color: var(--border-color);
  color: var(--text-main);
}

.header {
  background: rgba(13,17,23,0.95) !important;
}
[data-theme="dark"] .header {
  background: rgba(13,17,23,0.98) !important;
  border-bottom-color: var(--border-color) !important;
}

.about__feature {
  background: var(--bg-section) !important;
}

.about__stats .stat-item {
  background: var(--dark) !important;
}

@media (max-width: 768px) {
  .header__nav.open {
    background: var(--bg-card) !important;
  }
}

/* ---- Search Bar ---- */
.header__search {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  display: none;
  z-index: 999;
}
.header__search.active { display: block; }
.header__search-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: var(--bg-section);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0 16px;
}
.header__search-form i { color: var(--gray-500); margin-right: 12px; }
.header__search-form input {
  flex: 1;
  padding: 12px 0;
  border: none;
  background: none;
  font-size: 15px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
}
.header__search-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0 4px;
}

/* ---- Notification ---- */
.header__notif {
  position: relative;
  cursor: pointer;
  font-size: 18px;
  color: var(--gray-400);
  padding: 6px;
}
.header__notif:hover { color: var(--primary); }
.header__notif .header__notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 9px;
  width: 16px;
  height: 16px;
}

.notif-dropdown {
  position: absolute;
  top: 60px;
  right: 10px;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  display: none;
  z-index: 1000;
}
.notif-dropdown.active { display: block; }
.notif-dropdown__header {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}
.notif-dropdown__list { padding: 8px 0; }
.notif-dropdown__empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.notification-item {
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.notification-item:hover { background: var(--bg-section); }
.notification-item.unread { border-left-color: var(--primary); }
.notification-item__title { font-size: 13px; font-weight: 600; color: var(--text-main); }
.notification-item__time { font-size: 11px; color: var(--text-muted); }

/* ---- Theme Toggle Button ---- */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--gray-400);
  padding: 6px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}
.theme-toggle:hover {
  background: rgba(255,107,53,0.1);
  color: var(--primary);
}

/* ---- Wishlist Button ---- */
.btn-wishlist {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--gray-400);
  transition: var(--transition);
  padding: 6px;
}
.btn-wishlist:hover { color: var(--danger); }
.btn-wishlist.active { color: var(--danger); }

/* ---- Scrollbar Dark Mode ---- */
[data-theme="dark"] ::-webkit-scrollbar { width: 8px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--bg-section); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 4px; }

/* ---- SEO helper ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}
/* Extra responsive breakpoints */
@media (max-width: 320px) {
  .hero__title { font-size: 28px !important; }
  .course-card__body { padding: 12px !important; }
  .header__actions .btn { font-size: 11px !important; padding: 6px 10px !important; }
  .courses__grid { grid-template-columns: 1fr !important; }
}
@media (min-width: 640px) {
  .courses__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .courses__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .courses__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1536px) {
  .container { max-width: 1400px; }
}

/* ===== COURSE CARDS V2 - REDESIGN ===== */
.course-card {
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  overflow: hidden;
  transition: all .3s ease;
  border: 1px solid var(--border-color);
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

.course-card__image {
  position: relative;
  height: 180px;
  overflow: hidden;
}
.course-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.course-card:hover .course-card__image img {
  transform: scale(1.05);
}

/* Badge trên ảnh */
.course-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 2;
}
.course-card__badge.free { background: #22c55e; color: white; }
.course-card__badge.paid { background: #ef4444; color: white; }

.course-card__level {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
}

/* Wishlist button */
.course-card__wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 15px;
  transition: all .25s ease;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.course-card__wishlist:hover { color: #ef4444; background: white; }
.course-card__wishlist.active { color: #ef4444; }

.course-card__body { padding: 20px; }
.course-card__title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; line-height: 1.3; }
.course-card__desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.course-card__meta { display: flex; gap: 16px; margin-bottom: 12px; }
.course-card__meta span { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

.course-card__rating { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.course-card__rating .stars { display: flex; gap: 2px; }
.course-card__rating .stars i { font-size: 12px; }
.course-card__rating span { font-size: 12px; color: var(--text-muted); }

.course-card__footer { display: flex; align-items: center; justify-content: space-between; }
.course-card__price { font-size: 16px; font-weight: 700; color: var(--primary); }
.course-card__footer .btn { padding: 8px 18px; font-size: 13px; border-radius: 8px; font-weight: 600; }
.course-card__footer .btn i { margin-left: 6px; }

/* Shadow variants */
.shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.shadow-md { box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.shadow-lg { box-shadow: 0 16px 48px rgba(0,0,0,.12); }

/* Smooth hover */
.hover-lift { transition: all .3s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
