/* ==========================================================================
   Studio Dentistico Franco Filipponi — foglio di stile principale
   Indice:
   1. Variabili (tema chiaro / scuro)   6. Chi sono e formazione
   2. Base                              7. Trattamenti
   3. Pulsanti e utility                8. Lo studio (galleria e lightbox)
   4. Header e navigazione              9. Contatti, orari e mappa
   5. Hero                             10. Footer, pagine legali, cookie banner, CTA mobile
   ========================================================================== */

/* 1. Variabili ------------------------------------------------------------ */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f9fa;
  --surface: #ffffff;
  --surface-2: #eef4f6;
  --text: #0f1c21;
  --text-muted: #4a5a62;
  --border: #dde7ea;
  --border-strong: #c7d6db;
  --primary: #0f766e;
  --primary-hover: #0b5f58;
  --on-primary: #ffffff;
  --primary-tint: #e3f4f1;
  --primary-tint-2: #c9ebe5;
  --accent: #e8eff5;
  --accent-ink: #345062;
  --warm: #b45309;
  --warm-tint: #fff4e5;
  --warm-border: #f6d3a1;
  --header-bg: rgba(255, 255, 255, 0.82);
  --shadow-sm: 0 1px 2px rgba(15, 40, 48, 0.05), 0 1px 3px rgba(15, 40, 48, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(15, 60, 70, 0.22);
  --shadow-lg: 0 30px 60px -25px rgba(15, 70, 80, 0.35);
  --focus: #0f766e;
  --map-land: #eef4f2;
  --map-road: #ffffff;
  --map-road-edge: #d4e0e3;
  --map-sea: #cfe8f1;
  --map-sea-line: #b5dbe8;
  --map-park: #dcefe6;
  --map-label: #4a5a62;
  --radius: 14px;
  --radius-lg: 28px;
  --header-h: 68px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b1214;
  --bg-soft: #0f181b;
  --surface: #121d21;
  --surface-2: #17252a;
  --text: #e7eff1;
  --text-muted: #a2b3b9;
  --border: #213238;
  --border-strong: #2d4249;
  --primary: #2dd4bf;
  --primary-hover: #5eead4;
  --on-primary: #032b26;
  --primary-tint: rgba(45, 212, 191, 0.12);
  --primary-tint-2: rgba(45, 212, 191, 0.2);
  --accent: #182830;
  --accent-ink: #b9cdd8;
  --warm: #fbbf24;
  --warm-tint: rgba(251, 191, 36, 0.1);
  --warm-border: rgba(251, 191, 36, 0.32);
  --header-bg: rgba(11, 18, 20, 0.78);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 60px -25px rgba(0, 0, 0, 0.75);
  --focus: #5eead4;
  --map-land: #142126;
  --map-road: #24363c;
  --map-road-edge: #1a2a30;
  --map-sea: #0e2a35;
  --map-sea-line: #154050;
  --map-park: #16302b;
  --map-label: #a2b3b9;
  color-scheme: dark;
}
/* Senza JavaScript: segue la preferenza del sistema operativo. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0b1214; --bg-soft: #0f181b; --surface: #121d21; --surface-2: #17252a;
    --text: #e7eff1; --text-muted: #a2b3b9; --border: #213238; --border-strong: #2d4249;
    --primary: #2dd4bf; --primary-hover: #5eead4; --on-primary: #032b26;
    --primary-tint: rgba(45, 212, 191, 0.12); --primary-tint-2: rgba(45, 212, 191, 0.2);
    --accent: #182830; --accent-ink: #b9cdd8; --warm: #fbbf24; --warm-tint: rgba(251, 191, 36, 0.1); --warm-border: rgba(251, 191, 36, 0.32); --header-bg: rgba(11, 18, 20, 0.78);
    --focus: #5eead4; --map-land: #142126; --map-road: #24363c; --map-road-edge: #1a2a30;
    --map-sea: #0e2a35; --map-sea-line: #154050; --map-park: #16302b; --map-label: #a2b3b9;
    color-scheme: dark;
  }
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; color: var(--text); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
section[id], main[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-primary); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

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

/* 3. Pulsanti e utility --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2;
  border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 20px -10px var(--primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { min-height: 42px; padding: 9px 18px; font-size: .95rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

.card-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-tint); color: var(--primary);
  margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; }

/* 4. Header e navigazione ------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-width: 0; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--primary-tint); color: var(--primary);
  border: 1px solid var(--primary-tint-2);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand-sub { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--text-muted); font-weight: 500; font-size: .95rem; text-decoration: none;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"], .main-nav a.is-active { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
/* Il pulsante tema e il menu hamburger funzionano solo con JavaScript. */
html:not(.js) .theme-toggle, html:not(.js) .menu-toggle { display: none !important; }
.menu-toggle { display: none; }

