/* ==========================================================================
   Studio medico Dott. Giulio Di Maggio — stile "studio boutique"
   --------------------------------------------------------------------------
   Approccio: mobile first. Breakpoint principali:
     480  telefoni grandi   |  768  tablet verticale
     1024 tablet orizzontale / layout affiancati
     1280 desktop (menu in linea)

   Indice
    1. Token (colori, tipografia, spazi, ombre)
    2. Reset e base
    3. Tipografia
    4. Layout e utility
    5. Pulsanti
    6. Icone
    7. Header e navigazione (menu a tutto schermo su mobile/tablet)
    8. Hero
    9. Servizi e tariffe
   11. Chi sono
   12. Prenota (calendario + modale a schermo intero su telefono)
   13. Le sedi
   14. Contatti
   15. Footer
   16. Barra mobile e pulsante flottante
   17. Pagina privacy
   18. Animazioni di comparsa
   19. Hover (solo dispositivi con puntatore)
   20. Riduzione del movimento
   ========================================================================== */

/* ==========================================================================
   Font in locale (nessuna richiesta a Google Fonts): file variabili woff2
   in fonts/, sottoinsiemi latin e latin-ext.
   ========================================================================== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter-latin-ext-400.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter-latin-400.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-ext-600.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-600.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}



/* 1. TOKEN ================================================================ */
:root {
  /* Colori */
  --cream: #f7f3ec;          /* sfondo principale: beige chiaro e luminoso */
  --paper: #fffdf9;          /* superfici (card): bianco caldo */
  --sand: #efe9de;           /* sezioni alternate */
  --sand-deep: #e3dacb;
  --line: #e1d9cb;           /* filetti */
  --line-strong: #cfc5b3;
  --ink: #23292c;            /* testo: grigio antracite */
  --ink-deep: #1b2023;       /* sezioni scure */
  --muted: #5c6468;
  --accent: #1f6f6b;         /* accento principale: verde petrolio (pulsanti, link, icone) */
  --accent-dark: #175754;
  --accent-soft: #a9cfcb;
  --accent-deep: #17625e;    /* pannello della sezione "Le sedi" */
  --accent-tint: #e3efed;
  --amber: #e0a458;          /* accento secondario: ambra (2ª sede, piccoli dettagli) */
  --venue-marino: var(--accent);  /* colori delle sedi: calendario, mappa, legende */
  --venue-rocca: var(--amber);

  /* Tipografia */
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  --fs-body: 1.0625rem;      /* 17px */
  --fs-small: 1rem;          /* 16px: minimo per il testo corrente */
  --fs-label: 0.875rem;      /* 14px: etichette in maiuscoletto */
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-h1: clamp(2rem, 1.25rem + 3.4vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 2vw, 2.625rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);

  /* Spaziatura (multipli di 8px) */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px;
  --s6: 48px; --s8: 64px; --s10: 80px; --s12: 96px; --s16: 128px;
  --section-y: clamp(64px, 8vw, 112px);
  --gutter: 24px;
  --card-pad: 24px;
  --bar-h: 76px;             /* altezza barra fissa mobile */

  /* Raggi, ombre, movimento: angoli meno morbidi, ombre leggere e nette */
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-btn: 12px;
  --shadow-sm: 0 1px 2px rgba(27, 32, 35, 0.07), 0 2px 6px rgba(27, 32, 35, 0.06);
  --shadow-md: 0 2px 4px rgba(27, 32, 35, 0.06), 0 8px 24px rgba(27, 32, 35, 0.10);
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --t: 250ms;
}

@media (min-width: 480px) { :root { --card-pad: 32px; } }
@media (min-width: 768px) { :root { --gutter: 40px; } }
@media (min-width: 1024px) and (max-width: 1199px) { :root { --card-pad: 24px; } }


/* 2. RESET E BASE ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(31, 111, 107, 0.12);
}
/* blocco dello scroll con menu o calendario aperti */
html.nav-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  /* spazio per la barra fissa: non copre contenuti né footer; rispetta la safe area iPhone */
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
}

img, svg, iframe { max-width: 100%; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--accent-dark); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color var(--t) var(--ease); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

::selection { background: var(--accent-soft); color: var(--ink-deep); }

.skip-link {
  position: absolute; left: var(--s2); top: -72px; z-index: 500;
  background: var(--ink); color: var(--cream);
  padding: 12px 24px; border-radius: var(--r-btn); text-decoration: none;
}
.skip-link:focus { top: var(--s2); color: var(--cream); }

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

/* Segnaposto [TRA QUADRE] evidenziati da script.js */
mark.ph {
  background: #ffecc9;
  color: #5a3a05;
  padding: 0 4px;
  border-radius: 4px;
  border-bottom: 2px dashed #c98a2b;
  font-weight: 500;
  font-style: normal;
}


/* 3. TIPOGRAFIA =========================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 var(--s2);
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-h1); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
/* niente corsivi: la parte chiave del titolo è nel colore d'accento */
h1 em, h2 em { font-style: normal; color: var(--accent); }

p { margin: 0 0 var(--s3); max-width: 65ch; }

/* Occhiello: piccolo, maiuscoletto, con filetto */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 var(--s3);
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.eyebrow::before { content: ""; width: 32px; height: 1px; flex: none; background: currentColor; opacity: 0.7; }
@media (max-width: 399px) { .eyebrow { letter-spacing: 0.1em; gap: 8px; } .eyebrow::before { width: 24px; } }
@media (min-width: 480px) { .eyebrow { letter-spacing: 0.18em; } }

.lead { font-size: var(--fs-lead); color: var(--muted); line-height: 1.7; }


/* 4. LAYOUT E UTILITY ===================================================== */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

section { padding: var(--section-y) 0; position: relative; }
.section-alt { background: var(--sand); }

.section-head { max-width: 680px; margin-bottom: var(--s6); }
.section-head p { color: var(--muted); margin: 0; }
#servizi .section-head { margin-bottom: var(--s4); }
#servizi .section-head h2 { margin-bottom: 0; }
@media (min-width: 768px) { .section-head { margin-bottom: var(--s8); } }


/* 5. PULSANTI ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 32px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font: 700 var(--fs-small)/1.2 var(--font-sans);
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.btn .icon { width: 22px; height: 22px; }
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-light { background: var(--cream); color: var(--ink-deep); }

.btn-sm { min-height: 48px; padding: 10px 24px; }
.btn-lg { min-height: 64px; padding: 16px 20px; font-size: 1.0625rem; }
@media (min-width: 480px) { .btn-lg { padding-left: 32px; padding-right: 32px; } }
@media (min-width: 768px) { .btn-lg { min-height: 68px; padding: 18px 40px; } }


/* 6. ICONE (sprite SVG inline, tutte a linea, tratto 1.5) ================= */
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

.icon-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; flex: none;
  border-radius: var(--r-sm);
  border: 0;
  background: var(--accent-tint);
  color: var(--accent);
}
.icon-circle .icon { width: 28px; height: 28px; }


/* 7. HEADER E NAVIGAZIONE ================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: z-index 0s;
}
/* sfondo sfocato su pseudo-elemento: così l'header non crea un "contenitore" per il menu fisso */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease);
}
.site-header.scrolled::before {
  background: rgba(247, 243, 236, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: rgba(207, 197, 179, 0.55);
}
.site-header.menu-open { z-index: 300; }
.site-header.menu-open::before { background: var(--cream); border-bottom-color: var(--line); }

.header-inner {
  display: flex; align-items: center; gap: var(--s2);
  min-height: 72px;
  transition: min-height 300ms var(--ease);
}
.site-header.scrolled .header-inner { min-height: 64px; }

/* Marchio: monogramma + nome */
.brand {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  min-height: 48px;
  text-decoration: none; color: var(--ink); min-width: 0;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--accent);
  font: 800 0.75rem/1 var(--font-head);
  letter-spacing: 0;
  padding-left: 0.02em;
  color: #fff;
  transition: width 300ms var(--ease), height 300ms var(--ease);
}
.site-header.scrolled .brand-mark { width: 40px; height: 40px; }
.brand-name { display: block; font: 800 1.0625rem/1.2 var(--font-head); color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; }
.brand-sub { display: none; }

