/* ============================================================
   Calcolo Settimane di Gravidanza — Design System
   Mobile-first · Dark mode · Palette da brief
   ============================================================ */

:root {
  --primary: #1F7A5A;
  --primary-dark: #155C43;
  --primary-soft: #E7F4EE;
  --secondary: #E8A0B4;
  --secondary-soft: #FBEEF2;
  --accent: #2C9C97;
  --accent-dark: #1F7A76;
  --bg: #FFFFFF;
  --bg-alt: #F6FAF8;
  --surface: #FFFFFF;
  --text: #1B2A25;
  --text-muted: #5A6B64;
  --success: #1F7A5A;
  --warning: #C77700;
  --border: #E2ECE7;
  --shadow-sm: 0 1px 3px rgba(20, 60, 45, .06);
  --shadow: 0 6px 20px rgba(20, 60, 45, .08);
  --shadow-lg: 0 18px 45px rgba(20, 60, 45, .12);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container: 1180px;
  --space: clamp(2.5rem, 6vw, 5rem);
}

[data-theme="dark"] {
  --primary: #3FAE86;
  --primary-dark: #5BC79E;
  --primary-soft: #16271F;
  --secondary: #E8A0B4;
  --secondary-soft: #2A1B22;
  --accent: #3FB5AF;
  --accent-dark: #5BC7C1;
  --bg: #0F1714;
  --bg-alt: #13201B;
  --surface: #16241E;
  --text: #EAF3EF;
  --text-muted: #A6B8B0;
  --border: #24332C;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
  --shadow: 0 8px 30px rgba(0, 0, 0, .4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--primary); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.18; color: var(--text); letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); margin: .3em 0; font-weight: 800; }
h2 { font-size: clamp(1.55rem, 4vw, 2.2rem); margin-top: 1.6em; margin-bottom: .5em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.4rem); margin-top: 1.4em; }
p { margin: 0 0 1.1em; }
article p, .lead { max-width: 70ch; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: var(--space); }
.section-tight { padding-block: clamp(1.8rem, 4vw, 3rem); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--accent);
  color: #fff; padding: .7rem 1.1rem; z-index: 100; border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  display: inline-block; font-family: var(--font-body); font-weight: 700; font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: .6rem;
}
.section-head { text-align: center; max-width: 60ch; margin-inline: auto; margin-bottom: 2.5rem; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--text-muted); font-size: 1.1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--text); }
.brand-mark { color: var(--primary); font-size: 1.3rem; }
.brand-text { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .2px; }
.brand-text strong { color: var(--primary); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.1rem; }
.main-nav a { text-decoration: none; color: var(--text); font-size: .95rem; }
.main-nav a:hover { color: var(--primary); }

.header-actions { display: flex; gap: .4rem; }
.theme-toggle, .nav-toggle {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 1.05rem; padding: .35rem .6rem; cursor: pointer; color: var(--text);
}
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: .5rem 0; }
  .main-nav a { display: block; padding: .8rem 1.2rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--secondary) 35%, transparent), transparent 45%),
    radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 40%),
    linear-gradient(165deg, var(--bg) 35%, var(--bg-alt));
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 4rem);
}
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { margin-top: 0; }
.hero h1 .accent { background: linear-gradient(120deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .lead { font-size: 1.2rem; color: var(--text-muted); max-width: 54ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.8rem; }
.badge {
  display: inline-flex; align-items: center; gap: .35rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: .4rem .9rem;
  font-size: .85rem; font-weight: 500; color: var(--text-muted); box-shadow: var(--shadow-sm);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; border: none; cursor: pointer; text-decoration: none;
  font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; padding: .85rem 1.7rem; border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 10px 24px rgba(255,107,157,.4); }
.btn-primary:hover { color: #fff; box-shadow: 0 14px 30px rgba(255,107,157,.5); }
.btn-accent { background: linear-gradient(120deg, var(--accent), var(--accent-dark)); color: #fff; box-shadow: 0 10px 24px rgba(124,92,255,.35); }
.btn-accent:hover { color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text);
  display: flex; gap: 1rem; align-items: flex-start; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); color: var(--text); box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.card-title { display: block; margin-bottom: .25rem; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; }
.card-text { font-size: .95rem; color: var(--text-muted); line-height: 1.6; }
.cards-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

/* Calculator cards — premium, larger icons */
.calc-card { flex-direction: column; align-items: flex-start; gap: 1.1rem; padding: 2rem 1.8rem; border-radius: var(--radius-lg); }
.calc-card-icon {
  display: grid; place-items: center; width: 84px; height: 84px; border-radius: 22px;
  font-size: 2.6rem; line-height: 1;
  background: linear-gradient(135deg, color-mix(in srgb, var(--secondary) 50%, var(--surface)), color-mix(in srgb, var(--accent) 26%, var(--surface)));
  box-shadow: inset 0 0 0 1px var(--border), 0 6px 18px color-mix(in srgb, var(--primary) 14%, transparent);
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.calc-card:hover .calc-card-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transform: scale(1.06) rotate(-3deg);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 35%, transparent);
}
.calc-card .card-title { font-size: 1.18rem; }
.calc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* ---------- Calcolatore (widget) ---------- */
.calc-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.8rem; box-shadow: var(--shadow);
}
.calc-box h2, .calc-box h3 { margin-top: 0; }
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .98rem; }
.form-field input, .form-field select {
  width: 100%; padding: .8rem 1rem; font-size: 1.02rem; color: var(--text); font-family: var(--font-body);
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm); transition: border-color .15s;
}
.form-field input:focus, .form-field select:focus { border-color: var(--primary); outline: none; }
.calc-result {
  margin-top: 1.2rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
  border: 1.5px solid var(--success); display: none;
}
.calc-result.is-visible { display: block; }
.calc-result strong { color: var(--success); }
.calc-result .big { font-size: 1.5rem; font-family: var(--font-display); display: block; margin: .2rem 0; }

