/* ============================================================
   NexusCare Training — Premium Design System v3.0
   Modern · Elegant · Distinctive · Fully Responsive
   ============================================================ */

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

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

html {
  scroll-behavior: smooth;
}

:root {
  /* Brand Colors */
  --primary: #0f62fe;
  --primary-dk: #0043ce;
  --primary-lt: #eef3ff;
  --accent: #00a896;
  --accent-dk: #007f73;
  --accent-lt: #e0f7f5;

  /* Semantic */
  --danger: #da1e28;
  --warn: #f1a10d;
  --success: #24a148;
  --info: #0043ce;

  /* Surfaces */
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8ef;
  --border-lt: rgba(226, 232, 239, 0.6);

  /* Text */
  --text: #0d1526;
  --text-2: #374151;
  --muted: #6b7280;
  --muted-lt: #9ca3af;

  /* Sidebar */
  --sidebar-bg: #0d1f3c;
  --sidebar-text: #a8c0db;
  --sidebar-hover: #162d52;
  --sidebar-active: #1a3461;
  --sidebar-accent: #00a896;

  /* Layout */
  --nav-h: 70px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(13, 21, 38, 0.04);
  --shadow: 0 8px 24px rgba(13, 21, 38, 0.06);
  --shadow-md: 0 16px 40px rgba(13, 21, 38, 0.08);
  --shadow-lg: 0 24px 60px rgba(13, 21, 38, 0.12);

  /* Modern Healthcare Extensions */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(15, 98, 254, 0.08);
  --clinical-blue: #0ea5e9;
  --clinical-teal: #00a896;
  --medical-white: #f8fafc;
  --deep-navy: #0f172a;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Global Entry Animations ---------- */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.page-transition {
  animation: pageFadeIn 0.8s var(--ease) forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }

/* ---------- HD Background Utilities ---------- */
.hd-bg-container {
  position: relative;
  overflow: hidden;
}

.hd-bg-container .bg-image {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  transition: transform 15s var(--ease);
  animation: slowZoom 20s infinite alternate linear;
}

.hd-bg-container .bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.6) 100%);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
}

/* ---------- Base ---------- */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  text-decoration: none;
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- Utility Helpers ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.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;
}

.gap-3 {
  gap: 24px;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.text-sm {
  font-size: 13px;
}

.text-xs {
  font-size: 11px;
}

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

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

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Desktop: hide mobile-only controls by default; they'll be shown via media queries on small screens */
.mobile-filter-toggle {
  display: none;
}

.mobile-filter-close {
  display: none;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--primary-lt);
  color: var(--primary);
}

.badge-green {
  background: #dcfce7;
  color: #14532d;
}

.badge-teal {
  background: var(--accent-lt);
  color: var(--accent-dk);
}

.badge-orange {
  background: #fff3cd;
  color: #7c4a00;
}

.badge-red {
  background: #fee2e2;
  color: #991b1b;
}

.badge-dark {
  background: #1e293b;
  color: #e2e8f0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
  text-decoration: none !important;
  line-height: 1.4;
}

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

.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(15, 98, 254, 0.22);
}

.btn-primary:hover {
  background: var(--primary-dk);
  border-color: var(--primary-dk);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 98, 254, 0.32);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 168, 150, 0.2);
}

.btn-accent:hover {
  background: var(--accent-dk);
  border-color: var(--accent-dk);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 168, 150, 0.3);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 98, 254, 0.22);
}

.btn-outline-teal {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline-teal:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 168, 150, 0.22);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 7px 18px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 36px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* ---------- Navbar ---------- */
.navbar {
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-lt);
  position: sticky;
  top: 0;
  z-index: 5000;
  /* raise so mobile controls sit beneath */
  box-shadow: 0 1px 0 var(--border-lt), 0 4px 24px rgba(13, 21, 38, 0.05);
  transition: background 0.3s;
  overflow: hidden;
  /* prevent any child from causing horizontal scroll */
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
}

/* Brand — always visible, never shrinks */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  text-decoration: none !important;
  flex-shrink: 0;
}

.navbar-brand .brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 98, 254, 0.28);
}

.navbar-brand .brand-name {
  color: var(--text);
  font-weight: 800;
}

.navbar-brand .brand-accent {
  color: var(--accent);
  font-weight: 800;
}

/* Centre pill — desktop only */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border-lt);
  border-radius: 50px;
  padding: 4px;
  flex-shrink: 1;
}

.navbar-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2); /* Upgraded from var(--muted) for better contrast */
  padding: 6px 15px;
  border-radius: 50px;
  transition: all 0.18s;
  white-space: nowrap;
  text-decoration: none !important;
}

.navbar-links a:hover {
  background: var(--surface);
  color: var(--text);
}

.navbar-links a.active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(13, 21, 38, 0.08);
}

/* Right actions — desktop only */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.navbar-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  padding: 7px 14px;
  border-radius: 50px;
  transition: all 0.18s;
  text-decoration: none !important;
  white-space: nowrap;
}

.navbar-nav a:hover {
  background: var(--bg);
  color: var(--text);
}

.navbar-nav a.active {
  background: var(--primary-lt);
  color: var(--primary);
}

/* Username chip — truncates, never overflows */
.nav-username {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 50px;
  flex-shrink: 1;
  display: inline-block;
}

/* Hamburger — hidden on desktop, shown on mobile */
.navbar-toggle {
  display: none;
  background: var(--bg);
  border: 1.5px solid var(--border);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
  padding: 0;
}

.navbar-toggle:hover {
  background: var(--primary-lt);
  border-color: var(--primary);
  color: var(--primary);
}

.navbar-toggle .icon-close {
  display: none;
}

.navbar-toggle.open .icon-open {
  display: none;
}

.navbar-toggle.open .icon-close {
  display: block;
}

