/* Dermastudio — Custom CSS (palette premium-warm: avorio + blu notte + terracotta) */

:root {
  /* Backgrounds caldi */
  --bg-page: #FDF4E8;        /* avorio caldo (richiesta cliente) — sfondo base */
  --bg-soft: #F5E9D3;        /* avorio scuro per sezioni alternate */
  --bg-card: #FFFFFF;        /* card pulite, contrasto */
  --bg-warm-tint: #FBEBD3;   /* tinta calda per banner/hover */

  /* Brand */
  --brand-primary: #0F3D5C;        /* blu notte clinico */
  --brand-primary-soft: #1F5478;   /* hover variante */
  --brand-accent: #B57A4D;         /* terracotta (UNICO accent) */
  --brand-accent-hover: #9E6539;   /* terracotta hover */
  --brand-accent-soft: #D2A07A;    /* terracotta chiara per backgrounds soft */

  /* Neutri caldi */
  --neutral-ink: #2A2823;          /* caffè scuro per testo body */
  --neutral-text: #4A4540;         /* testo secondario */
  --neutral-mute: #6B6358;         /* testo terziario, microcopy */
  --neutral-border: #E8DCC4;       /* bordi sottili tono avorio */
  --neutral-border-strong: #D4C29F;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
  font-family: 'Manrope', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  color: var(--neutral-ink);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  letter-spacing: -0.005em;
}

*:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; border-radius: 2px; }

.skip-link { position: absolute; top: -100px; left: 1rem; background: var(--brand-primary); color: #fff; padding: .5rem 1rem; z-index: 100; border-radius: 0; }
.skip-link:focus { top: 1rem; }

/* TopBar urgenze */
.topbar {
  background: var(--brand-primary);
  color: #fff;
  font-size: .8125rem;
  letter-spacing: .01em;
}
.topbar a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.5);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .2s ease;
}
.topbar a:hover { text-decoration-color: #fff; }
.topbar strong { font-weight: 600; }

/* Header sticky */
.site-header {
  position: sticky; top: 0;
  background: rgba(253, 244, 232, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--neutral-border);
  z-index: 50;
  transition: padding .2s ease;
}
.site-header > div { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.site-header.scrolled > div { padding-top: .875rem; padding-bottom: .875rem; }

/* Logo wordmark — usa Manrope ExtraBold per coerenza con brand kit */
.brand-mark {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  letter-spacing: 0.18em;       /* tracking ampio come tagline per coerenza */
  color: var(--brand-primary);
  font-size: 1.375rem;
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  flex-direction: column;
  gap: .25rem;
}
.brand-mark .accent { color: var(--brand-accent); font-weight: 800; }
.brand-mark .tagline {
  font-family: 'Manrope', sans-serif;
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--neutral-mute);
  text-transform: uppercase;
}

/* Nav links */
.site-nav { display: flex; align-items: center; gap: .25rem; }
.nav-link {
  color: var(--neutral-ink);
  font-size: .9375rem;
  font-weight: 500;
  padding: .5rem .9375rem;
  border-radius: 0;
  text-decoration: none;
  transition: color .2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: .9375rem; right: .9375rem;
  bottom: 2px;
  height: 1.5px;
  background: var(--brand-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover { color: var(--brand-accent); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--brand-primary); }
.nav-link.active::after { transform: scaleX(1); }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 0;
  font-weight: 500; font-size: .9375rem;
  transition: all .2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
  line-height: 1.2;
  font-family: inherit;
}
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-soft); transform: translateY(-1px); }
.btn-accent { background: var(--brand-accent); color: #fff; }
.btn-accent:hover { background: var(--brand-accent-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--brand-primary); border: 1.5px solid var(--brand-primary); }
.btn-outline:hover { background: var(--brand-primary); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.7); }
.btn-outline-light:hover { background: #fff; color: var(--brand-primary); border-color: #fff; }
.btn-ghost { background: transparent; color: var(--brand-primary); padding-left: 0; padding-right: 0; }
.btn-ghost:hover { color: var(--brand-accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* === HERO SPLIT EDITORIAL — full screen 50/50 === */
.hero-split {
  position: relative;
  background: var(--bg-page);
  overflow: hidden;
  padding: 0 !important;   /* override del section { padding: 5rem 0 } globale */
}
.hero-split .hero-grid {
  display: grid;
}
@media (min-width: 1024px) {
  .hero-split {
    /* lascia ~180px (header + marquee) visibili nella stessa viewport */
    height: calc(100vh - 180px);
    min-height: 560px;
  }
  .hero-split .hero-grid {
    grid-template-columns: 1fr 1fr;
    height: 100%;
  }
}
@media (max-width: 1023px) {
  .hero-split .hero-grid { min-height: calc(100vh - 100px); }
}
.hero-split .hero-text {
  padding: 3rem 1.5rem;
  display: flex;
  align-items: center;        /* centro verticale */
  justify-content: flex-start;
}
@media (min-width: 1024px) {
  .hero-split .hero-text {
    padding: 3rem 3rem 3rem 2.5rem;   /* sx allineato al header (px-10 = 2.5rem) */
  }
}
.hero-split .hero-text-inner { max-width: 640px; width: 100%; }
.hero-split h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-top: 1rem;
  font-weight: 400;             /* Fraunces a peso 400 per hero — più editoriale */
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.hero-split .subhead {
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  margin-top: 1.25rem;
}
/* Foto hero — slider full-bleed sul 50% destro */
.hero-split .hero-photo {
  position: relative;
  background: var(--bg-soft);
  overflow: hidden;
  border-radius: 0;
  aspect-ratio: auto;
  min-height: 60vh;
}
@media (min-width: 1024px) {
  .hero-split .hero-photo { min-height: 100%; height: 100%; }
}
.hero-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}
.hero-slide.is-active { opacity: 1; z-index: 2; }

/* Slider progress bar — segmenti edge-to-edge in basso */
.hero-slider-dots {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  padding: 1.25rem;
  z-index: 4;
  background: linear-gradient(to top, rgba(0,0,0,.18) 0%, transparent 100%);
}
.hero-slider-dots button {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,.28);
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  transition: background .25s ease;
}
.hero-slider-dots button:hover { background: rgba(255,255,255,.5); }
.hero-slider-dots button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
}
.hero-slider-dots button.is-active::after {
  animation: heroProgress 5s linear forwards;
}
.hero-slider-dots button.is-played::after {
  transform: scaleX(1);
}
@keyframes heroProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}
/* Decoro: linea verticale terracotta sottile sul bordo sx foto */
.hero-split .hero-photo::before {
  content: '';
  position: absolute;
  left: 0; top: 12%;
  width: 4px; height: 80px;
  background: var(--brand-accent);
  z-index: 2;
}
.hero-split .hero-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--neutral-border);
}
.hero-split .trust-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand-accent);
  display: block;
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-split .trust-label {
  font-size: .75rem;
  color: var(--neutral-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: .375rem;
  display: block;
}

/* Hero pagine secondarie (non full-screen) */
.hero {
  padding: 4rem 0 5rem;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-page) 100%);
}
.hero-image { aspect-ratio: 4/3; object-fit: cover; border-radius: 0; }