@media (max-width: 389px) { /* 360px */
  .brand { gap: 8px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-name { font-size: 1rem; }
}
@media (min-width: 480px) {
  .brand { gap: 16px; }
  .brand-mark { width: 48px; height: 48px; font-size: 0.8125rem; }
  .brand-name { font-size: 1.125rem; }
}

/* Hamburger animato (solo con JS) */
.nav-toggle {
  display: none;
  position: relative; z-index: 2;
  margin-left: auto;
  width: 48px; height: 48px; flex: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper);
  cursor: pointer;
  touch-action: manipulation;
}
.js .nav-toggle { display: inline-block; }
.nav-toggle .bar {
  position: absolute; left: 14px; right: 14px; height: 1.5px;
  background: var(--ink); border-radius: 2px;
  transition: transform 300ms var(--ease), opacity 200ms var(--ease), top 300ms var(--ease);
}
.nav-toggle .bar:nth-child(1) { top: 17px; }
.nav-toggle .bar:nth-child(2) { top: 23px; }
.nav-toggle .bar:nth-child(3) { top: 29px; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { top: 23px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { top: 23px; transform: rotate(-45deg); }

/* Menu */
.main-nav ul { list-style: none; }
.main-nav li a {
  display: flex; align-items: center; min-height: 64px;
  color: var(--ink); text-decoration: none;
  font: 700 1.5rem/1.2 var(--font-head); letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line);
}
.main-nav li:last-child a { border-bottom: 0; }
.menu-foot { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1); margin-top: var(--s4); }
.menu-foot .btn { padding-left: 12px; padding-right: 12px; }

.header-actions { display: none; gap: 12px; align-items: center; }
.header-actions .btn { white-space: nowrap; flex: none; }

/* Pannello a tutto schermo (telefono e tablet) */
@media (max-width: 1279px) {
  .js .main-nav {
    position: fixed; inset: 0; z-index: 1;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: calc(88px + env(safe-area-inset-top, 0px)) var(--gutter) calc(var(--s3) + env(safe-area-inset-bottom, 0px));
    background: var(--cream);
    overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden;
    transition: opacity 250ms var(--ease), visibility 0s linear 250ms;
  }
  .js .main-nav.open { opacity: 1; visibility: visible; transition-delay: 0s; }
  .main-nav ul { max-width: 640px; width: 100%; margin: 0 auto; }
  .menu-foot { max-width: 640px; width: 100%; margin-left: auto; margin-right: auto; }
  /* voci che compaiono in sequenza, leggere */
  .js .main-nav li { opacity: 0; transform: translateY(10px); transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
  .js .main-nav.open li { opacity: 1; transform: none; }
  .js .main-nav.open li:nth-child(1) { transition-delay: 60ms; }
  .js .main-nav.open li:nth-child(2) { transition-delay: 90ms; }
  .js .main-nav.open li:nth-child(3) { transition-delay: 120ms; }
  .js .main-nav.open li:nth-child(4) { transition-delay: 150ms; }
  .js .main-nav.open li:nth-child(5) { transition-delay: 180ms; }
  .js .main-nav.open li:nth-child(6) { transition-delay: 210ms; }
}
@media (max-width: 1279px) and (max-height: 640px) {
  .main-nav li a { min-height: 52px; font-size: 1.75rem; }
}

/* Menu in linea (desktop) */
@media (min-width: 1280px) {
  .js .nav-toggle { display: none; }
  .header-inner { min-height: 88px; gap: var(--s2); }
  .site-header .container { max-width: 1320px; }
  .main-nav { margin-left: auto; }
  .main-nav ul { display: flex; gap: 0; }
  .main-nav li a {
    position: relative; min-height: 44px; padding: 0 12px; border: 0; white-space: nowrap;
    font: 500 var(--fs-small)/1.4 var(--font-sans);
  }
  .main-nav li a::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px;
    height: 1px; background: var(--accent);
    transform: scaleX(0); transform-origin: left;
    transition: transform var(--t) var(--ease);
  }
  .menu-foot { display: none; }
  .header-actions { display: flex; }
}

/* da 1280px in su: il pulsante "Chiama" resta solo con l'icona, per lasciare posto a "Richiedi appuntamento" */
@media (min-width: 1280px) {
  .header-actions .btn-outline .btn-label { display: none; }
  .header-actions .btn-outline { padding-left: 14px; padding-right: 14px; }
}


/* 8. HERO ================================================================= */
.hero { padding: var(--s2) 0 var(--s8); overflow: clip; }

/* forma organica decorativa */
.hero::before {
  content: ""; position: absolute; z-index: 0;
  width: 320px; height: 320px; right: -140px; top: -96px;
  background: var(--sand);
  border-radius: 62% 38% 55% 45% / 48% 56% 44% 52%;
}

/* telefono e tablet verticale: testo sopra, immagine sotto */
.hero-grid { position: relative; z-index: 1; display: grid; gap: var(--s6); align-items: center; }
/* titolo dell'hero a scaletta: una riga per servizio, a capo sempre fisso, tutto in antracite.
   clamp(): su telefono scala con la larghezza (la riga più lunga resta sempre su una linea), su desktop si ferma a 65px */
.hero h1 { font-size: clamp(2.125rem, 10.8vw, 4.0625rem); line-height: 1.08; letter-spacing: -0.035em; margin-bottom: clamp(28px, 3.4vw, 40px); } /* spazio tra titolo e pulsanti */
.hero h1 > span { display: flex; align-items: center; gap: var(--s1); white-space: nowrap; }
.hero h1 .icon { flex: none; width: .58em; height: .58em; color: var(--accent); }
.hero-location { display: flex; align-items: flex-start; gap: var(--s1); margin: var(--s4) 0 0; }
.hero-location .icon { flex: none; color: var(--accent); }

@media (max-width: 479px) {
  .hero h1 { font-size: clamp(1.75rem, calc(10.8vw - var(--s1)), 4.0625rem); }
}
.hero .eyebrow { margin-bottom: clamp(20px, 2.4vw, 32px); }

.hero-actions { display: flex; flex-direction: column; gap: var(--s2); }