/* ---------- Mobile Nav Drawer ---------- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 21, 38, 0.55);
  z-index: 4999 !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-panel {
  position: fixed;
  top: var(--nav-h);
  right: 0;
  width: min(300px, 82vw);
  height: calc(100% - var(--nav-h));
  background: var(--surface);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 40px rgba(13, 21, 38, 0.18);
  animation: slideInRight 0.26s var(--ease);
  overflow-y: auto;
  z-index: 1000;
}

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

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Drawer header with logo */
.mobile-menu-header {
  background: linear-gradient(135deg, #06213e 0%, #0f3460 100%);
  padding: 20px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.mobile-menu-header::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 168, 150, 0.25) 0%, transparent 70%);
  top: -60px;
  right: -40px;
  pointer-events: none;
}

.mobile-menu-header .mm-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none !important;
  position: relative;
  z-index: 2;
}

.mobile-menu-header .mm-brand .brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 98, 254, 0.35);
  flex-shrink: 0;
}

.mobile-menu-header .mm-brand span {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.mobile-menu-header .mm-brand .mm-accent {
  color: #7ffff4;
}

.mobile-menu-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  font-size: 16px;
  line-height: 1;
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Nav links area */
.mobile-menu-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.mobile-menu-panel a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.18s;
  border-left: 3px solid transparent;
  text-decoration: none !important;
}

.mobile-menu-panel a:hover {
  background: var(--bg);
  color: var(--primary);
  border-left-color: var(--primary);
}

.mobile-menu-panel .mobile-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 20px;
}

/* Drawer footer with tagline */
.mobile-menu-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-lt);
  font-size: 11.5px;
  color: var(--muted-lt);
  text-align: center;
  flex-shrink: 0;
  line-height: 1.5;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-lt);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.25s var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-body {
  padding: 24px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

/* ---------- Course Cards ---------- */
.course-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-lt);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.28s var(--ease);
  text-decoration: none !important;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 98, 254, 0.15);
}

.course-card-img {
  height: 170px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  background-color: linear-gradient(135deg, var(--accent), var(--primary));
}

.course-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 21, 38, 0.25) 0%, transparent 50%);
}

.course-card-content {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 12px;
}

.course-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

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

.course-card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-lt);
}

.btn-card {
  width: 100%;
  padding: 10px;
  background: var(--accent-lt);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 50px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-card:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 168, 150, 0.28);
}

.btn-outline-alt {
  background: rgba(5, 150, 105, 0.06);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  justify-content: center;
  padding: 10px 0;
  border-radius: 50px;
  transition: all 0.2s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-outline-alt:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
  text-decoration: none;
}

/* ---------- Feature Cards ---------- */
.feature-card {
  background: var(--surface);
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-lt);
  box-shadow: var(--shadow-sm);
  transition: all 0.28s var(--ease);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-lt);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-lt);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

/* ---------- Stat Cards ---------- */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-lt);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s var(--ease);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-lt);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.stat-card .stat-val {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -1px;
}

.stat-card .stat-lbl {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Stats Grid ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* ---------- Filter Sidebar ---------- */
.filter-sidebar {
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-width: 240px;
  max-width: 260px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.filter-sidebar h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.filter-group {
  margin-bottom: 24px;
}

.filter-group h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.18s;
}

.filter-option:hover {
  color: var(--primary);
}

.filter-option input[type=checkbox] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

.filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ---------- Courses Layout ---------- */
.courses-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 36px 0;
}

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

.courses-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.courses-count {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
  color: var(--text-2);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-btn:hover:not(.active) {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text-2);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  appearance: none;
}

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

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.08);
  background: #fff;
}

.form-control.error {
  border-color: var(--danger);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
  font-weight: 500;
}

.form-divider {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 20px 0;
  position: relative;
}

.form-divider::before,
.form-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}

.form-divider::before {
  left: 0;
}

.form-divider::after {
  right: 0;
}

/* ---------- Auth Pages ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 48px;
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--border-lt);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

/* Split auth */
.split-auth {
  display: flex;
  min-height: 100vh;
}

.auth-panel-left {
  flex: 0 0 38%;
  background: linear-gradient(145deg, #0d1f3c 0%, #0f3460 50%, var(--accent-dk) 100%);
  display: none;
  position: relative;
  overflow: hidden;
  padding: 40px 48px;
}

@media (min-width: 900px) {
  .auth-panel-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.auth-panel-left::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 168, 150, 0.3) 0%, transparent 70%);
  top: -200px;
  right: -200px;
}

.auth-panel-left::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 98, 254, 0.25) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
}

.auth-panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 52px;
  background: #fff;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .auth-panel-right {
    padding: 32px 24px;
    max-width: 100%;
    justify-content: flex-start;
  }
}

.auth-mobile-header {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  text-decoration: none;
}

@media (max-width: 900px) {
  .auth-mobile-header {
    display: flex;
  }
}

/* ---------- Dashboard Layout ---------- */
.dash-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-h));
}

.dash-sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 24px 0;
  flex-shrink: 0;
  position: fixed;               /* Fixed in place — never scrolls */
  top: var(--nav-h);             /* Starts just below the navbar */
  left: 0;
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;                  /* Below navbar (900) on desktop */
}

/* Right-side column — DASHBOARD PAGES ONLY (body.is-dashboard) */
body.is-dashboard .dash-layout {
  margin-left: 260px;
  flex-direction: column;
  min-height: calc(100vh - var(--nav-h));
}

/* Default dash-layout: standard flex row (for mobile drawer on public pages) */
.dash-layout {
  display: flex;
  min-height: 100vh;
}

/* Dashboard Footer — synchronized across all portals */
.dash-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border-lt);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  z-index: 50;                  /* Below sidebar (100) and navbar (900) */
  box-shadow: 0 -4px 20px rgba(13, 21, 38, 0.04);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.is-dashboard .dash-footer {
  left: 260px;                  /* Offsets for the fixed sidebar */
}

.dash-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  text-decoration: none !important;
}

.dash-footer-brand .brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 98, 254, 0.2);
}

.dash-footer-brand em {
  font-style: normal;
  color: var(--accent);
}

.dash-footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dash-footer-links a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none !important;
  transition: color 0.18s;
}

.dash-footer-links a:hover {
  color: var(--primary);
}

