/* ============================================================
   MomCalc — $10B Ultra-Premium Pregnancy Calculator
   Typography: Inter + Outfit | Tailwind CSS Hybrid
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* ── Light Mode: $10B SaaS Palette ── */
  --bg-primary:    #FAFBFE;
  --bg-secondary:  #F0F2F8;
  --bg-card:       rgba(255, 255, 255, 0.82);
  --bg-card-hover: rgba(255, 255, 255, 0.96);
  --bg-glass:      rgba(255, 255, 255, 0.6);
  --bg-nav:        rgba(255, 255, 255, 0.72);
  --border-color:  rgba(99, 102, 241, 0.10);
  --border-card:   rgba(99, 102, 241, 0.07);

  --text-primary:   #000000;
  --text-secondary: #000000;
  --text-muted:     #000000;
  --text-accent:    #6366F1;

  /* Brand Colors — Refined */
  --rose:           #BE185D;
  --rose-light:     #E11D74;
  --indigo:         #4338CA;
  --indigo-light:   #6366F1;
  --mint:           #059669;
  --mint-light:     #10B981;
  --gold:           #B45309;
  --lavender:       #8B5CF6;
  --lavender-light: #A78BFA;

  /* $10B Gradients */
  --gradient-primary:  linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #A855F7 100%);
  --gradient-secondary: linear-gradient(135deg, #BE185D 0%, #DB2777 100%);
  --gradient-rose:     linear-gradient(135deg, #BE185D 0%, #EC4899 100%);
  --gradient-mint:     linear-gradient(135deg, #059669 0%, #10B981 100%);
  --gradient-gold:     linear-gradient(135deg, #B45309 0%, #D97706 100%);
  --gradient-lavender: linear-gradient(135deg, #7C3AED, #A855F7);
  --gradient-hero:     radial-gradient(ellipse at 20% 0%, #EEF2FF 0%, #F5F3FF 35%, #FDF2F8 65%, #FAFBFE 100%);
  --gradient-aurora:   linear-gradient(135deg, rgba(79,70,229,0.04) 0%, rgba(236,72,153,0.03) 33%, rgba(16,185,129,0.03) 66%, rgba(245,158,11,0.02) 100%);

  /* Ultra-Premium Shadows — color-tinted */
  --shadow-sm:   0 1px 3px rgba(99,102,241,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md:   0 4px 12px -2px rgba(99,102,241,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:   0 12px 28px -6px rgba(99,102,241,0.12), 0 4px 10px rgba(0,0,0,0.04);
  --shadow-xl:   0 24px 48px -12px rgba(99,102,241,0.16), 0 8px 16px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.25), 0 0 80px rgba(99,102,241,0.08);
  --shadow-card: 0 1px 1px rgba(0,0,0,0.02), 0 2px 4px rgba(99,102,241,0.03), 0 8px 24px -4px rgba(99,102,241,0.06);

  /* Modern Radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  --transition:      all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;

  --nav-height: 80px;
}

[data-theme="dark"] {
  /* ── Dark Mode: $10B Obsidian + Neon Indigo ── */
  --bg-primary:    #050311;
  --bg-secondary:  #0A0820;
  --bg-card:       rgba(16, 12, 38, 0.85);
  --bg-card-hover: rgba(24, 18, 52, 0.95);
  --bg-glass:      rgba(12, 8, 28, 0.65);
  --bg-nav:        rgba(5, 3, 17, 0.92);
  --border-color:  rgba(139, 92, 246, 0.15);
  --border-card:   rgba(139, 92, 246, 0.10);

  --text-primary:   #F1EEFF;
  --text-secondary: #B0A5D4;
  --text-muted:     #6860A0;
  --text-accent:    #A78BFA;

  --rose:           #F472B6;
  --rose-light:     #FB7185;
  --rose-dark:      #DB2777;
  --lavender:       #A78BFA;
  --lavender-light: #C4B5FD;
  --gold:           #FBBF24;
  --gold-light:     #FCD34D;
  --gold-bright:    #FDE68A;
  --mint:           #34D399;
  --mint-light:     #6EE7B7;
  --sky:            #60A5FA;

  --gradient-hero:     linear-gradient(160deg, #050311 0%, #0E0832 40%, #110720 70%, #050311 100%);
  --gradient-aurora:   linear-gradient(135deg, rgba(139,92,246,0.06) 0%, rgba(236,72,153,0.04) 33%, rgba(52,211,153,0.03) 66%, rgba(251,191,36,0.02) 100%);
  --gradient-card:     linear-gradient(145deg, rgba(22,16,46,0.92), rgba(14,10,28,0.6));
  --gradient-primary:  linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #A855F7 100%);
  --gradient-rose:     linear-gradient(135deg, #DB2777 0%, #EC4899 50%, #F472B6 100%);
  --gradient-gold:     linear-gradient(135deg, #B45309 0%, #D97706 50%, #FBBF24 100%);
  --gradient-lavender: linear-gradient(135deg, #4F46E5, #7C3AED);
  --gradient-mint:     linear-gradient(135deg, #047857, #10B981);

  --shadow-sm:   0 2px 12px rgba(139, 92, 246, 0.12);
  --shadow-md:   0 8px 32px rgba(139, 92, 246, 0.16);
  --shadow-lg:   0 16px 48px rgba(139, 92, 246, 0.22);
  --shadow-xl:   0 24px 64px rgba(139, 92, 246, 0.28);
  --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.3), 0 0 120px rgba(139,92,246,0.1);
  --shadow-card: 0 1px 1px rgba(0,0,0,0.1), 0 4px 12px rgba(139,92,246,0.06), 0 12px 32px -4px rgba(139,92,246,0.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  letter-spacing: -0.01em;
  transition: background 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Noise texture overlay for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.015'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}
[data-theme="dark"] body::before { opacity: 0.25; }

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--gradient-primary); border-radius: var(--radius-full); }

/* ====== BACKGROUND ORBS ====== */
.bg-orbs {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: orbFloat 20s ease-in-out infinite;
}
[data-theme="dark"] .bg-orb { opacity: 0.18; }

.bg-orb-1 { width: 600px; height: 600px; background: var(--lavender); top: -150px; right: -120px; animation-delay: 0s; opacity: 0.09; }
.bg-orb-2 { width: 450px; height: 450px; background: var(--rose); bottom: 15%; left: -120px; animation-delay: -7s; opacity: 0.07; }
.bg-orb-3 { width: 380px; height: 380px; background: var(--gold); top: 35%; right: 15%; animation-delay: -14s; opacity: 0.06; }
.bg-orb-4 { width: 280px; height: 280px; background: var(--mint); bottom: 5%; right: 5%; animation-delay: -3s; opacity: 0.05; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ====== NAVBAR ====== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center;
  padding: 0 clamp(20px, 4vw, 48px);
  z-index: 1000;
  transition: var(--transition);
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-logo {
  width: 38px; height: 38px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}
.nav-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex; align-items: center; gap: 4px;
  margin: 0 auto;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--lavender);
  background: rgba(108, 59, 228, 0.09);
}

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

.theme-toggle {
  width: 56px; height: 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  align-items: center;
  padding: 0 4px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.theme-toggle::before {
  content: '☀️';
  position: absolute;
  left: 6px;
  font-size: 12px;
  opacity: 0.5;
  transition: var(--transition);
}

.theme-toggle::after {
  content: '🌙';
  position: absolute;
  right: 6px;
  font-size: 12px;
  opacity: 0.5;
  transition: var(--transition);
}

.theme-toggle-knob {
  width: 20px; height: 20px;
  background: var(--gradient-primary);
  border-radius: 50%;
  position: relative;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 2px 8px rgba(108, 59, 228, 0.3);
}

[data-theme="dark"] .theme-toggle-knob {
  transform: translateX(28px);
  background: var(--gradient-rose);
  box-shadow: 0 2px 8px rgba(219, 39, 119, 0.3);
}

[data-theme="dark"] .theme-toggle::after { opacity: 1; color: var(--rose); }
[data-theme="light"] .theme-toggle::before { opacity: 1; color: var(--gold); }

.theme-icon { font-size: 14px; }

.nav-cta {
  background: #0D0A1E !important;
  color: white !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  transition: var(--transition);
}
.nav-cta:hover {
  background: #1a1a2e !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  transform: translateY(-1px);
}
[data-theme="dark"] .nav-cta {
  background: var(--gradient-primary) !important;
  box-shadow: var(--shadow-sm);
}

/* ====== HERO SECTION ====== */
.hero {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex; align-items: center;
  padding: calc(var(--nav-height) + 40px) 32px 60px;
  position: relative; z-index: 1;
  overflow: hidden;
}

/* Aurora glow effect behind hero */
.hero::after {
  content: '';
  position: absolute;
  top: -30%; right: -20%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, rgba(236,72,153,0.05) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: auroraFloat 15s ease-in-out infinite;
}
[data-theme="dark"] .hero::after {
  background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, rgba(236,72,153,0.06) 40%, transparent 70%);
}

@keyframes auroraFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, 20px) scale(1.05); }
  66% { transform: translate(20px, -30px) scale(0.95); }
}

.hero-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 72px; align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(108, 59, 228, 0.08);
  border: 1px solid rgba(108, 59, 228, 0.2);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lavender);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 4.8rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.hero-title .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-stats {
  display: flex; gap: 28px;
  margin-bottom: 36px;
}
.stat-item { text-align: left; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

/* ====== CALCULATOR CARD ====== */
.calculator-card {
  background: var(--bg-card);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-2xl);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
}
.calculator-card:hover {
  box-shadow: var(--shadow-glow);
  border-color: rgba(99,102,241,0.15);
}
.calculator-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-primary);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

.calc-title {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.calc-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 24px; }

.method-tabs {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; margin-bottom: 24px;
}
.method-tab {
  padding: 10px 8px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  text-align: center;
  line-height: 1.3;
}
.method-tab:hover { border-color: var(--rose); color: var(--rose); }
.method-tab.active {
  background: var(--gradient-rose);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-sm);
}

.input-group { margin-bottom: 20px; }
.input-label {
  display: block;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.input-field {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: var(--transition);
  outline: none;
}
.input-field:focus {
  border-color: var(--lavender);
  box-shadow: 0 0 0 3px rgba(108, 59, 228, 0.10);
}

.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.select-field {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c0406a' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.calc-btn {
  width: 100%;
  padding: 16px 28px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem; font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
  letter-spacing: 0.02em;
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  overflow: hidden;
}

.calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
  filter: brightness(1.05);
}

.calc-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.input-field {
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 1rem;
  background: white;
  transition: var(--transition);
  outline: none;
}

.input-field:focus {
  border-color: var(--lavender);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.method-content { display: none; }
.method-content.active { display: block; }

/* ====== DASHBOARD ====== */
.dashboard {
  max-width: 1200px; margin: 0 auto;
  padding: 40px 32px;
  position: relative; z-index: 1;
  display: none;
}
.dashboard.visible { display: block; }

/* Elite Bento UI - Dashboard Banner */
.results-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
  position: relative;
}
.results-banner::before, .results-banner::after { display: none; }

.result-item {
  background: var(--bg-card);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-item::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--gradient-aurora);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.result-item:hover::after { opacity: 1; }

.result-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99,102,241,0.08);
  border-color: rgba(99, 102, 241, 0.18);
  z-index: 2;
}

.result-label { font-size: 0.7rem; color: var(--text-accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; position: relative; z-index: 1; }
.result-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; display: inline-block; position: relative; z-index: 1; }
.result-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; font-weight: 500; position: relative; z-index: 1; }