/* area immagine */
.hero-visual { position: relative; width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }
/* cornice sottile sfalsata dietro la foto */
.hero-visual::before {
  content: ""; position: absolute; z-index: 0; inset: 20px -14px -20px 14px;
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-lg);
}
.visual-frame {
  position: relative; z-index: 1; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(155deg, #e3efed 0%, #cfe3df 55%, #b7d5d0 100%);
  box-shadow: var(--shadow-md);
}
.visual-art { position: absolute; inset: 0; width: 100%; height: 100%; color: #ffffff; opacity: 0.7; }
.visual-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 56% 6%; /* volto sempre visibile */ }
.visual-frame img[hidden] { display: none; }

.visual-caption {
  z-index: 3;
  position: absolute; left: 16px; bottom: 16px; right: 16px;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 24px;
  background: rgba(255, 253, 249, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(225, 217, 203, 0.8);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  line-height: 1.4;
}
.visual-caption .icon { color: var(--accent); width: 28px; height: 28px; }
.visual-caption strong { display: block; font: 700 1.0625rem/1.25 var(--font-head); }
.visual-caption span { font-size: var(--fs-small); color: var(--muted); }

@media (min-width: 480px) {
  .hero-actions .btn { flex: 1 1 auto; }
}

@media (min-width: 768px) {
  .hero { padding-top: var(--s3); }
  .hero::before { width: 560px; height: 560px; right: -200px; top: -140px; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .hero-actions .btn { flex: 0 1 auto; }
  .hero-grid { gap: var(--s8); }
}

/* affiancati solo da 1024px in su */
@media (min-width: 1024px) {
  .hero { padding-top: var(--s5); padding-bottom: var(--s10); }
  .hero::before { content: none; }
  .hero-grid { grid-template-columns: 1.2fr 0.8fr; gap: var(--s10); }
  .hero-visual { max-width: 480px; margin-left: auto; }
  .hero-actions { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, max-content); }
  .hero-actions .btn { padding-inline: var(--s2); }
  .hero-actions .icon { flex: none; }
  /* arco */
  .visual-caption { left: -32px; right: auto; bottom: 48px; min-width: 280px; }
}


/* 9. SERVIZI E TARIFFE ==================================================== */
/* 1 colonna (telefono) · 2 colonne (tablet verticale) · 3 colonne (da 1024px) */
.cards { display: grid; gap: var(--s3); }

.card {
  display: flex; flex-direction: column;
  padding: var(--card-pad);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: translate 300ms var(--ease), box-shadow 300ms var(--ease), border-color 300ms var(--ease);
}

.card-top { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.card-top h3 { margin: 0; }
.card > p { color: var(--muted); font-size: var(--fs-small); margin-bottom: var(--s3); }

.price {
  display: flex; flex-direction: column; gap: 0;
  margin: 0 0 var(--s3); padding: var(--s3) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.price-label { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); line-height: 1.6; }
.price-value {
  font: 800 3rem/1 var(--font-head);
  font-variant-numeric: lining-nums;
  color: var(--accent);
  letter-spacing: -0.04em;
}

.card h4 {
  margin: 0 0 var(--s2);
  font: 600 var(--fs-label)/1.4 var(--font-sans);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
.checklist { list-style: none; display: grid; gap: var(--s2); }
.checklist li { position: relative; padding-left: 36px; font-size: var(--fs-small); line-height: 1.6; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 24px; height: 24px;
  background: var(--accent);
  -webkit-mask: var(--check) center / contain no-repeat;
  mask: var(--check) center / contain no-repeat;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M8 12.5l3 3 5-5.5'/%3E%3C/svg%3E");
}

.card-note {
  margin: var(--s3) 0 0; padding: 16px 20px;
  background: var(--accent-tint); border-radius: var(--r-sm);
  font-size: var(--fs-small); line-height: 1.6; color: #1d4b48;
}

.card-rest { display: flex; flex-direction: column; flex: 1; }   /* elenco + note + pulsante */
.card-action { margin-top: auto; padding-top: var(--s4); }
.card-action .btn { width: 100%; }
.card-action .btn { padding-left: 16px; padding-right: 16px; }   /* "Richiedi appuntamento" su una riga in tutte le larghezze */
.card-link {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; margin-top: var(--s1); text-align: center;
  font-size: var(--fs-small); color: var(--muted);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong);
}

.cards-foot { margin: var(--s4) 0 0; font-size: var(--fs-small); color: var(--muted); }

@media (min-width: 768px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
  /* la terza card resta centrata sotto le altre due */
  .card:nth-child(3) { grid-column: 1 / -1; width: calc(50% - 12px); justify-self: center; }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
  .card:nth-child(3) { grid-column: auto; width: auto; justify-self: stretch; }
}
@media (min-width: 1200px) { .cards { gap: var(--s4); } }

/* tablet e desktop: le card condividono le righe (subgrid), così intestazione, descrizione,
   tariffa e "Cosa portare" restano alla stessa altezza in tutte le card */
@media (min-width: 768px) {
  .cards { row-gap: 0; }
  .card { display: grid; grid-template-columns: minmax(0, 1fr); grid-row: span 5; grid-template-rows: subgrid; }
  .card > .card-top { grid-row: 1; }
  .card > p:not(.price) { grid-row: 2; }
  .card > .price { grid-row: 3; }
  .card > h4 { grid-row: 4; }
  .card > .card-rest { grid-row: 5; }
  .card:nth-child(3) { margin-top: var(--s3); } /* tablet verticale: terza card sotto le altre due */
}
@media (min-width: 1024px) { .card:nth-child(3) { margin-top: 0; } }


/* 11. CHI SONO ============================================================ */
#chi-sono { overflow: clip; }
/* foto sopra, testo sotto; affiancati da 1024px */
.about { display: grid; gap: var(--s6); align-items: center; }

.portrait { position: relative; isolation: isolate; width: 100%; max-width: 440px; justify-self: center; }
.portrait::before { /* cornice sfalsata */
  content: ""; position: absolute; z-index: -1; inset: 24px -16px -24px 16px;
  border: 1px solid var(--accent-soft); border-radius: var(--r-lg);
}
.photo-frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center; padding: var(--s4); text-align: center;
  background: linear-gradient(160deg, #e3efed 0%, #cfe3df 100%);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.photo-label { position: relative; z-index: 1; font-size: var(--fs-small); color: #5c6468; }
.photo-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2;
  object-fit: cover; object-position: 50% 0;
  /* inquadratura più stretta rispetto all'hero: primo piano sul volto */
  transform: scale(1.45); transform-origin: 58% 20%;
}
.photo-frame img[hidden] { display: none; }
.photo-art { position: absolute; inset: 0; width: 100%; height: 100%; color: #ffffff; opacity: 0.6; }

.about-text .lead-serif {
  font: 600 clamp(1.1875rem, 1.05rem + 0.8vw, 1.5rem)/1.45 var(--font-head); letter-spacing: -0.015em;
  color: var(--ink);
}
.about-text p { color: var(--muted); }
.about-text .lead-serif { color: var(--ink); }
.doctor-reg {
  margin-top: var(--s4); padding-top: var(--s3);
  border-top: 1px solid var(--line-strong);
  font-size: var(--fs-small); color: var(--ink) !important;
}

@media (min-width: 768px) { .about { gap: var(--s8); } .portrait { max-width: 480px; } }
@media (min-width: 1024px) {
  .about { grid-template-columns: 0.85fr 1.15fr; gap: var(--s10); }
  .portrait { max-width: 440px; justify-self: stretch; }
}
@media (min-width: 1200px) { .about { gap: var(--s12); } }


/* 12. PRENOTA ============================================================= */
.book { background: var(--cream); color: #e4e8ea; text-align: center; overflow: clip; }
/* archi decorativi concentrici */
.book::before, .book::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(247, 243, 236, 0.12); pointer-events: none;
}
.book::before { width: 520px; height: 520px; left: -200px; top: -240px; }
.book::after { width: 760px; height: 760px; right: -320px; bottom: -420px; box-shadow: 0 0 0 64px rgba(247, 243, 236, 0.03); }
.book .container { position: relative; max-width: 960px; }
.book-head { max-width: 640px; margin: 0 auto var(--s5); }
.book .eyebrow { color: var(--accent-dark); }
.book h2 { color: var(--ink); }
@media (min-width: 1024px) {
  #prenota .book-head { max-width: 920px; text-align: left; }
  #prenota .book-head .eyebrow { display: flex; }
}
.book-head p { color: #c9d0d3; margin: 0 auto; }
.book-head .book-sede { margin-top: var(--s1); }

/* contenitore del calendario di prenotazione */
.booking-card {
  max-width: 920px; margin: 0 auto; padding: 8px; text-align: left;
  background: var(--sand);
  border-radius: var(--r-lg);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.12);
}
.booker-nojs { margin: var(--s3); }
html:not(.js) .booker { display: none; }

.booker { --venue-marino: var(--accent); --venue-rocca: var(--amber); display: grid; gap: var(--s3); padding: var(--s1); }
.booker-steps { display: grid; gap: var(--s1); align-content: start; min-width: 0; }
.booker-side { display: grid; gap: var(--s3); align-content: start; min-width: 0; }

/* i 3 passaggi: aperto / completato (compatto, con la scelta e "Modifica") / bloccato (attenuato) */
.step {
  padding: var(--s1) var(--s2);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: opacity 400ms var(--ease), background-color 400ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.step.is-open { border-color: var(--line-strong); box-shadow: var(--shadow-sm); padding-bottom: var(--s2); }
.step.is-locked { opacity: 0.5; background: transparent; border-style: dashed; }
.step-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 56px; }
.step-badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border-radius: 9px;
  border: 1.5px solid var(--accent); color: var(--accent);
  font: 700 0.9375rem/1 var(--font-head);
  transition: background-color 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}
.step-badge .icon { width: 18px; height: 18px; stroke-width: 2; }
.step.is-done .step-badge { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.step-titles { min-width: 0; }
.step-title { margin: 0; font: 700 1.125rem/1.3 var(--font-head); color: var(--ink); letter-spacing: -0.015em; }
.step-value { display: none; margin-top: 2px; font-size: var(--fs-small); line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.step-value .dot { margin-right: 8px; vertical-align: middle; }
.step:not(.is-open) .step-value:not(:empty) { display: block; }
.step.is-done .step-value { color: var(--ink); font-weight: 500; }
.step-edit {
  display: none; align-items: center; min-height: 44px; padding: 0 4px;
  background: none; border: 0; cursor: pointer; touch-action: manipulation;
  font: 600 0.9375rem/1 var(--font-sans); color: var(--accent-dark);
  text-decoration: underline; text-underline-offset: 4px;
}
.step.is-done .step-edit { display: inline-flex; }
.step-hint { display: none; margin: 0 0 var(--s1) 44px; max-width: none; font-size: 0.9375rem; color: var(--muted); }
.step.is-locked .step-hint:not(:empty) { display: block; }

/* corpo che si apre e si chiude in modo morbido */
.step-body { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 420ms var(--ease), visibility 0s linear 420ms; }
.step.is-open .step-body { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
.step-body-inner { min-height: 0; overflow: hidden; opacity: 0; transition: opacity 300ms var(--ease); }
.step.is-open .step-body-inner { opacity: 1; transition-delay: 100ms; padding-top: var(--s1); }

/* chip (radio nativi: tastiera e screen reader funzionano da soli) */
.chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.chip { position: relative; display: block; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 10px 20px;
  border: 1px solid var(--line-strong); border-radius: var(--r-btn);
  background: var(--paper); color: var(--ink);
  font: 600 var(--fs-small)/1.2 var(--font-sans);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.chip .icon { width: 20px; height: 20px; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--cream); animation: pop 260ms var(--ease); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.chips-services .chip { flex: 1 1 100%; }
.chips-services .chip span { width: 100%; }
@media (min-width: 480px) { .chips-services .chip { flex: 0 1 auto; } .chips-services .chip span { width: auto; } }

#booker .venue-opts { grid-template-columns: minmax(0, 1fr); }
#booker .booking-hours-note { margin: var(--s1) 0 0; color: var(--muted); }
#booking-afternoon[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }

/* scelta della sede: due card selezionabili con il pallino del colore */
.venue-opts { display: grid; gap: var(--s1); }
.venue-opt { position: relative; display: block; }
.venue-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.vo-card {
  display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 18px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--paper);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.vo-card .dot { width: 14px; height: 14px; margin: 0; }
.vo-text strong { display: block; font: 600 1.125rem/1.3 var(--font-sans); color: var(--ink); }
.vo-text small { display: block; font-size: 0.9375rem; color: var(--muted); }
.venue-opt input:checked + .vo-card { border-color: var(--v); box-shadow: inset 0 0 0 1.5px var(--v); animation: pop 260ms var(--ease); }
.venue-opt input:focus-visible + .vo-card { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (min-width: 600px) { .venue-opts { grid-template-columns: 1fr 1fr; } }

@keyframes pop { 0% { transform: scale(0.96); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }

/* calendario mensile */
.cal-for { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--s1); max-width: none; font: 600 var(--fs-small)/1.4 var(--font-sans); color: var(--ink); }
.cal-for .dot { width: 12px; height: 12px; }
.cal { padding: var(--s2) 8px; background: var(--sand); border: 1px solid var(--line); border-radius: var(--r-md); --cal-cols: var(--cal-cols-mobile, 0.7fr 0.7fr 0.7fr 0.7fr 0.7fr 2fr 0.7fr); }  /* telefono: colonne larghe solo nei giorni di ricevimento (impostate da script.js) */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s1); margin-bottom: var(--s1); padding: 0 4px; }
.cal-month { margin: 0; font: 700 1.25rem/1 var(--font-head); color: var(--ink); text-align: center; letter-spacing: -0.02em; }
.cal-nav {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink);
  cursor: pointer; touch-action: manipulation;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), opacity var(--t) var(--ease);
}
.cal-prev .icon { transform: scaleX(-1); }
.cal-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: var(--cal-cols); gap: 4px; }
.cal-dow span { padding: 8px 0; text-align: center; font: 600 0.75rem/1 var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.cal-day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 60px; padding: 0;
  border: 1px solid transparent; border-radius: 14px; background: transparent;
  font: 500 1rem/1 var(--font-sans); color: var(--ink);
}
.cal-day.is-empty { visibility: hidden; }
.cal-day.is-off { color: var(--muted); opacity: 0.45; font-size: 0.9375rem; }        /* giorni non disponibili per la sede scelta e date passate */
.cal-day.is-excluded { opacity: 0.7; }                                                /* date escluse: "Non disponibile" */
.cal-day.is-excluded .n { text-decoration: line-through; text-decoration-thickness: 1.5px; }
button.cal-day {
  cursor: pointer; background: var(--paper); border-color: var(--line); font-weight: 600; touch-action: manipulation;
  transition: transform var(--t) var(--ease), background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.cal-day .dot { width: 8px; height: 8px; margin: 0; }
.v-marino { --v: var(--venue-marino); }
.v-rocca { --v: var(--venue-rocca); }
button.cal-day[aria-pressed="true"] { background: var(--v); border-color: var(--v); color: #fff; box-shadow: 0 10px 20px -10px var(--v); animation: pop 280ms var(--ease); }
button.cal-day[aria-pressed="true"] .dot { background: #fff; }
.v-rocca button.cal-day[aria-pressed="true"], button.cal-day.v-rocca[aria-pressed="true"] { color: var(--ink); }
button.cal-day.v-rocca[aria-pressed="true"] .dot { background: var(--ink); }
button.cal-day:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.cal-grid.is-next { animation: slide-next 280ms var(--ease); }
.cal-grid.is-prev { animation: slide-prev 280ms var(--ease); }
@keyframes slide-next { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes slide-prev { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }

/* riepilogo */
.summary { padding: var(--s3); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); }
.summary h3 { margin: 0 0 var(--s2); font: 700 1.125rem/1.3 var(--font-head); letter-spacing: -0.015em; }
.summary dl { margin: 0; display: grid; gap: var(--s2); }
.summary dt { font: 600 var(--fs-label)/1.5 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.summary dd { margin: 2px 0 0; font-size: 1.0625rem; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.summary dd.is-empty { color: var(--muted); }
.summary dd.is-new { animation: fade-up 320ms var(--ease); }
.summary .sum-venue { display: flex; gap: 10px; align-items: flex-start; }
.summary .sum-venue .dot { width: 10px; height: 10px; margin-top: 0.5em; }
.summary .sum-venue small { display: block; font-size: 0.9375rem; color: var(--muted); }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* invio */
.booker-action { display: grid; gap: var(--s1); }
.booker-action .btn[hidden] { display: none; }
.booker-send { width: 100%; padding-left: 14px; padding-right: 14px; font-size: 1rem; gap: 10px; }
@media (min-width: 768px) { .booker-send { padding-left: 24px; padding-right: 24px; font-size: 1.0625rem; } }
.booker-send[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.booker-missing, .booker-note { margin: 0; max-width: none; text-align: center; font-size: var(--fs-small); color: var(--muted); }
.booker-note { color: var(--ink); font-weight: 600; line-height: 1.5; }                         /* conferma solo dopo la risposta dello studio: ben leggibile */
.booker-missing:empty { display: none; }
.booker-send:not([aria-disabled="true"]) { animation: pop 320ms var(--ease); }

.booking-foot p a, .book-alt a, .contact-card .big a { display: inline-block; padding: 12px 2px; margin: -12px 0; } /* area toccabile ≥ 44px senza alterare il layout */
.book-alt { margin: var(--s4) auto 0; font-size: var(--fs-small); color: var(--muted); }
.book-alt a { color: var(--accent-dark); font-weight: 600; }

@media (min-width: 480px) { .cal { padding: var(--s2); } .step { padding-left: var(--s3); padding-right: var(--s3); } }
@media (min-width: 768px) {
  .booking-card { padding: 12px; }
  .booker { padding: var(--s2); }
  .cal { --cal-cols: repeat(7, 1fr); }
  .cal-dow, .cal-grid { gap: 6px; }
  .cal-day { min-height: 64px; font-size: 1.0625rem; }
  .cal-month { font-size: 1.375rem; }
}
@media (min-width: 960px) {
  .booker { grid-template-columns: 1.3fr 1fr; gap: var(--s3); align-items: start; }
  .booker-side { position: sticky; top: 96px; }
}


/* 13. LE SEDI ============================================================= */
/* pannello di testo a sinistra + grande mappa a destra, senza bordi tra i due blocchi.
   Telefono/tablet: pannello sopra, mappa sotto. Da 1024px: affiancati a tutta altezza. */
#sedi { padding: 0; background: var(--accent-deep); }
.sedi-split { display: grid; }

.sedi-panel {
  padding: var(--s8) var(--gutter);
  background: var(--accent-deep); color: #eaf4f2;
}
.sedi-panel .eyebrow { color: #bfe6e0; }
.sedi-title { margin: 0 0 var(--s5); color: var(--cream); font-size: clamp(1.875rem, 1.3rem + 2.6vw, 3rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.035em; }
.sedi-title em { font-style: normal; color: var(--amber); }

.sede { padding: var(--s4) 0; border-top: 1px solid rgba(247, 243, 236, 0.22); cursor: pointer; }
.sede-main { display: block; width: 100%; padding: 0; margin: 0; text-align: left; background: none; border: 0; color: inherit; font: inherit; }
.sede-eyebrow { display: flex; align-items: center; gap: 10px; font: 600 var(--fs-label)/1.5 var(--font-sans); letter-spacing: 0.16em; text-transform: uppercase; color: #bfe6e0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--v); flex: none; }
.sede-eyebrow .dot { box-shadow: 0 0 0 2px rgba(247, 243, 236, 0.9); }
.sede-street {
  display: block; margin: 8px 0 2px;
  font: 700 clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem)/1.2 var(--font-head); letter-spacing: -0.025em; color: var(--cream);
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 8px;
  transition: text-decoration-color var(--t) var(--ease);
}
.sede-city { display: block; font-size: 1.0625rem; color: #d5e8e5; }
.sede .btn { margin-top: var(--s3); }

.sedi-contact { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); padding-top: var(--s4); border-top: 1px solid rgba(247, 243, 236, 0.22); }
.sedi-link { display: block; min-height: 44px; color: var(--cream); text-decoration: none; }
.sedi-link:focus-visible { outline-color: var(--cream); }
.sedi-link-text {
  display: inline-block; margin-top: 4px;
  font: 700 1.1875rem/1.2 var(--font-head); letter-spacing: -0.015em; font-variant-numeric: lining-nums;
  text-decoration: underline; text-decoration-color: #a9cfcb; text-decoration-thickness: 1px; text-underline-offset: 8px;
  transition: text-decoration-thickness var(--t) var(--ease), text-decoration-color var(--t) var(--ease);
}

/* mappa */
.sedi-map-wrap { position: relative; isolation: isolate; background: var(--sand); }
.sedi-map-stage { position: relative; height: 400px; }
.venues-map {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; background: var(--sand);
}

@media (min-width: 768px) {
  .sedi-panel { padding: var(--s10) var(--gutter); }
  .sedi-map-stage { height: 480px; }
}
@media (min-width: 1024px) {
  /* affiancati: pannello a sinistra (allineato al contenitore), mappa a tutta altezza a destra */
  .sedi-split { grid-template-columns: minmax(420px, 5fr) 7fr; min-height: 720px; }
  .sedi-panel { padding: var(--s12) var(--s6) var(--s12) max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter))); }
  .sedi-map-stage { position: sticky; top: 88px; height: calc(100vh - 88px); min-height: 520px; max-height: 800px; }
}


/* 14. CONTATTI ============================================================ */
.contact-grid { display: grid; gap: var(--s3); }
.contact-card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: var(--card-pad);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: translate 300ms var(--ease), box-shadow 300ms var(--ease), border-color 300ms var(--ease);
}
.contact-card .icon-circle { margin-bottom: var(--s3); }
.contact-card h3 { font-size: 1.125rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s1); }
.contact-card .big { font-variant-numeric: lining-nums; max-width: 100%; font: 700 clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem)/1.2 var(--font-head); letter-spacing: -0.02em; margin-bottom: var(--s3); overflow-wrap: anywhere; }
.contact-card .big { font-size: clamp(1rem, 0.85rem + 0.9vw, 1.1875rem); }
.contact-card .big-email { font-weight: 600; letter-spacing: -0.01em; }
.contact-card .big a { color: var(--ink); text-decoration: none; }
.contact-card .btn { width: 100%; margin-top: auto; }

/* tablet verticale: 2 colonne, la scheda email occupa tutta la riga */
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-card:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-card:last-child { grid-column: auto; }
  .contact-card .big { font-size: 1rem; }
}
@media (min-width: 1200px) { .contact-card .big { font-size: 1.0625rem; } }


/* 15. FOOTER ============================================================== */
.site-footer { background: var(--ink-deep); color: #c9d0d3; padding: var(--s8) 0 var(--s3); font-size: var(--fs-small); line-height: 1.8; }
.site-footer a { color: var(--cream); text-decoration: none; }
.footer-grid { display: grid; gap: var(--s5); }
.footer-brand .brand-mark { border-color: var(--cream); color: var(--cream); margin-bottom: var(--s3); }
.site-footer h2 { font: 800 1.375rem/1.2 var(--font-head); letter-spacing: -0.025em; color: var(--cream); margin-bottom: var(--s1); }
.site-footer h3 {
  font: 600 var(--fs-label)/1.5 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber); margin-bottom: var(--s1);
}
.site-footer p { margin: 0 0 var(--s1); }
.site-footer ul { list-style: none; }
.site-footer li a { display: flex; align-items: center; min-height: 44px; overflow-wrap: break-word; }
.footer-legal {
  max-width: none !important; margin: var(--s6) 0 0 !important; padding-top: var(--s3);
  border-top: 1px solid rgba(247, 243, 236, 0.18); font-size: 0.875rem; color: #9aa4a8;
}

@media (max-width: 767px) {
  #footer .footer-grid li a { min-height: 1.8em; }
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .site-footer { padding-top: var(--s10); } }
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.1fr 1.2fr 1.3fr 0.9fr; gap: var(--s6); }

  #footer .footer-grid {
    grid-template-rows: auto auto 1fr;
    row-gap: 0;
  }
  #footer .footer-grid > div {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
  }
  #footer .footer-grid h2,
  #footer .footer-grid h3 { grid-row: 2; align-self: baseline; }
  #footer .footer-brand h2 { font-size: clamp(1.125rem, 2vw - 0.125rem, 1.375rem); }
  #footer .footer-grid p,
  #footer .footer-grid ul { grid-row: 3; }
  #footer .footer-grid li a { display: block; min-height: 1.8em; }
}


