/* ===================================
   Sleepmate Website - Professional Styles
   ================================= */

/* CSS Custom Properties (Enhanced Design System) */
:root {
  /* Colors - Enhanced Palette */
  --primary-bg: linear-gradient(135deg, #0f1419 0%, #1a1f3a 25%, #2d3561 75%, #3d4785 100%);
  --secondary-bg: linear-gradient(45deg, #1e2749 0%, #2a3458 100%);
  --accent-blue: #4a90e2;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-primary: #8b5cf6;
  --text-primary: #ffffff;
  --text-secondary: #b8c5d6;
  --text-muted: #8892b0;
  --button-primary: linear-gradient(135deg, #6c5ce7 0%, #8b5cf6 100%);
  --button-hover: linear-gradient(135deg, #5a4fcf 0%, #7c3aed 100%);
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-bg-hover: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.15);
  --card-border-hover: rgba(255, 255, 255, 0.25);
  --input-bg: rgba(255, 255, 255, 0.1);
  --input-border: rgba(255, 255, 255, 0.2);
  --input-focus: rgba(108, 92, 231, 0.4);
  --error-color: #ef4444;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --gradient-secondary: linear-gradient(45deg, #6c5ce7 0%, #8b5cf6 100%);
  --gradient-accent: linear-gradient(135deg, #4a90e2 0%, #8b5cf6 50%, #06b6d4 100%);
  
  /* Typography - Enhanced */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-family-display: 'Inter', system-ui, sans-serif;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 3.75rem;   /* 60px */
  --font-size-7xl: 4.5rem;    /* 72px */
  
  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Spacing */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */
  
  /* Layout */
  --container-max-width: 1200px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  
  /* Shadows - Enhanced */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.3);
  --shadow-glow-hover: 0 0 30px rgba(108, 92, 231, 0.5);
  
  /* Transitions - Enhanced */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Animations */
  --animation-duration: 0.6s;
  --animation-delay: 0.1s;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--primary-bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Add subtle texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--font-size-5xl);
  font-weight: 700;
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover, a:focus {
  color: var(--text-primary);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Layout Components */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header Styles */
.header {
  padding: var(--space-lg) 0;
  position: relative;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
}

.navigation .nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.nav-link {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link:focus {
  color: var(--text-primary);
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero-section {
  padding: var(--space-4xl) 0;
  text-align: center;
}

.hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.app-icon-container {
  margin-bottom: var(--space-2xl);
}

.app-icon {
  width: 120px;
  height: 120px;
  border-radius: var(--border-radius-lg);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  padding: var(--space-lg);
}

.hero-title {
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Features Section */
.features-section {
  padding: var(--space-2xl) 0;
}

.features-card {
  max-width: 500px;
  margin: 0 auto;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: var(--space-2xl);
}

.features-list {
  list-style: none;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.feature-item:last-child {
  margin-bottom: 0;
}

.feature-bullet {
  color: var(--accent-blue);
  font-weight: bold;
  font-size: var(--font-size-lg);
  line-height: 1;
  margin-top: 2px;
}

.feature-text {
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  line-height: 1.5;
}

/* CTA Section */
.cta-section {
  padding: var(--space-4xl) 0;
  text-align: center;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.cta-title {
  margin-bottom: var(--space-md);
}

.cta-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
}

.contact-info {
  margin-top: var(--space-2xl);
}

.contact-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: 0;
}

.contact-link {
  color: var(--accent-blue);
}

/* Footer */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--card-border);
  margin-top: var(--space-4xl);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-logo-icon {
  width: 24px;
  height: 24px;
}

.footer-brand-name {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.footer-nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.footer-link {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.copyright-text {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* Focus Styles for Accessibility */
*:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --text-secondary: #ffffff;
    --card-border: rgba(255, 255, 255, 0.5);
    --input-border: rgba(255, 255, 255, 0.6);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ===================================
   ENHANCED PROFESSIONAL COMPONENTS
   ================================= */

/* Enhanced Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 20, 25, 0.95);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}

header.scrolled {
  background: rgba(15, 20, 25, 0.98);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-xl);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}

.logo {
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--accent-primary);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  line-height: 1.75rem;
}

.logo::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -0.5rem;
  width: 0.25rem;
  height: 1.5rem;
  background: var(--gradient-primary);
  border-radius: 2px;
  transform: translateY(-50%);
  transition: all 0.4s ease;
}

.logo:hover {
  transform: scale(1.05) translateY(-1px);
  filter: brightness(1.1);
}

.logo:hover::before {
  height: 2rem;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: baseline;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  font-size: 0.95rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  letter-spacing: 0.025em;
  white-space: nowrap;
  line-height: 1.75rem;
}

.nav-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  opacity: 0;
  transition: all 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.nav-links a:hover::before {
  opacity: 1;
}

.nav-links a:hover::after {
  width: calc(100% - 2rem);
}

.nav-links a:hover {
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.1);
}

.nav-links a.active::after {
  width: calc(100% - 2rem);
}

/* Enhanced Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.025em;
  min-width: 120px;
}

.btn::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 0.6s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
}

.btn-outline:hover {
  background: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Enhanced Forms */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.025em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--input-focus);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  color: var(--error-color);
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.form-success {
  color: var(--success-color);
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Enhanced Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: var(--space-2xl);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  margin-bottom: var(--space-lg);
}

.card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: var(--font-size-base);
}

.card-content {
  color: var(--text-secondary);
  line-height: 1.7;
}

.card-footer {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--accent-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease-out;
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
  nav {
    padding: 1rem;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
  
  .nav-links a {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-sm);
  }
  
  .card {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 1rem;
  }
  
  .nav-links a {
    padding: 0.25rem 0.5rem;
  }
}

/* ===================================
   ENHANCED INTERACTIVE COMPONENTS
   ================================= */

/* App Screenshots Carousel */
.app-carousel {
  position: relative;
  max-width: 300px;
  margin: 0 auto;
}

.carousel-container {
  position: relative;
  height: 600px;
  perspective: 1000px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  width: 280px;
  height: 580px;
  background: linear-gradient(145deg, #1a1f3a, #2d3561);
  border-radius: 40px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  opacity: 0.5;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.carousel-slide.active {
  transform: translateX(-50%) scale(1);
  opacity: 1;
  z-index: 3;
  box-shadow: var(--shadow-2xl);
}

.carousel-slide.next {
  transform: translateX(-50%) scale(0.9);
  opacity: 0.7;
  z-index: 2;
  box-shadow: var(--shadow-xl);
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: var(--accent-primary);
  transform: scale(1.2);
}

.carousel-dot:hover {
  background: var(--accent-primary);
  opacity: 0.8;
}

/* Testimonials Carousel */
.testimonials-carousel {
  position: relative;
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 400px; /* Ensure minimum height */
}

.testimonials-container {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  height: 100%;
  min-height: 400px; /* Ensure container has height */
}

.testimonial-card {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.5s ease;
  opacity: 1 !important;
  transform: scale(1) !important;
  box-sizing: border-box;
  display: block !important;
  visibility: visible !important;
  min-height: 350px; /* Ensure card has minimum height */
}

.testimonial-card.active {
  opacity: 1 !important;
  transform: scale(1) !important;
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-lg);
  display: block !important;
  visibility: visible !important;
}

.testimonial-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 0.375rem;
}

.testimonial-dot.active {
  background: var(--accent-primary);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.testimonial-dot:hover {
  background: var(--accent-primary);
  opacity: 0.8;
  transform: scale(1.1);
}

.testimonial-dot:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Sleep Quiz Styles */
.quiz-screen {
  transition: all 0.5s ease;
  min-height: 300px;
}

.quiz-screen:not(.active) {
  display: none !important;
}

.quiz-screen.active {
  display: block !important;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

/* Quiz Container */
#quiz-container {
  position: relative;
  min-height: 400px;
}

/* Quiz Questions Container */
#quiz-questions {
  display: none;
}

#quiz-questions.active {
  display: block !important;
}

/* Quiz Start Screen */
#quiz-start {
  display: block;
}

#quiz-start.active {
  display: block !important;
}

/* Quiz Results Screen */
#quiz-results {
  display: none;
}

#quiz-results.active {
  display: block !important;
}

.quiz-option {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.quiz-option:hover {
  background: var(--card-bg-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quiz-option.selected {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-primary);
  color: var(--text-primary);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

.quiz-option.selected:hover {
  background: rgba(139, 92, 246, 0.2);
}

#quiz-progress {
  background: var(--gradient-primary);
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

#quiz-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes slideOutDown {
  from {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  to {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
}

/* Enhanced Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: var(--shadow-lg);
  }
  50% {
    box-shadow: var(--shadow-xl), var(--shadow-glow);
  }
}

.animate-slide-in-up {
  animation: slideInUp 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-glow {
  animation: glow 3s infinite;
}

/* Responsive Enhancements for New Components */
@media (max-width: 768px) {
  .carousel-container {
    height: 500px;
  }
  
  .carousel-slide {
    width: 240px;
    height: 480px;
    padding: 15px;
  }
  
  .carousel-slide .app-screen {
    padding: 20px 15px;
  }
  
  .testimonial-card {
    padding: 2rem;
  }
  
  .quiz-option {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .carousel-container {
    height: 450px;
  }
  
  .carousel-slide {
    width: 200px;
    height: 400px;
    padding: 12px;
  }
  
  .testimonial-card {
    padding: 1.5rem;
  }
  
  .quiz-option {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  .carousel-slide,
  .testimonial-card,
  .quiz-screen,
  .quiz-option {
    transition: none;
  }
  
  .carousel-slide {
    animation: none;
  }
  
  #quiz-progress::after {
    animation: none;
  }
}

/* High Contrast Mode for Interactive Elements */
@media (prefers-contrast: high) {
  .quiz-option {
    border-width: 2px;
  }
  
  .quiz-option.selected {
    background: var(--accent-primary);
    color: var(--text-primary);
  }
  
  .carousel-dot.active,
  .testimonial-dot.active {
    background: var(--text-primary);
  }
}

/* ===================================
   PHASE 2 ENHANCEMENTS
   ================================= */

/* How It Works Cards */
.how-it-works-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--card-border-hover);
}

/* Features Deep Dive Responsive Grid */
@media (max-width: 768px) {
  .features-deep-dive .feature-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  .features-deep-dive .feature-grid > div {
    order: unset !important;
  }
}

/* Feature Demo Cards */
.feature-demo {
  transition: all 0.4s ease;
}

.feature-demo:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Enhanced Hover Effects for New Sections */
.how-it-works-card,
.feature-demo {
  position: relative;
  overflow: hidden;
}

.how-it-works-card::before,
.feature-demo::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.how-it-works-card:hover::before,
.feature-demo:hover::before {
  left: 100%;
}

/* ===================================
   PHASE 3 ENHANCEMENTS
   ================================= */

/* FAQ Section */
.faq-item:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.faq-question:hover {
  color: var(--accent-primary);
}

.faq-answer {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-answer {
  max-height: 200px !important;
}

.faq-icon {
  transition: transform 0.3s ease, color 0.3s ease;
}

.faq-item:hover .faq-icon {
  color: var(--accent-primary);
}

/* Pricing Card */
.pricing-card {
  transition: all 0.4s ease;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl), var(--shadow-glow);
  border-color: var(--accent-cyan);
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.pricing-card:hover::before {
  opacity: 1;
}

/* Enhanced Mobile Responsiveness for Phase 3 */
@media (max-width: 768px) {
  .faq-question {
    padding: 1.25rem 1.5rem !important;
    font-size: 1rem !important;
  }
  
  .faq-answer > div {
    padding: 0 1.5rem 1.25rem 1.5rem !important;
  }
  
  .pricing-card {
    padding: 2rem !important;
    margin: 0 1rem;
  }
  
  .pricing-card .btn {
    font-size: 1rem !important;
  }
}

@media (max-width: 480px) {
  .faq-question {
    padding: 1rem 1.25rem !important;
    font-size: 0.95rem !important;
  }
  
  .faq-answer > div {
    padding: 0 1.25rem 1rem 1.25rem !important;
    font-size: 0.9rem !important;
  }
  
  .pricing-card {
    padding: 1.5rem !important;
  }
}

/* Animation Enhancements */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.faq-item,
.pricing-card {
  animation: fadeInScale 0.6s ease-out;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(6) { animation-delay: 0.6s; }

/* Accessibility Enhancements for Phase 3 */
@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .pricing-card,
  .faq-answer,
  .faq-icon {
    animation: none;
    transition: none;
  }
}

/* Focus States for Phase 3 */
.faq-question:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.pricing-card .btn:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
}

/* ===================================
   PHASE 4 ENHANCEMENTS
   ================================= */

/* Blog Cards */
.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
  border-color: var(--card-border-hover);
}

.blog-card:hover .blog-image {
  transform: scale(1.05);
}

/* Expert Cards */
.expert-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--card-border-hover);
}

/* Newsletter Form */
.newsletter-form {
  transition: all 0.3s ease;
}

.newsletter-form:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.newsletter-form input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Media Mentions Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.media-mention {
  animation: fadeInUp 0.6s ease-out;
}

.media-mention:nth-child(1) { animation-delay: 0.1s; }
.media-mention:nth-child(2) { animation-delay: 0.2s; }
.media-mention:nth-child(3) { animation-delay: 0.3s; }
.media-mention:nth-child(4) { animation-delay: 0.4s; }

/* Awards Section */
.awards-section {
  position: relative;
  overflow: hidden;
}

.awards-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(139, 92, 246, 0.05), rgba(6, 182, 212, 0.05));
  border-radius: 20px;
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Responsive Design for Phase 4 */
@media (max-width: 768px) {
  .blog-card {
    margin-bottom: 1.5rem;
  }
  
  .expert-card {
    padding: 1.5rem !important;
  }
  
  .newsletter-form {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .newsletter-form input {
    min-width: auto !important;
  }
  
  .media-mentions {
    gap: 2rem !important;
  }
}

@media (max-width: 480px) {
  .blog-card h3 {
    font-size: 1.1rem !important;
  }
  
  .blog-card p {
    font-size: 0.9rem !important;
  }
  
  .expert-card blockquote {
    font-size: 1rem !important;
  }
  
  .awards-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

/* Enhanced Animations for Phase 4 */
.blog-card,
.expert-card {
  animation: slideInUp 0.6s ease-out;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }

.expert-card:nth-child(1) { animation-delay: 0.2s; }
.expert-card:nth-child(2) { animation-delay: 0.4s; }

/* Accessibility for Phase 4 */
@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .expert-card,
  .media-mention,
  .awards-section::before {
    animation: none;
    transition: none;
  }
}

/* Focus States for Phase 4 */
.blog-card:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
}

.newsletter-form button:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}