@media (max-width: 1023.98px) {
  .main-nav a { padding: 8px 10px; }
}
@media (max-width: 767.98px) {
  :root { --header-h: 62px; }
  .header-inner { gap: 8px; }
  .brand-sub { display: none; }
  .brand-text { overflow: hidden; }
  .brand-name { font-size: .92rem; white-space: normal; line-height: 1.2; }
  .brand-mark { width: 36px; height: 36px; }
  .call-header { width: 44px; height: 44px; padding: 0; }
  .call-header .label-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .js .menu-toggle { display: grid; }
  .js .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 8px 20px 20px;
    display: none;
  }
  .js .main-nav.is-open { display: block; }
  .js .main-nav ul { flex-direction: column; gap: 2px; }
  .js .main-nav a { padding: 14px 12px; font-size: 1.05rem; border-radius: 12px; color: var(--text); }
  /* Senza JavaScript la navigazione resta visibile su una riga scorrevole. */
  html:not(.js) .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; }
  html:not(.js) .main-nav { order: 3; width: 100%; overflow-x: auto; }
}
@media (max-width: 380px) {
  .brand-name { font-size: .85rem; }
}

/* 5. Hero ----------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 48px 0 64px;
  background:
    radial-gradient(900px 420px at 85% -10%, var(--primary-tint), transparent 70%),
    radial-gradient(700px 400px at -10% 110%, var(--accent), transparent 70%),
    var(--bg);
}
.hero-grid { display: grid; gap: 44px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 6.2vw, 3.6rem); font-weight: 750; margin-top: 18px; }
.hero h1 .accent { color: var(--primary); }
.hero-sub { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--text-muted); margin-top: 18px; max-width: 34ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--border); }
.hero-meta-item { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: .95rem; }
.hero-meta-item svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.hero-meta-item a { color: var(--text); font-weight: 600; text-decoration: none; }
.hero-meta-item a:hover { color: var(--primary); }

.hero-media { position: relative; max-width: 460px; width: 100%; margin: 0 auto; }
.hero-photo {
  position: relative; border-radius: 32px; overflow: hidden;
  aspect-ratio: 4 / 5; background: var(--surface-2);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.hero-media::before {
  content: ""; position: absolute; inset: 22px -18px -18px 22px; z-index: -1;
  border-radius: 36px; background: var(--primary-tint);
  border: 1px solid var(--primary-tint-2);
}
.badge-float {
  position: absolute; left: -10px; bottom: 28px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-md);
}
.badge-float .badge-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary);
}
.badge-float .badge-icon svg { width: 22px; height: 22px; }
.badge-float strong { display: block; font-size: 1.1rem; line-height: 1.1; }
.badge-float span { display: block; font-size: .8rem; color: var(--text-muted); }
.badge-chip {
  position: absolute; right: -8px; top: 26px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md);
  font-size: .82rem; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.badge-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); display: inline-block; }

@media (min-width: 900px) {
  .hero { padding: 80px 0 96px; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 64px; }
  .hero-media { margin: 0 0 0 auto; }
}
@media (max-width: 480px) {
  .hero-ctas .btn { width: 100%; }
  .badge-float { left: 8px; bottom: 16px; }
  .badge-chip { right: 8px; top: 16px; }
  .hero-media::before { inset: 16px -8px -10px 16px; }
}

/* Sezioni */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2, .section-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin-top: 12px; }
.section-head p { color: var(--text-muted); margin-top: 14px; font-size: 1.075rem; }
@media (min-width: 1024px) { .section { padding: 104px 0; } }

/* 6. Chi sono e formazione ------------------------------------------------ */
.about-grid { display: grid; gap: 40px; align-items: start; }
.about-photo {
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1 / 1;
  border: 1px solid var(--border); box-shadow: var(--shadow-md); background: var(--surface-2);
  max-width: 420px;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.about-body .section-title { margin: 12px 0 20px; }
.about-body .lead { font-size: 1.2rem; line-height: 1.6; color: var(--text); }
.about-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.about-points li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-muted); }
.about-points li strong { color: var(--text); display: block; }
.check {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--primary-tint); color: var(--primary);
}
.check svg { width: 16px; height: 16px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: .8fr 1.2fr; gap: 64px; } .about-photo { max-width: none; } }