/* === HERO PAGINE INTERNE — bg image + overlay (compact cinematic) === */
.hero-page {
  position: relative;
  min-height: 42vh;
  padding: 4rem 0 !important;
  background-color: var(--brand-primary);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-align: center;
}
@media (min-width: 1024px) {
  .hero-page { min-height: 50vh; padding: 5rem 0 !important; }
}
/* Overlay gradient scuro per leggibilità testo bianco */
.hero-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,61,92,.78) 0%, rgba(15,61,92,.55) 45%, rgba(15,61,92,.82) 100%);
  z-index: 1;
}
.hero-page-text {
  max-width: 820px;
  padding: 0 1.5rem;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  color: #fff;
}
@media (min-width: 1024px) {
  .hero-page-text {
    padding: 0 4rem;
    max-width: 1280px;     /* più ampia su desktop → titoli lunghi su 1 riga */
  }
}
.hero-page h1 {
  /* la regola sotto già esiste, qui aggiungo solo balance */
  text-wrap: balance;       /* bilancia auto le righe se va su 2 (browser moderni) */
}
.hero-page .eyebrow {
  display: block;
  margin-bottom: 1rem;
  color: rgba(255,255,255,.85) !important;
}
.hero-page h1 {
  color: #fff !important;
  font-size: clamp(2.25rem, 5vw, 4rem) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem !important;
  font-weight: 400 !important;
}
.hero-page-subhead {
  font-size: clamp(1rem, 1.3vw, 1.1875rem);
  line-height: 1.55;
  color: rgba(255,255,255,.85);
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto 2rem;
}
/* Linea decorativa terracotta sottile */
.hero-page-text::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--brand-accent);
  margin: 0 auto 1.25rem;
}

