:root {
  color-scheme: light;
  --background: 0 0% 100%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 47% 11%;
  --primary: 214 100% 50%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222 47% 11%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --accent: 210 40% 96%;
  --accent-foreground: 222 47% 11%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 210 40% 98%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --ring: 214 100% 50%;
  --hero: 223 49% 8%;
  --hero-foreground: 210 40% 98%;
  --radius: 0.75rem;
  --card-padding: 24px;
  
  /* Enhanced design tokens */
  --gradient-primary: linear-gradient(135deg, #0066FF 0%, #7C3AED 100%);
  --gradient-accent: linear-gradient(135deg, #10B981 0%, #0066FF 100%);
  --gradient-warm: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  --gradient-hero: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
  
  --shadow-sm: 0 1px 3px rgba(2, 6, 23, 0.06);
  --shadow-md: 0 6px 18px rgba(11, 20, 50, 0.06);
  --shadow-lg: 0 20px 40px rgba(11, 20, 50, 0.08);
  --shadow-primary: 0 10px 40px rgba(0, 102, 255, 0.2);
  --shadow-secondary: 0 10px 40px rgba(124, 58, 237, 0.2);
  --shadow-accent: 0 10px 40px rgba(16, 185, 129, 0.2);
  
  /* Animation tokens */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

.dark {
  color-scheme: dark;
  --background: 222 47% 11%;
  --foreground: 210 40% 98%;
  --card: 222 47% 15%;
  --card-foreground: 210 40% 98%;
  --popover: 222 47% 12%;
  --popover-foreground: 210 40% 98%;
  --primary: 214 100% 50%;
  --primary-foreground: 210 40% 98%;
  --secondary: 217 33% 17%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217 33% 17%;
  --muted-foreground: 210 40% 95%;
  --accent: 217 33% 17%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 63% 31%;
  --destructive-foreground: 210 40% 98%;
  --border: 217 33% 20%;
  --input: 217 33% 20%;
  --ring: 214 100% 50%;
  --hero: 223 49% 8%;
  --hero-foreground: 210 40% 98%;
  
  /* Enhanced dark mode tokens */
  --gradient-primary: linear-gradient(135deg, #0066FF 0%, #7C3AED 100%);
  --gradient-accent: linear-gradient(135deg, #10B981 0%, #0066FF 100%);
  --gradient-warm: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  --gradient-hero: linear-gradient(135deg, rgba(0, 102, 255, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
  --shadow-primary: 0 10px 40px rgba(0, 102, 255, 0.3);
  --shadow-secondary: 0 10px 40px rgba(124, 58, 237, 0.3);
  --shadow-accent: 0 10px 40px rgba(16, 185, 129, 0.3);
}

* {
  border-color: hsl(var(--border));
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

.theme-transition * {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, fill 0.3s ease, stroke 0.3s ease;
}

.bg-slate-100,
.bg-slate-200,
.bg-slate-700 {
  background-color: hsl(var(--muted));
}

.dark .prose,
.dark .prose p,
.dark .prose li,
.dark .lead,
.dark .text-muted-foreground {
  color: hsl(var(--foreground));
}

.dark input,
.dark textarea,
.dark select,
.dark button {
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  border-color: hsl(var(--border));
}

[data-blog-pagination] button[aria-current="page"] {
  background-color: hsl(var(--primary)) !important;
  color: hsl(var(--primary-foreground)) !important;
  border-color: hsl(var(--primary)) !important;
  box-shadow: var(--shadow-accent);
}

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

.course-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.border-slate-200,
.border-slate-600,
.border-slate-700 {
  border-color: hsl(var(--border));
}

/* Modern Component Styles */

/* Enhanced Cards */
.modern-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  overflow: hidden;
  padding: var(--card-padding); /* p-6 standard */
}

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

.modern-card-elevated {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  padding: 24px; /* p-6 standard */
}

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

/* Standardized card padding classes */
.card-large {
  padding: 32px; /* p-8 for feature/pricing cards */
}

.card-standard {
  padding: 24px; /* p-6 for regular cards */
}

.card-compact {
  padding: 16px; /* p-4 for smaller cards */
}

/* Enhanced Buttons */
.btn-primary {
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  border: none;
  border-radius: 999px;
  padding: 12px 24px; /* Consistent py-3 px-6 */
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  min-height: 48px; /* Ensure minimum touch target */
}

.plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--transition-slow);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  padding: 12px 24px; /* Consistent py-3 px-6 */
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  min-height: 48px; /* Ensure minimum touch target */
}

.btn-secondary:hover {
  background: hsl(var(--accent));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Standardized button sizes */
.btn-small {
  padding: 6px 12px; /* py-1.5 px-3 */
  font-size: 14px;
  min-height: 48px; /* ensure touch target */
  border-radius: 999px;
}

.btn-pill {
  padding: 8px 16px; /* py-2 px-4 */
  min-height: 40px;
  border-radius: 999px;
}

/* Enhanced Hero Section */
.modern-hero {
  position: relative;
  background: var(--gradient-hero);
  overflow: hidden;
}

.modern-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/hero-pattern.svg');
  opacity: 0.05;
  z-index: 0;
}

.rounded-lg, .rounded-2xl, .rounded-3xl {
  border-radius: 0.75rem !important; /* Standardize to rounded-xl */
}

.modern-hero-content {
  position: relative;
  z-index: 1;
}

/* Enhanced Navigation */
.modern-nav {
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border) / 0.6);
  transition: all var(--transition-normal);
}

.modern-nav-sticky {
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

/* Enhanced Filters */
.pill-filter {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 40px; /* Ensure minimum touch target */
}

.pill-filter:hover {
  background: hsl(var(--muted));
  border-color: hsl(var(--primary));
}

.pill-filter.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

/* Status Badge (Accessible) */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px; /* py-1.5 px-3 */
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  min-height: 32px; /* Ensure adequate touch target */
  white-space: nowrap;
}

/* Enhanced Typography */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced Grid Layouts */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
}

.card-grid-compact {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse-slow {
  animation: pulse 3s infinite;
}

/* Enhanced Stats */
.stat-card {
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-primary);
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.9;
}

/* Enhanced Search */
.modern-search {
  position: relative;
  display: flex;
  align-items: center;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  padding: 12px 20px;
  transition: all var(--transition-normal);
}

.modern-search:focus-within {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.2);
}

.modern-search input {
  background: none;
  border: none;
  outline: none;
  flex: 1;
  color: hsl(var(--foreground));
}

/* Standardized form input styles */
.input-standard {
  padding: 12px 16px; /* py-3 px-4 */
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  min-height: 48px; /* Ensure minimum touch target */
  transition: all var(--transition-normal);
}

.input-standard:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.2);
}

