/* ==========================================================================
   JOLLY ACADEMY - PLATAFORMA DE CURSOS LMS
   Estilos CSS Modernos & Multimedia (Vanilla CSS)
   Identidad Corporativa Oficial: Novelda (Alicante)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Baloo+2:wght@600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* Jolly Academy Brand Colors */
  --primary: #0084c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --primary-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-light: #fef3c7;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

  --success: #10b981;
  --success-dark: #059669;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
  
  --dark: #0f172a;
  --dark-surface: #1e293b;
  --dark-border: #334155;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-brand: 0 10px 20px -5px rgba(0, 132, 199, 0.35);
  --shadow-glow: 0 0 30px rgba(2, 132, 199, 0.2);

  /* Radius & Transitions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Baloo 2', 'Plus Jakarta Sans', sans-serif;
  color: var(--dark);
  line-height: 1.25;
  font-weight: 700;
}

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

a:hover {
  color: var(--primary-dark);
}

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

/* Top Information Header */
.top-bar {
  background-color: #f1f5f9;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 7px 0;
  position: relative;
  z-index: 1001;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-info-list {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.top-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-info-item svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
  fill: currentColor;
}

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

/* Main Navigation Bar */
.main-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1240px;
  margin: 0 auto;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.brand-logo-link:hover .brand-logo-img {
  transform: scale(1.03);
}

.logo-fallback {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  text-decoration: none;
}
.logo-fallback .logo-jolly { color: #0284c7; }
.logo-fallback .logo-academy { color: #f59e0b; margin-left: 4px; font-weight: 700; font-size: 1.4rem; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  padding: 8px 4px;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition);
}

.social-btn.facebook { background: #1877f2; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-btn.youtube { background: #ff0000; }
.social-btn:hover { transform: translateY(-2px); opacity: 0.9; }

.social-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Custom Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

.btn-accent {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: #f1f5f9;
  color: var(--dark);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.84rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 55%, #0c4a6e 100%);
  color: #ffffff;
  padding: 70px 0 90px 0;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 243, 199, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-title {
  color: #ffffff;
  font-size: 3rem;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #e0f2fe;
  margin-bottom: 28px;
  max-width: 580px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 24px;
}

.stat-item h4 {
  color: #fef08a;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.stat-item p {
  color: #bae6fd;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Wave Dividers */
.wave-divider {
  overflow: hidden;
  position: relative;
  line-height: 0;
  width: 100%;
  margin-top: -1px;
}

.wave-divider svg {
  display: block;
  width: calc(100% + 1.3px);
  height: 48px;
}

.wave-divider .wave-fill {
  fill: #0c4a6e;
}

/* Course Grid Section */
.section-title-wrap {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 30px auto;
}

.section-badge {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.2rem;
  color: var(--dark);
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Filter buttons */
.filter-tabs-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.filter-tab-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 132, 199, 0.25);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

/* Course Card */
.course-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: #cbd5e1;
}

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--accent);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.course-thumbnail-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #0f172a;
}

.course-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.course-card:hover .course-thumbnail {
  transform: scale(1.06);
}

.course-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-level-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.course-card-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.course-card-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

.course-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
  fill: currentColor;
}

.course-progress-bar-container {
  width: 100%;
  background: #e2e8f0;
  height: 8px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 14px;
}

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

/* ==========================================================================
   LMS COURSE PLAYER LAYOUT
   ========================================================================== */
.lms-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: calc(100vh - 120px);
  background: #ffffff;
}

.lms-sidebar {
  background: #f8fafc;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 65px);
  position: sticky;
  top: 65px;
  overflow-y: auto;
}

.lms-sidebar-header {
  padding: 22px;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}

.lms-course-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--dark);
}

.lms-progress-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.lms-curriculum-list {
  padding: 8px 0;
  list-style: none;
}

.lms-module-item {
  border-bottom: 1px solid #f1f5f9;
}

.lms-module-header {
  padding: 14px 20px;
  background: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  border-left: 4px solid transparent;
  transition: var(--transition);
}

.lms-module-header:hover {
  background: #f1f5f9;
  border-left-color: var(--primary);
}

.lms-module-header.expanded {
  background: #e2e8f0;
  border-left-color: var(--accent);
}

.lms-lesson-list {
  list-style: none;
  background: #f8fafc;
}

.lms-lesson-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 28px;
  color: var(--text-main);
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.lms-lesson-link:hover {
  background: #ffffff;
  color: var(--primary);
  padding-left: 32px;
}

.lms-lesson-link.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  border-left: 4px solid var(--primary);
}

.lesson-status-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  transition: var(--transition);
}