/* Progress bar */
.pregnancy-progress {
  background: var(--bg-card);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  margin-bottom: 40px;
  box-shadow: 
    0 4px 10px -2px rgba(108,59,228,0.03),
    0 16px 32px -4px rgba(108,59,228,0.08),
    inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.pregnancy-progress:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 
    0 24px 40px -8px rgba(108,59,228,0.12),
    0 12px 14px -6px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.6);
  border-color: rgba(155, 114, 245, 0.25);
}
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.progress-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.progress-pct { font-size: 0.875rem; font-weight: 700; color: var(--rose); }

.trimester-bar {
  display: flex; gap: 4px; height: 12px;
  border-radius: var(--radius-full); overflow: hidden;
  margin-bottom: 12px;
}
.tri-segment {
  flex: 1; border-radius: 2px;
  background: var(--bg-secondary);
  transition: var(--transition-slow);
}
.tri-segment.filled-1 { background: linear-gradient(90deg, #4C1B9E, #6C3BE4); }
.tri-segment.filled-2 { background: linear-gradient(90deg, #9B72F5, #C4AAFF); }
.tri-segment.filled-3 { background: linear-gradient(90deg, #B8860B, #D4A843); }

.trimester-labels { display: flex; justify-content: space-between; }
.tri-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

/* Week Navigator */
.week-nav {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}
.week-nav-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.week-nav-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.current-week-badge {
  background: var(--gradient-primary);
  color: white; font-size: 0.8rem; font-weight: 700;
  padding: 4px 14px; border-radius: var(--radius-full);
}

.week-scroll {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 8px; scrollbar-width: thin;
}
.week-btn {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  position: relative;
}
.week-btn:hover { border-color: var(--lavender); color: var(--lavender); }
.week-btn.active {
  background: var(--gradient-primary);
  border-color: transparent; color: white;
  box-shadow: var(--shadow-md);
  transform: scale(1.12);
}


/* Main Tabs */
.main-tabs {
  display: flex; gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.main-tab {
  padding: 12px 28px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  color: var(--obsidian);
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 10px rgba(155, 109, 197, 0.05);
}
.main-tab:hover { 
  border-color: var(--lavender); 
  color: var(--lavender); 
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 15px rgba(155, 109, 197, 0.2);
}
.main-tab.active {
  background: var(--gradient-primary);
  border-color: transparent; color: white;
  box-shadow: 0 6px 20px rgba(155, 109, 197, 0.4);
  transform: translateY(-2px);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ====== BABY INFO PANEL ====== */
.baby-panel {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 24px;
}
.baby-visual {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 28px;
  backdrop-filter: blur(20px);
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.baby-fruit {
  font-size: 80px;
  margin-bottom: 16px;
  animation: babyPulse 3s ease-in-out infinite;
  display: block;
  line-height: 1;
}
@keyframes babyPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
.baby-size-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.baby-size-name {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 16px;
}
.baby-measurements { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.measure-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 10px 16px; text-align: center;
}
.measure-val { font-weight: 800; font-size: 1.1rem; color: var(--rose); display: block; }
.measure-key { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

.baby-info-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.info-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.info-card-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.info-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.info-card-title { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }
.info-card-body { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }
.info-card-body ul { list-style: none; padding: 0; }
.info-card-body ul li { padding: 3px 0; }
.info-card-body ul li::before { content: '•'; color: var(--rose); margin-right: 8px; font-weight: 700; }

.icon-rose { background: rgba(214, 56, 102, 0.12); }
.icon-lavender { background: rgba(155, 109, 197, 0.12); }
.icon-gold { background: rgba(212, 168, 68, 0.12); }
.icon-mint { background: rgba(59, 184, 154, 0.12); }
.icon-sky { background: rgba(72, 144, 212, 0.12); }

/* ====== MOM HEALTH PANEL ====== */
.mom-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.mom-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.mom-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.mom-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mom-card-icon { font-size: 28px; }
.mom-card-title { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; }
.mom-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.mom-tag {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
  background: rgba(214, 56, 102, 0.1);
  color: var(--rose);
  border: 1px solid rgba(214, 56, 102, 0.2);
}
.mom-tag.lavender-tag { background: rgba(155, 109, 197, 0.1); color: var(--lavender); border-color: rgba(155, 109, 197, 0.2); }
.mom-tag.gold-tag { background: rgba(212, 168, 68, 0.1); color: var(--gold); border-color: rgba(212, 168, 68, 0.2); }
.mom-tag.mint-tag { background: rgba(59, 184, 154, 0.1); color: var(--mint); border-color: rgba(59, 184, 154, 0.2); }
.mom-tag.sky-tag { background: rgba(72, 144, 212, 0.1); color: var(--sky); border-color: rgba(72, 144, 212, 0.2); }

.warning-card {
  background: rgba(214, 56, 102, 0.06);
  border: 1px solid rgba(214, 56, 102, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.warning-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.warning-card-header h4 { font-weight: 700; color: var(--rose); }
.warning-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.warning-list li { font-size: 0.875rem; color: var(--text-secondary); display: flex; align-items: flex-start; gap: 8px; }
.warning-list li::before { content: '⚠️'; flex-shrink: 0; }

/* ====== TRACKERS PANEL ====== */
.trackers-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.tracker-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 28px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}
.tracker-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.tracker-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.tracker-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.tracker-desc { font-size: 0.8rem; color: var(--text-muted); }

/* Kick Counter */
.kick-display {
  text-align: center; margin-bottom: 20px;
}
.kick-count {
  font-family: var(--font-display);
  font-size: 4rem; font-weight: 800;
  background: var(--gradient-rose);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.kick-goal { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

.kick-btn {
  width: 100%;
  padding: 16px;
  background: var(--gradient-rose);
  color: white; border: none;
  border-radius: var(--radius-lg);
  font-size: 1.1rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  font-family: var(--font-body);
  margin-bottom: 12px;
}
.kick-btn:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.kick-btn:active { transform: scale(0.98); }

.kick-info { display: flex; justify-content: space-between; }
.kick-info-item { text-align: center; }
.kick-info-val { font-weight: 800; color: var(--text-primary); font-size: 1rem; }
.kick-info-key { font-size: 0.75rem; color: var(--text-muted); }

.secondary-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  font-family: var(--font-body);
}
.secondary-btn:hover { border-color: var(--rose); color: var(--rose); }

/* Contraction Timer */
.contraction-display { margin-bottom: 20px; }
.contraction-time {
  font-family: var(--font-display);
  font-size: 3.5rem; font-weight: 800;
  color: var(--lavender);
  text-align: center; line-height: 1;
  margin-bottom: 4px;
}
.contraction-status {
  text-align: center;
  font-size: 0.875rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: 16px;
}

.contraction-btn {
  width: 100%;
  padding: 16px;
  background: var(--gradient-lavender);
  color: white; border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  font-family: var(--font-body);
  margin-bottom: 12px;
}
.contraction-btn:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }

.contraction-log { max-height: 140px; overflow-y: auto; }
.contraction-entry {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
}
.contraction-entry:last-child { border-bottom: none; }

/* Weight Tracker */
.weight-form { display: flex; gap: 10px; margin-bottom: 16px; }
.weight-input { flex: 1; }
.add-btn {
  padding: 12px 20px;
  background: var(--gradient-gold);
  color: white; border: none;
  border-radius: var(--radius-md);
  font-weight: 700; cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
  white-space: nowrap;
}
.add-btn:hover { transform: scale(1.02); }

.weight-chart {
  height: 120px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  display: flex; align-items: flex-end;
  gap: 4px; padding: 8px;
  overflow: hidden; margin-bottom: 12px;
}
.weight-bar {
  flex: 1; border-radius: 4px 4px 0 0;
  background: var(--gradient-gold);
  min-height: 4px;
  transition: height 0.5s ease;
  cursor: pointer;
  position: relative;
}
.weight-bar:hover::after {
  content: attr(data-val);
  position: absolute; top: -24px; left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.weight-rec {
  font-size: 0.8rem; color: var(--text-muted);
  background: rgba(212, 168, 68, 0.1);
  border-radius: var(--radius-md); padding: 10px;
}

/* Mood Tracker */
.mood-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.mood-btn {
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer; transition: var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.mood-btn span.mood-label { font-size: 0.65rem; color: var(--text-muted); font-family: var(--font-body); font-weight: 500; }
.mood-btn:hover { border-color: var(--lavender); background: rgba(155, 109, 197, 0.1); }
.mood-btn.selected { border-color: var(--lavender); background: rgba(155, 109, 197, 0.15); }

.mood-history { max-height: 100px; overflow-y: auto; }
.mood-entry {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem; color: var(--text-secondary);
}
.mood-entry:last-child { border-bottom: none; }

/* ====== TIMELINE PANEL ====== */
.timeline-wrapper { position: relative; padding-left: 24px; }
.timeline-wrapper::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--gradient-rose);
}

.timeline-item {
  position: relative; margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.timeline-item:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.timeline-item::before {
  content: '';
  position: absolute; left: -32px; top: 22px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--rose);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(214, 56, 102, 0.2);
}
.timeline-item.done::before { background: var(--mint); box-shadow: 0 0 0 3px rgba(59, 184, 154, 0.2); }
.timeline-item.upcoming::before { background: var(--lavender); box-shadow: 0 0 0 3px rgba(155, 109, 197, 0.2); }

.timeline-week { font-size: 0.75rem; font-weight: 700; color: var(--rose); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.timeline-item.done .timeline-week { color: var(--mint); }
.timeline-item.upcoming .timeline-week { color: var(--lavender); }
.timeline-name { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; margin-bottom: 6px; }
.timeline-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.timeline-date { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; font-weight: 500; }

/* ====== NUTRITION PANEL ====== */
.nutrition-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.nutrient-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
}
.nutrient-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.nutrient-icon { font-size: 36px; margin-bottom: 10px; }
.nutrient-name { font-weight: 700; color: var(--text-primary); margin-bottom: 4px; font-size: 0.95rem; }
.nutrient-dose { font-size: 0.8rem; color: var(--rose); font-weight: 700; margin-bottom: 8px; }
.nutrient-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }

.foods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.foods-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}
.foods-card-title { font-weight: 700; color: var(--text-primary); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.food-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.food-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; color: var(--text-secondary);
}
.food-item .food-dot {
  width: 8px; height: 8px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--mint);
}
.food-item.avoid .food-dot { background: var(--rose); }

/* ====== MEDICAL PANEL ====== */
.medical-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.medical-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}
.medical-card.danger { border-color: rgba(214, 56, 102, 0.3); background: rgba(214, 56, 102, 0.04); }
.medical-card.caution { border-color: rgba(212, 168, 68, 0.3); background: rgba(212, 168, 68, 0.04); }
.medical-title { font-weight: 700; color: var(--text-primary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.medical-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.medical-list li { font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.medical-list li .bullet { flex-shrink: 0; margin-top: 1px; }

/* ====== SECTION HEADINGS ====== */
.section-heading {
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.section-heading span {
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  
}
.section-sub { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 24px; }

/* ====== GENERAL FEATURES ZONE ====== */
.features-section {
  background: var(--bg-secondary);
  padding: 80px 32px;
  position: relative; z-index: 1;
}
.features-inner { max-width: 1200px; margin: 0 auto; }
.features-title {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 800;
  text-align: center; color: var(--text-primary);
  margin-bottom: 12px;
}
.features-sub { text-align: center; color: var(--text-muted); margin-bottom: 48px; font-size: 1rem; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow-card);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(236,72,153,0.08), rgba(16,185,129,0.06));
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99,102,241,0.15);
}

/* ====== CLICKABLE FEATURE CARDS ====== */
.feature-card-link {
  cursor: pointer;
  position: relative;
}
.feature-card-link:active { transform: translateY(-2px) scale(0.99); }
.feature-card-link:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 4px;
}

.feature-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px;
  font-size: 0.82rem; font-weight: 700;
  color: var(--rose);
  letter-spacing: 0.02em;
  transition: var(--transition);
}
.feature-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
  font-style: normal;
}
.feature-card-link:hover .feature-arrow { transform: translateX(5px); }
.feature-card-link:hover .feature-cta { color: var(--lavender); }

/* 9-card grid: 3 columns */
.features-grid { grid-template-columns: repeat(3, 1fr); }
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}
.feature-name { font-weight: 700; font-size: 1rem; color: var(--text-primary); margin-bottom: 8px; }
.feature-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.65; }

/* ====== FOOTER ====== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 32px;
  text-align: center;
  position: relative; z-index: 1;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 800;
  background: var(--gradient-rose);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.footer-disc { font-size: 0.8rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 16px; line-height: 1.6; }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* ====== ANIMATIONS ====== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(214, 56, 102, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(214, 56, 102, 0); }
}

.fade-in-up { animation: fadeInUp 0.6s ease forwards; }
.fade-in { animation: fadeIn 0.4s ease forwards; }

.dashboard.visible > * { animation: fadeInUp 0.5s ease both; }
.dashboard.visible > *:nth-child(2) { animation-delay: .05s; }
.dashboard.visible > *:nth-child(3) { animation-delay: .1s; }
.dashboard.visible > *:nth-child(4) { animation-delay: .15s; }
.dashboard.visible > *:nth-child(5) { animation-delay: .2s; }

/* ====== RESPONSIVE ====== */
@media (max-width: 1280px) {
  .hero-inner { gap: 40px; }
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin: 0 auto 32px; }
  .hero-stats { justify-content: center; }
  .baby-panel { grid-template-columns: 1fr; }
  .mom-grid, .nutrition-grid, .features-grid, .results-banner { grid-template-columns: repeat(2, 1fr); }
  .calculator-card { padding: 28px; }
}

@media (max-width: 768px) {
  .navbar { 
    height: auto; 
    min-height: 64px; 
    padding: 16px; 
    flex-direction: column;
    gap: 12px;
  }
  .nav-brand { margin-bottom: 0; justify-content: center; width: 100%; }
  .nav-actions { width: 100%; justify-content: center; gap: 12px; flex-wrap: wrap; }
  .nav-links { display: none !important; }
  .nav-cta-link { display: block; }
  
  .hero { padding-top: 130px; padding-left: 16px; padding-right: 16px; }
  .hero-title { font-size: 2.8rem; }
  .hero-desc { font-size: 1rem; }
  .dashboard { padding: 24px 16px; }
  .results-banner { grid-template-columns: 1fr 1fr; gap: 12px; }
  .result-item { padding: 20px 16px; }
  .result-value { font-size: 1.3rem; }
  .trackers-grid, .mom-grid, .medical-grid, .foods-grid, .nutrition-grid, .features-grid { grid-template-columns: 1fr; }
  .main-tabs { 
    justify-content: flex-start; 
    padding-bottom: 10px; 
    gap: 8px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .main-tab { padding: 10px 16px; font-size: 0.8rem; text-align: center; white-space: nowrap; }
  .calculator-card { padding: 24px 18px; border-radius: var(--radius-xl); }
  .section-heading { font-size: 1.4rem; }
  .feature-card { padding: 22px; }
  
  .doctor-btn-row { flex-direction: column; }
  .doctor-action-btn {
    width: 100% !important;
    padding: 14px 20px !important;
    flex: 1 1 100% !important;
  }
  .doctor-search-container > div:first-child input { min-width: 100% !important; }
  
  .tab-panels-container { padding: 18px 14px; }
  .countdown-card { flex-direction: column; text-align: center; padding: 16px 20px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.2rem; }
  .hero-desc { font-size: 0.9rem; }
  .results-banner { grid-template-columns: 1fr !important; }
  .calc-btn { font-size: 0.9rem; padding: 14px 20px; }
  .nav-title { font-size: 1.1rem; }
  .calculator-card { padding: 20px 14px; }
  .section-heading { font-size: 1.2rem; }
  .result-value { font-size: 1.15rem; }
  .hero { padding-top: 120px; }
  .features-section { padding: 48px 16px; }
  .features-title { font-size: 1.6rem; }
  .feature-card { padding: 18px; }
  .main-tabs { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .main-tab { font-size: 0.75rem; padding: 8px 10px; }
}

@media (max-width: 360px) {
  .hero-title { font-size: 1.9rem; }
  .dashboard { padding: 16px 10px; }
  .calculator-card { padding: 16px 12px; }
  .results-banner { gap: 8px; }
  .result-item { padding: 16px 12px; }
}

/* ====== GLOBAL ANTI-ITALIC ====== */
* { font-style: normal !important; }
em, i { font-style: normal !important; }

/* ====== PLAIN TEXT = BLACK ====== */
p, span, li, td, th, label, div, a,
.section-sub, .hero-desc, .feature-desc, .result-sub,
.timeline-desc, .nutrient-desc, .food-item, .fert-card-sub,
.medical-list li, .fert-tip-list li, .mood-entry,
.doctor-address, .kick-goal, .kick-info-key,
.contraction-status, .weight-rec, .api-live-sub,
.api-live-desc, .footer-disc, .footer-copy, .screening-name,
.api-key-hint, .fertility-subtitle, .future-cycle-window,
.doctor-meta span, .mood-btn span.mood-label,
.contraction-entry, .input-field, .tri-info-card-val,
.tri-map-seg small, .cycle-cal-legend {
  color: #111111;
}
[data-theme="dark"] p, [data-theme="dark"] span,
[data-theme="dark"] li, [data-theme="dark"] td,
[data-theme="dark"] th, [data-theme="dark"] label,
[data-theme="dark"] div, [data-theme="dark"] a,
[data-theme="dark"] .section-sub, [data-theme="dark"] .hero-desc,
[data-theme="dark"] .feature-desc, [data-theme="dark"] .result-sub,
[data-theme="dark"] .timeline-desc, [data-theme="dark"] .nutrient-desc,
[data-theme="dark"] .food-item, [data-theme="dark"] .fert-card-sub,
[data-theme="dark"] .medical-list li, [data-theme="dark"] .fert-tip-list li,
[data-theme="dark"] .doctor-address, [data-theme="dark"] .kick-goal,
[data-theme="dark"] .contraction-status, [data-theme="dark"] .weight-rec,
[data-theme="dark"] .api-live-sub, [data-theme="dark"] .api-live-desc,
[data-theme="dark"] .footer-disc, [data-theme="dark"] .footer-copy,
[data-theme="dark"] .screening-name, [data-theme="dark"] .api-key-hint,
[data-theme="dark"] .fertility-subtitle, [data-theme="dark"] .future-cycle-window,
[data-theme="dark"] .input-field, [data-theme="dark"] .tri-info-card-val,
[data-theme="dark"] .tri-map-seg small, [data-theme="dark"] .cycle-cal-legend {
  color: #E0DDF0;
}

/* Preserve heading & bold colors */
h1, h2, h3, h4, h5, h6,
.hero-title, .section-heading, .features-title,
.calc-title, .feature-name, .nutrient-name,
.timeline-name, .doctor-name, .medical-title,
.foods-card-title, .fert-tip-title, .fertility-title,
.cycle-cal-header, .api-live-title, .nav-title,
.footer-brand, .result-label, .result-value,
.fert-card-label, .fert-card-value, .countdown-timer,
.api-live-label, .api-live-value, .kick-count,
.contraction-time, .kick-info-val, .screening-dates,
b, strong, .fw-700 {
  color: var(--text-primary);
}
.section-heading span { 
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ====== DOCTOR ACTION BUTTONS ====== */
.doctor-action-btn {
  border-radius: var(--radius-lg) !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.doctor-action-btn:hover {
  transform: translateY(-2px) scale(1.02) !important;
}
.doctor-action-btn:active {
  transform: translateY(0) scale(0.98) !important;
}

/* ====== UTILITY ====== */
.hidden { display: none !important; }

/* Elite Validation - Shake & Glow */
.input-invalid {
  border-color: var(--rose) !important;
  box-shadow: 0 0 12px rgba(194, 24, 91, 0.2) !important;
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.text-rose { color: var(--rose); }

/* --- Tab Panels Container --- */
.tab-panels-container {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  animation: panelSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-panels-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--gradient-rose);
  opacity: 0.8;
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Elite Switch UI for Favs */
.switch-ui {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-ui input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-ui {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.1);
  transition: .4s;
  border-radius: 34px;
}

.slider-ui:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider-ui {
  background: var(--gradient-rose);
}

input:checked + .slider-ui:before {
  transform: translateX(20px);
}

.text-lavender { color: var(--lavender); }
.text-gold { color: var(--gold); }
.text-mint { color: var(--mint); }
.fw-700 { font-weight: 700; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mt-16 { margin-top: 16px; }

/* ====== EDD COUNTDOWN CARD ====== */
.countdown-card {
  background: var(--gradient-rose);
  border-radius: var(--radius-xl);
  padding: 20px 32px;
  margin-bottom: 28px;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
}
.countdown-label {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.countdown-timer {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 800;
  color: white;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-variant-numeric: tabular-nums;
}

/* ====== BABY SVG ILLUSTRATION CONTAINER ====== */
.baby-svg-illustration {
  width: 100%;
  max-width: 220px;
  margin: 0 auto 16px;
  animation: babyPulse 5s ease-in-out infinite;
  filter: drop-shadow(0 6px 18px rgba(214, 56, 102, 0.15));
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all 0.4s ease;
}
.baby-svg-illustration svg {
  width: 100%;
  height: auto;
  display: block;
}
.baby-svg-illustration:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 10px 28px rgba(214, 56, 102, 0.25));
}
[data-theme="dark"] .baby-svg-illustration {
  filter: drop-shadow(0 6px 20px rgba(232, 80, 144, 0.25));
}

/* ====== ± WEEK BUTTONS ====== */
.week-pm-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1.2rem; font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  flex-shrink: 0;
}
.week-pm-btn:hover {
  background: var(--gradient-rose);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

/* ====== SCREENING DATE LIST ====== */
.screening-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.screening-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  gap: 12px;
  flex-wrap: wrap;
}
.screening-row:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.screening-row.screening-active {
  border-color: rgba(59,184,154,0.4);
  background: rgba(59,184,154,0.08);
}
.screening-row.screening-past {
  opacity: 0.6;
}
.screening-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}
.screening-dates {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--rose);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.screening-row.screening-active .screening-dates { color: var(--mint); }
.screening-row.screening-past  .screening-dates { color: var(--text-muted); }

/* ====== EXTRA MEASUREMENT ITEMS ====== */
.baby-measurements { flex-wrap: wrap; }


/* ====== FLATPIKCR PREMIUM THEME ====== */
.flatpickr-calendar {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  padding: 8px;
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, 
.flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, 
.flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, 
.flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, 
.flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, 
.flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, 
.flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, 
.flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, 
.flatpickr-day.endRange.nextMonthDay {
  background: var(--gradient-primary) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  color: white !important;
}
.flatpickr-day.today {
  border-color: var(--lavender);
}
.flatpickr-months .flatpickr-month {
  color: var(--text-primary);
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-weight: 700;
}
.flatpickr-weekday {
  color: var(--text-muted);
  font-weight: 600;
}
.flatpickr-day {
  border-radius: var(--radius-md);
  color: var(--text-primary);
}
.flatpickr-day:hover {
  background: var(--bg-secondary);
}
.flatpickr-calendar.arrowTop:before, .flatpickr-calendar.arrowTop:after {
  border-bottom-color: var(--bg-card);
}

/* Loader */
.calculating {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.calculating.show { opacity: 1; pointer-events: all; }
.calc-spinner {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.spinner-icon { font-size: 48px; animation: babyPulse 1.5s ease-in-out infinite; display: block; margin-bottom: 16px; }
.spinner-text { color: var(--text-primary); font-weight: 600; font-size: 1rem; }

/* ============================================================
   API KEY SECTION
   ============================================================ */
.api-key-row {
  margin-bottom: 24px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(108,59,228,0.07), rgba(214,56,102,0.05));
  border: 1.5px solid rgba(108,59,228,0.18);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.api-key-row::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient-primary);
}

.api-key-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(108,59,228,0.12);
  border: 1px solid rgba(108,59,228,0.22);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.72rem; font-weight: 700;
  color: var(--lavender);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 12px;
  animation: apiBadgePulse 2.5s ease-in-out infinite;
}
@keyframes apiBadgePulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.api-key-input-wrap {
  display: flex; gap: 10px;
}
.api-key-input {
  flex: 1;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
}
.api-key-save-btn {
  padding: 12px 18px;
  background: var(--gradient-primary);
  color: white; border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  font-family: var(--font-body);
  white-space: nowrap;
  flex-shrink: 0;
}
.api-key-save-btn:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }

.api-key-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 8px;
}
.api-key-hint a { color: var(--lavender); text-decoration: none; font-weight: 600; }
.api-key-hint a:hover { text-decoration: underline; }

/* API Status Bar */
.api-status-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.api-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.3s;
}
.api-dot.ready { background: var(--mint); box-shadow: 0 0 12px rgba(5, 150, 105, 0.4); animation: dotPulse 2s ease-in-out infinite; }
.api-dot.loading { background: var(--gold); animation: dotPulse 0.8s ease-in-out infinite; }
.api-dot.error { background: var(--rose); }
@keyframes dotPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ====== DOCTOR FINDER PANEL ====== */
.doctor-search-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}
.doctor-search-box {
  display: flex;
  gap: 12px;
  background: var(--bg-secondary);
  padding: 8px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.doctor-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
}
.doctor-search-box button {
  padding: 12px 24px;
  border-radius: var(--radius-lg);
}

@media (max-width: 600px) {
  .doctor-search-box {
    flex-direction: column;
    padding: 12px;
  }
  .doctor-search-box button {
    width: 100%;
  }
  .doctor-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-group {
    justify-content: space-between;
  }
}

.doctor-filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.doctor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--lavender-light);
}
.doctor-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.doctor-address {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.doctor-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}
.doctor-rating {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.9rem;
}
.doctor-distance {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.doctor-btn {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: var(--transition);
}
.doctor-btn:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.doctors-map {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  margin-bottom: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.fav-btn {
  font-size: 1.4rem;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.fav-btn:hover { transform: scale(1.2); }

/* ============================================================
   API LIVE DATA PANEL
   ============================================================ */
.api-live-panel {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease forwards;
}
.api-live-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #6C3BE4, #E91E8C, #D4A843, #26C6B0);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}
.api-live-panel::after {
  content: '⚡';
  position: absolute; right: 32px; top: 50%;
  transform: translateY(-50%);
  font-size: 100px; opacity: 0.04;
  pointer-events: none;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.api-live-header {
  margin-bottom: 28px;
}
.api-live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(108,59,228,0.1);
  border: 1px solid rgba(155,114,245,0.35);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: 0.72rem; font-weight: 700;
  color: var(--lavender);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
  animation: apiBadgePulse 2s ease-in-out infinite;
}
.api-live-title {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700;
  color: var(--obsidian);
  margin-bottom: 4px;
}
.api-live-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.api-live-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.api-live-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.api-live-card::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.api-live-card:hover { background: var(--bg-card-hover); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.api-live-card:hover::before { transform: scaleX(1); }

.api-live-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.api-live-label {
  font-size: 0.7rem; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.api-live-value {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800;
  color: var(--obsidian);
  line-height: 1.1;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--lavender), var(--rose), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.api-live-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.api-live-progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 10px;
}

/* RTL SUPPORT Logic */
[dir="rtl"] {
  text-align: right;
  direction: rtl;
}
[dir="rtl"] .nav-brand { flex-direction: row-reverse; }
[dir="rtl"] .nav-links { margin-right: 0; margin-left: auto; flex-direction: row-reverse; }
[dir="rtl"] .nav-actions { flex-direction: row-reverse; gap: 16px; }
[dir="rtl"] .hero-inner { flex-direction: column; } /* Keep stacked on mobile/tablet */
[dir="rtl"] .stat-item { border-left: 1px solid var(--border-card); border-right: none; }
[dir="rtl"] .stat-item:last-child { border-left: none; }
[dir="rtl"] .feature-icon { margin-right: 0; margin-left: 16px; }
[dir="rtl"] .footer-grid { text-align: right; }
[dir="rtl"] .trimester-labels { flex-direction: row-reverse; }
[dir="rtl"] .tri-info-card { text-align: right; }
[dir="rtl"] .tri-map-bar { flex-direction: row-reverse; }
[dir="rtl"] .countdown-timer { direction: ltr; unicode-bidi: embed; } /* Keep numbers LTR usually */
.api-live-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6C3BE4, #E91E8C, #D4A843);
  border-radius: var(--radius-full);
  transition: width 1s ease;
  width: 0%;
}

/* Trimester Journey Map */
/* LANGUAGE SWITCHER */
.lang-switcher {
  position: relative;
}
.install-btn {
  background: var(--gradient-primary);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  margin-right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.install-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.1);
}

.lang-btn {
  background: rgba(108, 59, 228, 0.08);
  border: 1px solid rgba(108, 59, 228, 0.15);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.lang-btn:hover { background: rgba(108, 59, 228, 0.12); }
.lang-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  transform: translateY(10px);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 180px;
  padding: 8px;
  display: none;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
}
.lang-dropdown.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.lang-option {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}
.lang-option:hover { background: rgba(108, 59, 228, 0.08); color: var(--lavender); }

/* RTL Adjustments for Switcher */
[dir="rtl"] .lang-switcher { margin-left: 0; margin-right: 20px; }
[dir="rtl"] .lang-dropdown { left: auto; right: 50%; transform: translateX(50%) translateY(10px); }
[dir="rtl"] .lang-dropdown.visible { transform: translateX(50%) translateY(0); }

/* Trimester Journey Map (Fix from previous step) */
.api-trimester-map {
  margin-bottom: 24px;
}
.tri-map-label {
  font-size: 0.8rem; font-weight: 700;
  color: var(--text-accent);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.tri-map-bar {
  display: flex; gap: 4px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  height: 54px;
}
.tri-map-seg {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  font-size: 0.75rem; font-weight: 700;
  color: var(--text-primary);
  transition: all 0.4s ease;
  cursor: default;
  border-radius: 6px;
}
.tri-map-seg span { color: var(--text-primary); font-size: 0.75rem; }
.tri-map-seg small { font-size: 0.65rem; color: var(--text-muted); opacity: 0.8; }
.tri-map-1 { background: rgba(108,59,228,0.2); }
.tri-map-2 { background: rgba(185,94,144,0.2); }
.tri-map-3 { background: rgba(212,168,68,0.2); }
.tri-map-1.active { background: linear-gradient(135deg, #4C1B9E, #6C3BE4); color: white; }
.tri-map-1.active span { color: white; }
.tri-map-2.active { background: linear-gradient(135deg, #C2185B, #E91E8C); color: white; }
.tri-map-2.active span { color: white; }
.tri-map-3.active { background: linear-gradient(135deg, #B8860B, #D4A843); color: white; }
.tri-map-3.active span { color: white; }
.tri-map-1.done { background: rgba(59,184,154,0.15); }
.tri-map-2.done { background: rgba(59,184,154,0.1); }
.tri-map-indicator {
  position: absolute; bottom: -4px;
  font-size: 14px; color: white;
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Trimester Info Cards below journey map */
.tri-info-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.tri-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.tri-info-card:hover { background: var(--bg-card-hover); box-shadow: var(--shadow-md); }
.tri-info-card-icon { font-size: 22px; margin-bottom: 6px; }
.tri-info-card-label { font-size: 0.7rem; color: var(--text-accent); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; font-weight: 700; }
.tri-info-card-val { font-size: 0.85rem; color: var(--text-primary); font-weight: 600; line-height: 1.4; }

@media (max-width: 768px) {
  .api-live-grid { grid-template-columns: repeat(2, 1fr); }
  .tri-info-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .api-live-grid { grid-template-columns: 1fr; }
  .tri-info-grid { grid-template-columns: 1fr; }
  .api-live-panel { padding: 20px 16px; }
}

/* ============================================================
   FERTILITY & OVULATION TAB
   ============================================================ */
.fertility-calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 28px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.fertility-calc-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--rose), var(--lavender));
}
.fertility-calc-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.fertility-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, rgba(214,56,102,0.15), rgba(108,59,228,0.15));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  border: 1px solid rgba(214,56,102,0.2);
}
.fertility-title {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.fertility-subtitle { font-size: 0.85rem; color: var(--text-muted); }

.fertility-inputs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
}

/* Fertility Result Grid */
.fertility-results { animation: fadeInUp 0.5s ease forwards; }
.fert-result-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.fert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px 16px;
  text-align: center;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.fert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.fert-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
}
.fert-card-ovulation::after { background: var(--gradient-rose); }
.fert-card-window::after { background: var(--gradient-primary); }
.fert-card-next::after { background: var(--gradient-gold); }
.fert-card-test::after { background: var(--gradient-mint); }

.fert-card-icon { font-size: 32px; margin-bottom: 10px; display: block; }
.fert-card-label {
  font-size: 0.72rem; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.fert-card-value {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 6px;
}
.fert-card-ovulation .fert-card-value { color: var(--rose); }
.fert-card-window .fert-card-value { color: var(--lavender); }
.fert-card-next .fert-card-value { color: var(--gold); }
.fert-card-test .fert-card-value { color: var(--mint); }
.fert-card-sub { font-size: 0.72rem; color: var(--text-muted); }

/* Cycle Calendar */
.cycle-calendar-card {
  background: var(--bg-card);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-2xl);
  padding: 32px;
  box-shadow: var(--shadow-xl);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.cycle-calendar-card::after {
  content: '';
  position: absolute; top: -100px; right: -100px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  z-index: 0; pointer-events: none;
}
.cycle-cal-header {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
  position: relative; z-index: 1;
}
.cycle-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 24px;
  position: relative; z-index: 1;
}
.cycle-cal-day {
  aspect-ratio: 1/1;
  width: auto; height: auto;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
}
.cycle-cal-day:hover { 
  transform: scale(1.1) translateY(-4px); 
  z-index: 2;
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}
.cycle-cal-day.day-period { 
  background: rgba(190, 24, 93, 0.12); 
  border-color: rgba(190, 24, 93, 0.3); 
  color: var(--rose); 
}
.cycle-cal-day.day-fertile { 
  background: rgba(99, 102, 241, 0.12); 
  border-color: rgba(99, 102, 241, 0.3); 
  color: var(--indigo); 
}
.cycle-cal-day.day-ovulation {
  background: var(--gradient-rose);
  border-color: transparent; 
  color: white;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(190, 24, 93, 0.3);
  transform: scale(1.2);
  z-index: 3;
}
.cycle-cal-day.day-next-period { 
  background: rgba(180, 83, 9, 0.12); 
  border-color: rgba(180, 83, 9, 0.3); 
  color: var(--gold); 
}
.cycle-cal-day.day-today {
  outline: 2px solid var(--lavender);
  outline-offset: 2px;
}

.cycle-cal-day .day-label {
  position: absolute;
  bottom: -22px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rose);
  font-weight: 800;
}

.cycle-cal-legend {
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem; font-weight: 600;
  position: relative; z-index: 1;
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot {
  width: 14px; height: 14px;
  border-radius: 4px;
}
.legend-period { background: var(--rose); opacity: 0.6; }
.legend-fertile { background: var(--indigo); opacity: 0.6; }
.legend-ovulation { background: var(--rose); }
.legend-due { background: var(--gold); opacity: 0.6; }

/* Fertility Tips */
.fertility-tips-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.fert-tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.fert-tip-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.fert-tip-icon { font-size: 28px; margin-bottom: 10px; display: block; }
.fert-tip-title { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; margin-bottom: 12px; }
.fert-tip-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fert-tip-list li {
  font-size: 0.83rem; color: var(--text-secondary); line-height: 1.5;
  display: flex; align-items: flex-start; gap: 8px;
}
.fert-tip-list li::before { content: '•'; color: var(--rose); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

/* Future Cycles Card */
.future-cycles-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 28px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  margin-top: 24px;
}
.future-cycles-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.future-cycle-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}
.future-cycle-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.future-cycle-num {
  font-size: 0.7rem; font-weight: 700;
  color: var(--lavender); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.future-cycle-period {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 6px;
}
.future-cycle-ovul {
  font-size: 0.8rem; color: var(--rose); font-weight: 600; margin-bottom: 4px;
}
.future-cycle-window {
  font-size: 0.75rem; color: var(--text-muted);
}

/* API Tab highlight */
.main-tab.api-tab {
  border-color: rgba(214,56,102,0.3);
  background: rgba(214,56,102,0.05);
}
.main-tab.api-tab.active {
  background: var(--gradient-rose);
}

/* Responsive fertility */
@media (max-width: 1024px) {
  .fert-result-grid { grid-template-columns: repeat(2, 1fr); }
  .fertility-tips-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .fertility-inputs { grid-template-columns: 1fr; }
  .fert-result-grid { grid-template-columns: repeat(2, 1fr); }
  .fertility-tips-grid { grid-template-columns: 1fr; }
  .future-cycles-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .fert-result-grid { grid-template-columns: 1fr; }
}

/* ====== FOOTER (SaaS Premium) ====== */
.saas-footer {
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
  padding: 80px 40px 40px;
  position: relative;
  overflow: hidden;
  color: #000000;
}
.saas-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108, 59, 228, 0.2), transparent);
}
.saas-footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.saas-footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.saas-footer-col h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: 8px;
}
.saas-footer-col a {
  color: #000000;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.8;
}
.saas-footer-col a:hover {
  color: var(--indigo);
  opacity: 1;
  transform: translateX(4px);
}
.saas-footer-brand {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #000000;
  margin-bottom: 12px;
}
.saas-footer-brand span {
  background: linear-gradient(135deg, #A78BFA 0%, #EC4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.saas-footer-bottom {
  max-width: 1200px;
  margin: 60px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #000000;
  font-size: 0.9rem;
  opacity: 0.8;
}
@media (max-width: 768px) {
  .saas-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .saas-footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ====== LANGUAGE DROPDOWN ====== */
.lang-dropdown-container {
  position: relative;
  display: inline-block;
}
.lang-dropdown-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.lang-dropdown-btn:hover {
  border-color: var(--indigo-light);
  box-shadow: var(--shadow-md);
}
.lang-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  width: 200px;
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1001;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.lang-dropdown-container:hover .lang-dropdown-menu,
.lang-dropdown-container:focus-within .lang-dropdown-menu,
.lang-dropdown-menu.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-dropdown-item {
  padding: 8px 12px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-dropdown-item:hover, .lang-dropdown-item.active {
  background: var(--bg-secondary);
  color: var(--indigo-light);
  font-weight: 600;
}

/* Enforce black paragraph text in light mode */
:root p, :root .footer-disc, :root .calc-subtitle {
  color: #000000;
}
[data-theme="dark"] p, [data-theme="dark"] .footer-disc, [data-theme="dark"] .calc-subtitle {
  color: var(--text-secondary);
}


