:root {
  /* colori del logo (file vettoriale): blu #26aae1, verde #6fd54b, grigio #808285 */
  --bg: #fffaf3;
  --bg-alt: #fff0de;
  --card: #ffffff;
  --navy: #173f5f;
  --blue: #26aae1;
  --blue-dark: #1170a6;
  --blue-soft: #9ad4f2;
  --blue-tint: #e6f4fb;
  --green: #6fd54b;
  --green-hover: #5fc23a;
  --green-dark: #2e7d1f;
  --green-tint: #eaf8e3;
  --star: #f2a900;
  --sun: #ffc845;
  --sun-tint: #fff4cc;
  --peach: #ffe3cc;
  --ink: #2a3a44;
  --ink-soft: #55636b;
  --muted: #6b747a;
  --line: #f1e3cf;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(12, 57, 84, 0.10);
  --max: 1180px;
}

/* ---------- Fonts (locali: nessuna richiesta a server esterni) ---------- */
/* Grafica «morbida» scelta dal cliente il 26/10/2026: titoli Fredoka, testi Nunito (licenza OFL) */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/fredoka-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('fonts/nunito-400-800.woff2') format('woff2');
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 118px; }

body {
  font-family: 'Nunito', 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Fredoka', 'Segoe UI', sans-serif;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

:focus-visible { outline: 3px solid var(--blue-dark); outline-offset: 3px; border-radius: 4px; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff;
  padding: 10px 18px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Section headings ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 14px;
}
.section-eyebrow svg { width: 18px; height: 18px; }
.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin-bottom: 18px;
}
.section-lede {
  font-size: 1.08rem;
  max-width: 700px;
  margin-bottom: 48px;
}
.section-head--center { text-align: center; }
.section-head--center .section-lede { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s, color .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--navy);
  box-shadow: 0 10px 24px rgba(95, 194, 58, 0.30);
}
.btn-primary:hover {
  background: var(--green-hover);
  border-color: var(--green-hover);
  transform: translateY(-2px);
}
.btn-ghost { border-color: var(--blue-dark); color: var(--blue-dark); }
.btn-ghost:hover { background: var(--blue-dark); color: #fff; }
.btn-light { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn-light:hover { background: #fff; color: var(--navy); border-color: #fff; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--blue-dark);
  border-bottom: 2px solid var(--blue-soft);
  padding-bottom: 2px;
  transition: border-color .2s, gap .2s;
}
.link-arrow svg { width: 18px; height: 18px; flex: none; }
.link-arrow:hover { border-color: var(--blue-dark); gap: 10px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.nav.scrolled,
.nav--solid {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(12, 57, 84, 0.07);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 100px;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 84px; width: auto; }
.footer-logo {
  display: inline-flex;
  background: var(--card);
  border-radius: 16px;
  padding: 12px 16px;
}
.footer-logo img { height: 64px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 26px);
  font-size: 15.5px;
  font-weight: 700;
}
.nav-links a { color: var(--navy); white-space: nowrap; transition: color .2s; }
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--green-dark); }
.nav-links a[aria-current="page"] { box-shadow: 0 2px 0 var(--blue-soft); }
.nav-links .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-dark);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s;
}
.nav-links .nav-cta:hover { background: var(--navy); color: #fff; }
.nav-cta svg { width: 17px; height: 17px; flex: none; }
.nav-links .nav-cta--mail { margin-left: -4px; background: var(--card); color: var(--blue-dark); box-shadow: inset 0 0 0 2px var(--blue-dark); }
.nav-links .nav-cta--mail:hover { background: var(--blue-dark); color: #fff; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute; display: block;
  width: 26px; height: 2.5px; background: var(--navy);
  border-radius: 2px; transition: .25s;
}
.nav-toggle span { top: 50%; left: 9px; }
.nav-toggle span::before { content: ''; top: -8px; left: 0; }
.nav-toggle span::after { content: ''; top: 8px; left: 0; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 150px 0 50px; /* sopra: 100 px di barra + 50 di margine, come sotto */
  overflow: hidden;
  /* foto ancorata a destra, larga quanto serve perché il bordo destro del muso del gatto
     (al 64% della foto) cada poco a sinistra del riquadro orari (centro + 200 px):
     larghezza = (50% - 200px) / 0,36, mai meno della hero */
  background: var(--navy) url('images/header.webp') 100% 15% / max(100%, calc(138.9% - 555px)) auto no-repeat;
  color: #d6e8e4;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(12, 57, 84, 0.95) 0%,
    rgba(12, 57, 84, 0.90) 36%,
    rgba(12, 57, 84, 0.45) 58%,
    rgba(12, 57, 84, 0.20) 100%);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 24px;
}
.hero-badge svg { width: 16px; height: 16px; color: var(--green-dark); }
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  margin-bottom: 22px;
}
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero-sub {
  font-size: 1.15rem;
  max-width: 560px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 12px 26px; font-weight: 700; color: #fff; }
.hero-points li { display: flex; align-items: center; gap: 8px; font-size: 15.5px; }
.hero-points svg { width: 20px; height: 20px; color: var(--green); flex: none; }

.hero-card {
  position: relative;
  color: var(--ink-soft);
  background: var(--card);
  border-radius: 26px;
  padding: 34px 32px;
  box-shadow: var(--shadow);
}
.hero-card-paw {
  position: absolute;
  top: -34px; right: 26px;
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border-radius: 22px;
  background: var(--sun);
  color: var(--navy);
  transform: rotate(8deg);
}
.hero-card-paw svg { width: 40px; height: 40px; }
.hero-card h2 { font-size: 1.45rem; margin-bottom: 6px; }
.open-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.open-status::before {
  content: '';
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--muted);
}
.open-status.is-open { background: var(--green-tint); color: var(--green-dark); }
.open-status.is-open::before { background: var(--green-dark); }

