/* Modern Learn/Courses Pages Redesign */

/* =============================================
   LEARN PAGE MAGAZINE LAYOUT
   ============================================= */

/* Magazine Hero Grid */
.learn-magazine-hero {
  margin-bottom: 40px;
}

.learn-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* Featured Course Slideshow */
.featured-course-slideshow {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}

.course-slideshow-container {
  position: relative;
  height: 420px;
}

.course-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.course-slide.active {
  opacity: 1;
  z-index: 1;
}

.course-slide-link {
  display: block;
  height: 100%;
}

.course-slide-image {
  position: relative;
  width: 100%;
  height: 100%;
}

.course-slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s ease-out;
}

.course-slide.active .course-slide-image img {
  transform: scale(1.05);
}

.course-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}

.course-slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
  margin-bottom: 12px;
}

.course-slide-price {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  background: #fbbf24;
  color: #78350f;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
}

.course-slide-price.free {
  background: #10b981;
  color: #fff;
}

.course-slide-content {
  color: #fff;
}

.course-slide-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  opacity: 0.9;
}

.course-slide-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.course-slide-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.3;
}

.course-slide-summary {
  font-size: 0.95rem;
  opacity: 0.85;
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 500px;
}

.course-slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #fff;
  color: #667eea;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.course-slide-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Slideshow Controls */
.course-slide-btn-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 5;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-slide-btn-nav:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-50%) scale(1.1);
}

.course-slide-btn-nav.prev {
  left: 16px;
}

.course-slide-btn-nav.next {
  right: 16px;
}

.course-slide-dots {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.course-slide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.course-slide-dot.active {
  background: #fff;
  width: 28px;
  border-radius: 5px;
}

.course-slide-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,0.2);
  z-index: 5;
}

.course-slide-progress-bar {
  height: 100%;
  background: #fff;
  width: 0;
}

/* New Courses Section (Right Side) */
.new-courses-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.new-courses-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text, #1a202c);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.new-courses-title i {
  color: #f59e0b;
}