@media (max-width: 767px) {
  .hero-page { min-height: 38vh; padding: 3rem 0 !important; }
}

/* Fix news featured — no underline ereditato dai link wrap */
.news-featured-modern a,
.news-featured-modern a:hover {
  text-decoration: none !important;
}
.news-featured-modern .news-featured-modern-title,
.news-featured-modern p {
  text-decoration: none !important;
}

/* === NEWS — Filtri tab orizzontali === */
.news-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--neutral-border);
  position: relative;
}
.news-tabs button {
  font-family: 'Manrope', sans-serif;
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 1rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--neutral-mute);
  cursor: pointer;
  position: relative;
  transition: color .25s ease;
  border-radius: 0;
}
.news-tabs button:hover { color: var(--brand-primary); }
.news-tabs button::after {
  content: '';
  position: absolute;
  left: 1.5rem; right: 1.5rem;
  bottom: -1px;
  height: 2px;
  background: var(--brand-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(0.22,1,0.36,1);
}
.news-tabs button.is-active {
  color: var(--brand-primary);
  font-weight: 600;
}
.news-tabs button.is-active::after { transform: scaleX(1); }
@media (max-width: 767px) {
  .news-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .news-tabs button { padding: .875rem 1rem; white-space: nowrap; flex-shrink: 0; font-size: .8125rem; }
  .news-tabs button::after { left: 1rem; right: 1rem; }
}

/* News featured editorial */
.news-featured-modern {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-card);
  border: 1px solid var(--neutral-border);
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease;
}
@media (min-width: 1024px) {
  .news-featured-modern { grid-template-columns: 1.4fr 1fr; min-height: 480px; }
}
.news-featured-modern:hover {
  border-color: var(--brand-accent);
  box-shadow: 0 16px 48px rgba(15,61,92,.08);
}
.news-featured-modern-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-warm-tint);
}
@media (min-width: 1024px) { .news-featured-modern-img { aspect-ratio: auto; height: 100%; } }
.news-featured-modern-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.5s cubic-bezier(0.22,1,0.36,1);
}
.news-featured-modern:hover .news-featured-modern-img img { transform: scale(1.04); }
.news-featured-modern-img::before {
  content: 'In evidenza';
  position: absolute;
  top: 1.25rem; left: 1.25rem;
  background: var(--brand-accent);
  color: #fff;
  padding: .375rem .875rem;
  font-family: 'Manrope', sans-serif;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  z-index: 2;
}
.news-featured-modern-text {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 1024px) { .news-featured-modern-text { padding: 3rem; } }
.news-featured-modern-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.625rem, 2.5vw, 2.25rem) !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
  color: var(--brand-primary);
  margin: .75rem 0 1rem !important;
  letter-spacing: -0.025em;
}
.eyebrow { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand-accent); margin-bottom: .75rem; display: inline-block; }

/* Tipografia — selettori specifici per battere il preflight Tailwind */
body h1, body h2, body h3, body h4 {
  font-family: 'Fraunces', 'Newsreader', 'Source Serif 4', Georgia, serif;
  font-weight: 500;
  font-optical-sizing: auto;
  color: var(--brand-primary);
  letter-spacing: -0.02em;
  margin: 0;
}
body h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.03em;
}
body h2 {
  font-size: clamp(1.875rem, 3.75vw, 3rem);   /* 30–48px — più contenuto */
  line-height: 1.08;
  margin-bottom: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.025em;
}
body h3 {
  font-size: clamp(1.375rem, 1.75vw, 1.75rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
}
body h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--brand-primary);
  margin: 0;
}
.subhead { font-size: 1.125rem; color: var(--neutral-text); line-height: 1.6; margin: 0; font-weight: 300; }
.eyebrow { font-family: 'Manrope', sans-serif; font-weight: 600; }

/* Section header: container più largo per dare respiro al titolo grande */
.section-header { max-width: 880px; }