.lms-lesson-link.completed .lesson-status-icon {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.lesson-status-icon svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* LMS Content Main Area */
.lms-content-area {
  padding: 40px 50px;
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}

.lms-lesson-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.lesson-breadcrumb {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.lesson-breadcrumb span {
  color: var(--primary);
}

.lesson-main-title {
  font-size: 2.3rem;
  margin-bottom: 24px;
  color: var(--dark);
}

/* ==========================================================================
   MULTIMEDIA SUITE: VIDEO PLAYER INTERACTIVO
   ========================================================================== */
.multimedia-player-card {
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin-bottom: 36px;
  border: 1px solid var(--dark-border);
}

.video-screen {
  aspect-ratio: 16 / 9;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1e293b 0%, #0a0f1d 100%);
  color: #ffffff;
  overflow: hidden;
}

.video-watermark {
  position: absolute;
  top: 18px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fef08a;
  z-index: 5;
}

.video-watermark .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse 1.5s infinite;
}

.video-big-play {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 35px rgba(2, 132, 199, 0.7);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
  z-index: 5;
}

.video-big-play:hover {
  transform: scale(1.12);
  background: var(--accent);
}

.video-big-play svg {
  width: 32px;
  height: 32px;
  margin-left: 4px;
  fill: currentColor;
}

/* Video Custom Controls Bar */
.video-controls-bar {
  background: #090d16;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #1e293b;
}

.video-scrubber-track {
  width: 100%;
  height: 6px;
  background: #334155;
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: height 0.15s ease;
}

.video-scrubber-track:hover {
  height: 8px;
}

.video-scrubber-fill {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  height: 100%;
  width: 38%;
  border-radius: var(--radius-full);
  position: relative;
}

.video-scrubber-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.video-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #cbd5e1;
  font-size: 0.86rem;
}

.video-ctrl-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.video-icon-btn {
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  padding: 4px;
  border-radius: 6px;
}

.video-icon-btn:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
}

.video-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.speed-badge {
  background: #1e293b;
  color: #94a3b8;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.speed-badge:hover { color: #ffffff; }

/* Video Chapters Panel */
.video-chapters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #111827;
  overflow-x: auto;
  border-top: 1px solid #1f2937;
}

.chapter-pill {
  white-space: nowrap;
  padding: 4px 12px;
  background: #1f2937;
  color: #9ca3af;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.chapter-pill:hover, .chapter-pill.active {
  background: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   MULTIMEDIA SUITE: AUDIO LISTENING LAB (CAMBRIDGE B1)
   ========================================================================== */
.listening-lab-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  border: 2px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 32px 0;
  box-shadow: var(--shadow-md);
  position: relative;
}

.listening-lab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.listening-tag {
  background: #0284c7;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.audio-waveform-visualizer {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  margin: 16px 0;
}

.wave-bar {
  width: 4px;
  background: #0284c7;
  border-radius: var(--radius-full);
  transition: height 0.2s ease;
  animation: waveDance 1.2s infinite ease-in-out;
}

@keyframes waveDance {
  0%, 100% { height: 8px; }
  50% { height: 36px; }
}

.listening-controls-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.audio-speed-toggle {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.listening-transcript-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 18px;
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
  line-height: 1.7;
}

.transcript-phrase {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.transcript-phrase:hover {
  background: #fef3c7;
}

.transcript-phrase.active {
  background: #fef08a;
  font-weight: 700;
}

/* ==========================================================================
   SPEAKING EXAM LAB: 60-SEC PICTURE DESCRIPTION
   ========================================================================== */
.speaking-lab-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 32px 0;
  box-shadow: var(--shadow-md);
}

.speaking-timer-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--dark);
  text-align: center;
  margin: 16px 0;
}

.speaking-timer-display.running {
  color: #0284c7;
  animation: pulse 1s infinite;
}

.speaking-mic-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
  transition: transform 0.25s ease;
}

.speaking-mic-btn:hover {
  transform: scale(1.08);
}

.speaking-mic-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* ==========================================================================
   WRITING ASSISTANT LAB (CAMBRIDGE 100-WORD EMAIL)
   ========================================================================== */
.writing-lab-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 32px 0;
  box-shadow: var(--shadow-sm);
}

.word-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  background: #f1f5f9;
  color: var(--text-muted);
}

.word-count-badge.target-met {
  background: var(--success-light);
  color: #065f46;
}