.new-courses-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.new-course-card {
  background: var(--card, #fff);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  flex: 1;
}

.new-course-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.new-course-link {
  display: flex;
  height: 100%;
  text-decoration: none;
}

.new-course-image {
  position: relative;
  flex: 0 0 100px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.new-course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.new-course-price {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 8px;
  background: #fbbf24;
  color: #78350f;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
}

.new-course-price.free {
  background: #10b981;
  color: #fff;
}

.new-course-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.new-course-level {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand, #667eea);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.new-course-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text, #1a202c);
  margin: 0 0 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.new-course-meta {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
  display: flex;
  align-items: center;
  gap: 4px;
}

.new-course-meta i {
  color: var(--brand, #667eea);
}

/* Category Navigation */
.learn-category-nav {
  background: var(--card, #fff);
  border-radius: 16px;
  padding: 16px 24px;
  margin-bottom: 36px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.learn-category-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.learn-category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.learn-category-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--bg, #f1f5f9);
  color: var(--text, #475569);
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.learn-category-tab:hover,
.learn-category-tab.active {
  background: var(--brand, #667eea);
  color: #fff;
}

.learn-category-tab .level-count {
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
}

.learn-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.learn-search-compact {
  position: relative;
  display: flex;
  align-items: center;
}

.learn-search-compact i {
  position: absolute;
  left: 12px;
  color: var(--muted, #64748b);
}

.learn-search-compact input {
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 0.9rem;
  width: 200px;
  background: var(--bg, #fff);
  color: var(--text, #1a202c);
  transition: all 0.3s ease;
}

.learn-search-compact input:focus {
  outline: none;
  border-color: var(--brand, #667eea);
  width: 280px;
}

.learn-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card, #fff);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  margin-top: 8px;
  z-index: 1000;
  display: none;
}

.learn-sort-dropdown select {
  padding: 10px 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 0.9rem;
  background: var(--bg, #fff);
  color: var(--text, #1a202c);
  cursor: pointer;
}

/* Main Content Area */
.learn-magazine-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  margin-bottom: 60px;
}

.learn-content-main {
  min-width: 0;
}

/* Trending Section */
.learn-trending-section {
  margin-bottom: 40px;
}

.learn-section-header {
  margin-bottom: 20px;
}

.learn-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text, #1a202c);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.learn-section-title i {
  color: var(--brand, #667eea);
}

.learn-section-title i.bi-fire {
  color: #f59e0b;
}

.learn-section-subtitle {
  font-size: 0.95rem;
  color: var(--muted, #64748b);
  margin: 0;
}

.learn-trending-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.learn-trending-card {
  background: var(--card, #fff);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.learn-trending-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.trending-course-link {
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
}

.trending-course-link:hover {
  color: inherit;
}

.trending-course-image {
  position: relative;
  padding-top: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  pointer-events: none;
}

.trending-course-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.trending-course-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--brand, #667eea);
  pointer-events: none;
}

.trending-course-price {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  background: #fbbf24;
  color: #78350f;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  pointer-events: none;
}

.trending-course-price.free {
  background: #10b981;
  color: #fff;
}

.trending-course-content {
  padding: 10px;
  pointer-events: none;
}

.trending-course-level {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--brand, #667eea);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trending-course-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text, #1a202c);
  margin: 4px 0 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-course-meta {
  display: flex;
  gap: 10px;
  font-size: 0.7rem;
  color: var(--muted, #64748b);
}

.trending-course-meta i {
  color: var(--brand, #667eea);
  font-size: 0.65rem;
}

/* Courses Section */
.learn-courses-section .learn-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.courses-count {
  font-size: 0.9rem;
  color: var(--muted, #64748b);
  background: var(--bg, #f1f5f9);
  padding: 4px 12px;
  border-radius: 12px;
}

.view-toggle {
  display: flex;
  gap: 6px;
}

.view-toggle .view-btn {
  padding: 8px 12px;
  background: var(--bg, #f1f5f9);
  border: none;
  border-radius: 8px;
  color: var(--muted, #64748b);
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-toggle .view-btn.active,
.view-toggle .view-btn:hover {
  background: var(--brand, #667eea);
  color: #fff;
}

/* Courses Grid */
.learn-courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.learn-courses-grid.list-view {
  grid-template-columns: 1fr;
}

.learn-course-card {
  background: var(--card, #fff);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

.learn-course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.course-card-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.course-card-image {
  position: relative;
  padding-top: 56%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.course-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card-price {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 12px;
  background: #fbbf24;
  color: #78350f;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.course-card-price.free {
  background: #10b981;
  color: #fff;
}

.course-card-level {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  color: #fff;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.course-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #1a202c);
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-summary {
  font-size: 0.85rem;
  color: var(--muted, #64748b);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.course-card-footer {
  margin-top: auto;
}

.course-card-stats {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--muted, #64748b);
  padding-top: 12px;
  border-top: 1px solid var(--border, #e2e8f0);
}

.course-card-stats i {
  color: var(--brand, #667eea);
}

.course-card-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.course-tag {
  padding: 3px 10px;
  background: var(--bg, #f1f5f9);
  color: var(--muted, #64748b);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
}

/* List View */
.learn-courses-grid.list-view .course-card-link {
  flex-direction: row;
}

.learn-courses-grid.list-view .course-card-image {
  flex: 0 0 200px;
  padding-top: 0;
  height: 140px;
}

.learn-courses-grid.list-view .course-card-body {
  justify-content: center;
}

.learn-courses-grid.list-view .course-card-title {
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

/* No Courses Message */
.no-courses-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--card, #fff);
  border-radius: 16px;
}

.no-courses-message i {
  font-size: 3rem;
  color: var(--muted, #64748b);
  margin-bottom: 16px;
}

.no-courses-message h3 {
  font-size: 1.3rem;
  color: var(--text, #1a202c);
  margin: 0 0 8px;
}

.no-courses-message p {
  color: var(--muted, #64748b);
  margin-bottom: 20px;
}

.btn-reset {
  display: inline-block;
  padding: 10px 24px;
  background: var(--brand, #667eea);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

/* Sidebar */
.learn-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.learn-sidebar-widget {
  background: var(--card, #fff);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.learn-sidebar-widget .widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #1a202c);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.learn-sidebar-widget .widget-title i {
  color: var(--brand, #667eea);
}

/* Stats Widget */
.stats-widget .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stats-widget .stat-item {
  text-align: center;
  padding: 16px 12px;
  background: var(--bg, #f8fafc);
  border-radius: 12px;
}

.stats-widget .stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand, #667eea);
}

.stats-widget .stat-label {
  font-size: 0.8rem;
  color: var(--muted, #64748b);
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-tag {
  padding: 6px 14px;
  background: var(--bg, #f1f5f9);
  color: var(--text, #475569);
  border-radius: 14px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.sidebar-tag:hover {
  background: var(--brand, #667eea);
  color: #fff;
}

/* CTA Widget */
.cta-widget {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.cta-widget .cta-icon {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.cta-widget .cta-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.cta-widget .cta-text {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.5;
  margin-bottom: 16px;
}

.cta-widget .cta-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #fff;
  color: #667eea;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.cta-widget .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Newsletter Widget */
.newsletter-widget .newsletter-icon {
  width: 50px;
  height: 50px;
  background: var(--bg, #f1f5f9);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--brand, #667eea);
  margin-bottom: 16px;
}

.newsletter-widget .newsletter-text {
  font-size: 0.9rem;
  color: var(--muted, #64748b);
  margin-bottom: 16px;
  line-height: 1.5;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-input {
  padding: 12px 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 0.9rem;
  background: var(--bg, #fff);
  color: var(--text, #1a202c);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--brand, #667eea);
}

.newsletter-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

/* Responsive */
@media (max-width: 1200px) {
  .learn-trending-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .learn-courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .learn-hero-grid {
    grid-template-columns: 1fr;
  }
  
  .new-courses-section {
    display: none;
  }
  
  .learn-magazine-content {
    grid-template-columns: 1fr;
  }
  
  .learn-sidebar {
    position: relative;
    top: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .learn-sidebar-widget {
    margin-bottom: 0;
  }
  
  .course-slideshow-container {
    height: 360px;
  }
}

@media (max-width: 768px) {
  .learn-category-inner {
    flex-direction: column;
    align-items: stretch;
  }
  
  .learn-category-tabs {
    overflow-x: auto;
    padding-bottom: 8px;
  }
  
  .learn-nav-actions {
    justify-content: space-between;
  }
  
  .learn-search-compact input {
    width: 100%;
  }
  
  .learn-search-compact input:focus {
    width: 100%;
  }
  
  .learn-trending-grid,
  .learn-courses-grid {
    grid-template-columns: 1fr;
  }
  
  .learn-sidebar {
    grid-template-columns: 1fr;
  }
  
  .course-slideshow-container {
    height: 320px;
  }
  
  .course-slide-summary {
    display: none;
  }
  
  .course-slide-overlay {
    padding: 24px;
  }
  
  .learn-courses-grid.list-view .course-card-link {
    flex-direction: column;
  }
  
  .learn-courses-grid.list-view .course-card-image {
    flex: none;
    padding-top: 56%;
    height: auto;
  }
}

/* =============================================
   END MAGAZINE LAYOUT
   ============================================= */

/* Container fix for learn pages */
main.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Main content areas for sidebar layout */
.course-main-area,
.lesson-main-area,
.chapter-main-area,
.quiz-main-area {
  padding: 0 20px;
  max-width: 100%;
  overflow-x: hidden;
}

/* Learn Hero */
.learn-hero-modern {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 36px 24px;
  margin-bottom: 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.learn-hero-modern::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.learn-hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.learn-hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.learn-hero-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.2;
}

.learn-hero-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.95;
  margin-bottom: 24px;
}

.learn-search-modern {
  margin-bottom: 24px;
}

.learn-search-wrapper {
  position: relative;
  max-width: 500px;
}

.learn-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #667eea;
  font-size: 1rem;
  z-index: 1;
}

.learn-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.learn-search-input:focus {
  outline: none;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  background: #fff;
}

.learn-search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  margin-top: 8px;
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.learn-search-suggestions a {
  display: block;
  padding: 16px 20px;
  color: #1a202c;
  text-decoration: none;
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.2s ease;
}

.learn-search-suggestions a:hover {
  background: #f8f9fa;
}

.learn-filters-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filters-label {
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 500;
}

.filters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip-modern {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-chip-modern:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.filter-chip-modern.active {
  background: #fff;
  color: #667eea;
  border-color: #fff;
}

/* Courses Sections */
.courses-section-modern {
  margin-bottom: 60px;
}

.section-header-modern {
  margin-bottom: 32px;
}

.section-title-modern {
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
}

.section-description-modern {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
}

.courses-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.trending-courses {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Course Cards - Reuse from home.css */
.course-card-modern {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.course-card-modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.course-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.course-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.course-card-modern:hover .course-image {
  transform: scale(1.1);
}

.course-overlay {
  position: absolute;
  inset: 0;
  background: rgba(102, 126, 234, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.course-card-modern:hover .course-overlay {
  opacity: 1;
}

.btn-overlay {
  padding: 12px 28px;
  background: #fff;
  color: #667eea;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s ease;
}

.btn-overlay:hover {
  transform: scale(1.05);
  color: #667eea;
}

.course-badge-price,
.course-badge-free {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 2;
}

.course-badge-price {
  background: #fbbf24;
  color: #78350f;
}

.course-badge-free {
  background: #10b981;
  color: #fff;
}

.course-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 12px;
  line-height: 1.4;
}

.course-summary {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 20px;
  flex: 1;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.course-enrollments,
.course-level {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 0.9rem;
}

.course-enrollments i,
.course-level i {
  color: #667eea;
}

.btn-course-action {
  padding: 8px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.btn-course-action:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  color: #fff;
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag-modern {
  padding: 4px 12px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Individual Course Page */
.course-hero-modern {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 24px;
  padding: 60px 40px;
  margin-bottom: 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.course-hero-modern::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.course-hero-content {
  position: relative;
  z-index: 1;
}

.course-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin: 0 0 20px;
  line-height: 1.3;
}

.course-hero-description {
  font-size: 1.2rem;
  line-height: 1.7;
  opacity: 0.95;
  margin-bottom: 24px;
}

.course-tags-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.course-tag-badge {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}

.course-badges-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge-level-modern,
.badge-paid-modern,
.badge-free-modern {
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.badge-level-modern {
  background: rgba(255, 193, 7, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #fff;
}

.badge-paid-modern {
  background: rgba(255, 87, 34, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 87, 34, 0.3);
  color: #fff;
}

.badge-free-modern {
  background: rgba(16, 185, 129, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #fff;
}

/* Progress Container */
.progress-container-modern {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 40px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.progress-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0;
}

.progress-percentage {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.progress-bar-modern {
  height: 12px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  transition: width 0.6s ease;
}

.progress-text {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-text i {
  color: #667eea;
}

/* Chapters Section */
.chapters-section-modern {
  margin-bottom: 60px;
}

.chapters-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
}

.chapter-card-modern {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  display: flex;
  gap: 20px;
  border-left: 4px solid transparent;
}

.chapter-card-modern:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-left-color: #667eea;
}

.chapter-number {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}

.chapter-content {
  flex: 1;
}

.chapter-card-modern .chapter-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 12px;
}

.chapter-summary {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.7;
  margin: 0 0 20px;
}

.btn-chapter-action {
  padding: 10px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.btn-chapter-action:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  color: #fff;
}

/* Responsive */
@media (max-width: 992px) {
  .chapters-grid-modern {
    grid-template-columns: 1fr;
  }
}

/* Chapter & Lesson Page Styles - Modern Redesign */

/* Breadcrumb */
.breadcrumb-modern {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.breadcrumb-modern a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-modern a:hover {
  color: #fff;
}

.breadcrumb-modern i {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
}

/* Chapter Hero */
.chapter-hero-modern {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 50px 40px;
  border-radius: 20px;
  color: #fff;
  margin-bottom: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.chapter-title-modern {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  margin: 0;
  line-height: 1.3;
}

/* Lesson Hero */
.lesson-hero-modern {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 50px 40px;
  border-radius: 20px;
  color: #fff;
  margin-bottom: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.lesson-title-modern {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  margin: 0;
  line-height: 1.3;
}

/* Content Area */
.content-area-modern {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 32px;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #1a202c;
}

.post-content h2,
.post-content h3 {
  margin-top: 40px;
  margin-bottom: 20px;
  color: #1a202c;
  font-weight: 700;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 32px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.post-content pre {
  background: #1a202c;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.post-content code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #667eea;
}

.post-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* TOC Box */
.toc-box-modern {
  background: #f8f9fa;
  padding: 24px;
  border-radius: 16px;
  border-left: 4px solid #667eea;
  margin-bottom: 32px;
}

.toc-box-modern strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 16px;
}

.toc-box-modern ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-box-modern li {
  margin-bottom: 8px;
}

.toc-box-modern a {
  color: #475569;
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  padding: 4px 0;
}

.toc-box-modern a:hover {
  color: #667eea;
}

/* Video Container */
.video-container-modern {
  margin-bottom: 32px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.video-frame-modern {
  width: 100%;
  height: 500px;
  border: none;
  display: block;
}

/* Lesson Navigation */
.lesson-navigation-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid #e2e8f0;
  flex-wrap: wrap;
}

.btn-nav-prev,
.btn-nav-next,
.btn-nav-quiz {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-nav-prev {
  background: #f8f9fa;
  color: #475569;
  border: 2px solid #e2e8f0;
}

.btn-nav-prev:hover {
  background: #e2e8f0;
  color: #1a202c;
  transform: translateX(-4px);
}

.btn-nav-next {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
}

.btn-nav-next:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
  color: #fff;
}

.btn-nav-quiz {
  background: #10b981;
  color: #fff;
  border: none;
}

.btn-nav-quiz:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  color: #fff;
}

/* Lesson Sidebar */
.lesson-sidebar-modern {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 100px;
}

.sidebar-title-modern {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 20px;
}

.sidebar-subtitle-modern {
  font-size: 1rem;
  font-weight: 600;
  color: #1a202c;
  margin: 24px 0 16px;
}

.btn-complete-modern {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-complete-modern:not(.completed) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.btn-complete-modern:not(.completed):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-complete-modern.completed {
  background: #10b981;
  color: #fff;
  cursor: not-allowed;
}

.sidebar-divider {
  margin: 24px 0;
  border-color: #e2e8f0;
}

.sidebar-links-modern {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-links-modern li {
  margin-bottom: 12px;
}

.sidebar-links-modern a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475569;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.sidebar-links-modern a:hover {
  background: #f8f9fa;
  color: #667eea;
  transform: translateX(4px);
}

.sidebar-links-modern a i {
  color: #667eea;
}

/* Chapter Navigation Buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid #e2e8f0;
  flex-wrap: wrap;
}

.nav-buttons .btn {
  min-width: 140px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .learn-hero-modern,
  .course-hero-modern {
    padding: 40px 24px;
    border-radius: 16px;
  }

  .learn-hero-title,
  .course-hero-title {
    font-size: 2rem;
  }

  .courses-grid-modern {
    grid-template-columns: 1fr;
  }

  .chapter-card-modern {
    flex-direction: column;
    text-align: center;
  }

  .chapter-number {
    margin: 0 auto;
  }
  
  .chapter-hero-modern,
  .lesson-hero-modern {
    padding: 40px 24px;
  }
  
  .content-area-modern {
    padding: 32px 24px;
  }
  
  .video-frame-modern {
    height: 400px;
  }
  
  .lesson-sidebar-modern {
    position: relative;
    top: 0;
    margin-top: 32px;
  }
  
  .video-frame-modern {
    height: 300px;
  }
  
  .lesson-navigation-modern {
    flex-direction: column;
  }
  
  .btn-nav-prev,
  .btn-nav-next,
  .btn-nav-quiz {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   COURSE OVERVIEW PAGE STYLES
   ============================================ */

/* Course Hero */
.course-hero {
  background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 70%, #000) 100%);
  padding: 32px 0;
  color: #fff;
}

.course-hero-content {
  max-width: 720px;
}

.course-hero .badge {
  font-size: 0.7rem;
  padding: 4px 10px;
  font-weight: 500;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
}

.course-hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.course-hero-desc {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 16px;
  line-height: 1.5;
}

.course-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  opacity: 0.85;
}

.course-hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.course-hero-meta i {
  font-size: 0.75rem;
}

/* Course Content Layout */
.course-content-section {
  padding: 24px 0 40px;
  background: var(--bg);
}

.course-main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Course Cards */
.course-content-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.course-content-card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.course-content-card h2 i {
  color: var(--brand);
  font-size: 0.9rem;
}

/* Course Description */
.course-description-text {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
}

.course-description-text p {
  margin-bottom: 10px;
}

.course-description-text p:last-child {
  margin-bottom: 0;
}

/* What You'll Learn */
.course-learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.course-learn-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text);
  padding: 8px;
  background: var(--bg);
  border-radius: 6px;
}

.course-learn-item i {
  color: var(--brand);
  font-size: 0.7rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Course Requirements */
.course-requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.course-requirements-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 6px 0;
}

.course-requirements-list li i {
  color: var(--brand);
  font-size: 0.6rem;
  margin-top: 4px;
}

/* Curriculum Accordion */
.curriculum-accordion {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.curriculum-chapter {
  border-bottom: 1px solid var(--border);
}

.curriculum-chapter:last-child {
  border-bottom: none;
}

.curriculum-chapter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg);
  cursor: pointer;
  transition: background 0.2s;
  gap: 12px;
}

.curriculum-chapter-header:hover {
  background: color-mix(in srgb, var(--bg) 90%, var(--brand));
}

.curriculum-chapter-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.curriculum-chapter-title i {
  color: var(--brand);
  font-size: 0.75rem;
  transition: transform 0.3s;
}

.curriculum-chapter.active .curriculum-chapter-title i {
  transform: rotate(90deg);
}

.curriculum-chapter-meta {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.curriculum-lessons {
  display: none;
  background: var(--card);
}

.curriculum-chapter.active .curriculum-lessons {
  display: block;
}

.curriculum-lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 36px;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}

.curriculum-lesson:hover {
  background: var(--bg);
}

.curriculum-lesson i {
  font-size: 0.7rem;
  color: var(--brand);
  width: 16px;
}

.curriculum-lesson span {
  flex: 1;
}

.curriculum-lesson .lesson-duration {
  font-size: 0.7rem;
  color: var(--muted);
}

/* Course Sidebar */
.course-sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.course-preview-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.course-sidebar-body {
  padding: 16px;
}

.course-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.course-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.course-price-free {
  color: var(--brand);
}

.course-sidebar-body .btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  margin-bottom: 8px;
}

.course-sidebar-body .btn:last-of-type {
  margin-bottom: 16px;
}

.btn-enroll {
  background: var(--brand);
  color: #fff;
  border: none;
}

.btn-enroll:hover {
  background: color-mix(in srgb, var(--brand) 85%, #000);
  color: #fff;
}

.btn-continue {
  background: var(--brand);
  color: #fff;
  border: none;
}

.btn-continue:hover {
  background: color-mix(in srgb, var(--brand) 85%, #000);
  color: #fff;
}

.btn-outline-course {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline-course:hover {
  background: var(--bg);
  color: var(--text);
}

.course-includes-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.course-includes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.course-includes-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--muted);
  padding: 6px 0;
  border-top: 1px solid var(--border);
}

.course-includes-list li:first-child {
  border-top: none;
}

.course-includes-list li i {
  color: var(--brand);
  font-size: 0.7rem;
  width: 16px;
}

/* Instructor Card */
.course-instructor {
  display: flex;
  align-items: center;
  gap: 12px;
}

.instructor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--brand);
}

.instructor-info h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 2px;
}

.instructor-info p {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

/* Progress Bar in Sidebar */
.course-progress-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.course-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.course-progress-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}

.course-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
  transition: width 0.3s;
}

/* ============================================
   COURSE OVERVIEW PAGE - UDEMY STYLE
   ============================================ */

/* Course Overview Page Container */
.course-overview-page {
  background: var(--bg);
  min-height: 100vh;
}

/* Course Hero Section - Light/Dark Mode */
.course-hero-section {
  position: relative;
  padding: 32px 0 48px;
  color: var(--text);
  overflow: hidden;
}

/* Backdrop with theme-aware gradient */
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Dark mode gradient */
[data-theme="dark"] .hero-backdrop,
.hero-backdrop {
  background: linear-gradient(135deg, 
    #0f0f1a 0%, 
    #1a1a2e 25%, 
    #2d1f3d 50%, 
    #1a1a2e 75%, 
    #0f0f1a 100%);
}

/* Light mode gradient */
[data-theme="light"] .hero-backdrop {
  background: linear-gradient(135deg, 
    #f8f9ff 0%, 
    #eef1ff 25%, 
    #e8e0f0 50%, 
    #eef1ff 75%, 
    #f8f9ff 100%);
}

/* Decorative elements */
.hero-backdrop::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-backdrop::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Dark mode text colors */
[data-theme="dark"] .course-hero-section,
.course-hero-section {
  color: #fff;
}

/* Light mode text colors */
[data-theme="light"] .course-hero-section {
  color: #1a1a2e;
}

.course-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  padding-right: 400px; /* Space for floating sidebar on desktop */
}

/* Floating Sidebar - Positioned relative to page */
.course-floating-sidebar {
  position: fixed;
  top: 90px;
  right: max(calc((100% - 1200px) / 2 + 20px), 20px);
  width: 340px;
  z-index: 1000;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

/* Hide scrollbar but keep functionality */
.course-floating-sidebar::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

.course-floating-sidebar .course-preview-card {
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25), 0 8px 40px rgba(0,0,0,0.15);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Preview Thumbnail */
.preview-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #1c1d1f;
  cursor: pointer;
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--brand);
}

.preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.2s;
}

.preview-overlay i {
  font-size: 3rem;
}

.preview-overlay span {
  font-size: 0.85rem;
  font-weight: 600;
}

.preview-thumb:hover .preview-overlay {
  opacity: 0.9;
}

/* Preview Body */
.preview-body {
  padding: 20px;
}

/* Price Row */
.price-row {
  margin-bottom: 8px;
}

.price-current {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.price-current.free {
  color: var(--brand);
}

/* Enroll Buttons */
.btn-enroll {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.btn-enroll:hover {
  background: color-mix(in srgb, var(--brand) 85%, #000);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.btn-enroll i {
  font-size: 1.1rem;
}

.btn-enroll-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.btn-enroll-secondary:hover {
  background: var(--bg);
  border-color: var(--brand);
  color: var(--brand);
}

.btn-enroll-outline {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 12px;
}

.btn-enroll-outline:hover {
  background: color-mix(in srgb, var(--bg) 50%, var(--border));
  color: var(--text);
}

/* Guarantee Text */
.guarantee-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.guarantee-text i {
  color: #22c55e;
  font-size: 0.85rem;
}

/* Course Includes */
.course-includes {
  padding-top: 4px;
}

.course-includes .includes-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}

.course-includes ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.course-includes li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 6px 0;
}

.course-includes li i {
  color: var(--brand);
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
}

/* Enrolled Box */
.enrolled-box {
  margin-bottom: 12px;
}

.enrolled-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.enrolled-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
}

.enrolled-text {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
}

/* Breadcrumb Navigation */
.course-breadcrumb {
  margin-bottom: 20px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8rem;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
  content: '/';
  margin: 0 10px;
  opacity: 0.3;
}

.breadcrumb-list a {
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
  opacity: 0.7;
}

.breadcrumb-list a:hover {
  opacity: 1;
}

/* Dark mode breadcrumb */
[data-theme="dark"] .breadcrumb-list a,
.breadcrumb-list a {
  color: #fff;
}

[data-theme="dark"] .breadcrumb-list li:not(:last-child)::after,
.breadcrumb-list li:not(:last-child)::after {
  color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .breadcrumb-list .current,
.breadcrumb-list .current {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Light mode breadcrumb */
[data-theme="light"] .breadcrumb-list a {
  color: var(--text);
}

[data-theme="light"] .breadcrumb-list li:not(:last-child)::after {
  color: rgba(26, 26, 46, 0.3);
}

[data-theme="light"] .breadcrumb-list .current {
  color: rgba(26, 26, 46, 0.5);
}

/* Home icon */
.breadcrumb-home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 0.85rem;
  opacity: 1 !important;
}

[data-theme="dark"] .breadcrumb-home,
.breadcrumb-home {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.breadcrumb-home:hover {
  background: rgba(139, 92, 246, 0.3);
  color: var(--brand);
}

[data-theme="light"] .breadcrumb-home {
  background: rgba(26, 26, 46, 0.08);
  color: var(--text);
}

[data-theme="light"] .breadcrumb-home:hover {
  background: rgba(139, 92, 246, 0.15);
}

/* Hero Title */
.course-hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px;
  font-family: var(--font-heading, inherit);
  letter-spacing: -0.5px;
}

/* Hero Description */
.course-hero-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 640px;
  opacity: 0.9;
}

[data-theme="light"] .course-hero-desc {
  opacity: 0.8;
}

/* Hero Stats */
.course-hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  width: fit-content;
}

[data-theme="dark"] .course-hero-stats,
.course-hero-stats {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .course-hero-stats {
  background: rgba(26, 26, 46, 0.05);
  border: 1px solid rgba(26, 26, 46, 0.1);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-item i {
  font-size: 1.1rem;
  color: var(--brand);
  margin-bottom: 2px;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.6;
}

.stat-divider {
  width: 1px;
  height: 40px;
  opacity: 0.2;
}

[data-theme="dark"] .stat-divider,
.stat-divider {
  background: #fff;
}

[data-theme="light"] .stat-divider {
  background: #1a1a2e;
}

/* Hero Info */
.course-hero-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.8rem;
}

.course-hero-info span {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.7;
}

.course-hero-info i {
  font-size: 0.85rem;
  color: var(--brand);
  opacity: 1;
}

/* Mobile responsiveness for hero */
@media (max-width: 900px) {
  .course-hero-inner {
    padding-right: 20px;
  }
  
  .course-hero-title {
    font-size: 1.75rem;
  }
  
  .course-hero-stats {
    gap: 16px;
    padding: 12px 16px;
  }
  
  .stat-value {
    font-size: 1rem;
  }
  
  .stat-label {
    font-size: 0.65rem;
  }
  
  .stat-divider {
    height: 32px;
  }
  
  /* On tablet/mobile, sidebar becomes inline */
  .course-floating-sidebar {
    position: static;
    width: 100%;
    max-width: 500px;
    margin: 24px auto 0;
    max-height: none;
    overflow: visible;
  }
  
  .course-hero-inner,
  .course-content-wrapper {
    padding-right: 20px;
  }
}

@media (max-width: 480px) {
  .course-hero-section {
    padding: 20px 0 32px;
  }
  
  .course-hero-title {
    font-size: 1.5rem;
  }
  
  .course-hero-desc {
    font-size: 1rem;
  }
  
  .course-hero-stats {
    width: 100%;
    justify-content: space-around;
  }
  
  .course-hero-info {
    flex-direction: column;
    gap: 8px;
  }
}

/* Course Content Section */
.course-content-section {
  padding: 32px 0 60px;
}

.course-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  padding-right: 400px; /* Space for floating sidebar */
}

/* Explore Topics */
.explore-topics {
  margin-bottom: 32px;
}

.explore-topics h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 12px;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-tag {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--text);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.topic-tag:hover {
  background: var(--text);
  color: var(--bg);
}

/* Course Box */
.course-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.box-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.2px;
}

.box-title i {
  display: none;
}

/* Curriculum Section */
.curriculum-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.curriculum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.curriculum-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.expand-all-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  transition: all 0.2s;
}

.expand-all-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--brand);
}

/* Curriculum Summary */
.curriculum-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.curriculum-summary span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.curriculum-summary i {
  font-size: 1rem;
  color: var(--brand);
}

/* Chapters Accordion */
.chapters-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chapter-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.chapter-item:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.chapter-item.open {
  border-color: var(--brand);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.12);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.02), rgba(139, 92, 246, 0.02));
}

.chapter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.chapter-header:hover {
  background: rgba(99, 102, 241, 0.03);
}

.chapter-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.chapter-chevron,
.chapter-icon {
  font-size: 0.85rem;
  color: var(--muted);
  transition: all 0.3s ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.chapter-item.open .chapter-chevron,
.chapter-item.open .chapter-icon {
  transform: rotate(90deg);
  color: var(--brand);
}

.chapter-num,
.chapter-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.chapter-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.chapter-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  margin: 0 !important;
  padding: 0;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-meta {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
}

/* Chapter Content */
.chapter-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--card);
}

.chapter-item.open .chapter-content {
  border-top: 1px solid var(--border);
}

/* Lesson Items */
.lesson-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s ease;
}

.lesson-item:last-child {
  border-bottom: none;
}

.lesson-item:hover:not(.locked):not(.empty) {
  background: rgba(99, 102, 241, 0.04);
  padding-left: 22px;
  cursor: pointer;
}

.lesson-item.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.lesson-item.empty {
  color: var(--muted);
  font-style: italic;
}

.lesson-item i {
  font-size: 0.95rem;
  color: var(--brand);
  margin-right: 0;
}

.lesson-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 2px;
}

.lesson-icon i {
  font-size: 0.9rem;
  color: var(--brand);
  margin: 0;
}

.lesson-item.locked .lesson-icon {
  background: var(--bg);
}

.lesson-item.locked .lesson-icon i {
  color: var(--muted);
}

.lesson-icon.quiz-icon {
  background: rgba(245, 158, 11, 0.15);
}

.lesson-icon.quiz-icon i {
  color: #f59e0b;
}

.lesson-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
}

.lesson-item .lesson-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.lesson-item .lesson-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.lesson-duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 600;
  white-space: nowrap;
}

.lesson-duration i {
  font-size: 0.75rem;
  color: var(--brand);
}

.lesson-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  padding: 4px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Requirements List */
.requirements-list {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}

.requirements-list li {
  font-size: 0.9rem;
  color: var(--text);
  padding: 4px 0;
}

.requirements-list li::before {
  display: none;
}

/* Course Description */
.course-description {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
}

.course-description p {
  margin-bottom: 12px;
}

/* ============================================
   COURSE OVERVIEW RESPONSIVE
   ============================================ */

@media (max-width: 1100px) {
  /* Reset hero padding */
  .course-hero-inner {
    padding-right: 20px;
  }
  
  /* Make sidebar flow normally (not absolute) */
  .course-floating-sidebar {
    position: relative;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    margin: 24px auto 0;
  }
  
  .course-floating-sidebar .course-preview-card {
    position: relative;
    top: 0;
  }
  
  .course-content-wrapper {
    padding-right: 20px;
  }
}

@media (max-width: 767px) {
  .course-hero-section {
    padding: 16px 0 24px;
  }
  
  .course-hero-title {
    font-size: 1.4rem;
  }
  
  .course-hero-desc {
    font-size: 0.9rem;
  }
  
  .course-hero-meta {
    flex-wrap: wrap;
    gap: 6px 12px;
  }
  
  .course-floating-sidebar {
    max-width: 100%;
    margin-top: 20px;
  }
  
  .course-content-section {
    padding: 24px 0 40px;
  }
  
  .course-box,
  .curriculum-section {
    padding: 16px;
    border-radius: 8px;
  }
  
  .curriculum-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .curriculum-summary {
    gap: 12px;
  }
  
  .chapter-header {
    padding: 14px 16px;
  }
  
  .lesson-item {
    padding: 12px 16px 12px 44px;
  }
  
  .explore-topics h3 {
    font-size: 1.1rem;
  }
  
  .topic-tag {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  
  .card-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .course-hero-title {
    font-size: 1.2rem;
  }
  
  .breadcrumb-list {
    font-size: 0.7rem;
  }
  
  .breadcrumb-list .current {
    max-width: 150px;
  }
  
  .breadcrumb-home {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
  
  .preview-body {
    padding: 16px;
  }
  
  .price-current {
    font-size: 1.5rem;
  }
  
  .course-hero-info {
    flex-direction: column;
    gap: 6px;
  }
}

/* =============================================
   LEARN PAGE - LESSON VIEWER LAYOUT
   ============================================= */

/* Page Layout */
.learn-page-layout {
  display: flex;
  min-height: calc(100vh - 60px);
  background: var(--bg);
  position: relative;
  transition: padding-left 0.3s ease;
}

/* Desktop Sidebar Toggle Button */
.sidebar-toggle-btn {
  position: fixed;
  left: 308px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.3s ease;
  z-index: 101;
}

.sidebar-toggle-btn:hover {
  background: var(--bg);
  color: var(--brand);
}

.sidebar-toggle-btn i {
  font-size: 0.875rem;
  transition: transform 0.3s ease;
}

/* Sidebar Collapsed State */
.learn-page-layout.sidebar-collapsed .learn-sidebar {
  width: 0;
  min-width: 0;
  border-right: none;
  overflow: hidden;
}

.learn-page-layout.sidebar-collapsed .sidebar-toggle-btn {
  left: 0;
  border-left: 1px solid var(--border);
  border-radius: 0 8px 8px 0;
}

.learn-page-layout.sidebar-collapsed .sidebar-toggle-btn i {
  transform: rotate(180deg);
}

/* Sidebar */
.learn-sidebar {
  width: 320px;
  min-width: 320px;
  background: var(--card);
  border-right: 1px solid var(--border);
  height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
  transition: width 0.3s ease, min-width 0.3s ease;
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--brand);
  color: #fff;
  flex-shrink: 0;
}

.sidebar-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
  flex-shrink: 0;
}

.sidebar-back:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.sidebar-course-info {
  flex: 1;
  min-width: 0;
}

.sidebar-course-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.9;
  margin-bottom: 6px;
}

.sidebar-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.sidebar-progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  transition: width 0.3s;
}

/* Sidebar Chapters */
.sidebar-chapters {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.sidebar-chapters::-webkit-scrollbar {
  width: 4px;
}

.sidebar-chapters::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.sidebar-chapter {
  border-bottom: 1px solid var(--border);
}

.chapter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.chapter-toggle-btn:hover {
  background: rgba(139, 92, 246, 0.05);
}

.sidebar-chapter.active .chapter-toggle-btn {
  background: rgba(139, 92, 246, 0.08);
}

.chapter-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--bg);
  color: var(--brand);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-chapter.active .chapter-number {
  background: var(--brand);
  color: #fff;
}

.chapter-details {
  flex: 1;
  min-width: 0;
}

.chapter-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-count {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.chapter-arrow {
  color: var(--muted);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.sidebar-chapter.active .chapter-arrow {
  transform: rotate(180deg);
  color: var(--brand);
}

/* Chapter Lessons */
.chapter-lessons {
  max-height: 0;
  overflow: hidden;
  background: var(--bg);
  transition: max-height 0.3s ease;
}

.sidebar-chapter.active .chapter-lessons {
  max-height: 1000px;
}

.lesson-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 56px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.lesson-link:hover {
  background: var(--card);
  color: var(--brand);
}

.lesson-link.active {
  background: var(--card);
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 600;
}

.lesson-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.lesson-icon i {
  font-size: 1rem;
  color: var(--muted);
}

.lesson-link.active .lesson-icon i,
.lesson-link:hover .lesson-icon i {
  color: var(--brand);
}

.lesson-link.completed .lesson-icon i {
  color: #10b981;
}

.lesson-icon.quiz-icon i {
  color: #f59e0b;
}

.lesson-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quiz-link {
  background: rgba(245, 158, 11, 0.05);
}

.quiz-link:hover {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

/* Main Content Area */
.learn-main {
  flex: 1;
  min-width: 0;
  background: var(--bg);
}

.content-panel {
  display: none;
}

.content-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Video Container */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Lesson Content */
.lesson-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
}

.lesson-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.lesson-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.lesson-breadcrumb i {
  font-size: 0.6rem;
}

.breadcrumb-chapter {
  color: var(--brand);
}

.lesson-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.lesson-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  word-wrap: break-word;
}

.lesson-body h1, .lesson-body h2, .lesson-body h3 {
  color: var(--text);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.lesson-body p {
  margin-bottom: 1em;
}

.lesson-body pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
}

.lesson-body code {
  font-family: 'Fira Code', monospace;
  font-size: 0.9em;
}

/* ============================================
   IMAGE & MEDIA FRAME REDESIGN (SMART SIZE TIERS)
   ============================================ */
.lesson-body img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: scale-down !important;
  image-rendering: auto !important;
  image-rendering: -webkit-optimize-contrast !important;
  border-radius: 8px !important;
  margin: 0 auto !important;
  display: block !important;
}

/* Standalone images not wrapped in link */
.lesson-body > img,
.lesson-body p > img {
  max-width: min(100%, 820px) !important;
  margin: 24px auto !important;
  border-radius: 10px !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
  background: rgba(15, 23, 42, 0.4) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.lesson-body > img:hover,
.lesson-body p > img:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35) !important;
}

/* Base Separator & Media Containers */
.lesson-body .separator,
.lesson-body .content-separator,
.lesson-body .content-media-frame {
  display: block !important;
  text-align: center !important;
  margin: 28px auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  width: 100% !important;
  clear: both !important;
  position: relative !important;
}

/* Image Anchor Wrapper with Glassmorphism Card Frame */
.lesson-body .separator a,
.lesson-body .content-separator a,
.lesson-body .content-media-frame a,
.lesson-body a.media-zoom-link {
  display: inline-block !important;
  position: relative !important;
  width: auto !important;
  max-width: 100% !important;
  text-align: center !important;
  text-decoration: none !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 1px solid var(--border) !important;
  background: rgba(15, 23, 42, 0.5) !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
  cursor: zoom-in !important;
  vertical-align: middle !important;
}

.lesson-body .separator a:hover,
.lesson-body .content-separator a:hover,
.lesson-body .content-media-frame a:hover,
.lesson-body a.media-zoom-link:hover {
  transform: translateY(-3px) scale(1.004) !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.35) !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
}

/* Hover Enlarge Badge */
.lesson-body .separator a::after,
.lesson-body .content-separator a::after,
.lesson-body .content-media-frame a::after,
.lesson-body a.media-zoom-link::after {
  content: '⤢ Click to view full image';
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 10;
}

.lesson-body .separator a:hover::after,
.lesson-body .content-separator a:hover::after,
.lesson-body .content-media-frame a:hover::after,
.lesson-body a.media-zoom-link:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* --- TIER 1: Full-Width / Large Desktop & App Screenshots --- */
.lesson-body .media-size-full,
.lesson-body .separator.media-size-full,
.lesson-body .content-separator.media-size-full,
.lesson-body table.tr-caption-container.media-size-full {
  width: 100% !important;
  max-width: 100% !important;
  margin: 32px auto !important;
}

.lesson-body a.media-zoom-link.media-size-full,
.lesson-body .separator.media-size-full a {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 12px !important;
}

.lesson-body a.media-zoom-link.media-size-full::before,
.lesson-body .separator.media-size-full a::before {
  content: '● ● ●';
  display: flex;
  align-items: center;
  background: #111827;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 9px;
  letter-spacing: 5px;
  color: #ef4444;
  text-shadow: 12px 0 0 #f59e0b, 24px 0 0 #10b981;
  text-align: left;
  box-sizing: border-box;
}

.lesson-body img.media-size-full {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 640px !important;
  object-fit: contain !important;
  border-radius: 0 !important;
}

/* --- TIER 2: Medium Dialogs & Standard Windows --- */
.lesson-body .media-size-medium,
.lesson-body .separator.media-size-medium,
.lesson-body .content-separator.media-size-medium,
.lesson-body table.tr-caption-container.media-size-medium {
  max-width: min(100%, 640px) !important;
  margin: 24px auto !important;
}

.lesson-body a.media-zoom-link.media-size-medium,
.lesson-body .separator.media-size-medium a {
  display: inline-block !important;
  max-width: 100% !important;
}

.lesson-body img.media-size-medium {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  max-height: 440px !important;
  object-fit: scale-down !important;
}

/* --- TIER 3: Small Dialogs, File Strips & Panels --- */
.lesson-body .media-size-small,
.lesson-body .separator.media-size-small,
.lesson-body .content-separator.media-size-small,
.lesson-body table.tr-caption-container.media-size-small {
  max-width: min(100%, 420px) !important;
  margin: 20px auto !important;
}

.lesson-body a.media-zoom-link.media-size-small,
.lesson-body .separator.media-size-small a {
  display: inline-block !important;
  max-width: 100% !important;
}

.lesson-body img.media-size-small {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  max-height: 320px !important;
  object-fit: scale-down !important;
}

/* Blogger Image Caption Tables */
.lesson-body table.tr-caption-container,
.lesson-body table.tr-caption-container tbody,
.lesson-body table.tr-caption-container tr,
.lesson-body table.tr-caption-container td {
  display: block !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  text-align: center !important;
}

.lesson-body td.tr-caption,
.lesson-body .tr-caption {
  display: block !important;
  margin-top: 8px !important;
  font-size: 0.84rem !important;
  font-style: italic !important;
  color: var(--muted) !important;
  text-align: center !important;
  padding: 4px 10px !important;
  border: none !important;
  background: transparent !important;
  line-height: 1.4 !important;
  letter-spacing: 0.2px;
}

/* ============================================
   LESSON PANEL - MODERN REDESIGN
   ============================================ */

/* Lesson Hero Section */
.lesson-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  position: relative;
}

.lesson-hero.has-video {
  background: #0f0f0f;
  aspect-ratio: 16 / 9;
  position: relative;
}

.lesson-hero.no-video {
  padding: 80px 32px;
  text-align: center;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Overlay for cover image background */
.lesson-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.4) 100%);
  z-index: 1;
}

.lesson-video-wrapper {
  position: absolute;
  inset: 0;
}

.lesson-video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.lesson-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.lesson-hero-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  backdrop-filter: blur(8px);
}

.lesson-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

/* Lesson Body Content Styling */
.lesson-body {
  padding: 32px 24px;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}

/* ============================================
   HEADINGS H1-H6 - Distinctive Visual Hierarchy
   ============================================ */

.lesson-body h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin: 48px 0 24px;
  line-height: 1.3;
  padding: 16px 20px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border-radius: 8px;
  position: relative;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.lesson-body h1::before {
  content: "§";
  margin-right: 12px;
  opacity: 0.6;
}

.lesson-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 44px 0 20px;
  padding: 14px 18px;
  padding-left: 20px;
  line-height: 1.35;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.05) 100%);
  border-left: 4px solid #22c55e;
  border-radius: 0 8px 8px 0;
  position: relative;
}

.lesson-body h2::before {
  content: "//";
  color: #22c55e;
  font-weight: 800;
  margin-right: 10px;
  opacity: 0.8;
}

.lesson-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 16px;
  padding: 10px 16px;
  padding-left: 18px;
  line-height: 1.4;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-left: 3px solid #a855f7;
  border-radius: 0 6px 6px 0;
}

.lesson-body h3::before {
  content: "›";
  color: #a855f7;
  font-weight: 800;
  margin-right: 10px;
  font-size: 1.1em;
}

.lesson-body h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 14px;
  padding: 8px 14px;
  padding-left: 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
  border-left: 3px solid #f59e0b;
  border-radius: 0 6px 6px 0;
}

.lesson-body h4::before {
  content: "•";
  color: #f59e0b;
  font-weight: 800;
  margin-right: 10px;
}

.lesson-body h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 12px;
  padding: 6px 12px;
  padding-left: 14px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(219, 39, 119, 0.05) 100%);
  border-left: 2px solid #ec4899;
  border-radius: 0 4px 4px 0;
}

.lesson-body h5::before {
  content: "—";
  color: #ec4899;
  margin-right: 8px;
}

.lesson-body h6 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 10px;
  padding: 5px 10px;
  padding-left: 12px;
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.1) 0%, rgba(71, 85, 105, 0.05) 100%);
  border-left: 2px solid #64748b;
  border-radius: 0 4px 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lesson-body h6::before {
  content: "◦";
  color: #64748b;
  margin-right: 8px;
}

/* ============================================
   TEXT STYLING - Bold, Italic, Underline
   ============================================ */

/* Bold text highlight box */
.lesson-body b,
.lesson-body strong {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
  color: #60a5fa;
  padding: 2px 8px;
  border-radius: 4px;
  border-left: 2px solid #3b82f6;
  font-weight: 600;
}

/* Italic text highlight box */
.lesson-body i,
.lesson-body em {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  color: #c4b5fd;
  padding: 2px 8px;
  border-radius: 4px;
  border-left: 2px solid #a855f7;
  font-style: italic;
}

/* Underline */
.lesson-body u {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(219, 39, 119, 0.1) 100%);
  text-decoration: underline;
  text-decoration-color: #ec4899;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  padding: 2px 6px;
  border-radius: 3px;
  color: #f472b6;
}

/* When bold and italic are nested, don't double-box */
.lesson-body b i,
.lesson-body b em,
.lesson-body strong i,
.lesson-body strong em,
.lesson-body i b,
.lesson-body i strong,
.lesson-body em b,
.lesson-body em strong {
  background: transparent;
  padding: 0;
  border-left: none;
}

/* Exclude icons and special elements from styling */
.lesson-body .bi,
.lesson-body i[class*="bi-"],
.lesson-body i[class*="fa-"],
.lesson-body .badge b,
.lesson-body .badge strong,
.lesson-body .btn b,
.lesson-body .btn strong,
.lesson-body h1 b, .lesson-body h1 strong,
.lesson-body h2 b, .lesson-body h2 strong,
.lesson-body h3 b, .lesson-body h3 strong,
.lesson-body pre b, .lesson-body pre i, .lesson-body pre strong, .lesson-body pre em,
.lesson-body code b, .lesson-body code i, .lesson-body code strong, .lesson-body code em,
.lesson-body .codecolorer-container b, .lesson-body .codecolorer-container strong,
.lesson-body .codecolorer-container i, .lesson-body .codecolorer-container em,
.codecolorer-container b, .codecolorer-container strong,
.codecolorer-container i, .codecolorer-container em {
  background: transparent !important;
  padding: 0 !important;
  border-left: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
}

.lesson-body p {
  margin: 0 0 20px;
}

.lesson-body a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lesson-body a:hover {
  text-decoration: none;
}

/* ============================================
   LIST STYLING - MODERN & RESPONSIVE
   ============================================ */
.lesson-body ul {
  list-style-type: disc !important;
  margin: 16px 0 24px !important;
  padding-left: 28px !important;
}

.lesson-body ol {
  list-style-type: decimal !important;
  margin: 16px 0 24px !important;
  padding-left: 28px !important;
}

.lesson-body li {
  margin-bottom: 8px !important;
  line-height: 1.75 !important;
  color: var(--text) !important;
  padding-left: 4px !important;
  position: static !important;
}

.lesson-body li::marker {
  color: var(--brand) !important;
  font-weight: 700 !important;
}

.lesson-body ul ul {
  list-style-type: circle !important;
  margin: 6px 0 6px !important;
  padding-left: 22px !important;
}

.lesson-body ul ul ul {
  list-style-type: square !important;
  margin: 4px 0 4px !important;
  padding-left: 20px !important;
}

.lesson-body ol ol {
  list-style-type: lower-alpha !important;
  margin: 6px 0 6px !important;
  padding-left: 22px !important;
}

.lesson-body ol ol ol {
  list-style-type: lower-roman !important;
  margin: 4px 0 4px !important;
  padding-left: 20px !important;
}

.lesson-body li > p {
  margin-bottom: 6px !important;
  display: inline !important;
}

.lesson-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Table Headers */
.lesson-body table thead {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%);
}

.lesson-body table th {
  padding: 20px 24px;
  font-weight: 800;
  text-align: center;
  border-bottom: 3px solid #3b82f6;
  color: #60a5fa;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
  font-size: 1.08rem;
  letter-spacing: 0.5px;
  position: relative;
  vertical-align: middle;
}

.lesson-body table th::before {
  content: "◆";
  margin-right: 10px;
  opacity: 0.7;
}

/* Table Rows and Cells */
.lesson-body table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: 1.8;
  vertical-align: top;
}

/* Alternating row colors */
.lesson-body table tbody tr:nth-child(odd) {
  background: rgba(59, 130, 246, 0.02);
}

.lesson-body table tbody tr:nth-child(even) {
  background: rgba(168, 85, 247, 0.015);
}

/* Hover effect for rows */
.lesson-body table tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
  transition: background 0.2s ease;
}

.lesson-body table tbody tr:last-child td {
  border-bottom: none;
}

/* First column styling for comparison tables */
.lesson-body table tbody tr td:first-child {
  font-weight: 700;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(22, 163, 74, 0.03) 100%);
  border-right: 3px solid #22c55e;
  color: #22c55e;
  width: 35%;
}

.lesson-body table tbody tr:nth-child(odd) td:first-child {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.04) 100%);
}

.lesson-body table tbody tr:hover td:first-child {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14) 0%, rgba(22, 163, 74, 0.06) 100%);
}

/* Second column styling */
.lesson-body table tbody tr td:last-child {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.05) 0%, rgba(139, 92, 246, 0.02) 100%);
}

.lesson-body table tbody tr:nth-child(odd) td:last-child {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.07) 0%, rgba(139, 92, 246, 0.03) 100%);
}

/* Comparison table styling */
.lesson-body table.comparison-table th {
  position: relative;
  padding: 22px 24px;
}

.lesson-body table.comparison-table th::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #22c55e 0%, #3b82f6 50%, #a855f7 100%);
}

/* Nested paragraphs in tables */
.lesson-body table p {
  margin: 0 0 8px;
  line-height: 1.8;
}

.lesson-body table p:last-child {
  margin-bottom: 0;
}

.lesson-body table strong,
.lesson-body table b {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.18) 100%);
  color: #60a5fa;
  padding: 4px 12px;
  border-radius: 4px;
  border-left: 3px solid #3b82f6;
  font-weight: 800;
  display: inline-block;
  margin: 2px 0;
}

/* Mobile responsive table */
@media (max-width: 768px) {
  .lesson-body table {
    font-size: 0.95rem;
    margin: 2rem 0;
  }

  .lesson-body table th {
    padding: 14px 12px;
    font-size: 0.95rem;
  }

  .lesson-body table td {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .lesson-body table th::before {
    margin-right: 6px;
  }

  /* Responsive lists */
  .lesson-body ol > li {
    padding-left: 44px;
  }

  .lesson-body ol > li::before {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .lesson-body ul > li {
    padding-left: 22px;
  }

  .lesson-body ul > li::before {
    font-size: 0.8rem;
  }

  .lesson-body ul > li > ol > li {
    padding-left: 28px;
  }

  .lesson-body ul > li > ol > li::before {
    font-size: 0.9rem;
  }
}

.lesson-body blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  background: var(--bg);
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text);
}

.content-separator {
  clear: both;
  margin: 1.5rem 0;
}

/* Lesson Card */
.lesson-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Meta Bar */
.lesson-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-chapter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
}

.meta-chapter i {
  color: var(--brand);
}

.meta-divider {
  color: var(--muted);
  font-size: 0.7rem;
}

.meta-number {
  color: var(--muted);
  font-size: 0.85rem;
}

.meta-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
}

.meta-status.completed {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.meta-status.pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

/* Lesson Header */
.lesson-header {
  padding: 24px 24px 0;
}

.lesson-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}

/* Lesson Body */
.lesson-body {
  padding: 24px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
}

.lesson-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

.lesson-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.lesson-empty p {
  margin: 0;
  font-size: 1rem;
}

/* Lesson Actions */
.lesson-actions {
  padding: 0 24px 24px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.complete-btn {
  background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 70%, #6366f1) 100%);
  color: #fff;
  width: 100%;
}

.complete-btn:hover:not(.completed):not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
}

.complete-btn.completed {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  cursor: default;
}

.complete-btn .btn-icon i {
  font-size: 1.1rem;
}

/* Lesson Navigation Cards */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  padding: 24px;
  gap: 16px;
  border-top: 1px solid var(--border);
}

.nav-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--card) 0%, var(--bg) 100%);
  border: 2px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.nav-card:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, var(--card) 100%);
  border-color: var(--brand);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
}

.nav-card:hover::before {
  opacity: 1;
}

.nav-card.nav-prev {
  text-align: left;
}

.nav-card.nav-next {
  text-align: right;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, var(--card) 100%);
  border-color: rgba(59, 130, 246, 0.3);
}

