/* ============================================================
   Prof. Ezio Adriani — Sito Ufficiale
   Design system & stylesheet
   ============================================================ */

:root {
  /* Palette */
  --navy-900: #0b1d35;
  --navy-800: #122a4a;
  --navy-700: #1a3a63;
  --navy-600: #25517e;
  --navy-50:  #eef3fa;

  --gold-600: #b08537;
  --gold-500: #c79a4a;
  --gold-400: #d9b06b;
  --gold-100: #f4ead4;

  --ink-900: #0e1726;
  --ink-700: #2a3445;
  --ink-500: #56627a;
  --ink-300: #9aa3b6;

  --bg:      #ffffff;
  --bg-soft: #f7f8fb;
  --bg-cream: #faf6ef;
  --line:    #e6e9f0;

  /* Typography */
  --font-serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container: 1200px;
  --radius:    6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(11,29,53,.06), 0 2px 8px rgba(11,29,53,.04);
  --shadow-md: 0 6px 24px rgba(11,29,53,.08), 0 2px 6px rgba(11,29,53,.05);
  --shadow-lg: 0 24px 60px rgba(11,29,53,.12), 0 6px 18px rgba(11,29,53,.06);

  --transition: 240ms cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--navy-700); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-600); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy-900);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.4rem, 4.6vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 14px;
}

.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-navy { background: var(--navy-900); color: #d9e2f1; }
.section-navy h1, .section-navy h2, .section-navy h3 { color: #fff; }
.section-cream { background: var(--bg-cream); }

.section-title {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 64px;
}
.section-title p {
  color: var(--ink-500);
  font-size: 1.05rem;
}
.section-navy .section-title p { color: #b6c2d8; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.btn-primary {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
}
.btn-primary:hover {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-gold {
  background: var(--gold-500);
  color: #fff;
  border-color: var(--gold-500);
}
.btn-gold:hover {
  background: var(--gold-600);
  border-color: var(--gold-600);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--navy-900);
}
.btn-outline:hover {
  background: var(--navy-900);
  color: #fff;
}
.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.btn-outline-light:hover {
  background: #fff;
  color: var(--navy-900);
  border-color: #fff;
}
.btn-ghost {
  padding: 0;
  background: none;
  border: none;
  color: var(--navy-700);
  font-weight: 600;
}
.btn-ghost:hover { color: var(--gold-600); }
.btn-ghost .arrow { transition: transform var(--transition); }
.btn-ghost:hover .arrow { transform: translateX(4px); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-900);
  color: #c9d3e6;
  font-size: 0.85rem;
  padding: 9px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar a { color: #c9d3e6; }
.topbar a:hover { color: var(--gold-400); }
.topbar-info { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-info span { display: inline-flex; align-items: center; gap: 8px; }
.topbar-info svg { flex-shrink: 0; }
.topbar-role span {
  color: var(--gold-400);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.topbar-role svg { color: var(--gold-500); flex-shrink: 0; }

/* Ruolo lungo — su tablet/mobile occupa la propria riga e mantiene leggibilità */
@media (max-width: 980px) {
  .topbar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .topbar-role { width: 100%; }
  .topbar-role span {
    line-height: 1.4;
    font-size: 0.82rem;
    align-items: flex-start;
  }
  .topbar-role svg { margin-top: 3px; }
}
/* Su smartphone piccoli il ruolo verboso sparisce per evitare wrap su 3 righe.
   Resta presente nel footer e in altre zone della pagina. */
@media (max-width: 480px) {
  .topbar-role { display: none; }
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-serif);
  color: var(--navy-900);
  line-height: 1.1;
}
.brand:hover { color: var(--navy-900); }
.brand-mark {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--navy-900);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--gold-500);
  border-radius: 50%;
}
.brand-logo {
  width: 48px;
  height: 48px;
  display: block;
  flex-shrink: 0;
}
.brand-logo.fit-contain { object-fit: contain; }
.brand-logo.fit-cover   { object-fit: cover; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-size: 1.25rem;
  font-weight: 500;
}
.brand-tag {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 10px 14px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-700);
  border-radius: var(--radius);
}
.nav-links a:hover { color: var(--navy-900); background: var(--bg-soft); }
.nav-links a.active { color: var(--navy-900); }
.nav-links a.active::after {
  content: "";
  display: block;
  height: 2px; width: 20px;
  background: var(--gold-500);
  margin: 4px auto 0;
}
.nav-cta { margin-left: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--navy-900);
  margin: 5px 0;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    /* Quando chiuso: spostiamo il menu fuori schermo con un valore basato sulla
       viewport (non sulla sua altezza) — così non c'è rischio di "leaking" del
       pulsante in fondo se il menu cresce. + visibility/pointer-events di sicurezza. */
    transform: translateY(-100vh);
    visibility: hidden;
    pointer-events: none;
    transition: transform var(--transition), visibility 0s var(--transition);
    gap: 4px;
  }
  .nav-links.open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform var(--transition), visibility 0s 0s;
  }
  .nav-links a { padding: 14px 16px; }
  /* "Prenota visita" come call-to-action a tutta larghezza nel menu mobile */
  .nav-cta {
    margin: 22px 0 8px;
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
  }
  .nav-cta .btn {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 16px 22px;
  }
  .brand-tag { display: none; }
  /* Logo header più contenuto su mobile per dare spazio al nome */
  .brand-logo {
    width: 40px;
    height: 40px;
  }
  .brand-name {
    font-size: 1.1rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0b1d35 0%, #1a3a63 100%);
  color: #e7eef9;
  overflow: hidden;
  padding: 120px 0 140px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(199,154,74,.18), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(37,81,126,.6), transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  right: -200px; bottom: -200px;
  width: 600px; height: 600px;
  border: 1px solid rgba(199,154,74,.15);
  border-radius: 50%;
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.hero-eyebrow {
  color: var(--gold-400);
  letter-spacing: 0.22em;
}
.hero h1 {
  color: #fff;
  margin-bottom: 24px;
  font-weight: 400;
}
.hero h1 .accent {
  font-style: italic;
  color: var(--gold-400);
}
.hero-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #c2cfe3;
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-portrait {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
}
.hero-portrait img,
.hero-portrait svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-portrait img.fit-contain {
  object-fit: contain;
  box-sizing: border-box;
  padding: 14px;
}
.hero-portrait img.fit-cover { object-fit: cover; }
.hero-portrait .frame {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: calc(var(--radius-lg) - 4px);
  pointer-events: none;
}
.hero-portrait::after {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(199,154,74,.5);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.hero-card {
  position: relative;
  background: #fff;
  color: var(--ink-700);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(199,154,74,.4);
  border-radius: var(--radius-lg);
  pointer-events: none;
}
.hero-card h3 {
  margin-top: 0;
  color: var(--navy-900);
  font-family: var(--font-serif);
  font-size: 1.4rem;
}
.hero-card-list {
  list-style: none;
  padding: 0; margin: 18px 0 0;
}
.hero-card-list li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.hero-card-list li:last-child { border-bottom: none; }
.hero-card-list .icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold-100);
  color: var(--gold-600);
  display: grid; place-items: center;
}
.hero-card-list strong {
  display: block;
  color: var(--navy-900);
  font-weight: 600;
}
.hero-card-list span { font-size: 0.92rem; color: var(--ink-500); }

