/* ============================================================
   BEDTIME CALCULATOR — style.css
   Design: Deep-cosmos dark, glowing accents, premium health-tech
   ============================================================ */

/* ── CSS CUSTOM PROPERTIES ─────────────────────────────────── */
:root {
  /* Dark theme (default) */
  --bg-primary:    #09090f;
  --bg-secondary:  #0e0e1a;
  --bg-card:       #12121f;
  --bg-card-hover: #181828;
  --bg-input:      #1a1a2e;
  --border:        rgba(120, 100, 200, 0.18);
  --border-focus:  rgba(160, 130, 255, 0.55);

  --text-primary:  #f0eeff;
  --text-secondary:#a89fc8;
  --text-muted:    #6b6384;

  --accent:        #8b5cf6;
  --accent-glow:   rgba(139, 92, 246, 0.35);
  --accent-2:      #06b6d4;
  --accent-2-glow: rgba(6, 182, 212, 0.25);
  --gold:          #f59e0b;
  --gold-soft:     rgba(245, 158, 11, 0.15);

  --cycle-best:    #10b981;
  --cycle-great:   #3b82f6;
  --cycle-ok:      #8b5cf6;
  --cycle-min:     #f59e0b;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  22px;
  --radius-xl:  32px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.45), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.18);

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Sora', system-ui, sans-serif;

  --nav-height: 70px;
  --container:  1120px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme */
[data-theme="light"] {
  --bg-primary:    #f5f4ff;
  --bg-secondary:  #eeedf8;
  --bg-card:       #ffffff;
  --bg-card-hover: #f8f7ff;
  --bg-input:      #ededfa;
  --border:        rgba(100, 80, 180, 0.18);
  --border-focus:  rgba(120, 80, 220, 0.45);

  --text-primary:  #1a1535;
  --text-secondary:#4a4370;
  --text-muted:    #8880aa;

  --accent:        #7c3aed;
  --accent-glow:   rgba(124, 58, 237, 0.2);
  --accent-2:      #0891b2;
  --accent-2-glow: rgba(8, 145, 178, 0.15);

  --shadow-card: 0 4px 20px rgba(80, 60, 140, 0.1), 0 1px 4px rgba(80, 60, 140, 0.06);
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.08);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── UTILITY ────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 12px auto 48px;
  text-align: center;
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
  color: #fff;
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.btn-large { padding: 16px 38px; font-size: 1.05rem; }
.btn-calc { width: 100%; justify-content: center; margin-top: 8px; }

/* ── HEADER / NAV ───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(9, 9, 15, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

[data-theme="light"] .site-header {
  background: rgba(245, 244, 255, 0.88);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-primary);
  flex-shrink: 0;
}
.logo:hover { color: var(--text-primary); }
.logo-icon { font-size: 1.5rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-links a:hover {
  color: var(--text-primary);
  background: var(--accent-glow);
}

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: rotate(20deg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── BREADCRUMB ─────────────────────────────────────────────── */
.breadcrumb ol {
  display: flex;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: 8px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 60px) 0 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.star-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: white;
  animation: twinkle var(--duration, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: var(--opacity, 0.6);
}

@keyframes twinkle {
  0%, 100% { opacity: var(--opacity, 0.6); transform: scale(1); }
  50%       { opacity: calc(var(--opacity, 0.6) * 0.3); transform: scale(0.8); }
}

.moon-glow {
  position: absolute;
  top: -200px; right: -100px;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, rgba(109,40,217,0.07) 40%, transparent 70%);
  animation: moonPulse 8s ease-in-out infinite;
}