/* 16. BARRA MOBILE E PULSANTE FLOTTANTE =================================== */
/* barra fissa: Chiama · WhatsApp · Prenota (rispetta la safe area dell'iPhone) */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px;
  padding: 8px max(12px, calc((100% - 640px) / 2)) calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(247, 243, 236, 0.92);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid rgba(207, 197, 179, 0.6);
  box-shadow: 0 -12px 32px -16px rgba(27, 32, 35, 0.25);
}
.bar-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 60px; padding: 6px 4px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
  font: 600 0.875rem/1.1 var(--font-sans);
  text-decoration: none; white-space: nowrap;
  touch-action: manipulation;
  transition: transform var(--t) var(--ease), background-color var(--t) var(--ease);
}
.bar-btn .icon { width: 22px; height: 22px; }
.bar-btn:active { transform: scale(0.97); }
.bar-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.bar-more { display: none; }                                         /* su telefono la barra dice solo "Richiedi" */
@media (min-width: 600px) { .bar-more { display: inline; } }

.fab {
  display: none;
  position: fixed; right: var(--s4); bottom: var(--s4); z-index: 150;
  align-items: center; gap: 12px;
  min-height: 60px; padding: 0 28px 0 20px;
  background: var(--ink); color: var(--cream);
  border: 1px solid rgba(247, 243, 236, 0.25);
  border-radius: var(--r-btn);
  font: 600 var(--fs-small)/1 var(--font-sans); letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 18px 36px -14px rgba(20, 24, 26, 0.6);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t) var(--ease), opacity 300ms var(--ease), visibility 300ms;
}
.fab .icon { width: 26px; height: 26px; }
.fab.is-hidden { opacity: 0; visibility: hidden; transform: translateY(12px); pointer-events: none; }