@media (max-width: 880px) {
  .hero { padding: 80px 0 90px; }
  .hero .container { grid-template-columns: 1fr; gap: 50px; }
  .hero-card { order: 2; }
}

/* ---------- Trust strip / stats ---------- */
.stats {
  background: var(--bg-cream);
  padding: 50px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stats-item .num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 500;
  color: var(--navy-900);
  line-height: 1;
}
.stats-item .lbl {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-500);
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

/* ---------- About / split sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.split-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
}
.split-image img,
.split-image svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Modalità "contain": l'immagine è interamente visibile dentro la cornice,
   con eventuale spazio attorno (sfumatura navy del contenitore).
   IMPORTANTE: box-sizing border-box, altrimenti il padding eccede inset:0
   e l'immagine viene tagliata dal overflow:hidden del contenitore. */
.split-image img.fit-contain {
  object-fit: contain;
  box-sizing: border-box;
  padding: 14px;
}
.split-image img.fit-cover {
  object-fit: cover;
}
.split-image .frame {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: calc(var(--radius-lg) - 4px);
  z-index: 2;
  pointer-events: none;
}

.split h2 { margin-bottom: 22px; }
.split p { color: var(--ink-500); margin-bottom: 18px; }

/* Banner illustrativo per intestazioni di sezione (pagina Patologie) */
.patology-banner {
  margin: 0 auto 44px;
  max-width: 540px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
}
.patology-banner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.patology-banner img.fit-contain {
  object-fit: contain;
  /* Niente cropping: il banner si adatta all'altezza naturale dell'immagine */
  height: auto;
  max-height: 540px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
}
.patology-banner img.fit-cover {
  /* Banner ad altezza fissa, con cropping */
  height: 320px;
  object-fit: cover;
}