/* Percorso: titoli accademici e inizio attività */
.timeline { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 12px; }
.timeline li {
  display: grid; grid-template-columns: 4.25rem 1fr; gap: 16px; align-items: start;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.timeline .year { font-size: 1.35rem; font-weight: 750; color: var(--primary); letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.timeline strong { display: block; line-height: 1.35; }
.timeline span { display: block; color: var(--text-muted); font-size: .92rem; margin-top: 2px; }
.timeline .is-highlight { background: var(--primary-tint); border-color: var(--primary-tint-2); }
.timeline .is-degree { background: var(--warm-tint); border-color: var(--warm-border); }
.timeline .is-degree .year { color: var(--warm); }

/* Formazione: carosello delle certificazioni, scorrevole a mano e allineato al contenuto */
.training { padding: 64px 0 72px; border-top: 1px solid var(--border); }
@media (min-width: 1024px) { .training { padding: 88px 0 96px; } }
.training-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.training-head .section-head { margin-bottom: 0; }
.slider-nav { display: flex; gap: 8px; }
.slider-nav .icon-btn:disabled { opacity: .4; cursor: default; border-color: var(--border); color: var(--text-muted); }
.slider {
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
  padding-bottom: 14px; border-radius: 18px;
}
.slider-list { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.cert {
  flex: 0 0 85%; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
}
@media (min-width: 600px) { .cert { flex-basis: calc((100% - 16px) / 2); } }
@media (min-width: 1024px) { .cert { flex-basis: calc((100% - 48px) / 4); } }
.cert-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cert-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); flex: none; }
.cert-icon svg { width: 22px; height: 22px; }
.cert-year { font-size: .85rem; font-weight: 650; color: var(--primary); font-variant-numeric: tabular-nums; }
.cert h3 { font-size: 1rem; font-weight: 650; line-height: 1.35; letter-spacing: -0.01em; }
.cert p { color: var(--text-muted); font-size: .88rem; margin-top: auto; }
/* Titoli accademici in evidenza */
.cert.is-degree { background: var(--warm-tint); border-color: var(--warm-border); box-shadow: inset 0 3px 0 var(--warm); }
.cert.is-degree .cert-icon { background: var(--warm); color: var(--surface); }
.cert-badge {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; color: var(--warm); border: 1px solid var(--warm-border); background: var(--surface);
}
.cert.is-degree h3 { font-size: 1.05rem; }
.cert .cert-honor { margin-top: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--warm); font-weight: 650; font-size: .92rem; }
.cert .cert-honor svg { width: 16px; height: 16px; }
.cert-honor + p { margin-top: auto; }

/* 7. Trattamenti ---------------------------------------------------------- */
.treat-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .treat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .treat-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 26px 22px 24px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-tint-2); }
.card h3 { font-size: 1.08rem; font-weight: 650; }
.card p { color: var(--text-muted); font-size: .95rem; margin-top: 8px; line-height: 1.55; }
.treat-foot {
  margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border-radius: 18px; background: var(--accent); border: 1px solid var(--border);
}
.note { display: flex; align-items: center; gap: 10px; color: var(--accent-ink); font-size: .95rem; }
.note svg { width: 18px; height: 18px; flex: none; }