@media (min-width: 1280px) {
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }
  .fab { display: inline-flex; }
}


/* 17. PAGINA PRIVACY ====================================================== */
.legal { padding: var(--s6) 0 var(--section-y); }
.legal .container { max-width: 800px; }
.legal h1 { font-size: clamp(1.875rem, 1.5rem + 2vw, 2.75rem); margin-bottom: var(--s4); }
.legal h2 { font-size: 1.375rem; margin: var(--s5) 0 var(--s2); }
.legal p { overflow-wrap: anywhere; }
.legal .updated { color: var(--ink-soft, var(--ink)); opacity: .75; font-size: var(--fs-small, .875rem); margin: 0 0 var(--s3); }
.legal ul { list-style: disc; padding-left: 1.25rem; margin: 0 0 var(--s2); }
.legal li { margin-bottom: 8px; overflow-wrap: anywhere; }
.legal code { font-size: .9em; background: var(--sand); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.notice {
  background: #ffecc9; border: 1px solid var(--accent-soft); border-radius: var(--r-sm);
  padding: 16px 24px; margin-bottom: var(--s4);
}


/* 18. ANIMAZIONI DI COMPARSA ============================================== */
/* attive solo se script.js aggiunge .reveal-on (JS presente, movimento consentito) */
.reveal-on .reveal {
  opacity: 0; transform: translateY(12px);
  transition: opacity 500ms var(--ease) var(--d, 0s), transform 500ms var(--ease) var(--d, 0s);
}
.reveal-on .reveal.in { opacity: 1; transform: none; }

/* elementi con comparsa + hover: le transizioni vanno unite */
.reveal-on .card.reveal,
.reveal-on .contact-card.reveal {
  transition: opacity 500ms var(--ease) var(--d, 0s), transform 500ms var(--ease) var(--d, 0s),
              translate 300ms var(--ease), box-shadow 300ms var(--ease), border-color 300ms var(--ease);
}

@media (min-width: 768px) {
  .reveal-on .reveal { transform: translateY(24px); transition-duration: 700ms, 700ms; }
  .reveal-on .card.reveal, .reveal-on .contact-card.reveal { transition-duration: 700ms, 700ms, 300ms, 300ms, 300ms; }
}


/* 19. HOVER (solo dispositivi con puntatore: mai su touch) ================ */
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--ink); }

  .btn:hover { transform: translateY(-2px); }
  .btn-primary:hover { background: var(--accent-dark); color: #fff; box-shadow: 0 14px 28px -12px rgba(23, 87, 84, 0.6); }
  .btn-outline:hover { background: var(--paper); border-color: var(--ink); color: var(--ink); box-shadow: var(--shadow-sm); }
  .btn-light:hover { background: #fff; color: var(--ink-deep); box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.5); }

  .main-nav li a:hover { color: var(--accent-dark); }
  .main-nav li a:hover::after { transform: scaleX(1); }
  .nav-toggle:hover, .cal-nav:not(:disabled):hover { border-color: var(--ink); }
  .chip:hover input:not(:checked) + span { border-color: var(--ink); }
  button.cal-day:hover:not([aria-pressed="true"]) { border-color: var(--v); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
  .booker-send[aria-disabled="true"]:hover { transform: none; background: var(--accent); box-shadow: none; }
  .venue-opt input:not(:checked) + .vo-card:hover { border-color: var(--v); transform: translateY(-2px); }
  .step-edit:hover { color: var(--ink); }


  .card:hover { translate: 0 -6px; box-shadow: var(--shadow-md); border-color: var(--line-strong); }
  .card-link:hover { color: var(--accent-dark); text-decoration-color: currentColor; }

  .contact-card:hover { translate: 0 -4px; box-shadow: var(--shadow-md); border-color: var(--line-strong); }
  .contact-card .big a:hover { color: var(--accent-dark); }

  .book-alt a:hover { color: var(--accent); }

  .site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

  .sedi-link:hover .sedi-link-text { text-decoration-thickness: 2px; text-decoration-color: var(--cream); }
  .bar-btn:hover { background: var(--sand); }
  .bar-btn-primary:hover { background: var(--accent-dark); }
  .fab:hover { transform: translateY(-3px); background: var(--accent-dark); color: #fff; box-shadow: 0 22px 40px -14px rgba(23, 87, 84, 0.7); }
}


/* 20. RIDUZIONE DEL MOVIMENTO ============================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover, .btn:active, .bar-btn:active, .fab:hover, .card:hover, .contact-card:hover { transform: none; translate: none; }
}

/* 21. BLOG ================================================================ */
/* voce del menu della pagina corrente */
.main-nav li a[aria-current="page"] { color: var(--accent); }
@media (min-width: 1280px) { .main-nav li a[aria-current="page"]::after { transform: scaleX(1); } }

/* intestazione delle pagine interne */
.page-hero { padding: var(--s6) 0 var(--s4); }
.page-hero h1 { margin-bottom: var(--s1); }
.page-hero .lead { margin-bottom: var(--s4); }

/* filtro per categoria */
.filters { display: flex; flex-wrap: wrap; gap: var(--s1); }
.filter-btn {
  min-height: 48px; padding: 10px 20px;
  border: 1px solid var(--line-strong); border-radius: var(--r-btn);
  background: var(--paper); color: var(--ink);
  font: 600 var(--fs-small)/1.2 var(--font-sans); cursor: pointer; touch-action: manipulation;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.filter-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.blog-list { padding: var(--s4) 0 var(--section-y); }
.blog-empty { margin: var(--s4) 0; color: var(--muted); }

/* griglia di card: 1 colonna su telefono, 2 su tablet, 3 su desktop */
.post-grid { display: grid; gap: var(--s3); grid-template-columns: 1fr; }
@media (min-width: 768px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } .post-grid-2 { grid-template-columns: repeat(2, 1fr); } }

.post-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: translate 300ms var(--ease), box-shadow 300ms var(--ease), border-color 300ms var(--ease);
}
.post-card:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.post-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--accent-tint), #c5e0db); }
.post-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-cover img[hidden] { display: none; }
.post-body { display: flex; flex-direction: column; gap: var(--s1); flex: 1; padding: var(--s3); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 0.875rem; color: var(--muted); }
.tag {
  display: inline-block; padding: 4px 10px; border-radius: 8px;
  background: var(--accent-tint); color: var(--accent-dark);
  font: 700 0.75rem/1.3 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase;
}
.tag-armi { background: #fbe9cc; color: #7a4d0a; }
.tag-nautica { background: var(--sand-deep); color: var(--ink); }
.post-title { margin: 0; font: 700 1.25rem/1.3 var(--font-head); letter-spacing: -0.02em; }
.post-desc { margin: 0; font-size: var(--fs-small); color: var(--muted); }
.post-link {
  margin-top: auto; padding-top: var(--s1); display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 700; color: var(--accent); text-decoration: none;
}
.post-link::after { content: ""; position: absolute; inset: 0; } /* l'intera card è cliccabile */

/* sezione "Dal blog" in home */
.blog-latest { background: var(--cream); }
.blog-latest[hidden] { display: none; }
.section-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s2) var(--s3); margin-bottom: var(--s5); }
.section-row h2 { margin-bottom: 0; }
.section-row .eyebrow { margin-bottom: var(--s2); }