.nav-card.nav-next:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-color: var(--brand);
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.2);
}

.nav-card.nav-finish {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.nav-card.nav-finish:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.35);
}

.nav-card.nav-finish .nav-direction,
.nav-card.nav-finish .nav-title {
  color: #fff;
}

.nav-placeholder {
  visibility: hidden;
}

.nav-direction {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-card.nav-next .nav-direction {
  color: #3b82f6;
  font-weight: 700;
  font-size: 0.8rem;
  justify-content: flex-end;
}

.nav-prev .nav-direction {
  justify-content: flex-start;
}

.nav-next .nav-direction {
  justify-content: flex-end;
}

.nav-next .nav-direction i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.nav-card.nav-next:hover .nav-direction i {
  transform: translateX(4px);
}

.nav-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
  .lesson-hero.no-video {
    padding: 32px 20px;
  }
  
  .lesson-hero-icon {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
  }
  
  .lesson-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }
  
  .lesson-header {
    padding: 20px 16px 0;
  }
  
  .lesson-title {
    font-size: 1.25rem;
  }
  
  .lesson-body {
    padding: 20px 16px;
  }
  
  .lesson-actions {
    padding: 0 16px 20px;
  }
  
  .lesson-nav {
    flex-direction: column;
    padding: 16px;
  }
  
  .nav-card {
    gap: 8px;
    padding: 16px 20px;
  }

  .nav-card.nav-prev,
  .nav-card.nav-next {
    text-align: left;
  }
  
  .nav-next .nav-direction {
    justify-content: flex-start;
  }

  .nav-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .nav-direction {
    font-size: 0.7rem;
    gap: 6px;
  }
}