/* Card servizio — con foto full-bleed in cima */
.card-servizio {
  background: var(--bg-card);
  border: 1px solid var(--neutral-border);
  border-radius: 0;
  padding: 0;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

/* Scroll-reveal stagger — 5 card che appaiono in cascade */
.cards-stagger .card-servizio {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .7s cubic-bezier(0.22,1,0.36,1),
    transform .7s cubic-bezier(0.22,1,0.36,1),
    border-color .25s ease,
    box-shadow .25s ease;
}
.cards-stagger.in-view .card-servizio { opacity: 1; transform: translateY(0); }
.cards-stagger.in-view .card-servizio:nth-child(1) { transition-delay: 0s, 0s, 0s, 0s; }
.cards-stagger.in-view .card-servizio:nth-child(2) { transition-delay: .1s, .1s, 0s, 0s; }
.cards-stagger.in-view .card-servizio:nth-child(3) { transition-delay: .2s, .2s, 0s, 0s; }
.cards-stagger.in-view .card-servizio:nth-child(4) { transition-delay: .3s, .3s, 0s, 0s; }
.cards-stagger.in-view .card-servizio:nth-child(5) { transition-delay: .4s, .4s, 0s, 0s; }
@media (prefers-reduced-motion: reduce) {
  .cards-stagger .card-servizio { opacity: 1; transform: none; transition: none; }
}

/* Su 5 colonne, immagine card un po' più "verticale" per leggibilità */
@media (min-width: 1024px) {
  .cards-stagger .card-servizio .card-img { aspect-ratio: 4/3; }
  .cards-stagger .card-servizio .card-body { padding: 1.25rem 1.25rem 1.5rem; }
  .cards-stagger .card-servizio h3 { font-size: 1.125rem; }
  .cards-stagger .card-servizio p { font-size: .875rem; }
}
.card-servizio:hover {
  border-color: var(--brand-accent);
  box-shadow: 0 12px 32px rgba(15,61,92,.10);
  transform: translateY(-3px);
}

/* Numero area in overlay top-left foto */
.card-servizio .area-num {
  position: absolute;
  top: 1rem; left: 1rem;
  width: 38px; height: 38px;
  background: var(--bg-page);
  color: var(--brand-primary);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  letter-spacing: -0.02em;
}

.card-servizio { position: relative; }

/* Linea decorativa sotto il titolo */
.card-servizio .card-body h3 {
  position: relative;
  padding-bottom: .875rem;
}
.card-servizio .card-body h3::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 28px; height: 2px;
  background: var(--brand-accent);
  transition: width .3s ease;
}
.card-servizio:hover .card-body h3::after { width: 56px; }

.card-servizio .card-img {
  aspect-ratio: 16/10;
  background: var(--bg-warm-tint);
  overflow: hidden;
}
.card-servizio .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.card-servizio:hover .card-img img { transform: scale(1.04); }
.card-servizio .card-body {
  padding: 1.75rem 1.75rem 1.875rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* === Card medico — editorial style === */
.card-medico {
  background: var(--bg-card);
  border: 1px solid var(--neutral-border);
  border-radius: 0;
  padding: 0;
  transition: all .3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;       /* utile se .card-medico è <a> */
  color: inherit;
}
.card-medico:hover {
  border-color: var(--brand-accent);
  box-shadow: 0 16px 40px rgba(15,61,92,.10);
  transform: translateY(-3px);
}

/* Wrapper per la foto + overlay hover */
.card-medico-img {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--bg-warm-tint);
}
.card-medico .photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(0.22,1,0.36,1);
  border-radius: 0;
}
.card-medico:hover .photo { transform: scale(1.06); }

/* (rimossi overlay e numero medico — non più utilizzati) */

/* Photo placeholder */
.card-medico .photo-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--bg-warm-tint);
}
.card-medico .photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4.5rem;
  color: var(--brand-accent);
  font-weight: 400;
  font-family: 'Fraunces', serif;
  letter-spacing: -0.04em;
  aspect-ratio: 1/1;
}

/* Body card medico */
.card-medico-body {
  padding: 1.75rem 1.75rem 1.875rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .625rem;
}
.medico-spec {
  font-family: 'Manrope', sans-serif;
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--brand-accent);
  display: block;
}
.card-medico h3 {
  font-size: 1.375rem !important;
  margin: 0;
  position: relative;
  padding-bottom: 1rem;
  line-height: 1.2;
}
.card-medico h3::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 32px; height: 2px;
  background: var(--brand-accent);
}
.card-medico-bio {
  font-size: .875rem;
  line-height: 1.6;
  color: var(--neutral-text);
  margin: 0;
}

