/* ============================================
   Dott. Marco Gioia — Oculista — stile sito
   ============================================ */

:root {
  --teal-900: #0b3d42;
  --teal-700: #0f5c63;
  --teal-600: #147a83;
  --teal-500: #1a939d;
  --teal-100: #e4f3f3;
  --teal-50:  #f3f9f9;
  --ink:      #1f2d2f;
  --ink-soft: #4a5a5c;
  --paper:    #ffffff;
  --line:     #e1eceb;
  --gold:     #c9a15a;
  --shadow:   0 10px 30px rgba(11, 61, 66, 0.08);
  --radius:   14px;
  --maxw:     1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--teal-900);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { color: var(--ink-soft); margin: 0 0 1em; }

a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--teal-900); }

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

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

/* ---------- Top contact bar ---------- */
.topbar {
  background: var(--teal-900);
  color: #cfe9e9;
  font-size: .88rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a { color: #eaf6f6; font-weight: 600; }
.topbar a:hover { color: var(--gold); }
.topbar-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Header / Nav ---------- */
header.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  z-index: 50;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  color: var(--teal-900);
  font-weight: 600;
}
.brand small {
  display: block;
  font-family: "Source Sans 3", Arial, sans-serif;
  font-weight: 400;
  font-size: .72rem;
  color: var(--ink-soft);
  letter-spacing: .04em;
}
.brand .logo-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--teal-100);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand .logo-mark svg { width: 22px; height: 22px; }
.brand-logo-img {
  height: 46px;
  width: auto;
  display: block;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0; padding: 0;
}
nav.main-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--teal-700);
  border-bottom-color: var(--gold);
}
.nav-cta {
  display: flex; gap: 10px; align-items: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle svg { width: 20px; height: 20px; color: var(--teal-900); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal-600);
  color: #fff;
}
.btn-primary:hover { background: var(--teal-900); color: #fff; }
.btn-whatsapp {
  background: #25d366;
  color: #fff;
}
.btn-whatsapp:hover { background: #1ea952; color: #fff; }
.btn-outline {
  background: transparent;
  border-color: var(--teal-600);
  color: var(--teal-700);
}
.btn-outline:hover { background: var(--teal-50); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--teal-50) 0%, #fff 55%);
  padding: 64px 0 56px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  background: var(--teal-100);
  color: var(--teal-700);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 { margin-bottom: 10px; }
.hero .subtitle {
  font-size: 1.15rem;
  color: var(--teal-700);
  font-weight: 600;
  margin-bottom: 18px;
}
.hero .lead { font-size: 1.05rem; max-width: 52ch; }
.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 26px;
}
.hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.hero-card ul { margin: 0; padding: 0; list-style: none; }
.hero-card li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
  color: var(--ink);
}
.hero-card li:last-child { border-bottom: none; }
.hero-card .ico {
  width: 22px; height: 22px; flex-shrink: 0; color: var(--teal-600); margin-top: 2px;
}

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-alt { background: var(--teal-50); }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head p { margin: 0 auto; }

/* ---------- Services grid ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  height: 100%;
}
.card .ico-wrap {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--teal-100);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card .ico-wrap svg { width: 26px; height: 26px; color: var(--teal-700); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .95rem; margin-bottom: 0; }
.card a.card-link { font-weight: 700; font-size: .9rem; display: inline-block; margin-top: 12px; }

/* ---------- Credentials strip ---------- */
.credentials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: center;
}
.credentials .stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 12px;
}
.credentials .stat .num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  color: var(--teal-700);
  font-weight: 700;
}
.credentials .stat .lbl {
  font-size: .85rem;
  color: var(--ink-soft);
}

/* ---------- Timeline (Chi sono) ---------- */
.timeline {
  border-left: 3px solid var(--teal-100);
  margin-left: 6px;
  padding-left: 28px;
}
.timeline-item { position: relative; padding-bottom: 30px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--teal-600);
  border: 3px solid var(--teal-100);
}
.timeline-item .when {
  font-size: .82rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.timeline-item h3 { margin: 4px 0 6px; }

/* ---------- Bio layout ---------- */
.bio-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.bio-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, var(--teal-100), var(--teal-50));
  display: flex;
  align-items: center;
  justify-content: center;
}
.bio-photo svg { width: 40%; height: 40%; color: var(--teal-500); opacity: .55; }
.bio-photo img { width: 100%; height: 100%; object-fit: cover; }