/* pagina articolo: lettura comoda */
.article { padding: var(--s5) 0 var(--section-y); }
.article-wrap { width: 100%; max-width: calc(660px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); } /* ≈ 70 caratteri per riga */
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; text-decoration: none; color: var(--accent); }
.article .notice { margin: var(--s2) 0 var(--s4); max-width: none; }
.article-header .post-meta { margin-bottom: var(--s2); }
/* in fondo all'articolo: se i correlati sono nascosti, spazio tra l'ultimo blocco e il link "Torna al blog" */
.related[hidden] + .back-link { margin-top: var(--s6); }
.article-header h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); margin-bottom: var(--s2); }
.article-header .lead { margin: 0; }
.article-cover { max-width: 960px; margin: var(--s5) auto; padding: 0 var(--gutter); }
.article-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); background: var(--accent-tint); box-shadow: var(--shadow-md); }
.article-cover img[hidden] { display: none; }
.prose { font-size: 1.125rem; line-height: 1.8; }
.prose p { max-width: none; margin-bottom: 1.25em; }
.prose h2 { margin: 2em 0 0.6em; font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); }
.prose ul, .prose ol { margin: 0 0 1.5em; padding-left: 1.4em; display: grid; gap: 0.6em; }
.prose li::marker { color: var(--accent); }
.prose a { font-weight: 600; }

.article-cta { margin: var(--s8) 0 0; padding: var(--s4); background: var(--accent-deep); color: #eaf4f2; border-radius: var(--r-lg); }
.article-cta h2 { margin: 0 0 var(--s1); color: var(--cream); font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); }
.article-cta p { margin: 0 0 var(--s3); max-width: none; color: #d5e8e5; }
.article-cta-actions { display: grid; gap: var(--s2); }
.btn-ghost-light { background: transparent; color: var(--cream); border-color: rgba(247, 243, 236, 0.5); }
@media (min-width: 600px) { .article-cta-actions { grid-template-columns: auto auto; justify-content: start; } }

.related { margin: var(--s8) 0 var(--s4); padding: 0; } /* è una <section>: niente padding verticale generale */
.related[hidden] { display: none; }
.related h2 { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); margin-bottom: var(--s3); }
.article-wrap .post-grid-2 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .article-wrap .post-grid-2 { grid-template-columns: repeat(2, 1fr); } }

@media (hover: hover) and (pointer: fine) {
  .post-card:hover { translate: 0 -4px; box-shadow: var(--shadow-md); border-color: var(--line-strong); }
  .filter-btn[aria-pressed="false"]:hover { border-color: var(--ink); }
  .back-link:hover, .post-link:hover { color: var(--accent-dark); }
  .btn-ghost-light:hover { background: rgba(247, 243, 236, 0.12); color: #fff; border-color: var(--cream); }
}
@media (prefers-reduced-motion: reduce) { .post-card:hover { translate: none; } }

/* --- articolo lungo: introduzione, passaggi, riquadro prezzo, CTA estesa, domande frequenti --- */
.article-header .lead.lead-xl { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); line-height: 1.6; color: var(--ink); margin: 0 0 var(--s2); }
.article-header .lead.lead-xl + .lead.lead-xl { color: var(--muted); }
.prose h3 { margin: 1.8em 0 0.5em; font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem); }