/* Sezioni */
section { padding: 5rem 0; }
section.tinted { background: var(--bg-soft); }
section.dark { background: var(--brand-primary); color: #fff; }
section.dark h2, section.dark h3 { color: #fff; }
section.dark .subhead { color: rgba(255,255,255,.8); }
section.dark .eyebrow { color: var(--brand-accent-soft); }

.section-header { text-align: center; max-width: 720px; margin: 0 auto 3rem; }

/* Accordion */
details.accordion {
  border-bottom: 1px solid var(--neutral-border);
  padding: 1.25rem 0;
}
details.accordion summary {
  font-weight: 600; cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  color: var(--brand-primary);
  font-size: 1.0625rem;
}
details.accordion summary::-webkit-details-marker { display: none; }
details.accordion summary::after {
  content: '+';
  font-size: 1.5rem;
  line-height: 1;
  transition: transform .25s;
  color: var(--brand-accent);
}
details.accordion[open] summary::after { transform: rotate(45deg); }
details.accordion .accordion-content {
  padding-top: 1rem;
  color: var(--neutral-text);
  line-height: 1.7;
}

/* Form */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 500; font-size: .875rem; color: var(--neutral-ink); margin-bottom: .375rem; }
.form-label .required { color: var(--brand-accent); }
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: .75rem .875rem;
  border: 1px solid var(--neutral-border-strong);
  border-radius: 0;
  font-size: .9375rem;
  font-family: inherit;
  background: #fff;
  color: var(--neutral-ink);
  transition: border-color .2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--brand-primary);
  outline: 2px solid var(--brand-primary);
  outline-offset: 0;
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-help { font-size: .8125rem; color: var(--neutral-mute); margin-top: .25rem; }
.form-checkbox {
  display: flex; align-items: flex-start; gap: .625rem;
  padding: .875rem;
  background: var(--bg-warm-tint);
  border: 1px solid var(--neutral-border);
  border-radius: 0;
}
.form-checkbox input { margin-top: .25rem; flex-shrink: 0; accent-color: var(--brand-accent); }
.form-checkbox label { font-size: .8125rem; color: var(--neutral-text); line-height: 1.5; cursor: pointer; }

/* Disclaimer medico */
.disclaimer-medico {
  background: var(--bg-warm-tint);
  border-left: 3px solid var(--brand-accent);
  padding: 1rem 1.25rem;
  font-size: .875rem;
  color: var(--neutral-text);
  line-height: 1.6;
  border-radius: 0 4px 4px 0;
  margin: 2rem 0;
}

/* Banner riservatezza (MST) */
.banner-riservatezza {
  background: var(--bg-warm-tint);
  border: 1px solid var(--brand-accent-soft);
  padding: 1rem 1.25rem;
  border-radius: 0;
  font-size: .9375rem;
  color: var(--brand-primary);
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

/* Breadcrumb */
.breadcrumb { font-size: .8125rem; color: var(--neutral-mute); padding: 1rem 0; }
.breadcrumb a { color: var(--brand-primary); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-accent); text-decoration: underline; }
.breadcrumb-sep { margin: 0 .5rem; color: var(--neutral-border-strong); }

/* CTA banner — terracotta uniforme su tutte le pagine */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-hover) 100%);
  color: #fff;
  padding: 4rem 0;
}
.cta-banner h2 { color: #fff; }

/* Footer */
.site-footer {
  background: #1a1814;
  color: #c9bfa8;
  padding: 3.5rem 0 1.5rem;
  font-size: .875rem;
  line-height: 1.7;
}
.site-footer h4 {
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: .875rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer a {
  color: #c9bfa8;
  text-decoration: underline;
  text-decoration-color: rgba(201,191,168,.3);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color .15s, text-decoration-color .15s;
}
.site-footer a:hover {
  color: var(--brand-accent-soft);
  text-decoration-color: var(--brand-accent-soft);
}
.footer-bottom {
  border-top: 1px solid #2a2620;
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  font-size: .8125rem;
  color: #8a8170;
}
.footer-bottom a { text-decoration: underline; text-decoration-color: rgba(138,129,112,.4); }

/* Cookie banner */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-card);
  border-top: 2px solid var(--brand-accent);
  box-shadow: 0 -8px 32px rgba(0,0,0,.12);
  padding: 1.25rem;
  z-index: 90;
  transform: translateY(100%);
  transition: transform .3s ease;
}
.cookie-banner.visible { transform: translateY(0); }