@keyframes moonPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.08); opacity: 0.85; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  text-align: center;
  margin: 0 auto;
  animation: heroFadeIn 0.9s cubic-bezier(0.4,0,0.2,1) forwards;
}

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

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.h1-sub {
  display: block;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-description {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent);
  line-height: 1;
}
.stat span {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ── CALCULATOR SECTION ─────────────────────────────────────── */
.calculator-section {
  padding: 100px 0;
  background: var(--bg-secondary);
  position: relative;
}

.calculator-section h2,
.how-it-works h2,
.tips-section h2,
.blog-section h2,
.faq-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  text-align: center;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.calculator-tabs {
  display: flex;
  gap: 8px;
  margin: 0 auto 32px;
  max-width: 700px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px;
  flex-wrap: wrap;
}

.tab-btn {
  flex: 1;
  min-width: 130px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.tab-btn.active {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.35s ease; }

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

.calculator-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-input-group > label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.time-input-wrapper {
  position: relative;
}

input[type="time"] {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.06em;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(0.5);
  cursor: pointer;
}

input[type="time"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.age-group-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.age-group-wrapper label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

/* Sleep Now Card */
.sleep-now-card { text-align: center; }
.sleep-now-content { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sleep-now-icon { font-size: 3.5rem; animation: float 4s ease-in-out infinite; }

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

.sleep-now-content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
}

.sleep-now-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 320px;
}

/* ── RESULTS ────────────────────────────────────────────────── */
.results-container {
  max-width: 700px;
  margin: 32px auto 0;
}

.results-header {
  text-align: center;
  margin-bottom: 24px;
}

.results-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.results-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cycles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.cycle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  animation: cardSlideUp 0.4s ease forwards;
  animation-delay: var(--delay, 0s);
  opacity: 0;
}

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

.cycle-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cycle-color, var(--accent));
  border-radius: 3px 3px 0 0;
}

.cycle-card:hover {
  transform: translateY(-4px);
  border-color: var(--cycle-color, var(--accent));
  box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 0 0 1px var(--cycle-color, var(--accent));
}

.cycle-card.recommended {
  border-color: var(--cycle-best);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.18), var(--shadow-card);
}

.cycle-card .badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--gold-soft);
  color: var(--gold);
  margin-bottom: 12px;
}

.cycle-time {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.cycle-cycles {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cycle-color, var(--accent));
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cycle-hours {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cycle-quality {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 10px;
}

.quality-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cycle-color, var(--accent));
  opacity: 0.3;
}
.quality-dot.filled { opacity: 1; }

/* ── HOW IT WORKS ───────────────────────────────────────────── */
.how-it-works {
  padding: 100px 0;
  background: var(--bg-primary);
  text-align: center;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: left;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.step-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 0 24px var(--accent-glow);
}

.step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
  margin-bottom: 16px;
}

.step-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── TIPS SECTION ───────────────────────────────────────────── */
.tips-section {
  padding: 100px 0;
  background: var(--bg-secondary);
  text-align: center;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: left;
  transition: all var(--transition);
}

.tip-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 20px var(--accent-2-glow);
}

.tip-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 14px;
}

.tip-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.tip-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── BLOG SECTION ───────────────────────────────────────────── */
.blog-section {
  padding: 100px 0;
  background: var(--bg-primary);
  text-align: center;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  text-align: left;
  margin-top: 16px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-card), 0 0 28px var(--accent-glow);
}

.blog-card.featured { grid-column: span 6; }
.blog-card:not(.featured) { grid-column: span 3; }

.blog-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.blog-card-link:hover { color: inherit; }

.blog-img { overflow: hidden; }
.blog-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  transition: transform var(--transition);
}
.blog-card:hover .blog-img-placeholder { transform: scale(1.04); }

