/* ==========================================================
   Sito vetrina — Medico Oculista
   Mobile-first · CSS puro · Palette blu medico / bianco / grigio
   ========================================================== */

:root {
  --primary:       #0d5c9e;
  --primary-dark:  #0a487c;
  --primary-deep:  #0a2540;
  --primary-soft:  #e9f2fa;
  --ink:           #1c2b3a;
  --muted:         #5b6b7c;
  --bg:            #ffffff;
  --bg-alt:        #f4f8fc;
  --line:          #dce7f1;
  --radius:        14px;
  --shadow:        0 4px 18px rgba(13, 92, 158, .10);
  --shadow-lg:     0 10px 30px rgba(10, 37, 64, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.center { text-align: center; }

h1, h2, h3 { line-height: 1.25; color: var(--primary-deep); }
h2 { font-size: 1.6rem; margin-bottom: .8em; }
h3 { font-size: 1.15rem; margin-bottom: .4em; }

.icon {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.icon-muted { color: var(--muted); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .7em 1.3em;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-white { background: #fff; color: var(--primary); box-shadow: var(--shadow-lg); }
.btn-white:hover { background: var(--primary-soft); }

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .55);
}
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.btn-lg { padding: .95em 1.7em; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.logo { display: flex; flex-direction: column; line-height: 1.2; }
.logo-nome { font-weight: 700; color: var(--primary-deep); font-size: 1.02rem; }
.logo-ruolo { font-size: .74rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.main-nav { display: none; }
.main-nav a {
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
  padding: .4em .2em;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.main-nav a:hover { color: var(--primary); border-color: var(--primary); }

.header-cta { padding: .55em 1.05em; font-size: .88rem; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(255,255,255,.16), transparent 60%),
    linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 55%, #1473c4 100%);
  color: #fff;
  padding: 64px 0 72px;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: .6em;
}

.hero-sub {
  font-size: 1.02rem;
  color: rgba(255, 255, 255, .92);
  max-width: 34em;
  margin: 0 auto 1.6em;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  max-width: 340px;
  margin: 0 auto;
}

.hero-note {
  margin-top: 1.4em;
  font-size: .84rem;
  color: rgba(255, 255, 255, .75);
}

/* ---------- Sezioni ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }

.section-lead {
  color: var(--muted);
  max-width: 38em;
  margin: -.4em auto 2em;
  text-align: center;
}

/* ---------- Chi Sono ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.split-img img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 6px solid #fff;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  width: 100%;
  background: var(--primary-soft);
}

.split-text p { margin-bottom: 1em; color: var(--ink); }
.split-text p strong { color: var(--primary-dark); }

.checklist { list-style: none; margin-top: 1.2em; }
.checklist li {
  position: relative;
  padding-left: 1.9em;
  margin-bottom: .55em;
  color: var(--ink);
  font-weight: 500;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .32em;
  width: 1.15em;
  height: 1.15em;
  border-radius: 50%;
  background: var(--primary-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230d5c9e'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E")
    center / .75em no-repeat;
}

/* ---------- Pagine legali ---------- */
.legal { max-width: 760px; }
.legal h1 { font-size: 1.8rem; margin-bottom: .3em; }
.legal-agg { color: var(--muted); font-size: .85rem; margin-bottom: 2em; }
.legal h2 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
.legal p, .legal li { color: var(--ink); font-size: .95rem; margin-bottom: .8em; }
.legal ul { padding-left: 1.2em; margin-bottom: .8em; }
.legal-back { margin-top: 2.5em; font-weight: 600; }

/* ---------- Lo Studio: gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 960px;
  margin: 0 auto;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--primary-soft);
}
.gallery figcaption {
  margin-top: .55em;
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Dove Visito: cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* variante a scheda singola: centrata, larghezza contenuta */
.cards.single {
  grid-template-columns: 1fr;
  max-width: 480px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card h3 { color: var(--primary); font-size: 1.2rem; margin-bottom: 0; }

.card .presso {
  color: var(--primary-dark);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.card .indirizzo {
  color: var(--muted);
  display: flex;
  gap: .5em;
  align-items: flex-start;
  font-size: .97rem;
}
.card .indirizzo .icon { margin-top: .3em; }

.card .tel-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card .tel-list a {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-weight: 600;
  font-size: .97rem;
  color: var(--primary);
}
.card .tel-list a:hover { text-decoration: underline; }

.card .orari {
  color: var(--muted);
  font-size: .93rem;
  display: flex;
  gap: .5em;
  align-items: flex-start;
}
.card .orari .icon { margin-top: .25em; }

/* sedi secondarie: card compatte */
.altre-sedi {
  margin: 2.4em 0 1.1em;
  font-size: 1.15rem;
  color: var(--primary-deep);
}
.cards.mini { max-width: none; }
.card.mini {
  text-align: center;
  padding: 22px 16px;
  gap: 6px;
}
.card.mini h3 { font-size: 1.08rem; }
.card.mini .tel {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--primary);
}
.card.mini .tel:hover { text-decoration: underline; }
.card.mini .mini-note {
  font-size: .8rem;
  color: var(--muted);
}

.maps-link {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.maps-link:hover { text-decoration: underline; }

.card .btn-block { margin-top: auto; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(160deg, var(--primary-deep) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 56px 0;
}
.cta-band h2 { color: #fff; font-size: 1.5rem; margin-bottom: .4em; }
.cta-band p { color: rgba(255,255,255,.85); margin-bottom: 1.6em; }

/* ---------- Footer ---------- */
.site-footer {
  background: #071a2e;
  color: rgba(255, 255, 255, .72);
  font-size: .88rem;
  padding: 40px 0 100px; /* spazio extra in basso per il FAB su mobile */
}
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: underline; text-underline-offset: 2px; }
.site-footer a:hover { color: #fff; }

.footer-nome { color: #fff; font-weight: 600; margin-bottom: .5em; }
.footer-legal, .footer-contatti { margin-bottom: .5em; }
.footer-copy {
  margin-top: 1.4em;
  padding-top: 1.2em;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}

/* ---------- Floating Action Button (solo mobile) ---------- */
.fab {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(10, 37, 64, .38);
  transition: transform .15s ease, background .15s ease;
}
.fab svg { width: 28px; height: 28px; fill: currentColor; }
.fab:hover { background: var(--primary-dark); }
.fab:active { transform: scale(.92); }

/* ==========================================================
   Tablet / Desktop
   ========================================================== */
@media (min-width: 640px) {
  .hero { padding: 88px 0 96px; }
  .hero h1 { font-size: 2.5rem; }
  .hero-sub { font-size: 1.12rem; }
  .hero-cta { flex-direction: row; justify-content: center; max-width: none; }

  h2 { font-size: 1.9rem; }

  .gallery { grid-template-columns: 1fr 1fr; gap: 22px; }

  .cards { grid-template-columns: 1fr 1fr; }
  .cards.mini { grid-template-columns: repeat(3, 1fr); }

  .section { padding: 72px 0; }
  .cta-band h2 { font-size: 1.9rem; }

  .site-footer { padding-bottom: 40px; }
}

@media (min-width: 900px) {
  .main-nav {
    display: flex;
    gap: 28px;
    align-items: center;
  }
  .header-inner { min-height: 72px; }
  .logo-nome { font-size: 1.1rem; }

  .split { grid-template-columns: 5fr 7fr; gap: 48px; }

  .hero h1 { font-size: 2.85rem; }

  /* Il FAB serve solo su mobile: su desktop c'è già il pulsante nell'header */
  .fab { display: none; }
}
