/* 
 * Unified Design System for Baby Sleep Miracle
 * Version: 2.0.0 - Simplified and Clean
 * Created: 2024-06-27
 *
 * This is the centralized design system for all pages
 * to ensure consistency across the entire website.
 */

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

/* ===== ROOT VARIABLES ===== */
:root {
  /* Brand Colors */
  --primary: #4361ee;       /* Main Blue */
  --primary-light: #7c3aed; /* Light Purple */
  --primary-dark: #3730a3;  /* Dark Blue */
  
  --secondary: #06d6a0;     /* Turquoise */
  --accent: #f72585;        /* Pink Accent */
  
  --success: #10b981;       /* Green */
  --warning: #f59e0b;       /* Amber */
  --danger: #ef4444;        /* Red */
  
  /* Support Button Gradient */
  --support-gradient-start: #ff5f6d;
  --support-gradient-end: #ffc371;
  
  /* Neutral Colors */
  --white: #ffffff;
  --bg-light: #f8fafc;
  --bg-accent: #e0e7ff;
  --border-color: #e2e8f0;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --text-secondary: #64748b;
  
  /* Extended Brand Colors */
  --accent-dark: #d63384;
  --primary-darker: #1e3a8a;
  
  /* Typography */
  --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-heading: 'Playfair Display', serif;
  
  /* Shadows */
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --box-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Border Radius */
  --border-radius: 12px;
  --border-radius-sm: 6px;
  --border-radius-lg: 16px;
  
  /* Animation Durations */
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
}

/* ===== GLOBAL STYLES ===== */
body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== HEADER STYLES ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
  box-shadow: var(--box-shadow-lg);
  overflow: hidden;
  min-height: 80px;
}

/* Header Animation Background */
.animated-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Stars Animation */
.stars-container {
  position: absolute;
  width: 100%;
  height: 100%;
}

@keyframes starTwinkle {
  0%, 100% { 
    opacity: 0.3; 
    transform: scale(1); 
  }
  50% { 
    opacity: 1; 
    transform: scale(1.2); 
  }
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: starTwinkle 3s infinite;
}

/* Cloud Animation */
.cloud-container {
  position: absolute;
  width: 100%;
  height: 100%;
}

@keyframes cloudFloat {
  0% { transform: translateX(-100px); }
  100% { transform: translateX(calc(100vw + 100px)); }
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50px;
  filter: blur(2px);
  animation: cloudFloat 30s linear infinite;
}

/* Dream Bubbles Animation */
.dream-bubbles {
  position: absolute;
  width: 100%;
  height: 100%;
}

@keyframes bubbleRise {
  0% { 
    transform: translateY(100px) scale(0.8); 
    opacity: 0; 
  }
  50% { 
    opacity: 0.8; 
  }
  100% { 
    transform: translateY(-100px) scale(1.2); 
    opacity: 0; 
  }
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(173, 216, 230, 0.6));
  animation: bubbleRise 8s infinite;
}

/* Floating Moons */
.floating-moons {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.moon-icon {
  position: absolute;
  color: rgba(255, 255, 255, 0.3);
  animation: float 6s ease-in-out infinite;
}

.moon-icon.small {
  font-size: 20px;
  top: 20%;
  left: 15%;
  animation-delay: 0s;
}

.moon-icon.medium {
  font-size: 24px;
  top: 30%;
  right: 20%;
  animation-delay: 2s;
}

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

/* Gradient Overlay */
.gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1), transparent, rgba(255,255,255,0.05));
  pointer-events: none;
}

/* Theme Switcher */
.theme-switcher {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-switcher:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Header Content */
.header-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  z-index: 5;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  transition: transform var(--transition-normal) ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-normal) ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.nav-button {
  background: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-normal) ease;
  box-shadow: 0 4px 12px rgba(247, 37, 133, 0.3);
}

.nav-button:hover {
  background: #e91e63;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 37, 133, 0.4);
}

.nav-button.active {
  background: #c2185b;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: background var(--transition-normal) ease;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  background: var(--primary-dark);
  padding: 1rem 0;
}

.mobile-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu-link {
  display: block;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-normal) ease;
  font-weight: 600;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.mobile-menu-link.highlight {
  background: var(--accent);
  color: white;
}

.mobile-menu-link.highlight:hover {
  background: #e91e63;
}

/* Support Button */
.support-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--support-gradient-start), var(--support-gradient-end));
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(255, 95, 109, 0.4);
  transition: all var(--transition-normal) ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 95, 109, 0.5);
}

.support-button i {
  font-size: 16px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .header-container {
    padding: 0.75rem 0;
  }
  
  .nav-list {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .mobile-nav.active {
    display: block;
  }
  
  .logo {
    font-size: 1.25rem;
  }
  
  .logo img {
    width: 32px;
    height: 32px;
  }
  
  .container {
    padding: 0 0.75rem;
  }
  
  .theme-switcher {
    width: 40px;
    height: 40px;
    font-size: 14px;
    top: 15px;
    right: 15px;
  }
  
  .support-button {
    bottom: 15px;
    right: 15px;
    padding: 10px 16px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .header {
    min-height: 70px;
  }
  
  .header-container {
    padding: 0.5rem 0;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  .logo img {
    width: 28px;
    height: 28px;
  }
  
  .theme-switcher {
    width: 36px;
    height: 36px;
    font-size: 12px;
    top: 12px;
    right: 12px;
  }
  
  .mobile-menu-link {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* ===== COMMON PAGE ELEMENTS ===== */

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section.bg-light {
  background-color: var(--bg-light);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-dark);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-normal) ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(247, 37, 133, 0.3);
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

.btn-white {
  background: white;
  color: var(--primary);
  border-color: white;
}

.btn-white:hover {
  background: var(--bg-light);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

/* ===== FAQ PAGE STYLES ===== */
.faq-category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.faq-tab {
  padding: 0.75rem 1.5rem;
  background-color: var(--bg-light);
  border-radius: 50px;
  color: var(--text-dark);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.faq-tab:hover {
  background-color: var(--bg-accent);
  transform: translateY(-2px);
}

.faq-tab.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary-light);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.category-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.category-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: block;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
}

.category-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-links li {
  margin-bottom: 0.75rem;
}

.category-links a {
  color: var(--text-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: all 0.3s ease;
}

.category-links a:hover {
  background-color: var(--bg-light);
  color: var(--primary);
  transform: translateX(5px);
}

.category-links i {
  color: var(--primary);
  font-size: 0.8rem;
}

/* CTA Box */
.cta-box {
  margin-top: 4rem;
  border: 2px solid var(--primary-light);
}

.cta-title {
  color: var(--primary-dark);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ===== GRID SYSTEM ===== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -1rem;
}

.col-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  padding: 0 1rem;
}

.col-6 {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 0 1rem;
}

.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 576px) {
  .col-sm-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ===== FEATURE CARDS ===== */
.feature-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.feature-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.feature-text {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
}

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SPACING UTILITIES ===== */
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.p-5 { padding: 3rem; }

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.rounded { border-radius: var(--border-radius); }
.shadow { box-shadow: var(--box-shadow); }
.bg-white { background-color: white; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: var(--border-radius-sm); }
.rounded-lg { border-radius: var(--border-radius); }
.rounded-xl { border-radius: var(--border-radius-lg); }

.shadow { box-shadow: var(--box-shadow); }
.shadow-lg { box-shadow: var(--box-shadow-lg); }

.transition { transition: all var(--transition-normal) ease; }
.transition-fast { transition: all var(--transition-fast) ease; }
.transition-slow { transition: all var(--transition-slow) ease; }