/* Legacy Navigation (fallback) */
.nav-left, .nav-right {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid var(--border);
  gap: 16px;
}

.nav-left, .nav-right {
  flex: 1;
}

.nav-right {
  text-align: right;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-prev {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.nav-prev:hover {
  background: var(--bg);
  border-color: var(--brand);
  color: var(--brand);
}

.nav-next {
  background: var(--brand);
  color: #fff;
}

.nav-next:hover {
  background: color-mix(in srgb, var(--brand) 85%, #000);
  color: #fff;
  transform: translateX(4px);
}

.nav-complete {
  background: #10b981;
  color: #fff;
}

.nav-complete:hover:not(.completed) {
  background: #059669;
}

/* ============================================
   Terminal/Code blocks from Blogger posts (Learn pages)
   ============================================ */
.lesson-body .separator:has(.codecolorer-container),
.lesson-body .content-separator:has(.codecolorer-container),
.lesson-body .separator:has(pre),
.lesson-body .content-separator:has(pre) {
  width: 100% !important;
  max-width: 100% !important;
  align-items: stretch !important;
  display: block !important;
}

/* Pre / Code Blocks */
.lesson-body pre {
  background: #090d16 !important;
  color: #e2e8f0 !important;
  padding: 18px 26px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin: 24px 0 !important;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace !important;
  font-size: 0.8125rem !important;
  line-height: 1.55 !important;
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.lesson-body pre code {
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  border: none !important;
  font-size: inherit !important;
  font-weight: normal !important;
}

/* Blogger CodeColorer / Terminal Blocks */
.lesson-body .codecolorer-container,
.codecolorer-container {
  background: #090d16 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  margin: 24px 0 !important;
  padding: 0 !important;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace !important;
  font-size: 0.8125rem !important;
  line-height: 1.55 !important;
  overflow: hidden !important;
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  position: relative !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  clear: both !important;
  display: block !important;
  text-align: left !important;
}

.lesson-body .codecolorer-container::before,
.codecolorer-container::before {
  content: '● ● ●';
  display: flex !important;
  align-items: center !important;
  background: linear-gradient(180deg, #131b2e 0%, #0b1120 100%) !important;
  padding: 9px 18px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-size: 9px !important;
  letter-spacing: 5px !important;
  color: #ef4444 !important;
  text-shadow: 14px 0 0 #f59e0b, 28px 0 0 #10b981 !important;
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
  font-weight: 600 !important;
  box-sizing: border-box !important;
}

/* Hide CSS fallback when interactive code-bar-header is injected */
.lesson-body .codecolorer-container:has(.code-bar-header)::before,
.codecolorer-container:has(.code-bar-header)::before {
  display: none !important;
}

/* Interactive Terminal Header Bar */
.code-bar-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: linear-gradient(180deg, #131b2e 0%, #0b1120 100%) !important;
  padding: 10px 18px !important;
  margin: 0 !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  user-select: none !important;
  box-sizing: border-box !important;
  width: 100% !important;
  white-space: normal !important;
  line-height: normal !important;
}

.code-bar-dots {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 7px !important;
  white-space: normal !important;
  padding: 0 !important;
  margin: 0 !important;
}

.code-bar-dots .dot {
  width: 11px !important;
  height: 11px !important;
  border-radius: 50% !important;
  display: inline-block !important;
  box-sizing: border-box !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2) !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.code-bar-dots .dot-red { background: #ef4444 !important; box-shadow: 0 0 6px rgba(239, 68, 68, 0.35) !important; }
.code-bar-dots .dot-amber { background: #f59e0b !important; box-shadow: 0 0 6px rgba(245, 158, 11, 0.35) !important; }
.code-bar-dots .dot-green { background: #10b981 !important; box-shadow: 0 0 6px rgba(16, 185, 129, 0.35) !important; }

.code-bar-title {
  margin-left: 8px !important;
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
}

.code-bar-title i {
  color: #38bdf8 !important;
  font-size: 12px !important;
}

.code-copy-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 4px 11px !important;
  font-size: 11px !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.code-copy-btn:hover {
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3) !important;
}

.code-copy-btn.copied {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #34d399 !important;
}

/* Outer padding only on top level code container - Generous indent away from margins */
.lesson-body .codecolorer-container > div:not(.code-bar-header),
.lesson-body .codecolorer-container > .codecolorer,
.lesson-body .codecolorer-container > .text,
.codecolorer-container > div:not(.code-bar-header),
.codecolorer-container > .codecolorer,
.codecolorer-container > .text {
  background: transparent !important;
  color: #e2e8f0 !important;
  padding: 18px 26px 22px 26px !important;
  margin: 0 !important;
  border: none !important;
  font-family: inherit !important;
  font-size: 0.8125rem !important;
  line-height: 1.55 !important;
  white-space: pre !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: left !important;
  tab-size: 4 !important;
}

/* Zero padding & margin for ALL inner line divs to remove awkward line gaps while preserving container indentation */
.lesson-body .codecolorer-container > div:not(.code-bar-header) > div,
.lesson-body .codecolorer-container > .codecolorer > div,
.lesson-body .codecolorer-container > .text > div,
.codecolorer-container > div:not(.code-bar-header) > div,
.codecolorer-container > .codecolorer > div,
.codecolorer-container > .text > div {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  display: block !important;
  line-height: 1.55 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  box-sizing: border-box !important;
  white-space: pre !important;
}

.lesson-body pre code {
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  border: none !important;
  font-size: inherit !important;
  line-height: inherit !important;
  font-family: inherit !important;
}

.lesson-body code {
  background: rgba(99, 102, 241, 0.12) !important;
  color: #818cf8 !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  font-size: 0.88em !important;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace !important;
  font-weight: 500 !important;
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

.lesson-body .codecolorer-container span,
.codecolorer-container span {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

.lesson-body .codecolorer-container b,
.codecolorer-container b {
  color: #38bdf8 !important;
  font-weight: 700 !important;
}

.lesson-body .codecolorer-container span,
.codecolorer-container span {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

.lesson-body .codecolorer-container span[style*="color: #3d85c6"],
.lesson-body .codecolorer-container span[style*="color:#3d85c6"],
.codecolorer-container span[style*="color: #3d85c6"] {
  color: #38bdf8 !important;
  font-weight: 600;
}

.lesson-body .codecolorer-container span[style*="color: #656565"],
.lesson-body .codecolorer-container span[style*="color:#656565"],
.codecolorer-container span[style*="color: #656565"] {
  color: #94a3b8 !important;
}

.lesson-body .codecolorer-container span[style*="color: #6aa84f"],
.lesson-body .codecolorer-container span[style*="color:#6aa84f"],
.codecolorer-container span[style*="color: #6aa84f"] {
  color: #4ade80 !important;
}

.lesson-body .codecolorer-container span[style*="color: #cc0000"],
.lesson-body .codecolorer-container span[style*="color:#cc0000"],
.codecolorer-container span[style*="color: #cc0000"] {
  color: #f87171 !important;
  font-style: italic;
}

.lesson-body .codecolorer-container span[style*="color: #cc0000"],
.lesson-body .codecolorer-container span[style*="color:#cc0000"],
.lesson-body .codecolorer-container span[style*="color: rgb(204, 0, 0)"],
.codecolorer-container span[style*="color: #cc0000"],
.codecolorer-container span[style*="color:#cc0000"],
.codecolorer-container span[style*="color: rgb(204, 0, 0)"] {
  color: #f87171 !important;
}

.lesson-body .codecolorer-container span[style*="color: #e69138"],
.lesson-body .codecolorer-container span[style*="color:#e69138"],
.codecolorer-container span[style*="color: #e69138"],
.codecolorer-container span[style*="color:#e69138"] {
  color: #fbbf24 !important;
}

.lesson-body .codecolorer-container span[style*="color: #674ea7"],
.lesson-body .codecolorer-container span[style*="color:#674ea7"],
.codecolorer-container span[style*="color: #674ea7"],
.codecolorer-container span[style*="color:#674ea7"] {
  color: #c4b5fd !important;
}

.nav-complete.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  cursor: default;
}

/* Quiz Styles */
.quiz-header {
  text-align: center;
}

.quiz-title-icon {
  color: #f59e0b;
  margin-right: 8px;
}

.quiz-intro {
  color: var(--muted);
  margin-top: 8px;
}

.quiz-form {
  margin-top: 32px;
}

.quiz-question-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.question-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.5;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.option-label:hover {
  border-color: var(--brand);
  background: rgba(139, 92, 246, 0.05);
}

.option-label:has(input:checked) {
  border-color: var(--brand);
  background: rgba(139, 92, 246, 0.1);
}

.option-label input {
  display: none;
}

.option-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.option-label:has(input:checked) .option-marker {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.option-text {
  flex: 1;
  color: var(--text);
  font-size: 0.95rem;
}

.quiz-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 24px;
}

.quiz-submit-btn:hover {
  background: color-mix(in srgb, var(--brand) 85%, #000);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

/* Quiz Result */
.quiz-result {
  margin-top: 24px;
}

.result-card {
  text-align: center;
  padding: 40px;
  border-radius: 16px;
}

.result-card.passed {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 2px solid #10b981;
}

.result-card.failed {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
  border: 2px solid #f59e0b;
}

.result-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.result-card.passed .result-icon {
  color: #10b981;
}

.result-card.failed .result-icon {
  color: #f59e0b;
}

.result-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}

.result-score {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.result-card.passed .result-score {
  color: #10b981;
}

.result-card.failed .result-score {
  color: #f59e0b;
}

.result-detail {
  color: var(--muted);
  margin-bottom: 24px;
}

.retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.retry-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Mobile Sidebar */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.sidebar-backdrop.active {
  display: block;
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  cursor: pointer;
  z-index: 998;
  align-items: center;
  justify-content: center;
}

/* Responsive */
@media (max-width: 992px) {
  /* Hide desktop toggle button on mobile */
  .sidebar-toggle-btn {
    display: none;
  }
  
  /* Reset collapsed state on mobile */
  .learn-page-layout.sidebar-collapsed .learn-sidebar {
    width: 320px;
    min-width: 320px;
    left: -320px;
  }
  
  .learn-sidebar {
    position: fixed;
    left: -320px;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
    width: 320px;
    min-width: 320px;
  }
  
  .learn-sidebar.open {
    left: 0;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .lesson-content-wrapper {
    padding: 20px 16px;
  }
  
  .lesson-title {
    font-size: 1.4rem;
  }
  
  .lesson-hero.no-video {
    min-height: 200px;
    padding: 48px 20px;
  }
  
  .lesson-nav {
    flex-direction: column;
    gap: 12px;
  }
  
  .nav-left, .nav-right {
    width: 100%;
    text-align: center;
  }
  
  .nav-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .lesson-content-wrapper {
    padding: 16px 12px;
  }
  
  .lesson-title {
    font-size: 1.2rem;
  }
  
  .lesson-hero.no-video {
    min-height: 160px;
    padding: 32px 16px;
  }
  
  .lesson-hero-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border-radius: 14px;
  }
  
  .lesson-hero-badge {
    font-size: 0.85rem;
    padding: 8px 14px;
  }
  
  .quiz-question-card {
    padding: 16px;
  }
  
  .question-text {
    font-size: 1rem;
  }
  
  .option-label {
    padding: 12px 14px;
  }
}

/* =============================================
   LESSON CHAT SECTION
   ============================================= */
.lesson-chat-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.lesson-chat-widget {
    max-width: 100%;
}

/* Course Q&A Box */
.course-box #community-chat {
    margin-top: 1rem;
}

/* ============================================
   IMAGE CAPTIONS TABLE - Figure Styling
   ============================================ */

/* Image caption table - hide table styling */
.lesson-body table:has(> tbody > tr > td > a > img) {
  border: none;
  box-shadow: none;
  background: transparent;
  margin: 2.5rem auto;
  width: auto;
  max-width: 100%;
}

.lesson-body table:has(> tbody > tr > td > a > img) th,
.lesson-body table:has(> tbody > tr > td > a > img) td {
  border: none;
  padding: 0;
  background: transparent;
}

/* Image wrapper */
.lesson-body table:has(> tbody > tr > td > a > img) > tbody > tr:first-child > td {
  text-align: center;
  padding-bottom: 12px;
}

.lesson-body table:has(> tbody > tr > td > a > img) a {
  text-decoration: none;
  display: block;
}

.lesson-body table:has(> tbody > tr > td > a > img) img {
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 100%;
  height: auto;
  display: inline-block;
}

.lesson-body table:has(> tbody > tr > td > a > img) a:hover img {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Caption styling */
.lesson-body .tr-caption {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(37, 99, 235, 0.03) 100%);
  padding: 14px 18px;
  border-left: 3px solid #3b82f6;
  border-radius: 0 6px 6px 0;
  color: var(--text);
  font-size: 0.95rem;
  font-style: italic;
  text-align: center;
  margin-top: 0;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.lesson-body table:has(> tbody > tr > td > a > img) > tbody > tr:last-child > td {
  padding: 0;
}

.lesson-body table:has(> tbody > tr > td > a > img) > tbody > tr:last-child {
  background: transparent !important;
  border-bottom: none;
}

.lesson-body table:has(> tbody > tr > td > a > img) > tbody > tr:last-child > td {
  border-bottom: none;
}

@media (max-width: 768px) {
  .lesson-body table:has(> tbody > tr > td > a > img) {
    margin: 2rem auto;
  }

  .lesson-body table:has(> tbody > tr > td > a > img) img {
    max-width: 100%;
    height: auto;
  }

  .lesson-body .tr-caption {
    font-size: 0.9rem;
    padding: 10px 14px;
  }
}

@media (max-width: 768px) {
  .lesson-body table:has(> tbody > tr > td > a > img) {
    margin: 2rem auto;
  }

  .lesson-body table:has(> tbody > tr > td > a > img) img {
    max-width: 100%;
    height: auto;
  }

  .lesson-body .tr-caption {
    font-size: 0.9rem;
    padding: 10px 14px;
  }
}

/* ============================================
   DARK THEME STYLES FOR COURSE PAGES & OVERVIEW
   ============================================ */
[data-theme="dark"] .course-overview-page {
  background-color: #0b0f19;
  color: #f1f5f9;
}

[data-theme="dark"] .course-box {
  background-color: #131b2e;
  border: 1px solid #1e293b;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  color: #f1f5f9;
}

[data-theme="dark"] .box-title {
  color: #ffffff;
}

[data-theme="dark"] .course-description {
  color: #cbd5e1;
}

[data-theme="dark"] .course-description h3,
[data-theme="dark"] .course-description h4,
[data-theme="dark"] .course-description h5,
[data-theme="dark"] .course-description h6 {
  color: #ffffff;
}

[data-theme="dark"] .course-description .bg-body-tertiary,
[data-theme="dark"] .course-description .bg-light {
  background-color: #1a233a !important;
  border-color: #2e3c5a !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .course-description .table {
  --bs-table-bg: #131b2e;
  --bs-table-color: #f1f5f9;
  --bs-table-border-color: #243048;
  background-color: #131b2e !important;
  border-color: #243048 !important;
}

[data-theme="dark"] .course-description .table thead,
[data-theme="dark"] .course-description .table thead th,
[data-theme="dark"] .course-description .table-dark {
  background-color: #0d1322 !important;
  color: #ffffff !important;
  border-color: #243048 !important;
}

[data-theme="dark"] .course-description .table tbody tr,
[data-theme="dark"] .course-description .table tbody td {
  background-color: #131b2e !important;
  color: #e2e8f0 !important;
  border-color: #243048 !important;
}

[data-theme="dark"] .course-description .table-striped tbody tr:nth-of-type(odd) td {
  background-color: #182239 !important;
}

[data-theme="dark"] .course-description .table-striped tbody tr:nth-of-type(even) td {
  background-color: #131b2e !important;
}

[data-theme="dark"] .course-preview-card {
  background-color: #131b2e;
  border: 1px solid #1e293b;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .chapter-item {
  background-color: #172036;
  border-color: #243048;
}

[data-theme="dark"] .chapter-header {
  background-color: #1a243d;
  color: #ffffff;
}

[data-theme="dark"] .chapter-title {
  color: #ffffff;
}

[data-theme="dark"] .lesson-item {
  background-color: #131b2e;
  border-bottom-color: #1e293b;
  color: #cbd5e1;
}

[data-theme="dark"] .lesson-item:hover {
  background-color: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

[data-theme="dark"] .topic-tag {
  background-color: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .topic-tag:hover {
  background-color: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border-color: #6366f1;
}


