/* ============================================
   Learni Course – Design System
   Theme: Light Modern (Coursera/Notion inspired)
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&family=Secular+One&family=Poppins:wght@400;500;600;700&display=swap');

@font-face { font-family: 'Shuneet3 Square'; src: url('../fonts/Shuneet3 Square Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Shuneet3'; src: url('../fonts/Shuneet3 Medium.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Cafe'; src: url('../fonts/Cafe.ttf') format('truetype'); font-display: swap; }

/* --- CSS Custom Properties --- */
:root {
  /* Colors – Bold Learni Palette (Social Media Style) */
  --bg: #FAFAFF;
  --bg-alt: #F0EEFF;
  --card: #FFFFFF;
  --primary: #7C3AED;
  --primary-dark: #6D28D9;
  --primary-light: #A78BFA;
  --secondary: #14B8A6;
  --secondary-dark: #0D9488;
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
  --text: #1E1E2E;
  --text-light: #4A5568;
  --muted: #64748B;
  --border: #E2E0F0;
  --success: #059669;
  --success-bg: #D1FAE5;
  --success-light: #ECFDF5;
  --rose: #E76F7A;

  /* Radius */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Shadows – deeper, purple-tinted */
  --shadow-sm: 0 1px 3px rgba(124,58,237,.05), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(124,58,237,.08), 0 2px 4px rgba(0,0,0,.03);
  --shadow-lg: 0 12px 40px rgba(124,58,237,.1), 0 4px 12px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 60px rgba(124,58,237,.12), 0 8px 20px rgba(0,0,0,.05);

  /* Layout */
  --max-width: 1200px;
  --sidebar-width: 280px;
  --header-height: 72px;
}