/* 8. Lo studio ------------------------------------------------------------ */
.studio-head { display: grid; gap: 20px; margin-bottom: 40px; }
.studio-head .section-head { margin-bottom: 0; }
@media (min-width: 1024px) { .studio-head { grid-template-columns: 1fr auto; align-items: end; } }
.gallery { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .gallery { grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; }
  .gallery .photo:first-child { grid-row: 1 / span 2; }
}
.photo { margin: 0; position: relative; }
.photo a { display: block; position: relative; height: 100%; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); color: inherit; }
.photo picture, .photo img { width: 100%; height: 100%; }
.photo img { object-fit: cover; aspect-ratio: 4 / 3; transition: transform .5s ease; }
@media (min-width: 700px) { .gallery .photo:first-child img { aspect-ratio: auto; min-height: 100%; } }
.photo a:hover img { transform: scale(1.03); }
.photo figcaption {
  position: absolute; left: 14px; bottom: 14px; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-sm);
}
.photo figcaption i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); display: inline-block; }
.zoom-hint {
  position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); color: var(--text); border: 1px solid var(--border);
  opacity: 0; transition: opacity .2s ease;
}
.zoom-hint svg { width: 18px; height: 18px; }
.photo a:hover .zoom-hint, .photo a:focus-visible .zoom-hint { opacity: 1; }

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; overflow: visible;
}
.lightbox::backdrop { background: rgba(5, 12, 14, .86); }
.lightbox img { max-width: 100%; max-height: 84vh; width: auto; height: auto; border-radius: 14px; margin: 0 auto; }
.lightbox p { color: #e7eff1; text-align: center; margin-top: 12px; font-weight: 600; }
.lightbox-close {
  position: absolute; right: -6px; top: -54px; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff;
}
.lightbox-close:hover { color: #fff; border-color: #fff; }

/* 9. Contatti, orari e mappa ---------------------------------------------- */
.contact-grid { display: grid; gap: 24px; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; } }
.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 28px;
  display: flex; flex-direction: column; gap: 26px;
}
.contact-row { display: flex; gap: 16px; align-items: flex-start; }
.contact-row .card-icon { margin: 0; flex: none; width: 48px; height: 48px; }
.contact-label { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.phone-big {
  display: inline-block; font-size: clamp(1.7rem, 5vw, 2.3rem); font-weight: 750; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none; line-height: 1.2; margin-top: 2px;
}
.phone-big:hover { color: var(--primary); }
.contact-row address { font-style: normal; font-size: 1.1rem; margin-top: 2px; }
.hours-block { display: flex; flex-direction: column; gap: 12px; }
.hours-block .hours-title { display: flex; align-items: center; gap: 12px; }
.hours-block .hours-title .card-icon { margin: 0; width: 48px; height: 48px; }
.hours-list { margin: 0; display: grid; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.hours-item { display: grid; gap: 2px 16px; padding: 12px 16px; background: var(--bg-soft); }
.hours-item + .hours-item { border-top: 1px solid var(--border); }
.hours-item dt { font-weight: 650; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hours-item dd { margin: 0; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hours-item dd span:not(.hours-and) { color: var(--text); font-weight: 500; white-space: nowrap; }
@media (min-width: 560px) { .hours-item { grid-template-columns: 11rem 1fr; align-items: baseline; } }
.hours-item.is-open { background: var(--primary-tint); }
.hours-item.is-closed dd { font-style: italic; }
.hours-item.is-today { box-shadow: inset 4px 0 0 var(--primary); }
.today-tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--primary); color: var(--on-primary);
}
.hours-note { font-size: .92rem; color: var(--text-muted); }
.hours-note a { font-weight: 600; white-space: nowrap; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }
@media (max-width: 480px) { .contact-actions .btn { width: 100%; } }

.map-card { border-radius: 24px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; }
.map-frame { position: relative; aspect-ratio: 16 / 10; background: var(--map-land); }
.map-frame svg { width: 100%; height: 100%; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--border); }
.map-consent p { color: var(--text-muted); font-size: .95rem; }
.map-consent .btn { align-self: flex-start; }
.map-consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.map-revoke { padding: 14px 24px; border-top: 1px solid var(--border); font-size: .9rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
.map-revoke[hidden], .map-consent[hidden] { display: none; }

/* 10. Footer --------------------------------------------------------------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 56px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a:not(.btn) { color: var(--text); text-decoration: none; }
.site-footer a:not(.btn):hover { color: var(--primary); text-decoration: underline; }
.footer-brand p { color: var(--text-muted); margin-top: 10px; }
.footer-brand .footer-name { font-weight: 700; font-size: 1.05rem; color: var(--text); margin-top: 0; }
.footer-brand .btn { margin-top: 18px; }
.footer-hours { margin-top: 14px; font-size: .9rem; color: var(--text-muted); }
.footer-hours strong { color: var(--text); font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--primary); text-decoration: underline; }
html:not(.js) .link-btn { display: none; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--text-muted); font-size: .875rem;
}

/* Pagine legali */
.legal-hero { padding: 56px 0 8px; }
.legal-hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 750; margin-top: 14px; }
.legal-hero p { color: var(--text-muted); margin-top: 12px; }
.legal { padding: 24px 0 88px; }
.legal-body { max-width: 760px; }
.legal-body h2 { font-size: 1.35rem; font-weight: 700; margin: 40px 0 12px; }
.legal-body h3 { font-size: 1.08rem; font-weight: 650; margin: 24px 0 8px; }
.legal-body p, .legal-body li { color: var(--text-muted); }
.legal-body p + p { margin-top: 12px; }
.legal-body ul { padding-left: 1.25rem; margin: 12px 0; display: grid; gap: 6px; }
.legal-body strong { color: var(--text); }
.legal-box { margin-top: 20px; padding: 20px 22px; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--border); }
.legal-box p { color: var(--text); }
.legal-note { margin-top: 32px; padding: 16px 20px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: .92rem; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 14px; }
.legal-body table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.legal-body th, .legal-body td { text-align: left; padding: 12px 14px; vertical-align: top; }
.legal-body th { background: var(--bg-soft); color: var(--text); font-weight: 650; }
.legal-body td { color: var(--text-muted); border-top: 1px solid var(--border); }
.legal-body code { font-size: .88em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; color: var(--text); }