/* Mobile menu */
.mobile-menu {
  position: fixed; top: 0; right: -100%;
  width: 85%; max-width: 360px;
  height: 100vh;
  background: var(--bg-page);
  box-shadow: -8px 0 24px rgba(0,0,0,.15);
  z-index: 60;
  transition: right .3s;
  padding: 5rem 1.5rem 2rem;
  overflow-y: auto;
}
.mobile-menu.open { right: 0; }
.mobile-menu .nav-link {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid var(--neutral-border);
  font-size: 1.125rem;
}
.menu-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 61, 92, 0.4);
  backdrop-filter: blur(4px);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.menu-overlay.open { opacity: 1; pointer-events: auto; }

/* === SEZIONE CONTATTI con Google Maps full-width === */
.contatti-section { padding: 0 !important; background: var(--bg-soft); }
.contatti-header { padding-top: 5rem; padding-bottom: 3rem; background: var(--bg-soft); }
.contatti-header .section-header { margin-bottom: 0; }

.contatti-map-wrap {
  position: relative;
  width: 100%;
  height: 600px;
}
@media (max-width: 1023px) {
  .contatti-map-wrap { height: auto; display: flex; flex-direction: column; }
}
.contatti-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: saturate(.9);
}
@media (max-width: 1023px) {
  .contatti-iframe { height: 360px; }
}

.contatti-overlay-card {
  position: absolute;
  top: 50%;
  right: 4rem;
  transform: translateY(-50%);
  background: var(--bg-page);
  padding: 2.5rem;
  border-radius: 0;
  box-shadow: 0 20px 60px rgba(15,61,92,.18);
  max-width: 400px;
  width: calc(100% - 8rem);
  z-index: 5;
  border: 1px solid var(--neutral-border);
}
@media (max-width: 1023px) {
  .contatti-overlay-card {
    position: relative;
    top: auto; left: auto;
    transform: none;
    margin: -2rem 1.5rem 2rem;
    max-width: none;
    width: auto;
  }
}

.contatti-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contatti-list li {
  display: flex;
  flex-direction: column;
  gap: .125rem;
}
.contatti-label {
  font-family: 'Manrope', sans-serif;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--neutral-mute);
}
.contatti-value {
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--brand-primary);
  text-decoration: none;
}
a.contatti-value:hover { color: var(--brand-accent); }

/* Animazioni soft */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.fade-up.delay-1 { animation-delay: .15s; }
.fade-up.delay-2 { animation-delay: .3s; }
.fade-up.delay-3 { animation-delay: .45s; }

/* === NEWS / BLOG === */
.news-chip {
  font-family: 'Manrope', sans-serif;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .02em;
  padding: .5rem 1.125rem;
  border-radius: 0;
  border: 1px solid var(--neutral-border);
  background: var(--bg-card);
  color: var(--neutral-text);
  cursor: pointer;
  transition: all .2s;
}
.news-chip:hover { border-color: var(--brand-accent); color: var(--brand-accent); }
.news-chip.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.news-cat {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: .75rem;
}

.news-meta {
  font-family: 'Manrope', sans-serif;
  font-size: .8125rem;
  color: var(--neutral-mute);
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  align-items: center;
}
.news-meta .dot { color: var(--neutral-border-strong); }

/* Articolo featured */
.news-featured {
  background: var(--bg-card);
  border: 1px solid var(--neutral-border);
  border-radius: 0;
  overflow: hidden;
  transition: all .25s;
}
.news-featured:hover {
  border-color: var(--brand-accent);
  box-shadow: 0 12px 32px rgba(15,61,92,.06);
}
.news-featured-img {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--bg-warm-tint);
  overflow: hidden;
}
@media (min-width: 1024px) {
  .news-featured-img { aspect-ratio: auto; min-height: 100%; }
}
.news-featured-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.news-featured:hover .news-featured-img img { transform: scale(1.03); }
.news-featured-text {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 1024px) {
  .news-featured-text { padding: 3rem; }
}
.news-featured-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.15;
  font-weight: 500;
  color: var(--brand-primary);
  margin: 0;
}
.news-featured-excerpt {
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--neutral-text);
  margin-top: 1rem;
}