/* =====================================================================
   SEZIONE VIDEO — griglia card + lightbox YouTube
   ===================================================================== */

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 56px;
}
@media (max-width: 980px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}
@media (max-width: 640px) {
  .video-grid { grid-template-columns: 1fr; gap: 22px; }
}

.video-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  outline: none;
  display: flex;
  flex-direction: column;
}
.video-card:hover,
.video-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(11, 29, 53, .15);
  border-color: var(--gold-500);
}
.video-card:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  overflow: hidden;
}
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.video-card:hover .video-thumb img {
  transform: scale(1.06);
}
.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,29,53,.0) 0%, rgba(11,29,53,.55) 100%);
  transition: background .35s ease;
}
.video-card:hover .video-overlay {
  background: linear-gradient(180deg, rgba(11,29,53,.15) 0%, rgba(11,29,53,.7) 100%);
}

/* Pulsante play centrale */
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border: none;
  border-radius: 50%;
  background: var(--gold-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  transition: transform .35s ease, background .25s ease;
  padding-left: 4px;     /* compensa il triangolo asimmetrico */
}
.video-play::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55);
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease, transform .35s ease;
}
.video-card:hover .video-play {
  transform: scale(1.08);
  background: var(--gold-600, #a47e36);
}
.video-card:hover .video-play::after {
  opacity: 1;
  transform: scale(1.08);
}

/* Body card */
.video-body {
  padding: 22px 24px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.video-cat {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-500);
  font-weight: 600;
  margin-bottom: 10px;
}
.video-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--navy-900);
  margin: 0 0 6px;
  line-height: 1.3;
}
.video-sub {
  font-size: 0.92rem;
  color: var(--ink-500);
  font-style: italic;
  margin: 0 0 14px;
}
.video-desc {
  font-size: 0.92rem;
  color: var(--ink-700);
  margin: 0;
  line-height: 1.55;
}

/* CTA band sotto la griglia */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 36px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: #fff;
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}
.cta-band .eyebrow {
  color: var(--gold-400, var(--gold-500));
}
.cta-band h3 {
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 500;
}

/* =====================================================================
   LIGHTBOX VIDEO
   ===================================================================== */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.video-modal.open { display: flex; }
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 29, 53, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.video-modal-content {
  position: relative;
  width: min(1100px, 100%);
  max-height: 90vh;
}
.video-modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.video-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-modal-close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.video-modal-close:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.7);
}
/* L'SVG dentro al pulsante X non deve catturare i click — così il target
   dell'evento è sempre il <button> e closest('[data-close]') trova la X. */
.video-modal-close svg,
.video-modal-close svg * { pointer-events: none; }
@media (max-width: 640px) {
  .video-modal { padding: 12px; }
  .video-modal-close { top: -44px; }
}

.signature {
  margin-top: 30px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.6rem;
  color: var(--navy-900);
  letter-spacing: -0.01em;
}
.signature-line {
  width: 120px;
  height: 1px;
  background: var(--gold-500);
  margin-bottom: 14px;
}

@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 50px; }
  .split-image {
    aspect-ratio: 5/4;
    max-height: 460px;
    /* Su mobile l'immagine appare SEMPRE dopo il testo (ordine uniforme
       anche quando in HTML viene prima — è il caso di Spalla e Rigenerativa). */
    order: 2;
  }
}

/* ---------- Card grid (specialties / services) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-400);
}
.card-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--navy-50);
  color: var(--navy-700);
  display: grid; place-items: center;
  margin-bottom: 22px;
  transition: background var(--transition), color var(--transition);
}
.card:hover .card-icon {
  background: var(--gold-100);
  color: var(--gold-600);
}
.card h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
}
.card p {
  color: var(--ink-500);
  font-size: 0.96rem;
  margin-bottom: 18px;
}
.card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-700);
  display: inline-flex; align-items: center; gap: 6px;
}
.card-link:hover { color: var(--gold-600); }

@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

/* ---------- Pillars (4-column with rule) ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}
.pillar {
  text-align: left;
  padding-top: 22px;
  border-top: 2px solid var(--gold-500);
}
.pillar h4 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--navy-900);
}
.pillar p { color: var(--ink-500); font-size: 0.92rem; }

@media (max-width: 880px) { .pillars { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Timeline / CV ---------- */
.timeline {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding-left: 30px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--gold-500);
  opacity: 0.6;
}
.timeline-item { position: relative; padding: 0 0 38px 28px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -24px; top: 8px;
  width: 14px; height: 14px;
  background: var(--bg);
  border: 2px solid var(--gold-500);
  border-radius: 50%;
}
.timeline-year {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--gold-600);
  margin-bottom: 4px;
}
.timeline-item h4 {
  margin: 0 0 6px;
  color: var(--navy-900);
  font-size: 1.1rem;
}
.timeline-item p { color: var(--ink-500); margin: 0; font-size: 0.96rem; }