.dash-footer-copy {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 960px) {
  .dash-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    padding-top: 20px;
    transform: translateX(-100%);
    background: #0d1f3c !important;
    color: #a8c0db !important;
    box-shadow: 20px 0 50px rgba(0,0,0,0.25);
    z-index: 2500;
  }
  
  body.is-dashboard .dash-layout {
    margin-left: 0;              /* No offset on mobile — sidebar is a drawer */
  }

  body.is-dashboard .dash-footer {
    left: 0;
    padding: 12px 24px;
    justify-content: center;
  }
  
  .dash-footer-brand .brand-icon {
    display: none;
  }
  
  .dash-footer-copy {
    display: none;
  }
  
  .sidebar-open .dash-sidebar {
    transform: translateX(0);
  }

  .dash-sidebar a {
    color: #a8c0db !important;
  }
  .dash-sidebar .sidebar-header .sidebar-title {
    color: #fff !important;
  }
  .dash-sidebar .sidebar-section-label {
    color: rgba(168, 192, 219, 0.5) !important;
  }
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.sidebar-open .sidebar-overlay {
  display: block;
  opacity: 1;
}

.dash-sidebar::-webkit-scrollbar {
  width: 4px;
}

.dash-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.dash-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.sidebar-header {
  padding: 0 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 16px;
}

.sidebar-header .sidebar-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(168, 192, 219, 0.5);
  margin-bottom: 4px;
}

.sidebar-header .sidebar-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.sidebar-section {
  padding: 0 12px;
  margin-bottom: 8px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(168, 192, 219, 0.4);
  padding: 8px 8px 6px;
  margin-bottom: 4px;
}

.dash-sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 12px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s var(--ease);
  margin-bottom: 4px;
}

/* Nav Toggle for Mobile Dash */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
  margin-right: 12px;
}

@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }
  
  .navbar .container {
    padding: 0 16px;
    height: 60px;
  }

  .navbar-brand {
    gap: 8px;
  }

  .brand-name {
    font-size: 15px;
  }

  .brand-accent {
    font-size: 15px;
  }

  /* Compact Navbar Elements for Mobile */
  .d-mobile-none {
    display: none !important;
  }
}

.dash-sidebar a:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.dash-sidebar a.active {
  background: var(--sidebar-active);
  color: #fff;
}

/* Player Sub-Bar */
.player-sub-nav {
  background: #fff;
  border-bottom: 1px solid var(--border-lt);
  height: 48px;
  display: flex;
  align-items: center;
  z-index: 100;
  position: sticky;
  top: 64px; /* Desktop navbar height */
}

@media (max-width: 960px) {
  .player-sub-nav {
    top: 60px; /* Mobile navbar height */
    height: 44px;
    font-size: 13px;
  }
  .d-mobile-only { display: flex !important; }
}

@media (min-width: 961px) {
  .d-mobile-only { display: none !important; }
}

.dash-sidebar a .s-icon {
  font-size: 17px;
  width: 22px;
  flex-shrink: 0;
}

.dash-sidebar a .s-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 20px;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 12px 20px;
}

.sidebar-footer {
  margin-top: 0;
}

.dash-main {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  background: var(--bg);
}

.dash-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -0.5px;
}

/* Dash header row */
.dash-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Tables ---------- */
.table-wrap {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-lt);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: var(--bg);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-lt);
  vertical-align: middle;
}

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

tbody tr:hover {
  background: var(--bg);
}

/* ---------- Progress Bar ---------- */
.progress-bar-wrap {
  background: #e2e8f0;
  border-radius: 20px;
  height: 7px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 20px;
  transition: width 0.5s var(--ease);
}

/* ---------- Course Detail ---------- */
.course-header-strip {
  background: linear-gradient(135deg, #06213e 0%, #0f3460 60%, #0d4a45 100%);
  padding: 52px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.course-header-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(0, 168, 150, 0.25) 0%, transparent 60%);
}

.course-header-strip h1 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.8px;
  line-height: 1.2;
  position: relative;
}

.course-header-strip p {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 28px;
  position: relative;
}

.course-header-strip>* {
  position: relative;
  z-index: 2;
}

.course-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-box {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(8px);
}

.badge-box.blue {
  background: var(--primary);
  border-color: var(--primary);
}

.course-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
  margin: 0 auto;
  max-width: 1200px;
}

.course-video-box {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}

.video-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.video-overlay:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -50%) scale(1.06);
}

.video-overlay svg {
  width: 30px;
  fill: #fff;
}

.content-section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.tick-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.tick-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  padding: 10px 0;
}

.tick-icon {
  width: 20px;
  flex-shrink: 0;
  fill: var(--accent);
  margin-top: 1px;
}

.info-box {
  background: var(--surface);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-lt);
  box-shadow: var(--shadow-sm);
}

.curriculum-list {
  list-style: none;
  font-size: 14px;
}

.curriculum-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-lt);
  color: var(--text-2);
  transition: color 0.18s;
}

.curriculum-list li:last-child {
  border-bottom: none;
}

.curriculum-list li::before {
  content: '▸';
  color: var(--accent);
  font-size: 12px;
  flex-shrink: 0;
}

.certified-list {
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.9;
}

.certified-list li {
  margin-bottom: 8px;
  list-style: disc;
}

.accordion-item {
  border: 1px solid var(--border);
  padding: 18px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  background: #fff;
  transition: all 0.2s;
  position: relative;
}

.accordion-item:not(:last-child) {
  border-bottom: none;
}

.accordion-item:first-child {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.accordion-item:last-child {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.accordion-item:hover {
  background: var(--bg);
  color: var(--primary);
}

.accordion-item::before {
  content: '›';
  margin-right: 12px;
  color: var(--accent);
  font-size: 18px;
}

.course-sticky-card {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.course-sticky-card .card-img {
  height: 210px;
  background-size: cover;
  background-position: center;
}

.course-sticky-card .card-content {
  padding: 28px;
}

.course-sticky-card .card-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
}

.meta-list {
  list-style: none;
  margin-bottom: 24px;
}

.meta-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 14px;
  line-height: 1.4;
}

.meta-list svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  margin-top: 1px;
}