/* Card articolo standard */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--neutral-border);
  border-radius: 0;
  overflow: hidden;
  transition: all .25s;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  border-color: var(--brand-accent);
  box-shadow: 0 8px 24px rgba(15,61,92,.06);
  transform: translateY(-3px);
}
.news-card a { color: inherit; text-decoration: none; }
.news-card-img {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--bg-warm-tint);
  overflow: hidden;
}
.news-card-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.news-card:hover .news-card-img img { transform: scale(1.04); }
.news-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-card-title {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 500;
  color: var(--brand-primary);
  margin: 0;
}
.news-card-excerpt {
  font-family: 'Manrope', sans-serif;
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--neutral-text);
  margin-top: .75rem;
  flex: 1;
}

/* === MARQUEE — strip animata con specialità === */
.marquee-section {
  background: var(--brand-primary);
  color: #fff;
  border-top: 1px solid var(--brand-primary-soft);
  border-bottom: 1px solid var(--brand-primary-soft);
  overflow: hidden;
  padding: 1.5rem 0;
}
.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marqueeScroll 35s linear infinite;
  gap: 3rem;
  font-family: 'Fraunces', serif;
  font-size: clamp(1.25rem, 2.25vw, 1.875rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
}
.marquee-track > span { display: inline-flex; align-items: center; gap: 3rem; }
.marquee-track .marquee-dot {
  width: 8px; height: 8px;
  background: var(--brand-accent);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* === SEZIONE METODO — 4 step modern === */
.metodo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--neutral-border);
  border: 1px solid var(--neutral-border);
}
@media (min-width: 768px) { .metodo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .metodo-grid { grid-template-columns: repeat(4, 1fr); } }
.metodo-step {
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: background .25s ease;
}
.metodo-step:hover { background: var(--bg-warm-tint); }
.metodo-num {
  font-family: 'Fraunces', serif;
  font-size: 3.5rem;
  font-weight: 400;
  font-style: italic;
  color: var(--brand-accent);
  line-height: 1;
  letter-spacing: -0.04em;
}
.metodo-step h3 { font-size: 1.25rem; margin: 0; }
.metodo-step p {
  color: var(--neutral-text);
  font-size: .9375rem;
  line-height: 1.6;
  margin: 0;
}