/* ---------- List of features (clean lines) ---------- */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 40px;
}
.feature-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.feature-list li:last-child,
.feature-list li:nth-last-child(2) { border-bottom: none; }
.feature-list .check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  color: var(--gold-600);
  margin-top: 2px;
}
.feature-list strong {
  display: block;
  color: var(--navy-900);
  font-weight: 600;
  margin-bottom: 2px;
}
.feature-list span { color: var(--ink-500); font-size: 0.92rem; }

@media (max-width: 720px) {
  .feature-list { grid-template-columns: 1fr; }
  .feature-list li, .feature-list li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .feature-list li:last-child { border-bottom: none; }
}

/* ---------- Quote / testimonial ---------- */
.quote {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: 0 40px;
}
.quote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-serif);
  font-size: 6rem;
  line-height: 0.6;
  color: var(--gold-500);
  margin-bottom: 12px;
}
.quote-text {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.3vw, 1.9rem);
  font-style: italic;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 30px;
}
.quote-author { color: #c2cfe3; font-size: 0.95rem; }
.quote-author strong { color: #fff; display: block; font-family: var(--font-serif); font-size: 1.15rem; font-style: normal; margin-bottom: 4px; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: #e7eef9;
  padding: 90px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -120px;
  width: 360px; height: 360px;
  border: 1px solid rgba(199,154,74,.18);
  border-radius: 50%;
  transform: translateX(-50%);
}
.page-hero .eyebrow { color: var(--gold-400); }
.page-hero h1 { color: #fff; margin-bottom: 16px; }
.page-hero p {
  max-width: 680px;
  margin: 0 auto;
  color: #c2cfe3;
  font-size: 1.05rem;
}
.breadcrumbs {
  font-size: 0.88rem;
  color: #b6c2d8;
  margin-top: 22px;
}
.breadcrumbs a { color: var(--gold-400); }
.breadcrumbs span { margin: 0 8px; opacity: 0.5; }

/* ---------- Two-column long form ---------- */
.longform {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 70px;
  align-items: flex-start;
}
.longform article p { color: var(--ink-700); font-size: 1.02rem; }
.longform article h2 { margin-top: 36px; }
.longform article h3 { margin-top: 28px; }
.longform aside {
  position: sticky; top: 100px;
  background: var(--bg-cream);
  border: 1px solid var(--gold-100);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.longform aside h4 {
  font-family: var(--font-serif);
  color: var(--navy-900);
  margin: 0 0 14px;
  font-size: 1.2rem;
}
.longform aside ul { padding: 0; list-style: none; margin: 0; }
.longform aside li {
  padding: 10px 0;
  border-bottom: 1px solid var(--gold-100);
  color: var(--ink-700);
  font-size: 0.94rem;
}
.longform aside li:last-child { border-bottom: none; }

@media (max-width: 980px) { .longform { grid-template-columns: 1fr; gap: 40px; } .longform aside { position: static; } }

/* ---------- Locations / contact cards ---------- */
.locations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.location {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
}
.location h3 {
  font-size: 1.2rem;
  font-family: var(--font-serif);
  color: var(--navy-900);
  margin-bottom: 4px;
}
.location .role {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 14px;
}
.location p { color: var(--ink-500); font-size: 0.96rem; margin: 6px 0; }
.location a { color: var(--navy-700); font-weight: 500; }
@media (max-width: 880px) { .locations { grid-template-columns: 1fr; } }

/* ---------- Contact form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.form-field { display: flex; flex-direction: column; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  color: var(--ink-900);
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(199,154,74,.18);
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-consent {
  font-size: 0.85rem;
  color: var(--ink-500);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0 18px;
}
.form-success {
  display: none;
  background: #e9f6ee;
  color: #1f5f3a;
  border: 1px solid #b9e1c6;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.form-success.show { display: block; }

@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff;
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before, .cta-banner::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  border: 1px solid rgba(199,154,74,.2);
  border-radius: 50%;
}
.cta-banner::before { left: -100px; top: -120px; }
.cta-banner::after { right: -120px; bottom: -160px; }
.cta-banner h2 { color: #fff; }
.cta-banner p { max-width: 600px; margin: 0 auto 30px; color: #c2cfe3; }
.cta-banner .container { position: relative; z-index: 2; }

/* ---------- Footer ---------- */
.site-footer {
  background: #061226;
  color: #9aa9c2;
  padding: 70px 0 30px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 50px;
}
.footer-grid h4 {
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.footer-grid a { color: #9aa9c2; }
.footer-grid a:hover { color: var(--gold-400); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 6px 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  color: #6e7d96;
  font-size: 0.85rem;
}

/* Brand del footer — stesso logo dell'header dentro un cerchio bianco */
.brand-footer { color: #fff !important; margin-bottom: 18px; }
.brand-footer:hover { color: #fff !important; text-decoration: none; }
.brand-footer .brand-name { color: #fff; }
.brand-footer .brand-tag  { color: #9aa9c2; }
.brand-logo-wrap {
  width: 56px;
  height: 56px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.brand-logo-wrap::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(199,154,74,.45);
  border-radius: 50%;
  pointer-events: none;
}
.brand-logo-wrap img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  display: block;
}

/* Ruolo accademico nel footer (Direttore UOC...) */
.footer-role {
  margin-top: 18px;
  max-width: 320px;
  color: var(--gold-400, #d8b06b);
  font-size: 0.92rem;
  line-height: 1.55;
  border-left: 2px solid var(--gold-500);
  padding-left: 14px;
  font-style: italic;
}

@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ============================================================
   BOTTONE WHATSAPP FLUTTUANTE
   ============================================================ */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: #fff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4),
              0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 9990;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  animation: whatsapp-pulse 2.4s ease-in-out infinite;
}
.whatsapp-fab:hover {
  background: #1ebe5a;
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.5),
              0 4px 10px rgba(0, 0, 0, 0.18);
  animation: none;
}
.whatsapp-fab:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.whatsapp-fab svg {
  width: 30px;
  height: 30px;
  display: block;
}

/* Pulsante che pulsa lievemente per attirare l'attenzione */
@keyframes whatsapp-pulse {
  0%   { box-shadow: 0 6px 20px rgba(37,211,102,.4),  0 2px 6px rgba(0,0,0,.15), 0 0 0 0   rgba(37,211,102,.45); }
  70%  { box-shadow: 0 6px 20px rgba(37,211,102,.4),  0 2px 6px rgba(0,0,0,.15), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 6px 20px rgba(37,211,102,.4),  0 2px 6px rgba(0,0,0,.15), 0 0 0 0   rgba(37,211,102,0); }
}

/* Tooltip "Contattami su WhatsApp" che appare al hover (desktop) */
.whatsapp-tooltip {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: #0b1d35;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s, transform .25s;
  pointer-events: none;
}
.whatsapp-tooltip::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid #0b1d35;
}
.whatsapp-fab:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Su mobile il bottone è leggermente più piccolo e niente tooltip */
@media (max-width: 720px) {
  .whatsapp-fab {
    width: 54px;
    height: 54px;
    bottom: 18px;
    right: 18px;
  }
  .whatsapp-fab svg { width: 27px; height: 27px; }
  .whatsapp-tooltip { display: none; }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.7,.2,1);
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Helpers ---------- */
.text-center { text-align: center; }
.mt-30 { margin-top: 30px; }
.mt-50 { margin-top: 50px; }
.mb-0 { margin-bottom: 0; }

/* Hero profile strip responsive */
@media (max-width: 880px) {
  body .container > ul.hero-card-list[style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
  }
  body .container > ul.hero-card-list[style*="grid-template-columns:repeat(4"] li {
    border-right: none !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 14px 10px !important;
  }
  body .container > ul.hero-card-list[style*="grid-template-columns:repeat(4"] li:nth-child(odd) {
    border-right: 1px solid var(--line) !important;
  }
  body .container > ul.hero-card-list[style*="grid-template-columns:repeat(4"] li:nth-last-child(-n+2) {
    border-bottom: none !important;
  }
}

/* Publications list */
.pubs {
  display: grid;
  gap: 16px;
}
.pub-item {
  background: #fff;
  border-left: 3px solid var(--gold-500);
  padding: 22px 26px;
  border-radius: 0 var(--radius) var(--radius) 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.pub-item:hover { box-shadow: var(--shadow-sm); border-left-color: var(--gold-600); }
.pub-item .year {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--gold-600);
  text-transform: uppercase;
  font-weight: 600;
}
.pub-item h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--navy-900);
  margin: 6px 0 6px;
  font-weight: 500;
}
.pub-item p { color: var(--ink-500); margin: 0; font-size: 0.93rem; }

/* Society list */
.society-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 28px;
}
.society-grid li {
  list-style: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-700);
  font-size: 0.96rem;
  display: flex; gap: 12px; align-items: flex-start;
}
.society-grid svg { color: var(--gold-600); flex-shrink: 0; margin-top: 3px; }
@media (max-width: 720px) { .society-grid { grid-template-columns: 1fr; } }