/* ---------- Settimane ---------- */
.weeks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: .45rem; }
.week-pill {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--border);
  text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem;
}
.week-pill:hover { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.week-pill.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.week-nav { display: flex; justify-content: space-between; margin-block: 2rem; gap: 1rem; }

.trimester-label {
  display: inline-block; background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent); border-radius: 999px; padding: .2rem .8rem; font-size: .85rem; font-weight: 700;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: .6rem; padding: 0;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; padding: .9rem 1.1rem; list-style: none; position: relative;
}
.faq-item summary::after { content: '+'; position: absolute; right: 1.1rem; color: var(--primary); font-size: 1.2rem; }
.faq-item[open] summary::after { content: '–'; }
.faq-answer { padding: 0 1.1rem 1rem; color: var(--text-muted); }

/* ---------- Breadcrumbs / meta ---------- */
.breadcrumbs { font-size: .85rem; padding-block: .9rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: '›'; margin-right: .35rem; color: var(--text-muted); }
.breadcrumbs a { text-decoration: none; color: var(--text-muted); }
.last-updated { font-size: .85rem; color: var(--text-muted); border-left: 3px solid var(--secondary); padding-left: .7rem; }

/* ---------- Disclaimer / note ---------- */
.disclaimer {
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  border: 1.5px solid var(--warning); border-radius: var(--radius-sm);
  padding: 1rem 1.2rem; font-size: .92rem; margin-block: 2rem;
}

/* ---------- Tabelle ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
th, td { text-align: left; padding: .65rem .9rem; border-bottom: 1px solid var(--border); font-size: .95rem; }
th { background: color-mix(in srgb, var(--secondary) 20%, var(--surface)); }

/* ---------- Liste tool (diario / checklist) ---------- */
.tool-list { list-style: none; padding: 0; }
.tool-list li {
  display: flex; align-items: center; gap: .7rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .65rem .9rem; margin-bottom: .5rem;
}
.tool-list input[type="checkbox"] { width: 1.2rem; height: 1.2rem; accent-color: var(--primary); }
.tool-list li.is-done span { text-decoration: line-through; color: var(--text-muted); }
.progress-bar { height: 10px; background: var(--border); border-radius: 999px; overflow: hidden; margin-block: 1rem; }
.progress-bar > div { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); width: 0; transition: width .3s; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 3rem; }
.footer-grid { display: grid; gap: 2rem; padding-block: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { text-decoration: none; color: var(--text-muted); font-size: .92rem; }
.site-footer a:hover { color: var(--primary); }
.footer-tagline { color: var(--text-muted); font-size: .92rem; max-width: 34ch; }
.footer-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem;
  border-top: 1px solid var(--border); padding-block: 1rem; font-size: .85rem; color: var(--text-muted); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; inset-inline: 1rem; bottom: 1rem; z-index: 90;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1rem 1.2rem; max-width: 540px; margin-inline: auto;
}
.cookie-banner p { margin-top: 0; font-size: .9rem; }
.cookie-actions { display: flex; gap: .6rem; }