.meta-note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ---------- Collection ---------- */
.collection-header-strip {
  background: linear-gradient(135deg, #0043ce 0%, var(--accent-dk) 100%);
  padding: 64px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.collection-header-strip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
}

.collection-header-strip h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.8px;
  position: relative;
  z-index: 2;
}

.collection-header-strip p {
  font-size: 16px;
  margin-bottom: 28px;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

.collection-sidebar {
  margin-top: -120px;
  position: relative;
  z-index: 10;
}

/* ---------- Player ---------- */
.player-layout {
  display: flex;
  height: calc(100vh - var(--nav-h));
}

.player-sidebar {
  width: 310px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.player-sidebar::-webkit-scrollbar {
  width: 4px;
}

.player-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.player-sidebar-header {
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-weight: 700;
  font-size: 14.5px;
  color: #fff;
  flex-shrink: 0;
}

.player-module-title {
  padding: 12px 22px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: rgba(168, 192, 219, 0.5);
  background: rgba(0, 0, 0, 0.15);
}

.player-lesson-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  font-size: 13.5px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.18s;
}

.player-lesson-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.player-lesson-item.active {
  background: var(--sidebar-active);
  border-left-color: var(--sidebar-accent);
  color: #fff;
}

.lesson-icon {
  font-size: 15px;
  width: 20px;
  flex-shrink: 0;
}

.player-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.player-content {
  flex: 1;
  overflow-y: auto;
  padding: 36px;
}

.player-nav {
  padding: 18px 36px;
  background: var(--surface);
  border-top: 1px solid var(--border-lt);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(13, 21, 38, 0.04);
}

/* ---------- Alerts & Toasts ---------- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 18px;
  font-weight: 500;
}

.alert-success {
  background: #dcfce7;
  color: #14532d;
  border: 1px solid #86efac;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert-info {
  background: var(--primary-lt);
  color: var(--primary);
  border: 1px solid rgba(15, 98, 254, 0.2);
}

.alert-warn {
  background: #fef9c3;
  color: #713f12;
  border: 1px solid #fde047;
}

.toast-container {
  position: fixed;
  top: calc(var(--nav-h) + 16px);
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s var(--ease-spring);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toast-success {
  background: var(--success);
  color: #fff;
}

.toast-error {
  background: var(--danger);
  color: #fff;
}

.toast-info {
  background: var(--primary);
  color: #fff;
}

@keyframes toastIn {
  from {
    transform: translateX(110%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 21, 38, 0.6);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
}

.modal-overlay.hidden {
  display: none !important;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.28s var(--ease-spring);
}

@keyframes modalIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg);
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.18s;
}

.modal-close:hover {
  background: var(--danger);
  color: #fff;
}

/* ---------- Section Titles ---------- */
.section-heading {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-heading .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
  background: var(--accent-lt);
  padding: 4px 14px;
  border-radius: 20px;
}

.section-heading h2 {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.6px;
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-heading p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--sidebar-bg);
  color: #a8c0db;
  font-size: 14px;
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand {
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.8;
  margin-top: 16px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #e2e8f0;
  margin-bottom: 18px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #a8c0db;
  transition: color 0.18s;
  text-decoration: none;
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  opacity: 0.6;
}

/* Mobile footer logo block — hidden on desktop */
.footer-logo-center {
  display: none;
}

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  padding: 40px 0 60px;
}

.hero-bg-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0 0 32px 32px;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(13, 21, 38, 0.7) 0%, rgba(13, 21, 38, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 80px 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 168, 150, 0.2);
  border: 1px solid rgba(0, 168, 150, 0.4);
  color: #5ff6e9;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 20px;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 900;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.hero-title span {
  color: #5ff6e9;
}

.hero-desc {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat strong {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.hero-stat span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  margin-top: 4px;
}

.hero-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
  height: 44px;
  align-self: center;
}

/* ---------- Scrolling animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeUp 0.6s var(--ease) both;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

/* ---------- Skeleton Loader ---------- */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

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

  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 16px;
  width: 70%;
}

.skeleton-para {
  height: 12px;
}