/* --- Skip to content --- */
.skip-link {
  position: absolute;
  top: -100px;
  right: 0;
  background: var(--primary);
  color: white;
  padding: .5rem 1.5rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 200;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

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

html {
  direction: rtl;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Heebo', 'Poppins', 'Rubik', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --- English text --- */
.en-text {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  direction: ltr;
  display: inline;
}

/* --- Code Block --- */
.code-block {
  direction: ltr;
  text-align: left;
  font-family: 'Poppins', 'Consolas', 'Monaco', monospace;
  font-size: .85rem;
  line-height: 1.8;
  white-space: pre;
  background: #1E293B;
  color: #E2E8F0;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  border: 1px solid #334155;
}

.code-block .comment { color: #64748B; }
.code-block .key { color: #7DD3FC; }
.code-block .string { color: #86EFAC; }
.code-block .label { color: #FCD34D; font-size: inherit; text-transform: none; letter-spacing: 0; }

/* --- Screenshot / Training Image --- */
.screenshot {
  width: 100%;
  max-width: 720px;
  margin: 1.5rem auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.screenshot-caption {
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
  margin-top: .5rem;
  margin-bottom: 1.5rem;
}

/* --- Hero CTA --- */
.hero-cta {
  margin: 1.5rem auto 0;
  display: inline-flex;
}

/* --- Background: Animated Orbs (light version of training site) --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(600px 600px at 90% 10%, rgba(124,58,237,.07) 0%, transparent 60%),
    radial-gradient(500px 500px at 5% 85%, rgba(20,184,166,.06) 0%, transparent 60%),
    radial-gradient(400px 400px at 50% 50%, rgba(245,158,11,.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: orb-drift 20s ease-in-out infinite;
}

@keyframes orb-drift {
  0%, 100% { background-position: 90% 10%, 5% 85%, 50% 50%; }
  33% { background-position: 85% 15%, 10% 80%, 55% 45%; }
  66% { background-position: 95% 5%, 0% 90%, 45% 55%; }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes progressFill {
  from { width: 0; }
}

@keyframes checkmark {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: 'Secular One', 'Shuneet3 Square', 'Heebo', sans-serif;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

.subtitle {
  font-family: 'Cafe', 'Heebo', sans-serif;
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* --- Header / Navbar --- */
.course-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(250,250,255,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(124,58,237,.08);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 3vw, 2rem);
  animation: fadeIn .4s ease;
}

.course-header .logo {
  height: 44px;
  width: auto;
}

.course-header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.course-header .nav-link {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  padding: .4rem .8rem;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}

.course-header .nav-link:hover {
  color: var(--primary);
  background: rgba(74,127,181,.06);
}

.course-header .nav-progress {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-light);
}

.course-header .nav-progress-bar {
  width: 100px;
  height: 6px;
  background: var(--bg-alt);
  border-radius: 3px;
  overflow: hidden;
}

.course-header .nav-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #14B8A6, #7C3AED, #F59E0B);
  background-size: 200% 100%;
  animation: gradient-shift 4s ease infinite;
  border-radius: 3px;
  transition: width .5s ease;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Main Layout --- */
.course-main {
  margin-top: var(--header-height);
  position: relative;
  z-index: 1;
}

/* --- Hero Section (index page) --- */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  text-align: center;
  animation: fadeInUp .6s ease;
}

.hero h1 {
  margin-bottom: .75rem;
  font-weight: 900;
  background: linear-gradient(135deg, #7C3AED 0%, #14B8A6 60%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

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

.hero-stat .number {
  display: block;
  font-family: 'Shuneet3 Square', 'Secular One', sans-serif;
  font-size: 2rem;
  color: var(--primary);
  line-height: 1;
}

.hero-stat .label {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .25rem;
}

/* --- Hero Tagline & Icons Row --- */
.hero-tagline {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem) !important;
  line-height: 1.8;
  letter-spacing: .02em;
}

.hero-pink {
  color: #7C3AED !important;
  -webkit-text-fill-color: #7C3AED !important;
  font-weight: 700 !important;
}

.hero-icons-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem auto 1rem;
  flex-wrap: wrap;
}

.hero-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  transition: transform .2s ease;
}

.hero-icon-item:nth-child(1) { color: #4A7FB5; }
.hero-icon-item:nth-child(2) { color: #8B5CF6; }
.hero-icon-item:nth-child(3) { color: #E91E8C; }
.hero-icon-item:nth-child(4) { color: #5ABF92; }
.hero-icon-item:nth-child(5) { color: #F59E0B; }
.hero-icon-item:nth-child(6) { color: #06B6D4; }

.hero-icon-item:hover {
  transform: translateY(-3px);
}

.hero-icon-item span {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-light);
}

.hero-sub-note {
  font-size: .95rem;
  color: var(--muted);
  margin-top: .5rem;
  font-weight: 500;
}

/* --- Learn Cards (pastel) --- */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.learn-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.learn-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.learn-card-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.learn-card h3 {
  font-size: 1.05rem;
  margin-bottom: .5rem;
}

.learn-card p {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Pastel variants */
.pastel-blue {
  background: #E8F4FD;
  border: 1px solid #B8DCEF;
}
.pastel-blue .learn-card-icon {
  background: #C5E4F7;
  color: #2B7AB5;
}

.pastel-green {
  background: #E6F7EE;
  border: 1px solid #B3E5CD;
}
.pastel-green .learn-card-icon {
  background: #C0EDDA;
  color: #1D8B5E;
}

.pastel-purple {
  background: #F0E8F7;
  border: 1px solid #D4BFE8;
}
.pastel-purple .learn-card-icon {
  background: #DCC9EE;
  color: #7B4DAA;
}

.pastel-orange {
  background: #FFF3E0;
  border: 1px solid #FFDBA8;
}
.pastel-orange .learn-card-icon {
  background: #FFE4BC;
  color: #D4850A;
}

/* --- Hub Box (all tools in one place) --- */
.hub-box {
  background: linear-gradient(135deg, #1E293B, #0F172A);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  color: white;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.hub-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(139,92,246,.08) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(233,30,140,.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(6,182,212,.06) 0%, transparent 50%);
  pointer-events: none;
}

.hub-title {
  font-family: 'Secular One', 'Shuneet3 Square', 'Heebo', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  background: linear-gradient(90deg, #A78BFA, #14B8A6, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  max-width: 480px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.hub-spoke {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 1rem .75rem;
  transition: transform .2s ease, background .2s ease;
}

.hub-spoke:hover {
  transform: scale(1.05);
  background: rgba(255,255,255,.12);
}

.hub-spoke-icon { font-size: 1.75rem; margin-bottom: .4rem; }

.hub-spoke-text {
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  line-height: 1.4;
}

.hub-center {
  background: linear-gradient(135deg, #8B5CF6, #E91E8C);
  border-radius: var(--radius);
  padding: 1rem .75rem;
  box-shadow: 0 4px 20px rgba(139,92,246,.4);
  grid-column: 2;
  grid-row: 2;
  order: 0;
}

.hub-center-icon { font-size: 1.75rem; margin-bottom: .4rem; }

.hub-center-text {
  font-size: .85rem;
  font-weight: 700;
  color: white;
}

/* Reorder spokes around center */
.hub-spoke:nth-child(1) { grid-column: 1; grid-row: 1; }
.hub-spoke:nth-child(2) { grid-column: 2; grid-row: 1; }
.hub-spoke:nth-child(3) { grid-column: 3; grid-row: 1; }
.hub-spoke:nth-child(5) { grid-column: 1; grid-row: 2; }
.hub-spoke:nth-child(6) { grid-column: 3; grid-row: 2; }
.hub-spoke:nth-child(7) { grid-column: 2; grid-row: 3; }

.hub-bottom {
  font-size: .95rem;
  color: rgba(255,255,255,.6);
  position: relative;
}

.hub-bottom strong { color: white; }

@media (max-width: 480px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hub-center { grid-column: 1 / -1; grid-row: auto; }
  .hub-spoke:nth-child(n) { grid-column: auto; grid-row: auto; }
}

/* --- Hero Explain Cards (two side-by-side) --- */
.hero-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .hero-cards-row { grid-template-columns: 1fr; }
}

.hero-explain-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform .2s ease;
}

.hero-explain-card:hover { transform: translateY(-3px); }

.hero-card-emoji { font-size: 2.5rem; margin-bottom: .75rem; }

.hero-card-title {
  font-family: 'Shuneet3 Square', 'Secular One', 'Heebo', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.hero-card-desc {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-light);
}

.hero-explain-card.bad {
  background: #FEF2F2;
  border: 1px solid #FECACA;
}
.hero-explain-card.bad .hero-card-title { color: #DC2626; }

.hero-explain-card.good {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
}
.hero-explain-card.good .hero-card-title { color: #16A34A; }

.hero-explain-card.safe {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
}
.hero-explain-card.safe .hero-card-title { color: #16A34A; }

.hero-explain-card.warn {
  background: #FFF7ED;
  border: 1px solid #FED7AA;
}
.hero-explain-card.warn .hero-card-title { color: #D97706; }

/* --- Visual Checklist --- */
.checklist-visual {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: 1rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.25rem;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 500;
}

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

/* --- Screenshot Gallery (nicer image display) --- */
.screenshot {
  width: 100%;
  max-width: 720px;
  margin: 1.5rem auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--card);
  transition: transform .2s ease, box-shadow .2s ease;
}

.screenshot:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

.screenshot-caption {
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
  margin-top: .5rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

/* --- Flow Steps (horizontal process) --- */
.flow-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.flow-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  min-width: 120px;
  flex: 1;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.flow-icon { font-size: 2rem; margin-bottom: .5rem; }

.flow-text {
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
}

.flow-arrow {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-light);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .flow-arrow { transform: rotate(90deg); }
  .flow-steps { flex-direction: column; gap: .25rem; }
  .flow-step { min-width: unset; width: 100%; }
}

/* --- Compare Table (Bot vs Agent, etc.) --- */
.compare-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .compare-table {
    grid-template-columns: 1fr;
  }
}

.compare-side {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.compare-header {
  font-family: 'Shuneet3 Square', 'Secular One', 'Heebo', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid rgba(0,0,0,.08);
}

.compare-side ul {
  list-style: none;
  padding: 0;
}

.compare-side li {
  padding: .4rem 0;
  font-size: .95rem;
  line-height: 1.6;
  position: relative;
  padding-right: 1.25rem;
}

.compare-bad {
  background: #FEF2F2;
  border: 1px solid #FECACA;
}

.compare-bad .compare-header { color: #DC2626; }

.compare-bad li::before {
  content: '\2717';
  position: absolute;
  right: 0;
  color: #DC2626;
  font-weight: 700;
}

.compare-warn {
  background: #FFF7ED;
  border: 1px solid #FED7AA;
}

.compare-warn .compare-header { color: #D97706; }

.compare-warn li::before {
  content: '\26A0';
  position: absolute;
  right: 0;
  font-size: .8rem;
}

.compare-good {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
}

.compare-good .compare-header { color: #16A34A; }

.compare-good li::before {
  content: '\2713';
  position: absolute;
  right: 0;
  color: #16A34A;
  font-weight: 700;
}

/* --- Video Teaser --- */
.video-teaser {
  max-width: 720px;
  margin: 2rem auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  position: relative;
}

.video-teaser iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

.video-placeholder svg {
  width: 64px;
  height: 64px;
  opacity: .9;
}

/* --- Module Cards Grid (index) --- */
.modules-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.module-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  animation: fadeInUp .5s ease backwards;
}

.module-card:nth-child(1) { animation-delay: .05s; }
.module-card:nth-child(2) { animation-delay: .1s; }
.module-card:nth-child(3) { animation-delay: .15s; }
.module-card:nth-child(4) { animation-delay: .2s; }
.module-card:nth-child(5) { animation-delay: .25s; }

.module-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(124,58,237,.12), 0 4px 12px rgba(0,0,0,.04);
  border-color: rgba(124,58,237,.2);
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
}

.module-card[data-module="0"]::before { background: linear-gradient(90deg, #94A3B8, #7C3AED); }
.module-card[data-module="1"]::before { background: linear-gradient(90deg, #7C3AED, #14B8A6); }
.module-card[data-module="2"]::before { background: linear-gradient(90deg, #14B8A6, #F59E0B); }
.module-card[data-module="3"]::before { background: linear-gradient(90deg, #F59E0B, #E76F7A); }
.module-card[data-module="4"]::before { background: linear-gradient(90deg, #E76F7A, #7C3AED); }

.module-card .module-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-family: 'Shuneet3 Square', 'Secular One', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

.module-card[data-module="0"] .module-number { background: rgba(124,58,237,.08); color: #7C3AED; }
.module-card[data-module="1"] .module-number { background: rgba(124,58,237,.1); color: #7C3AED; }
.module-card[data-module="2"] .module-number { background: rgba(20,184,166,.1); color: #14B8A6; }
.module-card[data-module="3"] .module-number { background: rgba(245,158,11,.1); color: #F59E0B; }
.module-card[data-module="4"] .module-number { background: rgba(231,111,122,.1); color: #E76F7A; }

.module-card h3 {
  margin-bottom: .5rem;
}

.module-card .module-desc {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
}

.module-card .module-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--muted);
}

.module-card .module-meta svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  margin-left: .35rem;
}

.module-card .progress-mini {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.module-card .progress-mini-bar {
  width: 60px;
  height: 5px;
  background: var(--bg-alt);
  border-radius: 3px;
  overflow: hidden;
}

.module-card .progress-mini-fill {
  height: 100%;
  background: var(--success);
  border-radius: 3px;
  transition: width .5s ease;
}

.module-card .completed-badge {
  display: none;
  align-items: center;
  gap: .3rem;
  color: var(--success);
  font-weight: 600;
  font-size: .8rem;
}

.module-card.is-complete .completed-badge {
  display: flex;
}

.module-card.is-complete .progress-mini {
  display: none;
}

/* --- Module Page Layout --- */
.module-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: calc(100vh - var(--header-height));
}

/* --- Sidebar --- */
.module-sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  background: var(--card);
  border-left: 1px solid var(--border);
  padding: 1.5rem 0;
  animation: slideInRight .4s ease;
}

.sidebar-title {
  padding: 0 1.5rem .75rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.sidebar-lessons {
  list-style: none;
}

.sidebar-lesson {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.5rem;
  font-size: .9rem;
  color: var(--text-light);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
  border-right: 3px solid transparent;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  text-align: right;
}

.sidebar-lesson:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: 4px;
}

.sidebar-lesson:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.sidebar-lesson.active {
  background: rgba(124,58,237,.06);
  color: var(--primary);
  border-right-color: var(--primary);
  font-weight: 600;
}

.sidebar-lesson.completed {
  color: var(--success);
}

.lesson-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}

.sidebar-lesson.active .lesson-check {
  border-color: var(--primary);
}

.sidebar-lesson.completed .lesson-check {
  border-color: var(--success);
  background: var(--success);
}

.lesson-check svg {
  width: 12px;
  height: 12px;
  stroke: white;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.sidebar-lesson.completed .lesson-check svg {
  opacity: 1;
  animation: checkmark .3s ease;
}

/* --- Content Area --- */
.module-content {
  padding: 2.5rem clamp(1.5rem, 4vw, 3rem) 4rem;
  max-width: 840px;
  animation: fadeIn .4s ease;
}

/* --- Lesson Section --- */
.lesson-section {
  display: none;
  animation: fadeInUp .4s ease;
}

.lesson-section.active {
  display: block;
}

.lesson-section h2 {
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--border);
}

.lesson-section h2 .lesson-num {
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  display: block;
  margin-bottom: .25rem;
  font-family: 'Heebo', sans-serif;
}

/* --- Content Blocks --- */
.content-block {
  margin-bottom: 2rem;
}

.content-block p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1rem;
}

.content-block ul, .content-block ol {
  padding-right: 1.5rem;
  margin-bottom: 1rem;
}

.content-block li {
  margin-bottom: .5rem;
  line-height: 1.7;
}

/* --- Info Box --- */
.info-box {
  background: rgba(74,127,181,.06);
  border: 1px solid rgba(74,127,181,.15);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.info-box.tip {
  background: rgba(90,191,146,.06);
  border-color: rgba(90,191,146,.15);
}

.info-box.warning {
  background: rgba(245,158,11,.06);
  border-color: rgba(245,158,11,.15);
}

.info-box .info-title {
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: .4rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.info-box .info-title svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* --- Embedded Presentation / Video --- */
.embed-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  background: var(--bg-alt);
}

.embed-container iframe {
  width: 100%;
  border: none;
  min-height: 500px;
}

.embed-container.video {
  aspect-ratio: 16 / 9;
}

.embed-container.video iframe {
  height: 100%;
  min-height: unset;
}

/* --- Task Block --- */
.task-block {
  background: linear-gradient(135deg, rgba(74,127,181,.04), rgba(90,191,146,.04));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.task-block .task-title {
  font-family: 'Shuneet3 Square', 'Secular One', sans-serif;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.task-block .task-title svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* --- Navigation Footer --- */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Heebo', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .2s;
  touch-action: manipulation;
}

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

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.btn-cta {
  background: linear-gradient(135deg, #7C3AED, #14B8A6);
  color: white;
  box-shadow: 0 4px 16px rgba(124,58,237,.3);
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}

.btn-cta::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,.15), transparent);
  transform: translateX(100%);
  transition: transform .6s ease;
}

.btn-cta:hover::after {
  transform: translateX(-100%);
}

.btn-cta:hover {
  background: linear-gradient(135deg, #6D28D9, #0D9488);
  box-shadow: 0 8px 32px rgba(124,58,237,.35);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  background: #047857;
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  border-radius: var(--radius);
}

/* --- Quiz Section --- */
.quiz-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
}

.quiz-question {
  margin-bottom: 1.5rem;
}

.quiz-question p {
  font-weight: 600;
  margin-bottom: .75rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.quiz-option:hover {
  border-color: var(--primary-light);
  background: rgba(74,127,181,.03);
}

.quiz-option.selected {
  border-color: var(--primary);
  background: rgba(74,127,181,.06);
}

.quiz-option.correct {
  border-color: var(--success);
  background: var(--success-light);
}

.quiz-option.incorrect {
  border-color: #DC2626;
  background: #FEF2F2;
}

.quiz-option input[type="radio"] {
  accent-color: var(--primary);
}

/* --- Certificate --- */
.certificate-wrapper {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.certificate {
  background: white;
  border: 3px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  text-align: center;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.certificate::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(74,127,181,.2);
  border-radius: calc(var(--radius-lg) - 6px);
  pointer-events: none;
}

.certificate .cert-logo {
  height: 60px;
  margin-bottom: 2rem;
}

.certificate h1 {
  background: linear-gradient(135deg, #7C3AED, #14B8A6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .5rem;
}

.certificate .cert-name {
  font-family: 'Cafe', 'Heebo', sans-serif;
  font-size: 2.5rem;
  color: var(--text);
  margin: 1.5rem 0;
}

.certificate .cert-text {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.8;
}

.certificate .cert-date {
  margin-top: 2rem;
  font-size: .9rem;
  color: var(--muted);
}

/* --- Footer --- */
.course-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}

.course-footer .footer-logo {
  height: 36px;
  margin-bottom: .75rem;
}

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

.course-footer a:hover {
  text-decoration: underline;
}

/* --- Support Bar --- */
.support-bar {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: .75rem 1rem;
  font-size: .85rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.support-bar a {
  color: white;
  font-weight: 600;
  text-decoration: underline;
}

/* --- Locked Module Overlay --- */
.module-card.locked {
  opacity: .6;
  pointer-events: none;
}

.module-card.locked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(248,250,252,.5);
  border-radius: var(--radius);
}

/* --- Overall Progress Bar (top of module pages) --- */
.module-progress {
  background: var(--bg-alt);
  padding: .75rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .85rem;
  color: var(--text-light);
}

.module-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.module-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #14B8A6, #7C3AED, #F59E0B);
  background-size: 200% 100%;
  animation: progressFill .8s ease, gradient-shift 4s ease infinite;
  border-radius: 4px;
  transition: width .5s ease;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .module-layout {
    grid-template-columns: 1fr;
  }

  .module-sidebar {
    position: relative;
    top: 0;
    height: auto;
    border-left: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
  }

  .modules-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .hero {
    padding: 2.5rem 1.5rem 2rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .module-content {
    padding: 1.5rem;
  }

  .lesson-nav {
    flex-direction: column;
  }

  .lesson-nav .btn {
    width: 100%;
    justify-content: center;
  }

  .certificate {
    padding: 2.5rem 1.5rem;
  }

  .certificate .cert-name {
    font-size: 1.8rem;
  }

  :root {
    --sidebar-width: 100%;
    --header-height: 60px;
  }
}

/* --- Mobile sidebar toggle --- */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
}

.sidebar-toggle:active {
  transform: scale(.9);
}

.sidebar-toggle svg {
  width: 22px;
  height: 22px;
  stroke: white;
  fill: none;
  stroke-width: 2;
}

/* Sidebar overlay (always in DOM, hidden by default) */
.sidebar-overlay {
  display: none;
}

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

  /* Sidebar lessons — bigger touch targets on mobile */
  .sidebar-lesson {
    padding: 1rem 1.5rem;
    min-height: 48px;
  }

  /* Sidebar — slide from right with transition */
  .module-sidebar {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    width: 280px;
    z-index: 98;
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform .3s ease;
    height: calc(100vh - var(--header-height));
    border-left: none;
  }

  .module-sidebar.open {
    transform: translateX(0);
  }

  /* Overlay */
  .sidebar-overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 97;
    animation: fadeIn .2s ease;
  }

  /* Lesson nav — primary action on top */
  .lesson-nav {
    flex-direction: column-reverse;
  }
}

/* --- Quiz Result --- */
.quiz-result {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: none;
}
.quiz-result.success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(5,150,105,.2);
}
.quiz-result.retry {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid rgba(220,38,38,.2);
}

/* --- "What you'll learn" grid (index) --- */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* --- Price note --- */
.price-note {
  text-align: center;
  margin-top: 1.5rem;
  padding: .75rem 1.5rem;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: #92400E;
  display: inline-block;
}

/* --- Testimonials Section --- */
.testimonials-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.testimonials-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--text);
}

.testimonials-subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.testimonial-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border-right: 4px solid var(--primary-light);
  transition: transform .2s ease, box-shadow .2s ease;
}

.testimonial-card:nth-child(1) { border-right-color: #5ABF92; background: linear-gradient(135deg, #f0faf5 0%, var(--card) 100%); }
.testimonial-card:nth-child(2) { border-right-color: #8B5CF6; background: linear-gradient(135deg, #f5f0ff 0%, var(--card) 100%); }
.testimonial-card:nth-child(3) { border-right-color: #E91E8C; background: linear-gradient(135deg, #fef0f7 0%, var(--card) 100%); }
.testimonial-card:nth-child(4) { border-right-color: #F59E0B; background: linear-gradient(135deg, #fffbf0 0%, var(--card) 100%); }

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

.testimonial-featured {
  grid-column: 1 / -1;
}

.testimonial-quote {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text);
}

.testimonial-featured .testimonial-quote {
  font-size: 1.1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.testimonial-name {
  font-weight: 600;
  color: var(--text);
  font-size: .9rem;
}

.testimonial-role {
  font-size: .85rem;
  color: var(--muted);
}

.testimonial-role::before {
  content: '·';
  margin-inline-end: .5rem;
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Audience Section --- */
.audience-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.audience-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .audience-grid {
    grid-template-columns: 1fr;
  }
}

.audience-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.audience-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audience-card:nth-child(1) .audience-icon { background: #E8F4FD; color: #4A7FB5; }
.audience-card:nth-child(2) .audience-icon { background: #F0E8F7; color: #8B5CF6; }
.audience-card:nth-child(3) .audience-icon { background: #FEF0F7; color: #E91E8C; }
.audience-card:nth-child(4) .audience-icon { background: #E6F7EE; color: #5ABF92; }
.audience-card:nth-child(5) .audience-icon { background: #FFF3E0; color: #F59E0B; }

.audience-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--text);
}

.audience-card p {
  font-size: .95rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* --- FAQ Section --- */
.faq-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.faq-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.faq-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary);
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-right: 1rem;
}

.faq-item:nth-child(1) summary::after { color: #4A7FB5; }
.faq-item:nth-child(2) summary::after { color: #5ABF92; }
.faq-item:nth-child(3) summary::after { color: #8B5CF6; }
.faq-item:nth-child(4) summary::after { color: #E91E8C; }
.faq-item:nth-child(5) summary::after { color: #F59E0B; }
.faq-item:nth-child(6) summary::after { color: #06B6D4; }

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  padding: 0 1.5rem 1.25rem;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-light);
}

/* --- Bottom CTA --- */
.bottom-cta {
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.bottom-cta h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}

.bottom-cta p {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* --- Trivia Quiz (Kahoot-style) --- */
.trivia-container {
  background: var(--card);
  border: 2px solid rgba(124,58,237,.15);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.trivia-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7C3AED, #14B8A6, #F59E0B);
}

.trivia-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.trivia-header h3 {
  background: linear-gradient(135deg, #7C3AED, #14B8A6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.trivia-progress {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.trivia-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  transition: background .3s, transform .3s;
}

.trivia-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

.trivia-dot.done {
  background: var(--success);
}

.trivia-question {
  display: none;
  animation: fadeInUp .4s ease;
}

.trivia-question.active {
  display: block;
}

.trivia-question p {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.trivia-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

@media (max-width: 480px) {
  .trivia-options { grid-template-columns: 1fr; }
}

.trivia-option {
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  transition: all .25s ease;
  background: var(--card);
}

.trivia-option:hover {
  border-color: var(--primary-light);
  background: rgba(124,58,237,.04);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.trivia-option.correct {
  border-color: var(--success);
  background: var(--success-light);
  animation: pulse-success .5s ease;
}

.trivia-option.incorrect {
  border-color: var(--rose);
  background: #FEF2F2;
  animation: shake .4s ease;
}

.trivia-option.disabled {
  pointer-events: none;
  opacity: .6;
}

@keyframes pulse-success {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.trivia-feedback {
  text-align: center;
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity .3s;
}

.trivia-feedback.visible {
  opacity: 1;
}

.trivia-feedback.correct { color: var(--success); }
.trivia-feedback.incorrect { color: var(--rose); }

.trivia-score {
  text-align: center;
  padding: 2rem;
  display: none;
}

.trivia-score.visible {
  display: block;
  animation: scaleIn .5s ease;
}

.trivia-score .score-number {
  font-family: 'Secular One', sans-serif;
  font-size: 3rem;
  background: linear-gradient(135deg, #7C3AED, #14B8A6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Confetti animation --- */
@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-fall 2.5s ease-out forwards;
  pointer-events: none;
}

/* --- Task Submission Block --- */
.task-submission {
  background: linear-gradient(135deg, rgba(124,58,237,.03), rgba(20,184,166,.03));
  border: 2px solid rgba(124,58,237,.12);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}

.task-submission h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.task-time {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent-light);
  color: #92400E;
  padding: .4rem 1rem;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.task-checklist {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: 1rem 0;
}

.task-check-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.task-check-item:hover {
  border-color: var(--primary-light);
}

.task-check-item.checked {
  border-color: var(--success);
  background: var(--success-light);
}

.task-check-item input[type="checkbox"] {
  accent-color: var(--success);
  width: 18px;
  height: 18px;
}

.task-url-input {
  width: 100%;
  padding: .75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', 'Heebo', sans-serif;
  font-size: .95rem;
  direction: ltr;
  text-align: left;
  margin-top: .75rem;
  transition: border-color .2s;
}

.task-url-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}

.task-url-input::placeholder {
  color: var(--muted);
}

.task-complete-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  padding: .75rem 2rem;
  background: linear-gradient(135deg, #7C3AED, #14B8A6);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Heebo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
}

.task-complete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(124,58,237,.3);
}

.task-complete-btn:disabled {
  opacity: .5;
  pointer-events: none;
}

/* --- Resource Links Section --- */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(124,58,237,.2);
}

.resource-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.resource-icon.purple { background: rgba(124,58,237,.1); color: #7C3AED; }
.resource-icon.teal { background: rgba(20,184,166,.1); color: #14B8A6; }
.resource-icon.gold { background: rgba(245,158,11,.1); color: #F59E0B; }
.resource-icon.blue { background: rgba(59,130,246,.1); color: #3B82F6; }

.resource-icon svg {
  width: 20px;
  height: 20px;
}

.resource-title {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
}

.resource-desc {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* --- Print (for certificate) --- */
@media print {
  .course-header, .course-footer, .lesson-nav, .btn, .sidebar-toggle {
    display: none !important;
  }

  .certificate {
    box-shadow: none;
    border-width: 2px;
  }

  body {
    background: white;
  }
}
