/* ==========================================================================
   DESIGN SYSTEM & CUSTOM PROPERTIES
   ========================================================================== */
:root {
  /* Typography */
  --font-family-body: 'Inter', sans-serif;
  --font-family-headings: 'Outfit', sans-serif;

  /* Theme Tokens - Light Mode Default */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.15);
  
  --secondary: #06b6d4;
  --secondary-hover: #0891b2;
  
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --accent-gradient-hover: linear-gradient(135deg, #4338ca 0%, #0891b2 100%);
  
  --border-color: #e2e8f0;
  --border-glass: rgba(255, 255, 255, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.6);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.04);
  
  --card-bg: #ffffff;
  --dialog-bg: #ffffff;
  
  --success: #10b981;
  --error: #ef4444;

  /* System Color Scheme */
  color-scheme: light dark;
}

/* Theme Tokens - Dark Mode Override (Matches preferences or manual toggle) */
[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  
  --secondary: #22d3ee;
  --secondary-hover: #06b6d4;
  
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
  --accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  
  --border-color: #1f2937;
  --border-glass: rgba(255, 255, 255, 0.07);
  --bg-glass: rgba(17, 24, 39, 0.7);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  --card-bg: #111827;
  --dialog-bg: #111827;
}

/* Fallback for system preferences if Javascript fails or has not run yet */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.25);
    
    --secondary: #22d3ee;
    --secondary-hover: #06b6d4;
    
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
    --accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    
    --border-color: #1f2937;
    --border-glass: rgba(255, 255, 255, 0.07);
    --bg-glass: rgba(17, 24, 39, 0.7);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --card-bg: #111827;
    --dialog-bg: #111827;
  }
}

/* ==========================================================================
   BASE & RESET STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-headings);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

/* Custom Scrollbar */
scrollbar-color: var(--text-muted) var(--bg-tertiary);
scrollbar-width: thin;

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
  }
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.section-padding {
  padding-top: 80px;
  padding-bottom: 80px;
}

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

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

/* Gradients */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-headings);
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--accent-gradient-hover);
  box-shadow: 0 6px 20px 0 var(--primary-glow);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

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

.btn-block {
  display: flex;
  width: 100%;
}

.btn:active {
  transform: translateY(0);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: var(--shadow-glass);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.3s ease;
}

/* ==========================================================================
   HEADER NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  transition: all 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  padding-top: 10px;
  padding-bottom: 10px;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family-headings);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.logo-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
}

.accent-text {
  color: var(--primary);
}

.main-nav {
  display: none; /* Hidden on mobile */
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 0;
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

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

.nav-link.active::after {
  width: 100%;
}

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

/* Theme Toggle Button */
.theme-toggle-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  background-color: var(--border-color);
  transform: scale(1.05);
}

.theme-toggle-btn .sun-icon {
  display: none;
}

.theme-toggle-btn .moon-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-btn .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-btn .moon-icon {
  display: none;
}

/* Mobile Hamburger Menu */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.hamburger-bar {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Nav Menu Drawer */
.mobile-nav {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 20px;
  display: none; /* Controlled via JS */
  box-shadow: var(--shadow-lg);
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-nav.open {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  list-style: none;
}

.mobile-nav-link {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
  padding: 8px 0;
}

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

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  padding-top: 140px;
  padding-bottom: 80px;
  overflow: hidden;
  background-color: var(--bg-primary);
}

.hero-background-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
}

.glow-orb-1 {
  top: -10%;
  right: 5%;
  width: 500px;
  height: 500px;
  background: var(--primary);
}

.glow-orb-2 {
  bottom: -10%;
  left: 5%;
  width: 400px;
  height: 400px;
  background: var(--secondary);
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 1;
}

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

.badge-container {
  margin-bottom: 20px;
}