.input-compact {
  padding: 8px 12px; /* py-2 px-3 */
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  min-height: 40px;
  transition: all var(--transition-normal);
}

/* Enhanced Footer */
.modern-footer {
  background: hsl(var(--card));
  border-top: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
}

.modern-footer a {
  color: hsl(var(--foreground));
  transition: color var(--transition-fast);
}

.modern-footer a:hover {
  color: hsl(var(--primary));
}

/* Standardized Container Spacing */
.container-standard {
  padding-left: 16px; /* px-4 */
  padding-right: 16px;
}

@media (min-width: 640px) {
  .container-standard {
    padding-left: 24px; /* sm:px-6 */
    padding-right: 24px;
  }
}

@media (min-width: 1024px) {
  .container-standard {
    padding-left: 32px; /* lg:px-8 */
    padding-right: 32px;
  }
}

/* Standardized Section Spacing */
.section-hero {
  padding-top: 80px; /* pt-20 */
  padding-bottom: 80px;
}

@media (min-width: 1024px) {
  .section-hero {
    padding-top: 128px; /* lg:pt-32 */
    padding-bottom: 128px;
  }
}

.section-standard {
  padding-top: 64px; /* py-16 */
  padding-bottom: 64px;
}

.section-compact {
  padding-top: 48px; /* py-12 */
  padding-bottom: 48px;
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .modern-hero {
    padding: 48px 0;
  }
  
  .btn-primary, .btn-secondary {
    padding: 12px 24px;
    font-size: 14px;
  }
}

/* Additional responsive breakpoints for tablet/desktop sizing */
@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
  }
}
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}
@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (min-width: 1280px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  }
}