/* i 4 passaggi: numeri grandi nel colore d'accento */
.prose ol.steps { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: var(--s2); counter-reset: step; }
.prose ol.steps li {
  counter-increment: step; display: grid; grid-template-columns: 3.25rem 1fr; align-items: center; gap: var(--s2);
  padding: var(--s2) var(--s3) var(--s2) var(--s2); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  line-height: 1.5;
}
.prose ol.steps li::before {
  content: counter(step); font: 800 clamp(2.5rem, 2.2rem + 1.4vw, 3.25rem)/1 var(--font-head); letter-spacing: -0.04em;
  color: var(--accent); text-align: center;
}

/* riquadro "Rinnovo patente a 78 €" */
.prose .price-box {
  margin: var(--s6) 0 0; padding: var(--s4) var(--s3); background: var(--paper);
  border: 2px solid var(--accent-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.prose .price-box h2 { margin: 0 0 var(--s2); }
.prose .price-box > p:last-child { margin-bottom: 0; }
.prose .included { list-style: none; padding: 0; margin: 0 0 var(--s3); display: grid; gap: 14px; }
.prose .included li { display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start; line-height: 1.5; }
.prose .included .icon {
  width: 32px; height: 32px; padding: 6px; border-radius: 50%; background: var(--accent); color: #fff; stroke: currentColor; stroke-width: 2.6;
}
.prose .bring {
  margin: var(--s3) 0; padding: var(--s2) var(--s3); background: var(--accent-tint); border-left: 5px solid var(--accent);
  border-radius: var(--r-sm); font-size: 1.1875rem; line-height: 1.6; color: var(--ink-deep);
}
.prose .fine { font-size: 0.9375rem; line-height: 1.6; color: var(--muted); }

/* CTA estesa */
.article-cta .cta-q { font: 700 1.1875rem/1.4 var(--font-head); color: #fff; margin-bottom: var(--s1); }
.article-cta .btn-lg { width: 100%; text-align: center; }
.cta-alt { color: var(--cream); font-weight: 600; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; }
.article-cta-actions { justify-items: stretch; }
.article-cta .cta-notes { margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid rgba(247, 243, 236, 0.25); }
.article-cta .cta-notes p { margin: 0 0 var(--s1); font-size: 0.9375rem; line-height: 1.6; color: #bcd9d5; }
.article-cta .cta-notes p:last-child { margin-bottom: 0; }
@media (min-width: 600px) {
  .article-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
  .article-cta .btn-lg { width: auto; }
}

/* domande frequenti (accordion con <details>) */
.faq { margin: var(--s6) 0 0; padding: 0; } /* è una <section>: toglie il padding verticale generale */
.faq h2 { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); margin-bottom: var(--s3); }
.faq-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: var(--s1); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  min-height: 64px; padding: 14px var(--s3); font: 700 1.0625rem/1.4 var(--font-head); letter-spacing: -0.01em; border-radius: var(--r-md);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-right: 4px;
  border-right: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(45deg) translateY(-3px);
  transition: transform var(--t) var(--ease);
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq-item[open] { border-color: var(--accent-soft); }
.faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq-a { padding: 0 var(--s3) var(--s3); }
.faq-a p { margin: 0; line-height: 1.7; }

/* chiusura */
@media (prefers-reduced-motion: reduce) { .faq-item summary::after { transition: none; } }

/* --- articoli informativi: riquadro evidenziato, schede a confronto, griglia di accertamenti, avvisi --- */
.prose .hl-box {
  margin: var(--s3) 0 1.5em; padding: var(--s3); background: var(--paper);
  border: 2px solid var(--accent-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.prose .hl-box > p:first-child { margin: 0 0 var(--s2); font-weight: 600; }
.prose .hl-box .included { margin-bottom: 0; }

.compare { display: grid; gap: var(--s2); grid-template-columns: 1fr; margin: 0 0 1.5em; }
@media (min-width: 768px) { .compare { grid-template-columns: 1fr 1fr; gap: var(--s3); } }
.compare-box { padding: var(--s3); background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r-md); }
.compare-box:nth-child(2) { border-top-color: var(--amber); }
.compare-box strong { display: block; margin-bottom: 8px; font: 700 1.1875rem/1.3 var(--font-head); letter-spacing: -0.015em; color: var(--ink-deep); }
.compare-box p { margin: 0; font-size: 1.0625rem; line-height: 1.65; }

.eval-grid { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prose .eval-grid { padding: 0; }
@media (min-width: 768px) { .eval-grid, .prose .eval-grid { gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.eval-card { padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); line-height: 1.5; }
@media (min-width: 480px) { .eval-card { padding: 18px; } }
.eval-card .icon { display: block; box-sizing: content-box; width: 22px; height: 22px; padding: 9px; margin-bottom: 12px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); }
.eval-card strong { display: block; margin-bottom: 6px; font: 700 1rem/1.3 var(--font-head); letter-spacing: -0.01em; color: var(--ink-deep); overflow-wrap: anywhere; }
.eval-card p { margin: 0; font-size: 0.875rem; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
@media (min-width: 768px) { .eval-card p { font-size: 0.9375rem; } }

.prose .callout {
  margin: 1.5em 0; padding: 16px 20px; background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: var(--r-sm); line-height: 1.65;
}
.prose .callout p { margin: 0; }

.prose .price-line {
  margin: 1.2em 0; padding: 18px 20px; background: var(--accent-tint); border-left: 5px solid var(--accent);
  border-radius: var(--r-sm); font-size: 1.1875rem; line-height: 1.55; color: var(--ink-deep);
}
.prose .price-line strong { font: 800 1.5rem/1.2 var(--font-head); letter-spacing: -0.02em; color: var(--accent-dark); white-space: nowrap; }

/* --- articolo sul rinnovo: voce principale, due box piccoli, prezzo in grande, sedi --- */
.prose .big-item {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center;
  margin: 0 0 var(--s3); padding: var(--s2); background: var(--accent-tint); border-radius: var(--r-md);
  font: 700 clamp(1.1875rem, 1.1rem + 0.5vw, 1.375rem)/1.35 var(--font-head); letter-spacing: -0.01em; color: var(--ink-deep);
}
.prose .big-item .icon { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--accent); color: #fff; stroke: currentColor; stroke-width: 2.6; }
.prose .hl-box .big-item + .mini-grid { margin-top: 0; }
.mini-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .mini-grid { grid-template-columns: 1fr 1fr; gap: 16px; } }
.mini-box { padding: var(--s2); background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-md); }
.mini-box strong { display: block; margin-bottom: 6px; font: 700 1.0625rem/1.3 var(--font-head); letter-spacing: -0.01em; color: var(--ink-deep); }
.mini-box p { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--muted); }

.prose .price-num { display: inline; line-height: 1; margin: 0 2px; font: 800 clamp(2.25rem, 1.8rem + 2vw, 3rem)/1 var(--font-head); letter-spacing: -0.03em; color: var(--accent-dark); white-space: nowrap; }
.prose .price-box .ship { margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--line-strong); }
.prose .price-box .ship p { margin: 0 0 var(--s1); font-size: 0.9375rem; line-height: 1.6; color: var(--muted); }
.prose .price-box .ship p:last-child { margin-bottom: 0; }

.sede-cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 0 0 1.5em; }
@media (min-width: 480px) { .sede-cards { grid-template-columns: 1fr 1fr; gap: 16px; } }
.sede-card { padding: var(--s2) var(--s3); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); }
.sede-card strong { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font: 700 1.1875rem/1.3 var(--font-head); letter-spacing: -0.015em; color: var(--ink-deep); }
.sede-card strong::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--venue-marino); }
.sede-card.is-rocca strong::before { background: var(--venue-rocca); }
.sede-card .addr { display: block; margin: 0 0 8px; font-size: 1rem; line-height: 1.5; color: var(--muted); }
.sede-card a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* --- articolo sul rinnovo della patente nautica: durata in grande, avviso --- */
.dur-grid { display: grid; gap: var(--s2); grid-template-columns: 1fr; margin: 0 0 1.5em; }
@media (min-width: 768px) { .dur-grid { grid-template-columns: 1fr 1fr; gap: var(--s3); } }
.dur-box { padding: var(--s3); background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r-md); }
.dur-box:nth-child(2) { border-top-color: var(--amber); }
.dur-num { display: block; margin-bottom: 8px; font: 800 clamp(3rem, 2.4rem + 3vw, 4.25rem)/1 var(--font-head); letter-spacing: -0.04em; color: var(--accent); }
.dur-box:nth-child(2) .dur-num { color: var(--accent-dark); }
.dur-num span { margin-left: 6px; font-size: 0.4em; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-deep); }
.dur-box p { margin: 0; font-size: 1.0625rem; line-height: 1.6; }
.prose .callout.is-warn { background: #fff7e8; border-color: #f0d9b0; border-left-color: var(--amber); }



/* Homepage: hero, tariffe e profilo professionale */
.hero .hero-copy { position: relative; top: -8px; }
/* Mantiene la foto alla quota originale quando è sotto il testo. */
@media (max-width: 1023px) {
  .hero-grid { row-gap: calc(var(--s6) + 10px + var(--fs-label) * 1.5 + clamp(20px, 2.4vw, 32px)); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-grid { row-gap: calc(var(--s8) + 10px + var(--fs-label) * 1.5 + clamp(20px, 2.4vw, 32px)); }
}
#servizi .tariff-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: var(--s1);
  padding: 0 0 var(--s2);
  border-top: 0;
}
#servizi .tariff-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#servizi .tariff {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 6px;
  width: 100%;
  padding: 12px 4px;
  background: var(--accent-tint);
  border-radius: var(--r-sm);
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.4;
}
#servizi .tariff-single .tariff { width: 94%; }
#servizi .card-top-single-price { margin-inline-start: 3%; }
@media (max-width: 767px) {
  #servizi .tariff-single .tariff {
    min-height: calc(1.6em + clamp(1.75rem, 3vw, 2.5rem) + 30px);
    grid-template-rows: 1fr;
    place-items: center;
  }
  #servizi .tariff-single .price-label:empty { display: none; }
}
#servizi .tariff .price-label { min-height: 1.6em; letter-spacing: .08em; }
#servizi .tariff .price-value { font-size: clamp(1.75rem, 3vw, 2.5rem); }
@media (max-width: 350px) {
  #servizi .tariff-pair { grid-template-columns: minmax(0, 1fr); }
}