.connector-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.connector-chip {
  padding: 4px 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.connector-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* ==========================================================================
   VOCABULARY MATCHING GAME (INTERACTIVO)
   ========================================================================== */
.matching-game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.match-item-btn {
  background: #f8fafc;
  border: 2px solid var(--border-color);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.match-item-btn:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.match-item-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.match-item-btn.matched {
  border-color: var(--success);
  background: var(--success-light);
  color: #065f46;
  opacity: 0.8;
  cursor: default;
}

/* Flashcards 3D Interactive Component */
.flashcards-container {
  margin: 30px 0;
}

.flashcard {
  perspective: 1000px;
  width: 100%;
  max-width: 540px;
  height: 260px;
  margin: 0 auto 20px auto;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px;
}

.flashcard-front {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 2px solid #38bdf8;
}

.flashcard-back {
  background: #ffffff;
  color: var(--dark);
  transform: rotateY(180deg);
  border: 2px solid #f59e0b;
}

.flashcard-word {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.flashcard-hint {
  font-size: 0.85rem;
  opacity: 0.85;
}

.flashcard-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

/* Interactive Quiz Component */
.quiz-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 32px 0;
  box-shadow: var(--shadow-sm);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.quiz-progress-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

.quiz-question-title {
  font-size: 1.25rem;
  margin-bottom: 20px;
  color: var(--dark);
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  list-style: none;
}

.quiz-option-btn {
  background: #f8fafc;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  text-align: left;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.quiz-option-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.quiz-option-btn.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

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

.quiz-option-btn.wrong {
  background: var(--danger-light);
  border-color: var(--danger);
  color: #991b1b;
}

.quiz-feedback-box {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.92rem;
  display: none;
}

.quiz-feedback-box.correct {
  display: block;
  background: var(--success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.quiz-feedback-box.wrong {
  display: block;
  background: var(--danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Grammar Cards */
.grammar-card {
  background: #ffffff;
  border: 2px solid #e0f2fe;
  border-left: 6px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.grammar-card h4 {
  color: var(--primary-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.example-box {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 10px 0;
  font-family: inherit;
  border-left: 3px solid var(--accent);
}

.example-en {
  font-weight: 700;
  color: var(--dark);
}

.example-es {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.92rem;
}

/* Downloadable Resources Box */
.resources-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 28px 0;
}

.resources-box h4 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 10px;
}

.resource-item:last-child {
  margin-bottom: 0;
}

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

.resource-icon {
  color: #ef4444;
  width: 24px;
  height: 24px;
}

/* Bottom Lesson Navigation Bar */
.lms-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
}

/* Student Dashboard Styles */
.dashboard-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  margin: 40px 0;
}

.profile-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 30px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  border: 3px solid var(--primary);
}

.profile-name {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.profile-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-hover);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

/* Badges Showcase */
.badges-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.badge-item {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 14px 10px;
  border-radius: var(--radius-md);
  text-align: center;
}

.badge-icon {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.badge-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dark);
}

/* Footer Section */
.main-footer {
  background: #0f172a;
  color: #94a3b8;
  margin-top: auto;
  position: relative;
}

.footer-top-wave {
  overflow: hidden;
  position: relative;
  line-height: 0;
}

.footer-top-wave svg {
  display: block;
  width: calc(100% + 1.3px);
  height: 40px;
}

.footer-top-wave path {
  fill: var(--bg-page);
}

.footer-content {
  padding: 60px 0 40px 0;
}

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

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

.footer-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-col-title {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 18px;
  position: relative;
}

.footer-col-title::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--accent);
  margin-top: 6px;
}

.footer-links {
  list-style: none;
}

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

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.certificate-card {
  background: #ffffff;
  width: 100%;
  max-width: 820px;
  border-radius: var(--radius-lg);
  padding: 44px;
  border: 10px solid #0284c7;
  outline: 4px solid #f59e0b;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

/* Keyframes */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle {
    margin: 0 auto 28px auto;
  }
  .hero-buttons, .hero-stats {
    justify-content: center;
  }
  .lms-layout {
    grid-template-columns: 1fr;
  }
  .lms-sidebar {
    height: auto;
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .studio-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu, .top-bar {
    display: none;
  }
  .lms-content-area {
    padding: 20px 16px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .matching-game-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   JOLLY COURSE STUDIO - PANEL DOCENTE & CREADOR VISUAL
   ========================================================================== */
.studio-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}

.studio-top-bar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.studio-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.studio-status-badge.unsaved {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.studio-sidebar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
}

.studio-sidebar-header {
  padding: 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.studio-tree-container {
  overflow-y: auto;
  padding: 12px;
  flex-grow: 1;
}

.studio-module-block {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.studio-module-header {
  padding: 10px 14px;
  background: #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
}

.studio-module-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.studio-lesson-list {
  list-style: none;
  padding: 6px;
}

.studio-lesson-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
}

.studio-lesson-item:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.studio-lesson-item.is-active {
  background: #e0f2fe;
  border-color: #0284c7;
  box-shadow: 0 0 0 1px #0284c7;
}

.studio-lesson-item.is-active .lesson-tree-title {
  color: #0369a1;
  font-weight: 700;
}

.lesson-tree-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.lesson-tree-title {
  font-size: 0.84rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.studio-main-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
}

/* Tabs Navigation */
.studio-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.studio-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.studio-tab-btn:hover {
  color: var(--primary);
  background: #f8fafc;
  border-radius: 8px 8px 0 0;
}

.studio-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #f0f9ff;
  border-radius: 8px 8px 0 0;
}

/* Editor quick toolbar */
.editor-quick-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.toolbar-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.toolbar-btn:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

/* Multimedia Sections */
.media-setup-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 20px;
}

.media-setup-card h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quiz questions builder */
.quiz-q-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.quiz-opt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* Flashcards builder */
.flashcard-editor-card {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr auto;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  align-items: center;
}

/* Resource row */
.resource-editor-card {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr auto;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  align-items: center;
}