.skeleton-image {
  height: 170px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Tablet & Mobile — hide all nav items, show only brand + hamburger */
@media (max-width: 960px) {

  /* Mobile-only filter toggle button (show above sidebar) */
  .mobile-filter-toggle {
    display: block;
  }

  .mobile-filter-toggle {
    display: block;
    position: relative;
    z-index: 705;
  }

  .mobile-filter-toggle .btn {
    width: 140px;
    padding: 8px 12px;
  }

  /* When filters are open hide the toggle to avoid overlap */
  body.filters-open .mobile-filter-toggle {
    display: none !important;
  }

  /* Mobile controls: when sort is moved here, show inline */
  .mobile-filter-toggle.mobile-controls {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-filter-toggle.mobile-controls select {
    min-width: 130px;
    max-width: 46vw;
    font-size: 13px;
    padding: 8px 10px;
  }

  /* Collapsible filter behaviour on mobile */
  .filter-sidebar.collapsed {
    display: none;
  }

  /* When filter is open give it a subtle elevated look */
  .filter-sidebar {
    transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
  }

  .navbar-links {
    display: none;
  }

  .navbar-nav {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  /* Mobile menu for tablet/desktop-to-mobile transition */
  .mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(13, 21, 38, 0.55);
    z-index: 4999 !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
  }

  .mobile-menu.open {
    display: block;
  }

  .courses-layout {
    flex-direction: column;
    padding: 20px 0;
  }

  .filter-sidebar {
    max-width: 100%;
    min-width: unset;
    position: static;
  }

  .course-detail-layout {
    grid-template-columns: 1fr;
    margin: 0;
    max-width: 100%;
  }

  .tick-list-grid {
    grid-template-columns: 1fr;
  }


  .player-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - var(--nav-h));
  }

  .player-sidebar {
    width: 100%;
    height: auto;
    max-height: 240px;
  }

  .player-main {
    flex: 1;
  }

  .features-section {
    padding: 48px 0 !important;
  }

  .courses-section {
    padding: 44px 0 !important;
  }

  .cta-section {
    padding: 48px 0 !important;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .section-heading h2 {
    font-size: 26px;
  }

  .section-heading p {
    font-size: 14px;
  }

  .course-header-strip {
    padding: 36px 0;
  }

  .course-header-strip h1 {
    font-size: 24px;
  }

  .course-header-strip p {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .collection-header-strip {
    padding: 40px 0;
  }

  .collection-header-strip h1 {
    font-size: 28px;
  }

  .hero-inner {
    padding-top: 44px !important;
    padding-bottom: 32px !important;
  }

  .course-detail-layout {
    margin-top: 24px !important;
    margin-bottom: 40px !important;
  }

  .welcome-banner {
    padding: 32px 24px;
    border-radius: 24px;
    margin-bottom: 24px;
    text-align: center;
  }

  .welcome-banner h2 {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .welcome-banner p {
    font-size: 14px;
    line-height: 1.5;
  }

  .dash-title {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
  }

  .stat-card {
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(2, 6, 23, 0.04);
  }

  .stat-card .stat-icon {
    margin-bottom: 14px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .stat-card .stat-val {
    font-size: 24px;
    font-weight: 800;
  }

  .stat-card .stat-lbl {
    font-size: 11.5px;
    font-weight: 700;
  }

  .stat-card .stat-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
  }

  .course-sticky-card {
    position: static;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 520px;
  }

  .feature-card {
    padding: 20px;
  }

  .feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
  }

  .content-section {
    margin-bottom: 28px;
  }

  .course-video-box {
    margin-bottom: 24px;
  }

  .info-box {
    padding: 18px;
  }

  .section-title {
    font-size: 17px;
    margin-bottom: 16px;
    padding-bottom: 10px;
  }

  /* Footer tablet: 3-col links, hide desktop brand col */
  .footer-brand-col {
    display: none;
  }

  .footer-logo-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
  }

  .footer-logo-center .fl-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none !important;
    margin-bottom: 10px;
  }

  .footer-logo-center .fl-brand .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(15, 98, 254, 0.3);
  }

  .footer-logo-center .fl-brand span {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
  }

  .footer-logo-center .fl-brand .fl-accent {
    color: var(--accent);
  }

  .footer-logo-center p {
    font-size: 12.5px;
    color: rgba(168, 192, 219, 0.75);
    line-height: 1.55;
    max-width: 260px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px 16px;
    margin-bottom: 20px;
    justify-items: center;
  }

  .footer-col {
    text-align: center;
    width: 100%;
  }

  .footer-col h4 {
    margin-bottom: 10px;
    font-size: 10px;
    letter-spacing: 0.6px;
  }

  .footer-col ul li {
    margin-bottom: 6px;
  }

  .footer-col ul li a {
    font-size: 12.5px;
  }

  .site-footer {
    padding-top: 28px;
  }

  .footer-bottom {
    padding: 14px 0;
    font-size: 11.5px;
  }
}