.gradient-1 { background: linear-gradient(135deg, #1e1040 0%, #3b0764 50%, #1e1040 100%); }
.gradient-2 { background: linear-gradient(135deg, #0c1a40 0%, #1e3a5f 50%, #0c1a40 100%); }
.gradient-3 { background: linear-gradient(135deg, #0f2718 0%, #064e3b 50%, #0f2718 100%); }
.gradient-4 { background: linear-gradient(135deg, #1a0c2e 0%, #4c1d95 50%, #1a0c2e 100%); }
.gradient-5 { background: linear-gradient(135deg, #1c1000 0%, #78350f 50%, #1c1000 100%); }

[data-theme="light"] .gradient-1 { background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%); }
[data-theme="light"] .gradient-2 { background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%); }
[data-theme="light"] .gradient-3 { background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%); }
[data-theme="light"] .gradient-4 { background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%); }
[data-theme="light"] .gradient-5 { background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%); }

.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.blog-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 3px 10px;
  border-radius: 100px;
  width: fit-content;
}

.blog-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.blog-card.featured .blog-card-body h3 { font-size: 1.5rem; }

.blog-card-body p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 8px;
  transition: gap var(--transition);
}
.read-more:hover { gap: 10px; color: var(--accent); }

.blog-cta { margin-top: 40px; text-align: center; }

/* ── FAQ SECTION ────────────────────────────────────────────── */
.faq-section {
  padding: 100px 0;
  background: var(--bg-secondary);
  text-align: center;
}

.faq-list {
  max-width: 760px;
  margin: 16px auto 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:has(.faq-question[aria-expanded="true"]) {
  border-color: var(--accent);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  text-align: left;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--accent); }

.faq-icon {
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform var(--transition);
  flex-shrink: 0;
  font-weight: 300;
  line-height: 1;
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }

.faq-answer {
  padding: 0 24px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, padding 0.25s ease;
}
.faq-answer:not([hidden]) {
  max-height: 400px;
  padding-bottom: 20px;
}
.faq-answer p {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.faq-answer strong { color: var(--text-primary); }
.faq-answer em { color: var(--accent); font-style: normal; font-weight: 600; }

/* ── CTA SECTION ────────────────────────────────────────────── */
.cta-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

.cta-card {
  background: linear-gradient(135deg, rgba(139,92,246,0.15) 0%, rgba(109,40,217,0.1) 50%, rgba(6,182,212,0.08) 100%);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--radius-xl);
  padding: 64px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(139,92,246,0.1);
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(6,182,212,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.cta-content { position: relative; z-index: 1; max-width: 520px; }

.cta-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
  text-align: left;
}

.cta-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.cta-visual {
  font-size: 8rem;
  line-height: 1;
  animation: float 6s ease-in-out infinite;
  flex-shrink: 0;
}

/* ── NEWSLETTER ─────────────────────────────────────────────── */
.newsletter-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.newsletter-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 52px 48px;
  box-shadow: var(--shadow-card);
}

.newsletter-card h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.newsletter-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 28px;
  line-height: 1.65;
}

.newsletter-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.newsletter-input-group input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.newsletter-input-group input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.newsletter-input-group input::placeholder { color: var(--text-muted); }

.newsletter-fine {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0 !important;
}

.newsletter-success {
  margin-top: 16px;
  font-size: 0.93rem;
  color: var(--cycle-best);
  font-weight: 600;
}

/* ── SHARE SECTION ──────────────────────────────────────────── */
.share-section {
  padding: 60px 0;
  background: var(--bg-primary);
  text-align: center;
}

.share-section h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.share-section > .container > p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}

.share-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.share-btn.twitter:hover  { color: #1d9bf0; border-color: #1d9bf0; background: rgba(29,155,240,0.1); }
.share-btn.facebook:hover { color: #1877f2; border-color: #1877f2; background: rgba(24,119,242,0.1); }
.share-btn.reddit:hover   { color: #ff4500; border-color: #ff4500; background: rgba(255,69,0,0.1); }

/* ── RELATED ARTICLES ───────────────────────────────────────── */
.related-section {
  padding: 60px 0;
  background: var(--bg-secondary);
  text-align: center;
}

.related-section h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  transition: all var(--transition);
  text-align: center;
}

.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 20px var(--accent-glow);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.related-icon { font-size: 2rem; }
.related-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.footer-brand .logo {
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.footer-brand > p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 280px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all var(--transition);
}
.footer-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.footer-links-col h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.footer-links-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-col a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-disclaimer {
  font-size: 0.8rem !important;
  color: var(--text-muted);
}
.footer-disclaimer strong { color: var(--text-secondary); }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-card.featured   { grid-column: span 12; }
  .blog-card:not(.featured) { grid-column: span 6; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: span 2; }
  .cta-card { flex-direction: column; text-align: center; padding: 44px 32px; }
  .cta-content h2 { text-align: center; }
  .cta-visual { font-size: 5rem; }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; border-radius: var(--radius-sm); }
  .nav-toggle { display: flex; }

  .hero-actions { flex-direction: column; align-items: center; }
  .hero-stats { gap: 20px; padding: 18px 24px; }
  .stat-divider { height: 28px; }

  .calculator-card { padding: 28px 22px; }
  .calculator-tabs { flex-direction: column; }
  .tab-btn { min-width: unset; }

  .blog-card.featured,
  .blog-card:not(.featured) { grid-column: span 12; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }

  .newsletter-card { padding: 36px 24px; }
  .newsletter-input-group { flex-direction: column; }
  .newsletter-input-group .btn { width: 100%; justify-content: center; }

  .cycles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .cycles-grid { grid-template-columns: 1fr 1fr; }
  .cycle-time { font-size: 1.5rem; }
  h1 { font-size: 2.2rem; }
}

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6d28d9; }

/* ── SELECTION ──────────────────────────────────────────────── */
::selection { background: var(--accent-glow); color: var(--text-primary); }