/* ---------- Ad placeholders (monetizzazione) ---------- */
.ad-slot {
  display: grid; place-items: center; min-height: 100px; margin-block: 1.5rem;
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
}

/* ---------- Nomi / Ospedali (filtri) ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-block: 1rem; }
.filter-bar input, .filter-bar select {
  padding: .55rem .8rem; border: 1.5px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: .95rem;
}
.alpha-bar { display: flex; flex-wrap: wrap; gap: .3rem; margin-block: 1rem; }
.alpha-bar button {
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm);
  min-width: 2rem; padding: .25rem; cursor: pointer; color: var(--text);
}
.alpha-bar button.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Utility ---------- */
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.grid-2 { display: grid; gap: 1.5rem; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
@media print {
  .site-header, .site-footer, .cookie-banner, .ad-slot, .btn, .week-nav,
  .mobile-cta, .result-actions, nav, .links-cloud, .newsletter { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  /* Branded header on printed pages */
  main::before {
    content: "Calcolo Settimane di Gravidanza · calcolosettimanedigravidanza.net";
    display: block; font-weight: 700; font-size: 11pt; color: #1F7A5A;
    border-bottom: 2px solid #1F7A5A; padding-bottom: 6pt; margin-bottom: 12pt;
  }
  /* When printing from a result, emphasize it */
  .calc-result.is-visible {
    border: 1px solid #ccc !important; box-shadow: none !important;
    backdrop-filter: none !important; page-break-inside: avoid;
  }
  .ga-card { border: 1px solid #ccc !important; }
  a { color: #000; text-decoration: none; }
  /* Footer note on print */
  .calc-result.is-visible::after {
    content: "Strumento informativo · non sostituisce il parere medico · stampa del " attr(data-print-date);
    display: block; margin-top: 10pt; font-size: 9pt; color: #555;
  }
}

/* ---------- E-E-A-T byline & fonti ---------- */
.byline { font-size: .88rem; color: var(--text-muted); border-left: 3px solid var(--secondary); padding-left: .7rem; margin-block: .8rem 1.2rem; }
.byline p { margin: 0 0 .3rem; }
.byline .last-updated { border: none; padding: 0; margin: 0; }
.sources ol { padding-left: 1.2rem; }
.sources li { margin-bottom: .4rem; font-size: .92rem; color: var(--text-muted); }
.badge.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Author / reviewer box ---------- */
.author-box { display: grid; gap: 1rem; }
@media (min-width: 700px) { .author-box { grid-template-columns: 1fr 1fr; } }
.author-card { display: flex; gap: .8rem; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.author-avatar { font-size: 1.6rem; line-height: 1; }
.author-card p { margin: .3rem 0 0; font-size: .88rem; }

/* ============================================================
   PREMIUM HOMEPAGE SECTIONS (v2.3 redesign)
   ============================================================ */

/* Sezioni con sfondo alternato */
.section-alt { background: var(--bg-alt); }
.section-surface { background: var(--surface); border-block: 1px solid var(--border); }

/* Hero calculator card elevata */
.hero .calc-box { box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); }

/* Stat row (medical trust) */
.stats-row { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); text-align: center; }
@media (min-width: 760px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem);
  background: linear-gradient(120deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { color: var(--text-muted); font-size: .95rem; margin-top: .2rem; }

/* Trust/medical band */
.trust-band { display: grid; gap: 1.5rem; }
@media (min-width: 820px) { .trust-band { grid-template-columns: repeat(3, 1fr); } }
.trust-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm); }
.trust-item .ti-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; font-size: 1.7rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--success) 22%, var(--surface)), color-mix(in srgb, var(--accent) 18%, var(--surface))); margin-bottom: 1rem; }
.trust-item h3 { margin: 0 0 .4rem; }
.trust-item p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* Weeks trimester groups */
.trimester-block { margin-bottom: 1.8rem; }
.trimester-block > h3 { display: flex; align-items: center; gap: .6rem; margin: 0 0 .9rem; font-size: 1.1rem; }
.trimester-dot { width: 12px; height: 12px; border-radius: 50%; }
.t1 { background: var(--primary); } .t2 { background: var(--accent); } .t3 { background: var(--success); }

/* Popular tools horizontal */
.popular-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.popular-pill { display: flex; align-items: center; gap: .7rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: .7rem 1.1rem; text-decoration: none; color: var(--text); font-weight: 500; box-shadow: var(--shadow-sm);
  transition: transform .18s, border-color .18s; }