.hero-badge {
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--border-glass);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 9999px;
  display: inline-block;
  font-family: var(--font-family-headings);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 35px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: center;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.visual-card-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.visual-card {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.card-header-dots {
  display: flex;
  gap: 6px;
  background: var(--bg-tertiary);
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-header-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-body {
  padding: 24px;
  font-family: monospace;
  font-size: 0.9rem;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  overflow-x: auto;
}

.code-line {
  margin-bottom: 8px;
}

.code-keyword { color: #ec4899; font-weight: bold; }
.code-variable { color: var(--primary); }
.code-class { color: #f59e0b; }
.code-property { color: var(--secondary); }
.code-string { color: #10b981; }
.code-boolean { color: #3b82f6; }
.code-method { color: #8b5cf6; }

.indent-1 {
  padding-left: 20px;
}

/* Floating Badges */
.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  animation: float 6s ease-in-out infinite;
}

.badge-icon {
  background: var(--accent-gradient);
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.badge-top-right {
  top: 15px;
  right: -10px;
  animation-delay: 0s;
}

.badge-bottom-left {
  bottom: 25px;
  left: -10px;
  animation-delay: 3s;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* ==========================================================================
   STATS SECTION
   ========================================================================== */
.stats-section {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-card {
  padding: 15px;
}

.stat-number {
  font-family: var(--font-family-headings);
  font-size: 2.25rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   FEATURES / ABOUT
   ========================================================================== */
.section-header {
  max-width: 600px;
  margin: 0 auto 50px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 15px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.feature-card {
  padding: 30px;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.feature-icon-wrapper {
  background: var(--primary-glow);
  color: var(--primary);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.feature-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ==========================================================================
   COURSES CATALOG
   ========================================================================== */
.section-header-split {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.search-filter-wrapper {
  width: 100%;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 4px;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

.categories-filter-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 15px;
  margin-bottom: 40px;
  scrollbar-width: none; /* Hide scrollbar for clean filter look */
}

.categories-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  padding: 10px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-family-headings);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

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

.filter-tab.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #ffffff;
}

/* Courses Grid */
.courses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  min-height: 250px;
}

.course-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.course-thumbnail {
  position: relative;
  aspect-ratio: 16/10;
  background-color: var(--bg-tertiary);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Decorative visual for cards (Instead of image placeholders) */
.course-thumb-visual {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: transform 0.5s ease;
}

.course-card:hover .course-thumb-visual {
  transform: scale(1.08);
}

.course-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
}

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

.course-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 500;
}

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

.course-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.course-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}

.course-price {
  font-family: var(--font-family-headings);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--success);
}

.loading-state, .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.empty-state h3 {
  margin-bottom: 8px;
}

/* ==========================================================================
   CODE SANDBOX
   ========================================================================== */
.sandbox-wrapper {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-glass);
}

.sandbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-tertiary);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
}

.active-tab-title {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.sandbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sandbox-select {
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
}

.sandbox-workspace {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 400px;
  height: 500px;
}

.editor-pane {
  position: relative;
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.editor-lines-decor {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40px;
  padding-top: 15px;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  user-select: none;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
}

.editor-lines-decor span {
  height: 24px;
}

#sandbox-code-editor {
  flex-grow: 1;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.9rem;
  padding: 15px;
  line-height: 24px;
  tab-size: 2;
}

.preview-pane {
  background: #ffffff;
  position: relative;
  min-height: 200px;
}

#sandbox-preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* ==========================================================================
   FAQ SECTION (Native summary styling)
   ========================================================================== */
.faq-accordion-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  user-select: none;
  outline: none;
  list-style: none; /* Hide default arrow */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::-webkit-details-marker {
  display: none; /* Hide Webkit default arrow */
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-family: monospace;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  content: '−';
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-top: 1px solid transparent;
}

.faq-item[open] .faq-answer {
  border-color: var(--border-color);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  align-items: center;
}

.contact-info {
  max-width: 500px;
}

.contact-text {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.contact-details-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-detail-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-detail-icon {
  background: var(--primary-glow);
  color: var(--primary);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-detail-content {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.detail-value {
  font-size: 1rem;
  font-weight: 600;
}

.contact-form-card {
  padding: 35px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Form validation styling matching instructions */
.form-control:user-invalid {
  border-color: var(--error);
  background-color: rgba(239, 68, 68, 0.02);
}

.form-control:user-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-validation-msg {
  font-size: 0.75rem;
  color: var(--error);
  font-weight: 500;
  margin-top: -4px;
  min-height: 16px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 20px;
}

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

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  font-family: var(--font-family-headings);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  display: inline-block;
  margin-bottom: 15px;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.footer-col-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.copyright-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MODAL DIALOG (Native course details)
   ========================================================================== */
.course-details-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              opacity 0.3s ease, 
              visibility 0.3s ease;
  display: block; /* Overrides default browser display block/none behaviour for transitions */
}

/* Showing state */
.course-details-dialog[open] {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

.course-details-dialog::backdrop {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.course-details-dialog[open]::backdrop {
  opacity: 1;
}

.dialog-content {
  padding: 40px;
  overflow-y: auto;
  max-height: 85vh;
  position: relative;
  background-color: var(--dialog-bg);
}

.close-dialog-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-dialog-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.dialog-header {
  margin-bottom: 25px;
  padding-right: 30px;
}

.dialog-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 10px 0;
}

.dialog-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.dialog-rating .stars {
  color: #f59e0b;
}

.dialog-rating .rating-val {
  font-weight: 600;
}

.dialog-body-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.dialog-section-title {
  font-size: 1.2rem;
  margin-bottom: 12px;
  margin-top: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.dialog-syllabus-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialog-syllabus-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.dialog-syllabus-list li::before {
  content: '→';
  color: var(--primary);
  font-weight: bold;
}

.enrollment-sticky-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.pricing-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.price-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.price-amount {
  font-family: var(--font-family-headings);
  font-size: 2rem;
  font-weight: 800;
  color: var(--success);
}

.meta-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.meta-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.meta-label {
  color: var(--text-secondary);
}

.dialog-enrollment-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-control-sm {
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 12px 20px;
  border-radius: 10px;
  transform: translateY(100px) scale(0.9);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-icon {
  background: var(--success);
  color: #ffffff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.toast-message {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (min-width: 576px) {
  .hero-buttons {
    flex-direction: row;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .main-nav {
    display: block;
  }
  
  .mobile-menu-btn {
    display: none;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-container {
    grid-template-columns: 1.2fr 0.8fr;
  }
  
  .hero-content {
    text-align: left;
  }
  
  .hero-buttons {
    justify-content: flex-start;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .sandbox-workspace {
    grid-template-columns: 1fr 1fr;
  }
  
  .editor-pane {
    border-bottom: none;
    border-right: 1px solid var(--border-color);
  }
  
  .contact-container {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-container {
    grid-template-columns: 1.2fr 0.8fr;
  }
  
  .footer-links-group {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dialog-body-grid {
    grid-template-columns: 1.3fr 0.7fr;
  }
}

@media (min-width: 992px) {
  .courses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .section-header-split {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
  
  .search-filter-wrapper {
    width: 350px;
  }
}