/* ---------- Orari ---------- */
.hours { width: 100%; border-collapse: collapse; font-size: 16px; }
.hours th,
.hours td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; }
.hours th { font-weight: 700; color: var(--ink); }
.hours td { text-align: right; font-weight: 700; color: var(--blue-dark); white-space: nowrap; }
.hours tr:last-child th,
.hours tr:last-child td { border-bottom: 0; }
.hours .is-closed td { color: var(--muted); font-weight: 600; }
.hours tr[aria-current="date"] th::after {
  content: 'oggi';
  margin-left: 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--green-tint);
  color: var(--green-dark);
  padding: 2px 9px;
  border-radius: 999px;
}
.hours-note { font-size: 14.5px; color: var(--muted); margin-top: 14px; }
.hero-card-foot {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  color: var(--ink);
}
.hero-card-foot svg { width: 20px; height: 20px; color: var(--green-dark); flex: none; margin-top: 3px; }

/* ---------- Benvenuto ---------- */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.welcome-text p { margin-bottom: 18px; }
.welcome-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.fact-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--green-tint);
  color: var(--green-dark);
  margin-bottom: 14px;
}
.fact-icon svg { width: 24px; height: 24px; }
.fact h3 { font-size: 1.12rem; margin-bottom: 6px; }
.fact p { font-size: 15.5px; line-height: 1.55; }

/* ---------- Servizi ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.services-grid .service { border-color: transparent; }
.services-grid .service:nth-child(4n+1) { background: var(--green-tint); }
.services-grid .service:nth-child(4n+2) { background: var(--blue-tint); }
.services-grid .service:nth-child(4n+3) { background: var(--sun-tint); }
.services-grid .service:nth-child(4n+4) { background: var(--peach); }
.service h3 { font-size: 1.25rem; margin-bottom: 10px; }
.service p { font-size: 16px; line-height: 1.6; }
.services-more { margin-top: 44px; text-align: center; }
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}
.chips li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-dark);
}
.chips--left { justify-content: flex-start; }

/* ---------- A domicilio ---------- */
.homecare {
  background: var(--blue-dark);
  color: #d6e8e4;
  border-radius: 28px;
  padding: 52px 56px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 36px;
  align-items: center;
}
.homecare-icon {
  width: 84px; height: 84px;
  display: grid; place-items: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--green);
}
.homecare-icon svg { width: 44px; height: 44px; }
.homecare h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 8px; }
.homecare p { max-width: 560px; }
.homecare-actions { display: flex; flex-direction: column; gap: 12px; }
.homecare-actions .btn { justify-content: flex-start; line-height: 1.2; }
.homecare-actions small { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }

/* ---------- Équipe ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.doctor {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 22px;
  text-align: center;
}
.doctor-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  margin: 0 0 18px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--green-tint);
}
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor h3 { font-size: 1.08rem; margin-bottom: 8px; }
.doctor-role { font-size: 14px; line-height: 1.45; font-weight: 700; color: var(--green-dark); }
.team-cta { margin-top: 40px; text-align: center; }

/* ---------- Schede dei medici (pagina Chi siamo) ---------- */
.bios { display: grid; gap: 24px; }
.bio {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.bio .doctor-photo { margin: 0; }
.bio h2 { font-size: 1.5rem; margin-bottom: 4px; }
.bio-title { font-size: 14px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.bio .chips { margin-bottom: 16px; gap: 8px; }
.bio .chips li { background: var(--green-tint); border-color: transparent; color: var(--green-dark); font-size: 14px; padding: 4px 14px; }
.bio p + p { margin-top: 12px; }

/* ---------- Amici ---------- */
.friends-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.friends-grid--foto-sx { grid-template-columns: 1.4fr 0.6fr; }
.friends-grid--foto-dx { grid-template-columns: 0.6fr 1.4fr; }
.friends-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.friends-photos img {
  width: 100%; height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
}
.friends-more { margin-top: 26px; }

/* ---------- Galleria ---------- */
.friends-photos a,
.gallery-grid a {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
}
.friends-photos a[hidden] { display: none; }
.friends-photos a img,
.gallery-grid img { transition: transform .3s; }
.friends-photos a:hover img,
.gallery-grid a:hover img { transform: scale(1.04); }
.friends-photos a:focus-visible,
.gallery-grid a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.gallery-grid img {
  display: block;
  width: 100%; height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--card);
}
.lightbox {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 30, 44, 0.94);
  color: #fff;
}
.lightbox::backdrop { background: rgba(8, 30, 44, 0.94); }
.lightbox-figure {
  position: absolute;
  inset: 64px 84px 72px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100% - 40px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.lightbox-caption { font-size: 15px; text-align: center; color: #d6e8e4; }
.lightbox-count {
  position: absolute;
  top: 22px; left: 26px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #d6e8e4;
}
.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background .2s;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox button:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 2px; }
.lightbox button svg { width: 26px; height: 26px; }
.lightbox-close { top: 12px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Dicono di noi ---------- */
.reviews-score { font-size: 1.12rem; color: var(--ink); margin: -6px 0 44px; }
.reviews-score .review-stars { font-size: 1.3rem; margin-right: 6px; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.review {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  margin: 0;
}
.review-stars { color: var(--star); letter-spacing: 2px; font-size: 1.05rem; line-height: 1; margin-bottom: 16px; }
.review blockquote { font-size: 16.5px; line-height: 1.65; color: var(--ink); margin: 0 0 20px; flex: 1; }
.review blockquote::before { content: '«'; }
.review blockquote::after { content: '»'; }
.review figcaption { font-weight: 800; color: var(--navy); }
.review figcaption span { font-weight: 600; color: var(--muted); font-size: 14.5px; }
.reviews-more { text-align: center; margin-top: 36px; }

/* ---------- Consigli ---------- */
.advice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.advice-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .25s, box-shadow .25s;
}
.advice-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.advice-tag {
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--green-tint);
  color: var(--green-dark);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.advice-card h3 { font-size: 1.28rem; margin-bottom: 10px; }
.advice-card p { font-size: 16px; line-height: 1.6; margin-bottom: 20px; }
.advice-card .link-arrow { margin-top: auto; align-self: flex-start; }

/* ---------- Contatti ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px;
}
.contact-card h2,
.contact-card h3 { font-size: 1.4rem; margin-bottom: 18px; }
.contact-list { display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .fact-icon { margin: 0; flex: none; }
.contact-label {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-value { font-size: 1.12rem; font-weight: 800; color: var(--navy); }
a.contact-value:hover { color: var(--green-dark); }
.social { display: flex; gap: 12px; margin-top: 26px; }
.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  color: var(--blue-dark);
  transition: background .2s, color .2s;
}
.social a:hover { background: var(--blue-dark); color: #fff; }
.social svg { width: 18px; height: 18px; }
.contact-grid--wide { grid-template-columns: 1fr 2fr; }
.doctor-hours { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.doctor-hours th,
.doctor-hours td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doctor-hours th { width: 1%; white-space: nowrap; padding-right: 32px; font-weight: 800; color: var(--navy); }
.doctor-hours tr:last-child th,
.doctor-hours tr:last-child td { border-bottom: 0; }

/* ---------- Mappa (caricata solo con il consenso) ---------- */
.map {
  position: relative;
  min-height: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(17, 112, 166, 0.05) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(17, 112, 166, 0.05) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--green-tint);
  display: grid;
  place-items: center;
  text-align: center;
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-placeholder { padding: 32px; max-width: 460px; }
.map-pin {
  width: 60px; height: 60px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue-dark);
  color: #fff;
}
.map-pin svg { width: 30px; height: 30px; }
.map-placeholder p { margin-bottom: 18px; color: var(--ink); }
.map-placeholder small { display: block; margin-top: 14px; font-size: 14px; color: var(--muted); }
.map-placeholder .btn { margin: 4px; }

/* ---------- Banda contatti ---------- */
.cta-band { background: var(--navy); color: #cfe3e0; padding: 72px 0; }
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 8px; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Page hero (pagine interne) ---------- */
.page-hero {
  position: relative;
  padding: 172px 0 64px;
  overflow: hidden;
  /* stessa foto della home, stessa larghezza e ancoraggio a destra; la fascia è più bassa
     e quindi la foto è tagliata in altezza (si vedono i musi) */
  background: var(--navy) url('images/header.webp') 100% 25% / max(100%, calc(138.9% - 555px)) auto no-repeat;
  color: #d6e8e4;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(12, 57, 84, 0.95) 0%,
    rgba(12, 57, 84, 0.90) 36%,
    rgba(12, 57, 84, 0.45) 58%,
    rgba(12, 57, 84, 0.20) 100%);
}
.page-hero .container { position: relative; z-index: 1; }
.breadcrumb { font-size: 14.5px; font-weight: 700; color: var(--green); margin-bottom: 12px; }
.breadcrumb a:hover { text-decoration: underline; }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); margin-bottom: 14px; color: #fff; }
.page-hero p { font-size: 1.12rem; max-width: 720px; }

