/* Modern Dark Theme CSS for FocusRuler - Single Page Layout with SEO Optimizations */

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed navbar */
}

@media (min-width: 768px) {
  html {
    font-size: 18px;
  }
}

/* Modern Color System - IMPROVED CONTRAST */
:root {
  /* Dark Theme Colors - Enhanced for Better Readability */
  --bg-primary: #0f172a;           /* Dark slate */
  --bg-secondary: #1e293b;        /* Slightly lighter slate */
  --bg-card: #374151;             /* Lighter card background for better contrast */
  --bg-card-hover: #4b5563;       /* Card hover state */
  --bg-light: #f8fafc;           /* Light sections - brighter */
  --bg-accent: #1e40af;          /* Accent blue */
  
  /* Text Colors - Enhanced Contrast */
  --text-primary: #ffffff;        /* Pure white text for maximum contrast */
  --text-secondary: #e2e8f0;      /* Lighter secondary text */
  --text-muted: #cbd5e1;         /* Less muted for better visibility */
  --text-dark: #0f172a;          /* Dark text for light backgrounds */
  --text-accent: #60a5fa;        /* Brighter accent blue text */
  
  /* Brand Colors - Adjusted for Accessibility */
  --primary: #3b82f6;            /* Modern blue */
  --primary-hover: #2563eb;      /* Primary hover */
  --primary-dark: #1d4ed8;       /* Primary dark */
  --success: #22c55e;            /* Brighter green */
  --success-hover: #16a34a;      /* Success hover */
  --warning: #f59e0b;            /* Modern orange */
  --danger: #ef4444;             /* Modern red */
  --info: #06b6d4;               /* Modern cyan */
  
  /* High Contrast Alternatives */
  --text-high-contrast: #ffffff;
  --bg-high-contrast: #000000;
  --border-high-contrast: #ffffff;
  
  /* Gradients - Adjusted for better visibility */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --gradient-card: linear-gradient(135deg, #374151 0%, #4b5563 100%);
  --gradient-hero: linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #0f172a 100%);
  
  /* Enhanced Shadows for Depth */
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.15);
  --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.25), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 20px -4px rgba(0, 0, 0, 0.3), 0 6px 8px -2px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 24px 32px -8px rgba(0, 0, 0, 0.35), 0 12px 16px -4px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 24px rgba(59, 130, 246, 0.4);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

/* Alternative Light Theme for Better Readability */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-light: #ffffff;
    
    --text-primary: #0f172a;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-dark: #0f172a;
    --text-accent: #3b82f6;
    
    --gradient-dark: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  }
}

/* Light Section Styling - CRITICAL FIX */
.section-light {
  background: #ffffff !important;
  color: #0f172a !important;
  min-height: 100vh;
}

.section-light h1,
.section-light h2,
.section-light h3,
.section-light h4,
.section-light h5,
.section-light h6 {
  color: #0f172a !important;
  font-weight: 700;
}

.section-light p,
.section-light .lead {
  color: #374151 !important;
}

.section-light .text-muted {
  color: #6b7280 !important;
}