.sci-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 48px;
  align-items: center;
}
.sci-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.sci-photo img { width: 100%; display: block; }
.sci-photo figcaption {
  padding: 14px 18px;
  font-size: .85rem;
  color: var(--ink-soft);
  background: var(--paper);
  border-top: 1px solid var(--line);
}
@media (max-width: 960px) {
  .sci-grid { grid-template-columns: 1fr; }
}

.pill-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.pill {
  background: var(--teal-100);
  color: var(--teal-800, var(--teal-700));
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--teal-900);
  color: #eaf6f6;
  border-radius: var(--radius);
  padding: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: #fff; margin-bottom: 6px; }
.cta-banner p { color: #cfe9e9; margin-bottom: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.contact-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row:last-child { border-bottom: none; }
.contact-row .ico {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-row .ico svg { width: 20px; height: 20px; }
.contact-row .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); font-weight: 700; }
.contact-row .value { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  height: 100%;
  min-height: 320px;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ---------- Viaggio 3D dentro l'occhio ---------- */
.eye-journey {
  position: relative;
  height: 350vh;
  background: #0a1210;
}
.eye-journey-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, #142522 0%, #0a1210 70%);
}
.eye-stage-wrap {
  perspective: 900px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.eye-stage {
  position: relative;
  width: min(62vmin, 460px);
  height: min(62vmin, 460px);
  transform-style: preserve-3d;
}
.eye-tunnel-vignette {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(10,18,16,0) 38%, rgba(10,18,16,0.55) 68%, rgba(10,18,16,0.96) 100%);
}

.layer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  backface-visibility: hidden;
  will-change: transform, opacity;
  opacity: 0;
}

/* Ogni strato è un'immagine anatomica realistica (SVG) */
.layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* Palpebre */
.lid {
  position: absolute;
  left: -2%;
  right: -2%;
  height: 54%;
  background: linear-gradient(180deg, #e3b08c 0%, #c98a63 60%, #a96b48 100%);
  z-index: 5;
}
.lid-top {
  top: -2%;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  transform-origin: top center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}
.lid-bottom {
  bottom: -2%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform-origin: bottom center;
  box-shadow: 0 -6px 14px rgba(0,0,0,0.35);
}

/* Didascalie */
.eye-caption {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  text-align: center;
  color: #eaf6f6;
  max-width: 560px;
  padding: 0 24px;
  transition: opacity .4s ease;
}
.eye-caption .eyebrow {
  background: rgba(255,255,255,0.12);
  color: #cfe9e9;
}
.eye-caption h2 { color: #fff; margin-bottom: 0; font-size: clamp(1.2rem, 3vw, 1.7rem); }
.eye-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%);
  color: #a9d3d3;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: opacity .4s ease;
}
.eye-scroll-hint span {
  display: inline-block;
  animation: hintBounce 1.6s ease-in-out infinite;
}
@keyframes hintBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (max-width: 720px) {
  .eye-journey { height: 300vh; }
  .eye-caption { bottom: 12%; }
}

@media (prefers-reduced-motion: reduce) {
  .eye-journey { height: auto; }
  .eye-journey-sticky { position: relative; height: 70vh; }
}