/* Mobile */
@media (max-width: 700px) {
  .container {
    padding: 0 14px;
  }

  /* Ensure navbar is properly spaced and responsive on mobile */
  .navbar {
    height: var(--nav-h);
  }

  .navbar .container {
    gap: 6px;
    overflow: visible;
  }

  .navbar-brand {
    font-size: 15px;
    gap: 6px;
    flex-shrink: 0;
  }

  .navbar-brand .brand-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .navbar-brand .brand-name,
  .navbar-brand .brand-accent {
    display: inline;
  }

  /* Hide desktop navigation on mobile */
  .navbar-links {
    display: none !important;
  }

  .navbar-nav {
    display: none !important;
  }

  /* Show mobile toggle button */
  .navbar-toggle {
    display: flex !important;
  }

  /* Mobile menu styling */
  .mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(13, 21, 38, 0.55);
    z-index: 499;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    animation: none;
  }

  .mobile-menu.open {
    display: block;
  }

  .auth-card {
    padding: 24px 18px;
  }

  .auth-panel-right {
    padding: 28px 18px;
  }

  .dash-main {
    padding: 14px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 14px 12px;
  }

  .stat-card .stat-val {
    font-size: 22px;
  }

  .stat-card .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-bottom: 8px;
  }

  .stat-card .stat-lbl {
    font-size: 11.5px;
  }

  .course-header-strip {
    padding: 28px 0;
  }

  .course-header-strip h1 {
    font-size: 20px;
  }

  .course-header-strip p {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .collection-header-strip {
    padding: 32px 0;
  }

  .collection-header-strip h1 {
    font-size: 22px;
  }

  .hero-inner {
    padding-top: 36px !important;
    padding-bottom: 28px !important;
  }

  .hero-desc {
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 24px;
  }

  .hero-actions {
    margin-bottom: 28px;
    gap: 10px;
  }

  .hero-eyebrow {
    font-size: 11.5px;
    padding: 5px 12px;
    margin-bottom: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px 14px;
    margin-bottom: 16px;
    justify-items: center;
  }

  .footer-col {
    text-align: center;
    width: 100%;
  }

  .site-footer {
    padding-top: 24px;
  }

  .footer-bottom {
    padding: 12px 0;
    font-size: 11px;
  }

  .player-nav {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .player-content {
    padding: 16px 14px;
  }

  .section-heading h2 {
    font-size: 22px;
  }

  .section-heading p {
    font-size: 13.5px;
  }

  .section-heading {
    margin-bottom: 22px;
  }

  .features-section {
    padding: 36px 0 !important;
  }

  .courses-section {
    padding: 32px 0 !important;
  }

  .cta-section {
    padding: 36px 0 !important;
  }

  .cta-inner h2 {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .cta-inner p {
    font-size: 14px;
    margin-bottom: 22px;
  }

  .courses-layout {
    padding: 12px 0;
    margin: 0 -14px;
    width: calc(100% + 28px);
  }

  .courses-layout .filter-sidebar {
    padding: 10px;
  }

  /* Improve touch targets, spacing and visual rhythm for filters, checkboxes and cards on mobile */
  /* On mobile we collapse filters by default into a compact overlay panel to avoid wasting vertical real-estate. */
  .filter-sidebar {
    /* Slide-in panel behaviour on small screens: start hidden off-canvas */
    padding: 12px 14px 90px 14px;
    position: fixed;
    left: 12px;
    top: calc(var(--nav-h) + 12px);
    bottom: 12px;
    width: min(360px, 86vw);
    max-width: 360px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98));
    z-index: 700;
    overflow-y: auto;
    border-radius: 14px;
    border: 1px solid rgba(10, 20, 40, 0.04);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.16);
    backdrop-filter: blur(6px);
    transition: transform 0.36s cubic-bezier(.22, .9, .28, 1), opacity 0.22s var(--ease), box-shadow 0.22s;
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
  }

  /* When sidebar is not collapsed (open) bring it in */
  .filter-sidebar:not(.collapsed),
  .filter-sidebar.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* subtle entrance for inner items */
  .filter-sidebar .filter-group,
  .filter-sidebar .filter-option {
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.28s var(--ease);
  }

  .filter-sidebar.open .filter-group,
  .filter-sidebar.open .filter-option {
    opacity: 1;
    transform: translateX(0);
  }

  /* small stagger for list items to feel lively */
  .filter-sidebar .filter-group .filter-option:nth-child(1) {
    transition-delay: 0.03s;
  }

  .filter-sidebar .filter-group .filter-option:nth-child(2) {
    transition-delay: 0.06s;
  }

  .filter-sidebar .filter-group .filter-option:nth-child(3) {
    transition-delay: 0.09s;
  }

  .filter-sidebar .filter-group .filter-option:nth-child(4) {
    transition-delay: 0.12s;
  }

  .filter-sidebar .filter-group .filter-option:nth-child(5) {
    transition-delay: 0.15s;
  }

  .filter-sidebar .filter-group .filter-option:nth-child(6) {
    transition-delay: 0.18s;
  }

  /* Polished panel header */
  .filter-sidebar h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 10px;
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
    border-radius: 8px;
    padding-left: 14px;
  }

  .filter-sidebar h3 svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
  }

  /* Make the panel feel like a fixed modal with inner padding and rounded corners */
  .filter-sidebar {
    padding-bottom: 96px;
  }

  /* Improve headings */
  .filter-group h4 {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    margin: 6px 4px 10px;
    letter-spacing: 0.7px;
  }

  /* Enhanced checkbox: larger, visible, clear tick */
  .filter-option {
    padding: 10px 12px;
    gap: 12px;
    align-items: center;
    display: flex;
    position: relative;
  }

  .filter-option .check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(15, 23, 42, 0.14);
    /* stronger visible border */
    background: linear-gradient(180deg, #ffffff, #f6f9fc);
    box-shadow: 0 3px 8px rgba(2, 6, 23, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    margin-right: 8px;
    transition: transform 0.14s var(--ease), border-color 0.12s, box-shadow 0.16s, background 0.16s;
  }

  /* place the native input over the check so clicks/keyboard still work */
  .filter-option input[type=checkbox] {
    position: absolute;
    left: 18px;
    opacity: 0;
    width: 22px;
    height: 22px;
    z-index: 3;
  }

  .filter-option input[type=checkbox]:focus+.check {
    box-shadow: 0 0 0 6px rgba(15, 98, 254, 0.10);
  }

  .filter-option input[type=checkbox]:checked+.check {
    background: linear-gradient(180deg, var(--primary), var(--primary-dk));
    border-color: var(--primary-dk);
    box-shadow: 0 12px 30px rgba(15, 98, 254, 0.14);
  }

  /* tick centered and animates in */
  .filter-option .check::after {
    transition: transform 0.18s cubic-bezier(.2, .9, .3, 1), opacity 0.12s;
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 11px;
    border: 2px solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -52%) rotate(45deg) scale(0.6);
    opacity: 0;
    pointer-events: none;
  }

  .filter-option input[type=checkbox]:checked+.check::after {
    transform: translate(-50%, -52%) rotate(45deg) scale(1);
    opacity: 1;
  }

  .filter-option .filter-label-text {
    color: var(--text-2);
    font-size: 14px;
    margin-left: 6px;
  }

  /* Sticky footer actions inside panel */
  .filter-actions {
    position: sticky;
    bottom: 12px;
    display: flex;
    gap: 10px;
    padding-top: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95));
    padding-bottom: 6px;
    margin-top: 6px;
  }

  .filter-actions .btn {
    flex: 1;
    border-radius: 10px;
  }

  .filter-actions .btn.btn-ghost {
    border: 1px solid var(--border);
  }

  /* Ensure scrollbar looks neat inside the panel */
  .filter-sidebar::-webkit-scrollbar {
    width: 8px;
  }

  .filter-sidebar::-webkit-scrollbar-thumb {
    background: rgba(2, 6, 23, 0.06);
    border-radius: 8px;
  }

  /* Make the close button prominent but subtle */
  .mobile-filter-close {
    right: 12px;
    top: 12px;
    font-size: 16px;
  }

  /* ensure there's always a backdrop element we can animate (default hidden) */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 660;
    background: rgba(2, 6, 23, 0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s var(--ease), background 0.28s var(--ease);
  }

  /* backdrop transition (applies when .filters-open is toggled on body) */
  body.filters-open::before {
    transition: opacity 0.28s var(--ease);
  }

  .filter-option {
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: transparent;
    border: none;
    gap: 10px;
  }

  .filter-option input[type=checkbox] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .filter-actions {
    gap: 8px;
  }

  /* Modal backdrop when filters are open */
  body.filters-open::before {
    /* animate to a dim backdrop */
    background: rgba(2, 6, 23, 0.36);
    opacity: 1;
    pointer-events: auto;
  }

  /* also ensure the panel opens when the body class is toggled (covers JS that toggles body only) */
  body.filters-open .filter-sidebar {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* slide-in with a tiny overshoot for a premium feel */
  @keyframes slideInLeft {
    0% {
      transform: translateX(-110%);
      opacity: 0;
    }

    80% {
      transform: translateX(6px);
      opacity: 1;
    }

    100% {
      transform: translateX(0);
      opacity: 1;
    }
  }

  .filter-sidebar.open {
    animation: slideInLeft 0.36s var(--ease);
  }

  /* Close button inside the sidebar */
  .mobile-filter-close {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 710;
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--text-2);
    cursor: pointer;
  }

  .mobile-filter-close:hover {
    background: var(--bg);
    color: var(--text);
  }

  /* Make the search bar more roomy on small screens and target page-specific header search too */
  .search-bar,
  .page-header .search-bar {
    padding: 6px;
    gap: 8px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.05);
    max-width: 100%;
    width: 100%;
  }

  .search-bar input,
  .page-header .search-bar input {
    padding: 10px 12px;
    font-size: 14px;
  }

  .search-bar button,
  .page-header .search-bar button {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13.5px;
  }

  /* Force single column course grid and tighter card spacing */
  .course-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    justify-items: center;
    /* center card blocks horizontally in the single-column grid */
  }

  /* Centered course-card layout for mobile devices */
  .course-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border-lt);
    width: 100%;
    box-sizing: border-box;
    margin: 0;
  }

  .course-card-img {
    width: 110px;
    height: 82px;
    flex: 0 0 110px;
    border-radius: 8px;
    object-fit: cover;
  }

  .course-card-content {
    padding: 6px 0;
    flex: 1;
    min-width: 0;
  }

  /* Stronger overrides in case other rules are more specific or cached */
  .course-grid {
    justify-items: stretch !important;
  }

  .course-card {
    flex-direction: row !important;
    align-items: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .course-card-content {
    padding: 6px 0;
    flex: 1;
    min-width: 0;
  }

  .course-card-img {
    width: 110px;
    height: 82px;
    flex: 0 0 110px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    line-height: 1;
    margin: 0;
  }

  .course-card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .course-card-meta {
    font-size: 12.5px;
    color: var(--muted);
    gap: 8px;
    margin-bottom: 8px;
  }

  .course-card-footer {
    margin-top: 0;
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .btn-card {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
  }

  /* Reduce visual spacing around grid to use viewport height effectively */
  /* Extend courses-layout full width on mobile to allow cards to use full viewport */
  .courses-layout {
    gap: 12px;
    padding: 12px 0;
    margin: 0 -12px;
    width: calc(100% + 24px);
  }

  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Custom checkbox visual (mobile only) — compact and professional */
  .filter-option {
    position: relative;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    background: transparent;
  }

  .filter-option input[type=checkbox] {
    position: relative;
    left: 0;
    top: 0;
    transform: none;
    opacity: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
  }

  .filter-option .check {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.6px solid rgba(15, 23, 42, 0.14);
    background: linear-gradient(180deg, #ffffff, #f6f9fc);
    display: inline-block;
    box-shadow: 0 1px 4px rgba(2, 6, 23, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: transform 0.14s var(--ease), box-shadow 0.16s, border-color 0.12s, background 0.12s;
  }

  .filter-option:hover .check {
    transform: translateX(-2px) scale(1.03);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
  }

  .filter-option .filter-label-text {
    display: inline-block;
    font-size: 13.5px;
    color: var(--text-2);
  }

  .filter-option input[type=checkbox]:checked+.check {
    background: linear-gradient(180deg, var(--primary), var(--primary-dk));
    border-color: var(--primary-dk);
    box-shadow: 0 8px 20px rgba(15, 98, 254, 0.12);
  }

  .filter-option .check::after {
    transition: transform 0.18s cubic-bezier(.2, .9, .3, 1), opacity 0.12s;
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 11px;
    border: 2px solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -52%) rotate(45deg) scale(0.6);
    opacity: 0;
    pointer-events: none;
  }

  .filter-option input[type=checkbox]:checked+.check::after {
    transform: translate(-50%, -52%) rotate(45deg) scale(1);
    opacity: 1;
  }

  .courses-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .courses-section-header h2 {
    font-size: 20px;
  }

  .courses-section-header p {
    font-size: 13px;
    margin-top: 2px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .page-header p {
    font-size: 13px;
  }

  .page-header {
    padding: 28px 0;
  }

  .search-bar {
    margin-top: 16px;
  }

  .info-box {
    padding: 16px;
  }

  .feature-card {
    padding: 18px;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-bottom: 12px;
  }

  .content-section {
    margin-bottom: 22px;
  }

  .course-video-box {
    margin-bottom: 18px;
  }

  .section-title {
    font-size: 16px;
    margin-bottom: 14px;
    padding-bottom: 8px;
  }

  .tick-item {
    padding: 6px 0;
    font-size: 13px;
  }

  .curriculum-list li {
    padding: 9px 0;
    font-size: 13px;
  }

  .accordion-item {
    padding: 13px 16px;
    font-size: 13px;
  }

  .course-sticky-card .card-img {
    height: 160px;
  }

  .course-sticky-card .card-content {
    padding: 16px;
  }

  .course-sticky-card .card-price {
    font-size: 20px;
    margin-bottom: 14px;
  }

  .meta-list li {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .meta-note {
    font-size: 11px;
    margin-bottom: 16px;
  }

  .badge-box {
    font-size: 11px;
    padding: 4px 10px;
  }

  .course-badges {
    gap: 6px;
  }

  .dash-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
  }

  .welcome-banner {
    padding: 18px 16px;
    border-radius: 14px;
  }

  .welcome-banner h2 {
    font-size: 16px;
  }

  .welcome-banner p {
    font-size: 12.5px;
  }

  .section-head {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .continue-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;

    /* center the single-column grid items so cards appear centered on mobile */
    .course-grid {
      justify-items: center;
    }

    /* cards occupy full width on mobile for proper space usage */
    .course-card {
      width: 100%;
      margin: 0;
      box-sizing: border-box;
    }
  }

  /* Keep the mobile filter/sort controls below the navbar while scrolling */
  .mobile-filter-toggle {
    position: sticky;
    top: var(--nav-h);
    z-index: 600;
    display: block;
    background: #ffffff;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-lt);
    box-shadow: 0 2px 8px rgba(2, 6, 23, 0.04);
    width: 100%;
    box-sizing: border-box;
  }

  .continue-card .card-thumb {
    height: 80px;
    font-size: 36px;
  }

  .continue-card .card-body {
    padding: 12px;
  }

.completion-banner {
  text-align: center;
  padding: 60px 40px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
  animation: pageFadeIn 0.8s var(--ease);
}

.completion-banner::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 168, 150, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.completion-banner .trophy-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  font-size: 40px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.completion-banner h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.completion-banner p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  line-height: 1.6;
}

.completion-banner .actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.completion-banner .actions .btn {
  min-width: 200px;
  padding: 16px 28px;
  font-weight: 700;
  border-radius: 14px;
}

@media (max-width: 600px) {
  .completion-banner {
    padding: 40px 20px;
  }
  
  .completion-banner h2 {
    font-size: 24px;
  }
  
  .completion-banner .actions .btn {
    width: 100%;
  }
}

  .slide-content {
    padding: 16px;
  }

  .slide-content h2 {
    font-size: 17px;
    margin-bottom: 12px;
  }

  .quiz-question {
    padding: 14px;
    margin-bottom: 12px;
  }

  .quiz-question h4 {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .quiz-option {
    padding: 10px 12px;
    font-size: 13px;
  }

  .dash-title {
    font-size: 17px;
    margin-bottom: 14px;
  }

  .table-wrap table {
    min-width: 480px;
  }

  thead th {
    padding: 10px 12px;
    font-size: 10.5px;
  }

  tbody td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .filter-group {
    margin-bottom: 16px;
  }

  .filter-option {
    font-size: 13px;
  }

  .courses-header {
    margin-bottom: 12px;
  }

  .pagination {
    margin-top: 20px;
    gap: 4px;
  }

  .page-btn {
    padding: 6px 11px;
    font-size: 13px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .hero-title {
    font-size: 26px;
    letter-spacing: -0.6px;
  }

  .hero-desc {
    font-size: 14px;
  }

  .hero-stats {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  .hero-stat {
    flex: 1 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: none !important;
    min-width: 0 !important;
  }

  .hero-stat:last-child {
    border-right: none !important;
  }

  .hero-btns {
    flex-direction: column;
  }

  .hero-btns .btn,
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
  }

  .cta-btns {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-btns .btn {
    width: 100%;
    justify-content: center;
  }

  .cta-inner h2 {
    font-size: 20px;
  }

  .section-heading h2 {
    font-size: 19px;
  }

  .section-heading p {
    font-size: 13px;
  }

  /* Footer: keep 3 columns on small mobile */
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px 12px;
    justify-items: center;
  }

  .site-footer {
    padding-top: 24px;
  }

  .footer-logo-center {
    padding-bottom: 18px;
    margin-bottom: 16px;
  }

  .footer-logo-center .fl-brand span {
    font-size: 15px;
  }

  .footer-logo-center p {
    font-size: 11.5px;
  }

  .footer-col h4 {
    font-size: 9.5px;
    margin-bottom: 8px;
  }

  .footer-col ul li a {
    font-size: 11.5px;
  }

  .footer-col ul li {
    margin-bottom: 5px;
  }

  .collection-included-card {
    flex-wrap: wrap;
  }

  .collection-included-card .btn {
    margin-left: 0 !important;
    width: 100%;
    justify-content: center;
  }

  .modal {
    padding: 20px 16px;
  }

  .player-sidebar {
    max-height: 180px;
  }

  .tab-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .filter-sidebar {
    padding: 14px;
  }

  .feature-card {
    padding: 16px;
  }

  .feature-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
  }

  .course-card-content {
    padding: 14px;
  }

  .course-card-img {
    height: 140px;
  }

  .course-card-title {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .course-card-meta {
    font-size: 11.5px;
    gap: 8px;
    margin-bottom: 10px;
  }

  .course-card-footer {
    padding-top: 10px;
  }

  .btn-card {
    padding: 8px;
    font-size: 12.5px;
  }

  .welcome-banner {
    padding: 16px 14px;
  }

  .welcome-banner h2 {
    font-size: 15px;
  }

  .stat-card {
    padding: 12px 10px;
  }

  .stat-card .stat-val {
    font-size: 20px;
  }

  .stat-card .stat-lbl {
    font-size: 11px;
  }

  .dash-main {
    padding: 12px;
  }

  .continue-grid {
    gap: 8px;
  }
}

/* ---------- Legal / Static Pages Re-Design ---------- */
.static-hero {
    padding: 100px 0 60px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.static-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(0, 168, 150, 0.4), transparent 60%),
                radial-gradient(circle at bottom left, rgba(15, 98, 254, 0.3), transparent 60%);
    pointer-events: none;
    z-index: 1;
}
.static-hero .container {
    position: relative;
    z-index: 2;
}
.static-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #7ffff4;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.static-hero h1 {
    font-size: 52px;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.static-hero p {
    font-size: 18px;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}
.static-content {
    padding: 60px 0 120px;
    background: #f4f7fa;
}
.prose {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border-lt);
    border-radius: 32px;
    padding: 70px 80px;
    box-shadow: 0 25px 60px -15px rgba(13, 21, 38, 0.08);
    color: var(--text-2);
    line-height: 1.8;
    position: relative;
    z-index: 10;
}
.prose::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 32px 32px 0 0;
}
.prose h2 {
    font-size: 26px;
    font-weight: 800;
    margin-top: 48px;
    margin-bottom: 20px;
    color: var(--text);
    letter-spacing: -0.5px;
}
.prose h2:first-child { margin-top: 0; }
.prose p {
    margin-bottom: 24px;
    font-size: 16.5px;
}
.prose ul {
    margin-bottom: 28px;
    padding-left: 0;
    list-style: none;
}
.prose li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 14px;
    font-size: 16.5px;
}
.prose li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 20px;
    height: 20px;
    background: var(--accent-lt);
    border-radius: 50%;
}
.prose li::after {
    content: '✓';
    position: absolute;
    left: 4.5px;
    top: 9px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}
@media (max-width: 768px) {
    .prose { padding: 40px 30px; margin-top: -50px; border-radius: 24px; }
    .prose::before { border-radius: 24px 24px 0 0; }
    .static-hero h1 { font-size: 38px; }
    .static-hero { padding: 100px 0 80px; }
}