.popular-pill:hover { transform: translateY(-2px); color: var(--text); border-color: var(--primary); }
.popular-pill .pp-icon { font-size: 1.3rem; }

/* Latest articles */
.article-card { display: flex; flex-direction: column; gap: .6rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text);
  transition: transform .2s, box-shadow .2s; }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--text); }
.article-cat { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.article-card h3 { margin: 0; font-size: 1.12rem; }
.article-card p { margin: 0; color: var(--text-muted); font-size: .93rem; }

/* Newsletter */
.newsletter { background: linear-gradient(125deg, var(--primary), var(--accent)); border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem); text-align: center; color: #fff; box-shadow: var(--shadow-lg); }
.newsletter h2 { color: #fff; margin-top: 0; }
.newsletter p { color: rgba(255,255,255,.9); max-width: 50ch; margin-inline: auto; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.4rem; }
.newsletter-form input { flex: 1 1 260px; max-width: 340px; padding: .9rem 1.2rem; border: none; border-radius: 999px; font-size: 1rem; font-family: var(--font-body); }
.newsletter-form button { background: #fff; color: var(--accent-dark); border: none; border-radius: 999px; padding: .9rem 1.8rem; font-weight: 700; cursor: pointer; font-family: var(--font-body); font-size: 1rem; }
.newsletter-note { font-size: .82rem; color: rgba(255,255,255,.8); margin-top: .8rem; }

/* Internal links cloud */
.links-cloud { display: flex; flex-wrap: wrap; gap: .6rem; }
.links-cloud a { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .5rem 1rem;
  text-decoration: none; color: var(--text-muted); font-size: .9rem; transition: border-color .18s, color .18s; }
.links-cloud a:hover { color: var(--primary); border-color: var(--primary); }

/* FAQ on premium bg */
.faq .faq-item { box-shadow: var(--shadow-sm); }

/* Section divider wave spacing helper */
.lead-center { text-align: center; max-width: 60ch; margin-inline: auto; }

/* ---------- Calculator inline errors ---------- */
.calc-result.has-error { border-color: var(--warning); }
.calc-error { color: #B00020; font-weight: 500; margin: 0; }
[data-theme="dark"] .calc-error { color: #FF8A9B; }
.exam-timeline .timeline-list { list-style: none; padding-left: 0; }
.exam-timeline .timeline-list li { padding: .3rem 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }

/* ---------- Field hints ---------- */
.field-hint { display: block; margin-top: .35rem; font-size: .82rem; color: var(--text-muted); line-height: 1.4; }

/* ============================================================
   PREMIUM DATE INPUT (Day ▼ / Month ▼ / Year numeric)
   ============================================================ */
.date-group {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: .6rem;
}
.date-group select,
.date-group input {
  min-height: 56px;
  padding: .85rem 1rem;
  font-size: 1.05rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.date-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231F7A5A' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}
.date-group input::placeholder { color: var(--text-muted); }
.date-group select:focus,
.date-group input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent);
}
/* Hide number spinners for the year field */
.date-year::-webkit-outer-spin-button,
.date-year::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.date-year { -moz-appearance: textfield; }

/* ============================================================
   PREMIUM INPUTS (all form fields, 56px tap targets)
   ============================================================ */
.form-field input[type="number"],
.form-field input[type="text"],
.form-field select {
  min-height: 56px;
  padding: .85rem 1.1rem;
  font-size: 1.05rem;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
}
.form-field select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231F7A5A' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.2rem; cursor: pointer;
}
.form-field input:focus, .form-field select:focus {
  border-color: var(--primary); outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent);
}
.form-field label { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }

/* Submit button full-width & tall in calculator forms */
.calc-box .btn[type="submit"] {
  width: 100%;
  justify-content: center;
  min-height: 56px;
  font-size: 1.08rem;
  margin-top: .4rem;
}

/* Mobile: keep date group on one row but allow year to breathe */
@media (max-width: 420px) {
  .date-group { grid-template-columns: .9fr 1.3fr .9fr; gap: .4rem; }
  .date-group select, .date-group input { padding: .75rem .6rem; font-size: 1rem; }
  .date-group select { padding-right: 1.6rem; background-position: right .6rem center; }
}

/* ============================================================
   PREMIUM VISUAL RESULTS (progress bar + info cards)
   ============================================================ */
.ga-progress { margin: 1rem 0 .4rem; }
.ga-progress-bar {
  height: 14px; border-radius: 99px; background: var(--bg-alt);
  overflow: hidden; box-shadow: inset 0 0 0 1px var(--border);
}
.ga-progress-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary) 55%, var(--accent));
  border-radius: 99px; transition: width .6s cubic-bezier(.4,0,.2,1);
}
.ga-progress-meta {
  display: flex; justify-content: space-between;
  font-size: .74rem; color: var(--text-muted); margin-top: .35rem;
}
.ga-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin: 1rem 0;
}
.ga-card {
  text-align: center; padding: 1rem .5rem; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.ga-card-num {
  display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ga-card-num small { font-size: .9rem; font-weight: 700; }
.ga-card-lbl { display: block; font-size: .78rem; color: var(--text-muted); margin-top: .35rem; }

/* Result container glassmorphism touch */
.calc-result.is-visible {
  margin-top: 1.3rem; padding: 1.4rem; border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.calc-result .big {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.4rem, 4vw, 2rem); margin: .3rem 0 .2rem; color: var(--primary-dark);
}

/* ============================================================
   MOBILE STICKY CTA + smooth scrolling polish
   ============================================================ */
.mobile-cta {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.mobile-cta .btn { width: 100%; justify-content: center; min-height: 54px; }
@media (max-width: 760px) {
  .mobile-cta { display: block; }
  main { padding-bottom: 80px; } /* room for sticky bar */
}

/* Larger tap targets on mobile nav and pills */
@media (max-width: 760px) {
  .week-pill { min-width: 44px; min-height: 44px; }
  .popular-pill { min-height: 52px; }
  .btn { min-height: 48px; }
}

/* ============================================================
   PREMIUM HEALTHCARE PORTAL — trust bar, categories, reviewer
   ============================================================ */
.trust-bar {
  background: var(--primary-soft);
  border-block: 1px solid var(--border);
  padding: .9rem 0;
  font-size: .92rem;
  color: var(--primary-dark);
}
.trust-bar .container { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: center; justify-content: center; text-align: center; }
.trust-bar strong { font-weight: 600; }
.trust-bar .sep { opacity: .4; }

/* Calculator category groups */
.calc-category { margin-bottom: 2.5rem; }
.calc-category-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.2rem; }
.calc-category-head h3 { margin: 0; font-size: 1.25rem; }
.cat-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.cat-gravidanza { background: var(--primary); }
.cat-fertilita { background: var(--secondary); }
.cat-salute { background: var(--accent); }
.cat-travaglio { background: #C77700; }
.cat-strumenti { background: var(--text-muted); }

/* Reviewer band (homepage) */
.reviewer-band {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.8rem; box-shadow: var(--shadow-sm);
}
.reviewer-band .rb-photo {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  background: var(--primary-soft); display: grid; place-items: center; font-size: 2.4rem; flex-shrink: 0;
}
.reviewer-band .rb-body { flex: 1; min-width: 240px; }
.reviewer-band h3 { margin: 0 0 .3rem; }
.reviewer-band p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* Reviewer bio page */
.reviewer-hero { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; margin-bottom: 2rem; }
.reviewer-photo { border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
.author-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* ---------- Hero image (search thumbnail source) ---------- */
.hero-img {
  width: 100%; max-width: 320px; height: auto; margin-top: 1.5rem;
  border-radius: var(--radius-lg); aspect-ratio: 1000 / 800;
}
@media (min-width: 940px) {
  .hero-img { max-width: 240px; margin-top: 1.2rem; }
}

/* ============================================================
   WEEK PAGE — rich content + per-week image
   ============================================================ */
.week-figure {
  margin: 1.2rem 0 1.5rem; max-width: 640px;
}
.week-img {
  width: 100%; height: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  aspect-ratio: 640 / 360; background: var(--primary-soft);
}
.week-figure figcaption {
  margin-top: .6rem; font-size: .9rem; color: var(--text-muted); text-align: center;
}
.week-content h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem); margin-top: 2rem; margin-bottom: .7rem;
}
.week-content p { line-height: 1.75; margin-bottom: 1rem; }
.week-content ul { margin: 0 0 1.2rem 0; padding-left: 1.3rem; }
.week-content li { margin-bottom: .45rem; line-height: 1.65; }
.week-content a { color: var(--primary-dark); }

/* ============================================================
   BARRA DI CARICAMENTO NAVIGAZIONE (feedback istantaneo mobile)
   ============================================================ */
#nav-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 8px color-mix(in srgb, var(--primary) 50%, transparent);
  z-index: 9999; opacity: 0;
  transition: width .18s ease, opacity .25s ease;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #nav-progress { transition: opacity .2s ease; }
}