/* ---------- Galleria congressi ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item {
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--teal-100);
  aspect-ratio: 4/3;
  display: block;
  width: 100%;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px;
  font-size: .82rem;
  color: #fff;
  text-align: left;
  background: linear-gradient(180deg, rgba(11,61,66,0) 0%, rgba(11,61,66,0.82) 100%);
}
.gallery-item:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 24, 24, 0.92);
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-caption {
  position: absolute;
  bottom: 22px;
  left: 0; right: 0;
  text-align: center;
  color: #eaf6f6;
  font-size: .95rem;
  padding: 0 20px;
}
.lightbox-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.24); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.24); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .lightbox-nav { width: 44px; height: 44px; font-size: 1.4rem; }
}
@media (max-width: 460px) {
  .gallery { grid-template-columns: 1fr; }
}

/* ---------- Feed / Novità (stile social) ---------- */
.feed {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 10px;
}
.post-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--teal-100);
  padding: 6px;
  flex-shrink: 0;
  object-fit: contain;
}
.post-name {
  font-weight: 700;
  color: var(--ink);
  font-size: .95rem;
}
.post-meta {
  font-size: .8rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.post-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
}
.badge-novita { background: var(--teal-600); }
.badge-evento { background: var(--gold); color: #3a2c0f; }
.badge-pubblicazione { background: #3b6fa0; }
.post-body { padding: 4px 18px 16px; }
.post-body h3 { margin-bottom: 6px; font-size: 1.1rem; }
.post-body p { margin-bottom: 0; }
.post-image img { width: 100%; display: block; }
.post-footer {
  padding: 12px 18px 18px;
}
.post-footer a { font-weight: 700; font-size: .9rem; }
.feed-intro { max-width: 640px; margin: 0 auto 32px; text-align: center; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--teal-900);
  color: #b9d9d9;
  padding: 48px 0 24px;
  margin-top: 40px;
}
footer.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
footer.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
footer.site-footer a { color: #b9d9d9; }
footer.site-footer a:hover { color: #fff; }
footer.site-footer ul { list-style: none; margin: 0; padding: 0; }
footer.site-footer li { margin-bottom: 8px; }
.footer-bottom {
  padding-top: 20px;
  font-size: .82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #8bb4b4;
}

/* ---------- Sticky mobile call bar ---------- */
.sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: none;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(0,0,0,.08);
  padding: 10px 16px;
  gap: 10px;
  z-index: 60;
}
.sticky-cta .btn { flex: 1; justify-content: center; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .bio-grid { grid-template-columns: 1fr; }
  .bio-photo { max-width: 320px; margin: 0 auto 24px; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
}

@media (max-width: 720px) {
  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px 24px 16px;
  }
  nav.main-nav.nav-open { display: block; }
  nav.main-nav ul {
    flex-direction: column;
    gap: 4px;
  }
  nav.main-nav a {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
  }
  .menu-toggle { display: flex; }
  .nav-cta .btn span.long { display: none; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .credentials { grid-template-columns: 1fr 1fr; }
  .cta-banner { flex-direction: column; text-align: center; }
  footer.site-footer .footer-grid { grid-template-columns: 1fr; }
  .sticky-cta { display: flex; }
  body { padding-bottom: 66px; }
  .topbar .container { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .credentials { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   PREMIUM ENHANCEMENTS — livello estetico elevato
   ========================================================================== */

:root {
  --shadow-sm: 0 2px 8px rgba(11,61,66,0.06);
  --shadow-md: 0 12px 30px rgba(11,61,66,0.10);
  --shadow-lg: 0 30px 70px rgba(11,61,66,0.16);
  --gold-soft: #e6c98a;
  --ease: cubic-bezier(.2,.7,.2,1);
}

::selection { background: var(--teal-100); color: var(--teal-900); }

html { scroll-padding-top: 92px; }

body {
  font-size: 1.02rem;
  background:
    radial-gradient(1200px 600px at 85% -5%, rgba(20,122,131,0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(201,161,90,0.05), transparent 55%),
    var(--paper);
}

h1, h2, h3, h4 { letter-spacing: -0.015em; }
h1 { letter-spacing: -0.025em; line-height: 1.08; }

/* ---------- Refined section headers with accent ---------- */
.section-head h2 { position: relative; }
.section-head h2::after {
  content: "";
  display: block;
  width: 56px; height: 3px;
  margin: 16px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft) 60%, transparent);
}
.section-head[style*="left"] h2::after { margin-left: 0; margin-right: auto; }

/* ---------- Elevated buttons ---------- */
.btn {
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), background .28s var(--ease), color .2s ease;
  letter-spacing: .01em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--teal-600) 0%, var(--teal-700) 100%);
  box-shadow: 0 10px 24px rgba(15,92,99,0.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--teal-700) 0%, var(--teal-900) 100%);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(11,61,66,0.34);
}
.btn-whatsapp { box-shadow: 0 10px 24px rgba(37,211,102,0.28); }
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(30,169,82,0.36); }
.btn-outline:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Cards with hover lift + accent line ---------- */
.card {
  position: relative;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-500), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card:hover::before { transform: scaleX(1); }