/* ---------- Servizi (pagina) ---------- */
.service-rows { display: grid; gap: 24px; }
.service-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
}
.service-row h2 { font-size: 1.5rem; margin-bottom: 12px; }
.service-row p + p { margin-top: 12px; }
.highlights { margin-top: 16px; display: grid; gap: 8px; }
.highlights li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; color: var(--ink); }
.highlights svg { width: 20px; height: 20px; color: var(--green-dark); flex: none; margin-top: 4px; }

/* ---------- Testi lunghi (consigli, privacy) ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: start;
}
.article-index {
  position: sticky;
  top: 104px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.article-index h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.article-index li + li { margin-top: 8px; }
.article-index a { font-size: 15.5px; font-weight: 700; color: var(--blue-dark); line-height: 1.4; display: block; }
.article-index a:hover { color: var(--green-dark); }
.prose { max-width: 760px; }
.prose article + article { margin-top: 64px; padding-top: 56px; border-top: 1px solid var(--line); }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-bottom: 16px; }
.prose > h2 { margin-top: 44px; }
.prose h3 { font-size: 1.2rem; margin: 28px 0 10px; }
.prose p { margin-bottom: 16px; }
.prose ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--blue-dark); font-weight: 700; text-decoration: underline; text-decoration-color: var(--blue-soft); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--blue-dark); }
.prose .advice-tag { display: inline-block; }
.callout {
  background: var(--green-tint);
  border-left: 4px solid var(--green-dark);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 22px 0;
  color: var(--ink);
}
.callout p:last-child { margin-bottom: 0; }
.data-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: 16px; }
.data-table th,
.data-table td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { background: var(--bg-alt); color: var(--navy); }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #b9d0cd; padding: 64px 0 28px; font-size: 15.5px; }
.cta-band + .footer { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 44px;
}
.footer h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 16px;
}
.footer-about { margin-top: 18px; max-width: 360px; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  transition: background .2s, border-color .2s, color .2s;
}
.footer-social a:hover { background: var(--green); border-color: var(--green); color: var(--navy); text-decoration: none; }
.footer-social svg { width: 19px; height: 19px; }
.footer li + li { margin-top: 8px; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14.5px;
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-bottom li + li { margin-top: 0; }
.footer-link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.footer-link-btn:hover { color: #fff; text-decoration: underline; }

/* ---------- Banner cookie ---------- */
.cookie {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  z-index: 80;
  max-width: 760px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(12, 57, 84, 0.28);
  padding: 24px 28px;
}
.cookie[hidden] { display: none; }
.cookie h2 { font-size: 1.2rem; margin-bottom: 8px; }
.cookie p { font-size: 15.5px; line-height: 1.55; margin-bottom: 16px; }
.cookie p a { color: var(--blue-dark); font-weight: 700; text-decoration: underline; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie .btn { padding: 11px 24px; font-size: 15.5px; }

/* ---------- Chiamata rapida (solo telefono) ---------- */
.callbar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  html { scroll-padding-top: 96px; }
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .section-lede { margin-bottom: 34px; }

  .nav-inner { height: 80px; }
  .nav-logo img { height: 60px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 80px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(12, 57, 84, 0.12);
    padding: 8px 20px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav-links a[aria-current="page"] { box-shadow: none; }
  .nav-links .nav-cta { justify-content: center; margin-top: 16px; padding: 14px; border-bottom: 0; }
  .nav-links .nav-cta--mail { margin: 10px 0 0; }

  .hero { padding: calc(50px + 66.7vw) 0 64px; }
  .hero { background-image: none; }
  .hero::before {
    /* foto intera (3:2) sotto la barra di 80 px, sfumata in basso nel blu */
    inset: 80px 0 auto 0;
    height: 66.7vw;
    background:
      linear-gradient(180deg, rgba(23, 63, 95, 0) 65%, var(--navy) 100%),
      url('images/header-900.webp') 50% 0 / 100% auto no-repeat;
  }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-sub { font-size: 1.06rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-card { padding: 30px 22px 26px; }

  .welcome-grid,
  .friends-grid,
  .contact-grid,
  .contact-grid--wide,
  .article-layout { grid-template-columns: 1fr; gap: 36px; }
  .services-grid,
  .advice-grid,
  .reviews-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .doctor { padding: 10px 10px 18px; }

  .homecare { grid-template-columns: 1fr; padding: 36px 26px; gap: 22px; border-radius: 22px; }
  .homecare-icon { width: 68px; height: 68px; border-radius: 20px; }
  .homecare-icon svg { width: 36px; height: 36px; }

  .bio { grid-template-columns: 1fr; gap: 20px; padding: 26px 22px; }
  .bio .doctor-photo { max-width: 340px; }
  .friends-photos { gap: 10px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .gallery-grid a,
  .friends-photos a { border-radius: 10px; }
  .lightbox-figure { inset: 64px 10px 92px; }
  .lightbox-prev,
  .lightbox-next { top: auto; bottom: 18px; transform: none; }
  .lightbox-prev { left: calc(50% - 64px); }
  .lightbox-next { right: calc(50% - 64px); }

  .service-row { grid-template-columns: 1fr; gap: 18px; padding: 26px 22px; }
  .contact-card { padding: 28px 22px; }
  .doctor-hours th,
  .doctor-hours td { display: block; width: 100%; padding: 0; border: 0; }
  .doctor-hours th { padding-top: 14px; white-space: normal; }
  .doctor-hours td { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .map { min-height: 340px; }

  .page-hero { padding: 120px 0 44px; background-size: cover; background-position: 70% 30%; }
  .page-hero::before { background: rgba(12, 57, 84, 0.78); }
  .article-index { position: static; }
  .prose article + article { margin-top: 44px; padding-top: 40px; }

  .cta-band { padding: 56px 0; }
  .cta-band-actions .btn { flex: 1 1 100%; }
  .footer { padding: 48px 0 96px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .cookie { left: 12px; right: 12px; bottom: 84px; padding: 20px; }
  .cookie-actions .btn { flex: 1 1 auto; }

  .callbar {
    position: fixed;
    left: 12px; right: 12px; bottom: 12px;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--green);
    color: var(--navy);
    font-weight: 800;
    font-size: 17px;
    padding: 15px;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(12, 57, 84, 0.30);
    transition: transform .3s, opacity .3s, visibility .3s;
  }
  .callbar svg { width: 21px; height: 21px; }
  /* compare solo dopo aver scorso la pagina (main.js); senza JavaScript resta sempre visibile */
  .callbar--auto:not(.is-visible) { transform: translateY(140%); opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