.section-light .card {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 2px solid #e5e7eb !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.section-light .card:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.section-light .card h1,
.section-light .card h2,
.section-light .card h3,
.section-light .card h4,
.section-light .card h5,
.section-light .card h6 {
  color: #0f172a !important;
}

.section-light .card p,
.section-light .card .text-muted {
  color: #374151 !important;
}

.section-light .card .form-label {
  color: #374151 !important;
  font-weight: 600;
}

.section-light .card .form-text {
  color: #6b7280 !important;
}

/* Enhanced Form Controls for Light Sections */
.section-light .form-control,
.section-light .form-select {
  background: #ffffff !important;
  border: 2px solid #d1d5db !important;
  color: #0f172a !important;
  font-weight: 500;
}

.section-light .form-control:focus,
.section-light .form-select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.section-light .form-control::placeholder {
  color: #9ca3af !important;
  opacity: 0.8;
}

/* Enhanced Form Check Controls */
.section-light .form-check-input {
  background-color: #ffffff !important;
  border: 2px solid #d1d5db !important;
  color: #3b82f6 !important;
}

.section-light .form-check-input:checked {
  background-color: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

.section-light .form-check-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

.section-light .form-check-label {
  color: #374151 !important;
  font-weight: 500;
}

/* Enhanced Button Styling */
.section-light .btn-primary {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  font-weight: 700;
}

.section-light .btn-primary:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.section-light .btn-primary:focus {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25) !important;
}

.section-light .btn-outline-primary {
  background: transparent !important;
  border-color: #3b82f6 !important;
  color: #3b82f6 !important;
  font-weight: 700;
}

.section-light .btn-outline-primary:hover {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.section-light .btn-outline-primary:focus {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25) !important;
}

/* Enhanced Text Colors */
.section-light .text-primary {
  color: #3b82f6 !important;
}

.section-light .text-success {
  color: #059669 !important;
  font-weight: 600;
}

.section-light .text-danger {
  color: #dc2626 !important;
  font-weight: 600;
}

.section-light .bg-light {
  background-color: #f9fafb !important;
  color: #374151 !important;
  border: 1px solid #e5e7eb !important;
}

/* Enhanced Alert Styling */
.section-light .alert {
  color: #0f172a !important;
  border-width: 2px;
  font-weight: 500;
}

.section-light .alert-success {
  background-color: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
  color: #166534 !important;
}

.section-light .alert-danger {
  background-color: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
}

.section-light .alert-info {
  background-color: #f0f9ff !important;
  border-color: #bae6fd !important;
  color: #0369a1 !important;
}

.section-light .alert-warning {
  background-color: #fffbeb !important;
  border-color: #fed7aa !important;
  color: #d97706 !important;
}

/* Enhanced Links in Light Sections */
.section-light a:not(.btn) {
  color: #3b82f6 !important;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.section-light a:not(.btn):hover {
  color: #1d4ed8 !important;
  text-decoration: underline;
}

.section-light a:not(.btn):focus {
  color: #1d4ed8 !important;
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Enhanced List Styling */
.section-light ul:not(.list-unstyled) li {
  color: #374151 !important;
  font-weight: 500;
}

.section-light .list-unstyled li {
  color: #374151 !important;
}

.section-light .fas,
.section-light .far,
.section-light .fab {
  opacity: 1 !important;
}

/* Enhanced Small Text */
.section-light small,
.section-light .small {
  color: #6b7280 !important;
  font-weight: 500;
}

/* Enhanced HR Styling */
.section-light hr {
  border-color: #e5e7eb !important;
  opacity: 1;
}

/* Better Image Visibility */
.section-light img {
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Base Styles with Improved Readability */
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--gradient-dark);
  font-weight: 400;
  letter-spacing: -0.01em;
  /* Improve text rendering for better readability */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Ensure minimum contrast ratio */
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Enhanced Typography with Better Contrast */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  /* Improve heading visibility */
  scroll-margin-top: 80px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Enhanced paragraph and text visibility */
p, .lead {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  /* Improve text readability */
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.05);
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.95; /* Increased from 0.9 for better visibility */
  line-height: 1.6;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Accessibility Classes */
.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Skip Link for Accessibility and SEO - ENHANCED */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 2000; /* Increased z-index */
  transition: top var(--transition-fast);
  box-shadow: var(--shadow-lg);
  border: 2px solid white;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 1rem;
  color: white;
  text-decoration: none;
}

/* Fixed Navigation with SEO optimizations - FIXED */
.navbar.fixed-top {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
  transition: all var(--transition-normal);
  z-index: 1000;
  contain: layout;
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.98) !important;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff !important;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.navbar-brand:hover {
  color: #60a5fa !important;
}

.navbar-brand i {
  color: #3b82f6 !important;
}

/* Enhanced visibility for navbar in various conditions */
.navbar.navbar-dark .navbar-brand {
  color: #ffffff !important;
}

.navbar.navbar-dark .navbar-brand:hover,
.navbar.navbar-dark .navbar-brand:focus {
  color: #60a5fa !important;
}

/* High contrast support */
body.high-contrast .navbar-brand {
  color: #ffffff !important;
  text-shadow: 2px 2px 4px #000000 !important;
}

body.high-contrast .navbar-brand i {
  color: #ffff00 !important;
}

/* Bootstrap Navbar Fixes */
.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 0.4rem 0.6rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav {
  --bs-nav-link-color: var(--text-secondary);
  --bs-nav-link-hover-color: var(--text-primary);
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav-link:hover {
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.1);
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.2);
}