/* Cookie banner */
.cookie-banner {
  position: fixed; z-index: 80; bottom: 16px;
  left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 640px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 20px 20px 18px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { font-size: 1.05rem; font-weight: 650; display: flex; align-items: center; gap: 10px; padding-right: 40px; }
.cookie-banner h2 svg { width: 20px; height: 20px; color: var(--primary); }
.cookie-close { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; }
.cookie-close svg { width: 18px; height: 18px; }
.cookie-banner p { font-size: .9rem; color: var(--text-muted); margin-top: 8px; line-height: 1.55; }
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.cookie-actions .btn { min-height: 44px; padding: 10px 14px; font-size: .95rem; }
.cookie-actions .btn-pref { grid-column: 1 / -1; }
.btn-equal { background: var(--surface); color: var(--text); border-color: var(--text); }
.btn-equal:hover { background: var(--text); color: var(--bg); }
.cookie-prefs { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: grid; gap: 12px; font-size: .9rem; }
.cookie-prefs[hidden] { display: none; }
.cookie-prefs label { display: flex; gap: 10px; align-items: flex-start; }
.cookie-prefs label span { color: var(--text-muted); }
.cookie-prefs label strong { color: var(--text); }
.cookie-prefs input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex: none; }
@media (min-width: 768px) {
  .cookie-banner { bottom: 24px; }
  .cookie-actions { grid-template-columns: 1fr 1fr 1fr; }
  .cookie-actions .btn-pref { grid-column: auto; }
}

/* Linguetta fissa per riaprire le preferenze cookie (solo con JavaScript, nascosta a banner aperto) */
.cookie-tab {
  position: fixed; z-index: 55; left: 50%; bottom: 0; transform: translateX(-50%);
  display: none; align-items: center; gap: 6px;
  min-height: 32px; padding: 4px 14px 4px 10px;
  font: inherit; font-size: .8rem; font-weight: 600; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border); border-bottom: 0;
  border-radius: 12px 12px 0 0; box-shadow: 0 -6px 18px -12px rgba(0, 0, 0, .35);
  cursor: pointer; transition: color .2s ease, padding-bottom .2s ease;
}
.cookie-tab svg { width: 16px; height: 16px; }
.cookie-tab:hover, .cookie-tab:focus-visible { color: var(--primary); padding-bottom: 8px; }
.js .cookie-tab { display: inline-flex; }
body.cookie-open .cookie-tab { display: none; }
@media (max-width: 767.98px) {
  /* Su mobile si appoggia sopra la barra "Chiama lo studio". */
  .has-mobile-cta .cookie-tab { bottom: 72px; border-bottom: 1px solid var(--border); border-radius: 12px; }
  .has-mobile-cta .cookie-tab:hover, .has-mobile-cta .cookie-tab:focus-visible { padding-bottom: 4px; }
}

/* CTA telefonica fissa su mobile (rimuovere la classe "has-mobile-cta" dal <body> per disattivarla) */
.mobile-cta { display: none; }
@media (max-width: 767.98px) {
  .has-mobile-cta .mobile-cta {
    display: flex; position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px;
    align-items: center; justify-content: center; gap: 10px;
    min-height: 54px; border-radius: 999px;
    background: var(--primary); color: var(--on-primary); font-weight: 650; font-size: 1.05rem;
    text-decoration: none; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .45);
  }
  .has-mobile-cta .mobile-cta:hover { color: var(--on-primary); }
  .mobile-cta svg { width: 20px; height: 20px; }
  body.cookie-open .mobile-cta { display: none; }
  body.has-mobile-cta { padding-bottom: 112px; }
}

@media (prefers-reduced-motion: reduce) {
  html, .slider { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .btn-primary:hover, .photo a:hover img { transform: none; }
}

@media print {
  .site-header, .cookie-banner, .cookie-tab, .mobile-cta, .map-card, .slider-nav { display: none !important; }
  .slider { overflow: visible; }
  .slider-list { flex-wrap: wrap; }
}

/* Immagini responsive dentro i riquadri */
.hero-photo picture, .about-photo picture { display: block; width: 100%; height: 100%; }
/* Senza JavaScript il pulsante di consenso della mappa non può funzionare: resta il link a Google Maps. */
html:not(.js) [data-map-accept] { display: none; }
.slider:focus-visible { outline-offset: 2px; }