.about-list { display: grid; gap: var(--s2); list-style: none; margin: 0 0 var(--s3); padding: 0; }
.about-list li { display: flex; align-items: start; gap: var(--s1); }
.about-list .icon { flex: none; color: var(--accent); }
.about-divider { border-top: 1px solid var(--line); margin-top: var(--s3); padding-top: var(--s3); }
@media (min-width: 768px) {
  #chi-sono .about { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Ritratto integrale nella cornice esistente. */
#chi-sono .photo-frame { aspect-ratio: auto; padding: 0; }
#chi-sono .photo-frame img { position: static; height: auto; transform: none; }

.footer-legal-split { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); justify-content: space-between; }
.footer-vat { margin-left: auto; white-space: nowrap; }

@media (max-width: 639px) {
  .footer-legal-split { flex-direction: column; }
}

/* Chi sono: presentazione e qualifiche in una colonna. */
#chi-sono .about-single {
  max-width: 840px;
}
#chi-sono .about-list {
  margin-bottom: 0;
}


/* Homepage: schermata iniziale su telefono e rifiniture alle tariffe. */
.bar-appointment-mobile { display: none; }
@media (max-width: 767px) {
  .home-page {
    --home-hero-beige: #f4f1e9;
    --home-location-green: #346866;
    --home-header-height: 72px;
    --home-dock-height: calc(77px + env(safe-area-inset-bottom, 0px));
  }
  .home-page .site-header:not(.scrolled):not(.menu-open) {
    background: var(--home-hero-beige);
  }
  .hero { padding: 0; background: var(--home-hero-beige); }
  .hero::before { content: none; }
  .hero > .container { max-width: none; padding-inline: 0; }
  .hero .hero-grid {
    min-height: calc(100vh - var(--home-header-height) - var(--home-dock-height));
    min-height: calc(100dvh - var(--home-header-height) - var(--home-dock-height));
    grid-template-areas: "scene" "location";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(230px, 1fr) clamp(64px, 13.24dvh, 110px);
    gap: 0;
    align-items: stretch;
  }
  .hero .hero-copy { display: contents; opacity: 1; transform: none; }
  .hero h1 {
    grid-area: scene;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(14px, 4.9dvh, 34px);
    align-self: start;
    padding: clamp(18px, 4.9dvh, 38px) 8px 0 clamp(8px, 2.8vw, 15px);
    margin: 0;
    font-size: clamp(1.25rem, 6.97vw, 2.5rem);
    line-height: 1.12;
  }
  .hero h1 > span { gap: clamp(8px, 2.8vw, 16px); white-space: normal; }
  .hero h1 .icon { width: clamp(24px, 8.14vw, 40px); height: clamp(24px, 8.14vw, 40px); }
  .hero .hero-visual { grid-area: scene; max-width: none; margin: 0; overflow: hidden; }
  .hero-visual::before, .hero .visual-art { display: none; }
  .hero .visual-frame {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .hero .visual-frame img {
    /* Allinea il ritratto alla fascia. Su una schermata più bassa
       lo spazio sotto il ritratto si riduce, senza alzare il volto verso i titoli. */
    inset-block-start: max(6.62vw, calc(100% - 109.005vw));
    inset-block-end: auto;
    inset-inline-end: auto;
    /* Mantiene la posizione del mockup nel formato di riferimento. */
    inset-inline-start: calc(34.6% + clamp(0px, max(166vw - 100dvh, 100dvh - 179vw), 5px));
    width: 72.67%;
    height: auto;
  }
  .hero .hero-actions { display: none; }
  .bar-appointment-default { display: none; }
  .bar-appointment-mobile { display: inline; }
  .home-page .mobile-bar { background: #f3f0e8; box-shadow: none; }
  .home-page .bar-btn-primary {
    background: var(--paper);
    border-color: var(--line-strong);
    color: var(--ink);
  }
  #servizi { padding-top: 32px; }
  .hero-location {
    grid-area: location;
    align-items: center;
    gap: clamp(10px, 4vw, 16px);
    margin: 0;
    padding-inline: clamp(20px, 7.4vw, 36px);
    background: var(--home-location-green);
    color: #fff;
  }
  .hero-location .icon { width: 26px; height: 26px; color: inherit; }
  #prenota .book-head { max-width: none; }
  #prenota .book-head .eyebrow { display: flex; }
  #titolo-prenota { text-align: left; }
}
#servizi .card-top { margin-bottom: var(--s2); }
.footer-vat-inline { white-space: nowrap; }

/* Guide pratiche: riquadro unico per le tariffe e schermate ingrandibili. */
.prose .guide-step { padding: 0; }
.prose .guide-step h2 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .48em;
}
.guide-step h2 .step-number { color: var(--accent); }
.prose .guide-step .guide-note {
  padding: var(--s2);
  background: var(--accent-tint);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-sm);
}
.prose .guide-prices, .prose .guide-preflight {
  padding: var(--s2) var(--s3);
  margin: var(--s3) 0;
  background: var(--paper);
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-md);
}
.guide-prices .guide-price + .guide-price {
  border-top: 1px solid var(--line);
  padding-top: var(--s2);
}
.guide-prices .guide-price > strong {
  display: block;
  color: var(--accent-dark);
  margin-bottom: .35em;
}
.guide-prices .guide-price p:last-child { margin-bottom: var(--s2); }
.guide-preflight h2, .guide-costs h2 { margin-top: 0; }
.guide-costs { margin-top: var(--s5); }
.guide-costs .guide-price { padding-top: var(--s1); border-top: 1px solid var(--line); }
.guide-index { border-block: 1px solid var(--line); margin-block: var(--s3); }
.guide-details summary, .guide-index summary {
  color: var(--accent-dark);
  cursor: pointer;
  padding-block: var(--s1);
  font-weight: 700;
}
.guide-images { display: grid; gap: var(--s2); }
@media (min-width: 600px) { .guide-images { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide-shot { margin: var(--s2) 0 var(--s3); }
.guide-shot a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: zoom-in;
}
.guide-shot img { display: block; width: 100%; height: auto; }
.guide-image-dialog {
  position: fixed;
  inset: 0;
  width: min(920px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: var(--s2);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  z-index: 400;
}
.guide-image-dialog::backdrop { background: rgba(27, 32, 35, .7); }
.guide-image-dialog form { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s1); }
.guide-image-dialog .guide-image-scroll { max-height: 67dvh; overflow: auto; }
.guide-image-dialog img { display: block; width: 100%; height: auto; }
.guide-image-dialog img.is-enlarged { width: auto; max-width: none; }
.guide-contact a { color: var(--cream); }
.guide-contact p:last-child { margin-bottom: 0; }
.guide-contact + .back-link { margin-top: var(--s3); }