.nav-link.active {
  color: var(--primary) !important;
  background: rgba(59, 130, 246, 0.15);
  font-weight: 700;
}

/* Mobile Navigation Improvements */
@media (max-width: 991.98px) {
  .navbar-nav {
    background: rgba(15, 23, 42, 0.98);
    margin-top: 1rem;
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-link {
    margin: 0.25rem 0;
    text-align: center;
  }
  
  .d-flex.gap-2 {
    flex-direction: column;
    gap: 0.5rem !important;
    margin-top: 1rem;
  }
  
  .btn-sm {
    width: 100%;
  }
}

/* Hero Section with SEO structure */
.hero-section {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><circle cx="200" cy="200" r="100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="2"/><circle cx="800" cy="300" r="150" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/><circle cx="400" cy="700" r="120" fill="none" stroke="rgba(255,255,255,0.04)" stroke-width="1"/></svg>');
  opacity: 0.6;
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-section h1,
.hero-section h2,
.hero-section p,
.hero-section .lead {
  color: white;
}

/* Hero Visual Demo */
.hero-visual {
  position: relative;
}

.demo-window {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.demo-header {
  background: #f1f5f9;
  padding: 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
}

.demo-controls {
  display: flex;
  gap: 0.5rem;
  margin-right: 1rem;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control-red { background: #ef4444; }
.control-yellow { background: #f59e0b; }
.control-green { background: #10b981; }

.demo-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
}

.demo-content {
  padding: 2rem;
  position: relative;
}

.demo-text {
  font-family: monospace;
  font-size: 0.875rem;
  line-height: 1.8;
}

.text-line {
  padding: 0.25rem 0;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.text-line.highlighted {
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
  font-weight: 600;
}

.focus-ruler {
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 3px;
  background: var(--gradient-primary);
  top: 50%;
  transform: translateY(-50%);
  border-radius: 2px;
  opacity: 0.8;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.scroll-down {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
  animation: bounce 2s infinite;
}

.scroll-down:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Hero Benefits */
.hero-benefits .benefit-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}

/* Modern Cards with SEO enhancements */
.card {
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.15); /* Increased border visibility */
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
  overflow: hidden;
  position: relative;
  /* Improve card content indexing */
  contain: layout;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); /* Increased visibility */
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  border-color: rgba(59, 130, 246, 0.5); /* Increased hover border visibility */
  background: var(--bg-card-hover);
}

.card-body {
  padding: 2rem;
  color: var(--text-primary);
}

.card-body h1,
.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5,
.card-body h6 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  /* Ensure headings are highly visible */
  font-weight: 800; /* Increased weight */
}

.card-body p {
  color: var(--text-secondary);
  font-weight: 400;
}

/* Testimonial Cards with structured data support - ENHANCED VISIBILITY */
.testimonial-card {
  background: var(--gradient-card);
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.testimonial-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
}

.testimonial-card .rating .fas {
  font-size: 0.875rem;
}

.testimonial-card blockquote {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.6;
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-primary) !important; /* FIXED: Ensure testimonial text is visible */
  font-weight: 500; /* ENHANCED: Slightly bolder for better readability */
}

.testimonial-card blockquote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -0.25rem;
  font-size: 2rem;
  color: var(--primary);
  line-height: 1;
}

/* CRITICAL FIX: Testimonials in Light Sections */
.section-light .testimonial-card {
  background: #ffffff !important;
  border: 2px solid #e5e7eb !important;
  color: #0f172a !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.section-light .testimonial-card:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  transform: translateY(-2px);
}

.section-light .testimonial-card blockquote {
  color: #374151 !important; /* FIXED: Dark gray text for high contrast */
  font-weight: 600 !important; /* ENHANCED: Bolder weight for better readability */
  font-size: 1.1rem !important;
  line-height: 1.7 !important;
  text-shadow: none !important; /* Remove any text shadows that might reduce contrast */
}

.section-light .testimonial-card .rating .fas {
  color: #f59e0b !important; /* Golden star color for better visibility */
  text-shadow: none !important;
}

.section-light .testimonial-card h6 {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.section-light .testimonial-card .text-muted {
  color: #6b7280 !important;
  font-weight: 500 !important;
}

.section-light .testimonial-card .avatar {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.section-light .testimonial-card .card-body {
  color: #374151 !important;
}

/* EXTRA: Ensure all text in testimonial cards has proper contrast */
.section-light .testimonial-card * {
  text-shadow: none !important;
}

/* Pricing Cards with schema.org support */
.pricing-card {
  position: relative;
  background: var(--gradient-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.pricing-card.popular {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, var(--bg-card) 50%);
  transform: scale(1.05);
}

.pricing-card.popular::before {
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.popular-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: white;
  padding: 0.5rem 2rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.price-display {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: 1rem 0;
}

.price-display.free {
  color: var(--success);
}

.price-period {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  padding: 0.75rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500; /* Increased weight for better readability */
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list .check-icon {
  color: var(--success);
  font-weight: 700; /* Increased weight */
  margin-right: 1rem;
  font-size: 1.2rem; /* Slightly larger for better visibility */
  margin-top: 0.1rem;
  flex-shrink: 0;
  text-shadow: 0 0 2px rgba(34, 197, 94, 0.3); /* Subtle glow for icons */
}

/* Enhanced Button Visibility and Contrast Toggle */
.btn {
  font-weight: 700; /* Increased from 600 */
  border-radius: var(--radius-lg);
  padding: 0.75rem 2rem;
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
  cursor: pointer;
  letter-spacing: 0.025em;
  min-height: 44px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Interactive Demo Styles - CRITICAL ADDITION */
.interactive-demo {
  position: relative;
  overflow: visible;
}

.interactive-demo .card-header {
  background: var(--bg-card) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.interactive-demo .card-body {
  background: var(--bg-card) !important;
}

/* Demo Text and Container Styles */
.demo-text-container {
  position: relative;
  font-family: 'Courier New', monospace;
  line-height: 1.8;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.demo-text-line {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.demo-text-line:last-child {
  border-bottom: none;
}

/* Focus Ruler Demo Styles */
.focus-ruler-demo {
  position: absolute;
  left: 0;
  right: 0;
  height: 40px;
  z-index: 10;
  pointer-events: none;
  transition: all var(--transition-normal);
  top: 60px;
}

.ruler-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.9) 0%, 
    rgba(59, 130, 246, 0.7) 50%,
    rgba(59, 130, 246, 0.9) 100%);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  animation: rulerPulse 2s ease-in-out infinite;
}

@keyframes rulerPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* Overlay Demo Styles */
.demo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 5;
  pointer-events: none;
}

.demo-overlay.active {
  opacity: 1;
}

/* Color Demo Styles */
.color-demo-container {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  font-family: 'Courier New', monospace;
}

.color-options {
  gap: 0.5rem;
}

.color-btn {
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.8);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.color-btn:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.color-btn.active {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.demo-ruler-colored {
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 3px;
  background: rgba(59, 130, 246, 0.8);
  top: 50%;
  transform: translateY(-50%);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

/* Opacity Demo Styles */
.opacity-demo-container {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  min-height: 200px;
}

.demo-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-md);
  transition: opacity var(--transition-normal);
}

.demo-ruler-opacity {
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 40px;
  background: rgba(59, 130, 246, 0.8);
  top: 50%;
  transform: translateY(-50%);
  border-radius: var(--radius-sm);
  transition: opacity var(--transition-normal);
}

.opacity-sample {
  position: relative;
  z-index: 10;
}

.sample-block {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: var(--radius-sm);
}

.opacity-label {
  font-weight: 600;
  color: var(--text-accent);
  font-size: 0.85rem;
}

/* Hotkey Demo Styles */
.hotkey-demo-area {
  background: rgba(255, 255, 255, 0.05);
  min-height: 150px;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.hotkey-demo-area:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.demo-ruler-hotkey {
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 30px;
  background: rgba(59, 130, 246, 0.8);
  top: 50%;
  transform: translateY(-50%);
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
}

.demo-overlay-hotkey {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-md);
  transition: opacity var(--transition-normal);
  opacity: 0;
}

.demo-overlay-hotkey.active {
  opacity: 1;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--danger);
  transition: background var(--transition-fast);
}

.status-indicator.active {
  background: var(--success);
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
}

/* Persistence Demo Styles */
.persistence-demo-container {
  font-size: 0.9rem;
}

.preview-window {
  background: rgba(255, 255, 255, 0.05);
  height: 250px;
}

.preview-header {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-secondary) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-content {
  position: relative;
  overflow: hidden;
}

.preview-ruler {
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 3px;
  background: rgba(59, 130, 246, 0.8);
  top: 100px;
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.saved-settings-display {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
}

.demo-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.demo-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Accessibility Demo Styles */
.simulation-area {
  background: rgba(255, 255, 255, 0.05);
  min-height: 200px;
  font-family: Georgia, serif;
  line-height: 1.7;
}

.accessibility-ruler {
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 30px;
  background: rgba(59, 130, 246, 0.9);
  top: 50%;
  transform: translateY(-50%);
  border-radius: var(--radius-sm);
  z-index: 15;
  transition: all var(--transition-normal);
}

.simulation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  opacity: 0;
}

.simulation-dyslexia .reading-paragraph {
  filter: blur(0.5px);
  letter-spacing: 0.5px;
  line-height: 1.9;
  font-weight: 400;
}

.simulation-irlen .simulation-overlay {
  background: linear-gradient(180deg,
    rgba(255, 200, 150, 0.3) 0%,
    rgba(150, 200, 255, 0.2) 50%,
    rgba(255, 200, 150, 0.3) 100%);
  opacity: 1;
}

.simulation-irlen .reading-paragraph {
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.reading-paragraph {
  margin-bottom: 1rem;
  transition: all var(--transition-normal);
}

/* Demo Feedback System */
.demo-feedback {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(34, 197, 94, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  opacity: 0;
  transition: all var(--transition-normal);
  white-space: nowrap;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.demo-feedback.show {
  opacity: 1;
  bottom: -35px;
}

/* Demo Active States */
.demo-active {
  background: rgba(59, 130, 246, 0.05) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Mobile Responsive Demo Styles */
@media (max-width: 768px) {
  .interactive-demo .card-header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .demo-text-container {
    font-size: 0.8rem;
    padding: 0.75rem;
  }
  
  .color-btn {
    width: 35px;
    height: 35px;
  }
  
  .shortcut-list {
    font-size: 0.75rem;
  }
  
  .hotkey-demo-area {
    min-height: 120px;
  }
  
  .preview-window {
    height: 200px;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .demo-ruler-colored,
  .focus-ruler-demo .ruler-bar,
  .demo-ruler-opacity,
  .accessibility-ruler {
    border: 2px solid var(--text-primary);
  }
  
  .color-btn {
    border-width: 2px;
  }
  
  .demo-overlay {
    background: rgba(0, 0, 0, 0.8);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .ruler-bar {
    animation: none;
  }
  
  .demo-loading::after {
    animation: none;
  }
  
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* CRITICAL FIX: Accordion Text Contrast in Tutorials */
.accordion {
  --bs-accordion-bg: rgba(255, 255, 255, 0.98);
  --bs-accordion-border-color: rgba(0, 0, 0, 0.125);
  --bs-accordion-border-radius: 0.5rem;
  --bs-accordion-inner-border-radius: calc(0.5rem - 1px);
  --bs-accordion-btn-padding-x: 1.25rem;
  --bs-accordion-btn-padding-y: 1rem;
  --bs-accordion-btn-color: #0f172a;
  --bs-accordion-btn-bg: rgba(255, 255, 255, 0.98);
  --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-icon-width: 1.25rem;
  --bs-accordion-btn-icon-transform: rotate(-180deg);
  --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out;
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233b82f6'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-focus-border-color: #3b82f6;
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
  --bs-accordion-active-color: #0f172a;
  --bs-accordion-active-bg: rgba(59, 130, 246, 0.1);
}

.accordion-item {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border: 2px solid rgba(0, 0, 0, 0.125) !important;
  margin-bottom: 0.5rem;
  border-radius: var(--bs-accordion-border-radius) !important;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.accordion-header {
  margin-bottom: 0;
}

.accordion-button {
  background-color: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  border: none !important;
  text-align: left;
  transition: all 0.15s ease-in-out;
}

.accordion-button:not(.collapsed) {
  background-color: rgba(59, 130, 246, 0.1) !important;
  color: #0f172a !important;
  box-shadow: none !important;
}

.accordion-button:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25) !important;
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233b82f6'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
  transform: rotate(-180deg);
}

.accordion-body {
  background-color: rgba(255, 255, 255, 0.98) !important;
  color: #374151 !important;
  padding: 1.5rem !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;
  border-top: 1px solid rgba(0, 0, 0, 0.125);
}

.accordion-body h6 {
  color: #0f172a !important;
  font-weight: 700 !important;
  margin-bottom: 0.75rem !important;
}

.accordion-body p {
  color: #374151 !important;
  font-weight: 500 !important;
  margin-bottom: 1rem !important;
}

.accordion-body ul {
  color: #374151 !important;
  margin-bottom: 1rem !important;
}

.accordion-body li {
  color: #374151 !important;
  font-weight: 500 !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.6 !important;
}

.accordion-body strong {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.accordion-body .fas,
.accordion-body .far,
.accordion-body .fab {
  color: #3b82f6 !important;
  margin-right: 0.5rem;
}

/* Enhanced contrast for accordion in tutorials page specifically */
.tutorials-page .accordion-item,
#tutorials .accordion-item,
.tutorials-section .accordion-item {
  background-color: #ffffff !important;
  border: 2px solid #d1d5db !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.tutorials-page .accordion-button,
#tutorials .accordion-button,
.tutorials-section .accordion-button {
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  border: none !important;
}

.tutorials-page .accordion-button:not(.collapsed),
#tutorials .accordion-button:not(.collapsed),
.tutorials-section .accordion-button:not(.collapsed) {
  background-color: #f3f4f6 !important;
  color: #0f172a !important;
}

.tutorials-page .accordion-body,
#tutorials .accordion-body,
.tutorials-section .accordion-body {
  background-color: #ffffff !important;
  color: #374151 !important;
  font-weight: 500 !important;
}

.tutorials-section .accordion-body h6 {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.tutorials-section .accordion-body p {
  color: #374151 !important;
  font-weight: 500 !important;
}

.tutorials-section .accordion-body ul li {
  color: #374151 !important;
  font-weight: 500 !important;
}

.tutorials-section .accordion-body strong {
  color: #0f172a !important;
  font-weight: 700 !important;
}

/* CRITICAL FIX: Force high contrast text in ALL accordion content */
.accordion-body * {
  color: #374151 !important;
}

.accordion-body h1, .accordion-body h2, .accordion-body h3, 
.accordion-body h4, .accordion-body h5, .accordion-body h6,
.accordion-body strong, .accordion-body b {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.accordion-body .fas, .accordion-body .far, .accordion-body .fab {
  color: #3b82f6 !important;
}

/* Additional contrast enhancements for the tutorials page */
.tutorials-section .accordion-item {
  border: 2px solid #e5e7eb !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.tutorials-section .accordion-button {
  background-color: #f9fafb !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  padding: 1.25rem 1.5rem !important;
}

.tutorials-section .accordion-button:not(.collapsed) {
  background-color: #f3f4f6 !important;
  color: #0f172a !important;
  border-bottom-color: #e5e7eb !important;
}

.tutorials-section .accordion-body {
  background-color: #ffffff !important;
  padding: 2rem !important;
  border-top: 2px solid #f3f4f6 !important;
}

.tutorials-section .accordion-body .row {
  margin-bottom: 1rem;
}

.tutorials-section .accordion-body .col-md-6 h6 {
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  margin-bottom: 0.75rem !important;
}

.tutorials-section .accordion-body ul {
  padding-left: 1.25rem;
}

.tutorials-section .accordion-body li {
  color: #374151 !important;
  font-weight: 500 !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.6 !important;
}

.btn:focus {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.4); /* Increased focus ring */
  outline: none;
}