.card .ico-wrap { transition: transform .35s var(--ease), background .35s var(--ease); }
.card:hover .ico-wrap { transform: scale(1.08) rotate(-4deg); background: var(--teal-600); }
.card:hover .ico-wrap svg { color: #fff; }

/* ---------- Hero polish ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #eef7f7 0%, #ffffff 58%);
}
.hero::before {
  content: "";
  position: absolute;
  width: 620px; height: 620px;
  right: -160px; top: -220px;
  background: radial-gradient(circle, rgba(20,122,131,0.14), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  left: -160px; bottom: -200px;
  background: radial-gradient(circle, rgba(201,161,90,0.12), transparent 66%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
  animation: floatCard 7s ease-in-out infinite;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(160deg, rgba(201,161,90,0.5), rgba(20,122,131,0.18), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .hero-card { animation: none; } }
.eyebrow {
  box-shadow: inset 0 0 0 1px rgba(20,122,131,0.12);
}

/* ---------- Section-alt depth ---------- */
.section-alt { position: relative; overflow: hidden; }
.section-alt::before {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  right: -180px; top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(20,122,131,0.06), transparent 70%);
  pointer-events: none;
}

/* ---------- Credentials / stat tiles ---------- */
.credentials .stat {
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  background: linear-gradient(180deg, #ffffff, #fbfdfd);
}
.credentials .stat:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.credentials .stat .num {
  background: linear-gradient(135deg, var(--teal-600), var(--teal-900));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Timeline refinement ---------- */
.timeline { border-left-color: transparent; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: -1px; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--teal-500), var(--teal-100));
  border-radius: 3px;
}
.timeline-item::before {
  box-shadow: 0 0 0 4px rgba(20,122,131,0.10);
  transition: transform .3s var(--ease);
}
.timeline-item:hover::before { transform: scale(1.35); }

/* ---------- Nav underline animation ---------- */
nav.main-nav a { position: relative; border-bottom: none; }
nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}
nav.main-nav a:hover::after,
nav.main-nav a.active::after { transform: scaleX(1); transform-origin: left; }
nav.main-nav a.active { color: var(--teal-700); }

/* ---------- Links / CTA banner shine ---------- */
.cta-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-900) 0%, #0e4a50 55%, var(--teal-700) 100%);
}
.cta-banner::before {
  content: "";
  position: absolute;
  width: 360px; height: 360px;
  right: -80px; top: -120px;
  background: radial-gradient(circle, rgba(201,161,90,0.18), transparent 70%);
  pointer-events: none;
}

/* ---------- Post cards hover ---------- */
.post-card { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ---------- Footer polish ---------- */
footer.site-footer {
  background:
    radial-gradient(700px 300px at 80% 0%, rgba(20,122,131,0.25), transparent 60%),
    var(--teal-900);
}
footer.site-footer a { transition: color .2s ease, padding-left .2s ease; }
footer.site-footer li a:hover { padding-left: 4px; }

/* ---------- Reveal on scroll ---------- */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}
html.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Smooth image loading ---------- */
.gallery-item img, .sci-photo img, .post-image img { backface-visibility: hidden; }

/* ---------- Chi sono: fundus hero ---------- */
.bio-photo-fundus {
  margin: 0;
  aspect-ratio: 4/5;
  position: relative;
  background: #160702;
}
.bio-photo-fundus img { width: 100%; height: 100%; object-fit: cover; }
.bio-photo-fundus figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30px 18px 16px;
  color: #fff;
  font-size: .86rem;
  background: linear-gradient(180deg, rgba(11,61,66,0) 0%, rgba(11,61,66,0.78) 100%);
}