/* Print */
@media print {
  .site-header, .topbar, .site-footer, .cta-banner, .cookie-banner, .mobile-menu, .menu-overlay { display: none !important; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
}

/* === RESPONSIVE: TABLET (≤1023px) === */
@media (max-width: 1023px) {
  /* Padding sezioni meno aggressivo */
  body section:not(.hero-split):not(.contatti-section):not(.marquee-section) {
    padding: 3.5rem 0;
  }

  /* Header padding più contenuto */
  .site-header > div { padding: 1rem 0; }
  .site-header.scrolled > div { padding: .75rem 0; }
  .brand-mark { font-size: 1.25rem; }

  /* Topbar — info compatte su 2 righe se serve */
  .topbar { font-size: .75rem; }

  /* Marquee meno alto */
  .marquee-section { padding: 1rem 0; }
  .marquee-track { font-size: 1.25rem; gap: 2rem; }
  .marquee-track > span { gap: 2rem; }

  /* Card servizi: 2 col tablet (5 card → 2+2+1 in 3 righe è ok) */
  .cards-stagger {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .cards-stagger .card-servizio .card-img { aspect-ratio: 16/10; }
  .cards-stagger .card-servizio .card-body { padding: 1.5rem 1.5rem 1.75rem; }
  .cards-stagger .card-servizio h3 { font-size: 1.25rem; }
  .cards-stagger .card-servizio p { font-size: .9375rem; }

  /* Sezione metodo: 2 col tablet */
  .metodo-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .metodo-step { padding: 2rem 1.75rem; }
  .metodo-num { font-size: 3rem; }

  /* Mappa contatti più contenuta */
  .contatti-iframe { height: 360px; }
  .contatti-overlay-card {
    position: relative;
    top: auto; left: auto; right: auto;
    transform: none;
    margin: -3rem 1.5rem 2rem;
    max-width: none;
    width: auto;
    padding: 2rem;
  }

  /* Footer 2 col tablet */
  .site-footer { padding: 3rem 0 1.25rem; }
}

/* === RESPONSIVE: MOBILE (≤767px) === */
@media (max-width: 767px) {
  body section:not(.hero-split):not(.contatti-section):not(.marquee-section) {
    padding: 3rem 0;
  }
  .section-header { margin-bottom: 2rem; }
  .section-header h2 { font-size: 1.875rem; }

  /* Topbar — solo urgenze visibile per dare priorità */
  .topbar { padding: .5rem 0; font-size: .75rem; }
  .topbar > div { padding-left: 1rem; padding-right: 1rem; }

  /* Header: nascondi tagline per spazio */
  .brand-mark .tagline { display: none; }
  .brand-mark { font-size: 1.25rem; }
  .site-header > div { padding-top: .875rem; padding-bottom: .875rem; padding-left: 1rem; padding-right: 1rem; }
  .site-header .btn-accent { display: none; }
  .site-header .btn { padding: .625rem 1rem; font-size: .875rem; }

  /* Hero compatto ma respira */
  .hero-split .hero-text {
    padding: 2.5rem 1.25rem 2rem;
  }
  .hero-split h1 { font-size: 2rem; line-height: 1.1; }
  .hero-split .subhead { font-size: 1rem; margin-top: 1rem; }
  .hero-split .hero-text-inner { max-width: none; }

  /* Trust indicators stacked, più leggibili */
  .hero-split .hero-trust {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: left;
  }
  .hero-split .hero-trust > div {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--neutral-border);
  }
  .hero-split .hero-trust > div:last-child { border-bottom: none; padding-bottom: 0; }
  .hero-split .trust-num { font-size: 1.5rem; line-height: 1; }
  .hero-split .trust-label { font-size: .6875rem; margin-top: 0; }

  /* CTA hero full-width su mobile */
  .hero-split .hero-text-inner > .flex { flex-direction: column; gap: .625rem; }
  .hero-split .btn { width: 100%; justify-content: center; padding: .85rem 1.25rem; }

  /* Marquee più piccolo */
  .marquee-section { padding: .875rem 0; }
  .marquee-track { font-size: 1rem; gap: 1.5rem; }
  .marquee-track > span { gap: 1.5rem; }

  /* Card servizi: 1 col mobile */
  .cards-stagger { grid-template-columns: 1fr !important; gap: 1rem; }
  .cards-stagger .card-servizio .card-img { aspect-ratio: 16/10; }
  .card-servizio .area-num { width: 32px; height: 32px; font-size: .875rem; top: .75rem; left: .75rem; }

  /* Sezione metodo: 1 col mobile */
  .metodo-grid { grid-template-columns: 1fr !important; }
  .metodo-step { padding: 1.75rem 1.5rem; }
  .metodo-num { font-size: 2.5rem; }

  /* Card medico — body più snello */
  .card-medico-body { padding: 1.25rem 1.25rem 1.5rem; gap: .5rem; }
  .card-medico h3 { font-size: 1.1875rem !important; padding-bottom: .75rem; }
  .card-medico-bio { font-size: .8125rem; }

  /* Contatti card overlay */
  .contatti-section .section-header h2 { font-size: 1.875rem; }
  .contatti-header { padding-top: 3rem; padding-bottom: 2rem; }
  .contatti-iframe { height: 300px; }
  .contatti-overlay-card { padding: 1.5rem; margin: -2rem 1rem 2rem; }
  .contatti-list { gap: .75rem; }
  .contatti-overlay-card h3 { font-size: 1.5rem !important; }
  .contatti-overlay-card .flex { flex-direction: column; gap: .5rem; }

  /* Footer 1 col mobile, h4 più stretti */
  .site-footer { padding: 2.5rem 0 1.25rem; }
  .site-footer .grid { gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: .75rem; align-items: flex-start; }

  /* Cookie banner: stack su mobile */
  .cookie-banner > div { flex-direction: column; align-items: stretch; gap: .75rem; }
  .cookie-banner .btn { width: 100%; justify-content: center; }

  /* Hero slider dots più visibili sul piccolo */
  .hero-slider-dots { padding: 1rem; }

  /* News page mobile */
  .news-chip { font-size: .75rem; padding: .375rem .875rem; }
  .news-featured-text { padding: 1.5rem; }
  .news-featured-title { font-size: 1.375rem !important; }
}

/* === RESPONSIVE: SMALL MOBILE (≤479px) === */
@media (max-width: 479px) {
  .topbar { font-size: .6875rem; }
  .topbar .hidden.sm\\:inline { display: none !important; }
  .hero-split h1 { font-size: 1.75rem; }
  .marquee-track { font-size: .9375rem; gap: 1.25rem; }
  .marquee-track > span { gap: 1.25rem; }
  .marquee-track .marquee-dot { width: 6px; height: 6px; }
}
