/* ==========================================================================
   Fratila-Blanc — stile medicale, one-page
   Palette: blu petrolio (primario), teal (accento), fondi chiari, card bianche
   ========================================================================== */

:root {
  --fb-primary: #14607a;
  --fb-primary-dark: #0e4a5e;
  --fb-primary-soft: #e3eef4;
  --fb-accent: #2aa6a0;
  --fb-accent-soft: #e2f4f2;
  --fb-bg: #f5f9fb;
  --fb-surface: #ffffff;
  --fb-text: #172a33;
  --fb-muted: #5b6f7a;
  --fb-border: #dbe6ec;
  --fb-danger: #b3261e;
  --fb-success: #1f7a4d;
  --fb-radius: 16px;
  --fb-radius-sm: 10px;
  --fb-shadow: 0 10px 30px rgba(20, 96, 122, 0.08);
  --fb-shadow-sm: 0 2px 8px rgba(20, 96, 122, 0.06);
  --fb-font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fb-header-h: 84px;
  --fb-container: 1160px;
  --fb-gutter: 20px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--fb-header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.fb-body {
  margin: 0;
  font-family: var(--fb-font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--fb-text);
  background: var(--fb-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--fb-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--fb-primary-dark); }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; font-weight: 700; color: var(--fb-text); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
address { font-style: normal; }
small { font-size: 0.875em; color: var(--fb-muted); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--fb-accent); outline-offset: 2px; border-radius: 4px; }

.fb-skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 1000;
  padding: 8px 14px; background: var(--fb-primary); color: #fff; border-radius: 8px;
}
.fb-skip-link:focus { left: 8px; }

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

/* ---------- Componenti ---------- */
.fb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; line-height: 1.2;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.fb-btn:hover { transform: translateY(-1px); }
.fb-btn--primary { background: var(--fb-primary); color: #fff; box-shadow: 0 6px 18px rgba(20, 96, 122, 0.22); }
.fb-btn--primary:hover { background: var(--fb-primary-dark); color: #fff; }
.fb-btn--ghost { background: transparent; color: var(--fb-primary); border-color: var(--fb-border); }
.fb-btn--ghost:hover { border-color: var(--fb-primary); background: var(--fb-surface); }
.fb-btn--lg { padding: 15px 28px; font-size: 1.0625rem; }
.fb-btn:disabled { opacity: .6; cursor: progress; transform: none; }

.fb-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 9px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: .04em;
  background: var(--fb-primary); color: #fff; line-height: 1.3; vertical-align: middle;
}
.fb-badge--outline { background: transparent; color: var(--fb-primary); border: 1.5px solid var(--fb-primary); }
.fb-badge--lg { font-size: 1.125rem; padding: 10px 14px; border-radius: 10px; }

.fb-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 12px; font-size: 0.875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fb-accent);
}
.fb-eyebrow .fb-badge { text-transform: none; letter-spacing: .04em; }

.fb-card {
  background: var(--fb-surface); border: 1px solid var(--fb-border); border-radius: var(--fb-radius);
  padding: 28px; box-shadow: var(--fb-shadow-sm);
}
.fb-card__title { font-size: 1.125rem; margin-bottom: 16px; color: var(--fb-primary-dark); }
.fb-card__note { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--fb-border); font-size: 0.9375rem; color: var(--fb-muted); }

.fb-prose p:last-child { margin-bottom: 0; }
.fb-prose--sm { font-size: 0.9875rem; color: var(--fb-muted); }
.fb-prose h2 { font-size: 1.375rem; margin-top: 1.6em; }
.fb-prose ul { padding-left: 1.2em; margin-bottom: 1em; }
.fb-prose li { margin-bottom: .35em; }

.fb-section { padding: clamp(56px, 8vw, 104px) 0; }
.fb-section--alt { background: var(--fb-surface); border-top: 1px solid var(--fb-border); border-bottom: 1px solid var(--fb-border); }
.fb-section__header { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.fb-section__title { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: 0.4em; }
.fb-section__lead { margin: 0; font-size: 1.125rem; color: var(--fb-muted); }

/* Reveal */
.fb-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.fb-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fb-reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Header ---------- */
.fb-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease, box-shadow .2s ease;
}
.fb-header.is-scrolled { border-bottom-color: var(--fb-border); box-shadow: var(--fb-shadow-sm); }
.fb-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--fb-header-h); }
.fb-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fb-primary-dark); white-space: nowrap; }
.fb-logo:hover { color: var(--fb-primary); }
.fb-logo__img { height: 56px; width: auto; }
.fb-logo__mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--fb-accent); color: #fff; box-shadow: 0 4px 12px rgba(42, 166, 160, 0.35); }
.fb-logo__text { font-size: 1.375rem; letter-spacing: -0.015em; line-height: 1; }
.fb-logo__light { font-weight: 500; }
.fb-logo__text strong, .fb-footer__brand-name strong { font-weight: 700; }
.fb-nav { display: flex; align-items: center; gap: 28px; }
.fb-nav__list { display: flex; align-items: center; gap: 6px; list-style: none; }
.fb-nav__list a {
  display: inline-block; padding: 8px 12px; border-radius: 8px; font-weight: 500; text-decoration: none; color: var(--fb-text);
  transition: background-color .2s ease, color .2s ease;
}
.fb-nav__list a:hover, .fb-nav__list a.is-active, .fb-nav__list .current-menu-item > a { color: var(--fb-primary); background: var(--fb-primary-soft); }
.fb-nav__cta { padding: 10px 18px; font-size: 0.9375rem; }
.fb-burger {
  display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--fb-border); border-radius: 10px;
  background: var(--fb-surface); cursor: pointer; flex-direction: column; justify-content: center; gap: 5px;
}
.fb-burger span { display: block; height: 2px; width: 100%; background: var(--fb-primary-dark); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.fb-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fb-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.fb-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.fb-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(56px, 8vw, 112px) 0 clamp(64px, 9vw, 120px);
  background: var(--fb-bg);
}
.fb-hero__media { position: absolute; inset: 0; z-index: -1; }
.fb-hero__media picture, .fb-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.fb-hero__img { object-fit: cover; object-position: 62% center; }
.fb-hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(245, 249, 251, 0.97) 0%, rgba(245, 249, 251, 0.88) 38%, rgba(245, 249, 251, 0.35) 68%, rgba(245, 249, 251, 0.1) 100%),
    linear-gradient(180deg, rgba(245, 249, 251, 0.35) 0%, rgba(245, 249, 251, 0) 30%, rgba(245, 249, 251, 0) 70%, var(--fb-bg) 100%);
}
.fb-hero__grid { position: relative; }
.fb-hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .9fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.fb-hero__title { font-size: clamp(2.125rem, 4.6vw, 3.5rem); margin-bottom: 0.45em; color: var(--fb-primary-dark); }
.fb-hero__text { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--fb-muted); max-width: 560px; margin-bottom: 1.6em; }
.fb-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.fb-hero__partners { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; list-style: none; }
.fb-hero__partner {
  display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--fb-border); box-shadow: var(--fb-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
a.fb-hero__partner:hover { transform: translateY(-2px); box-shadow: var(--fb-shadow); }
.fb-hero__partner-logo { height: 38px; width: auto; max-width: 200px; object-fit: contain; display: block; }
.fb-hero__card { box-shadow: var(--fb-shadow); background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); border-color: rgba(255, 255, 255, 0.7); }
.fb-dl { margin: 0; display: grid; gap: 14px; }
.fb-dl > div { display: grid; grid-template-columns: minmax(96px, max-content) 1fr; gap: 14px; align-items: start; }
.fb-dl dt { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fb-muted); padding-top: 4px; white-space: nowrap; }
.fb-dl dd { margin: 0; }
.fb-dl__row { display: block; white-space: nowrap; }
.fb-dl a { text-decoration: none; font-weight: 600; white-space: nowrap; }
.fb-dl a:hover { text-decoration: underline; }

/* ---------- Chi siamo ---------- */
.fb-about__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .9fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.fb-about__text .fb-prose { font-size: 1.0625rem; color: var(--fb-text); }
.fb-about__logos { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--fb-border); }
.fb-features--grid { grid-template-columns: 1fr 1fr; margin-top: 28px; }
.fb-fmh { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; color: var(--fb-primary-dark); line-height: 1.25; }
.fb-fmh small { display: block; font-weight: 400; color: var(--fb-muted); }
.fb-about__side { display: grid; gap: 18px; }
.fb-about__figure { position: relative; margin: 0; border-radius: var(--fb-radius); overflow: hidden; box-shadow: var(--fb-shadow); aspect-ratio: 16 / 10; background: var(--fb-primary-soft); }
.fb-about__figure picture, .fb-about__photo { width: 100%; height: 100%; }
.fb-about__photo { object-fit: cover; display: block; transition: transform .8s ease; }
.fb-about__figure:hover .fb-about__photo { transform: scale(1.03); }
.fb-about__caption {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; color: var(--fb-primary-dark);
  background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.fb-about__caption svg { color: var(--fb-accent); }
.fb-features { list-style: none; display: grid; gap: 10px; }
.fb-features li {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; line-height: 1.45; border-radius: var(--fb-radius-sm);
  background: var(--fb-surface); border: 1px solid var(--fb-border); font-size: 0.9875rem;
}
.fb-features svg { flex: none; margin-top: 2px; color: var(--fb-accent); }

/* ---------- Medici ---------- */
.fb-staff__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.fb-doctor { display: flex; gap: 22px; align-items: flex-start; }
.fb-doctor__photo { flex: none; width: 112px; height: 112px; position: relative; }
.fb-doctor__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 4px solid var(--fb-surface); box-shadow: var(--fb-shadow-sm); }
.fb-doctor__avatar {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(120% 120% at 25% 20%, #3aa9c4 0%, var(--fb-primary) 55%, var(--fb-primary-dark) 100%);
  box-shadow: 0 10px 24px rgba(20, 96, 122, 0.28), inset 0 0 0 4px rgba(255, 255, 255, 0.85), inset 0 0 0 5px rgba(20, 96, 122, 0.15);
}
.fb-doctor__avatar::after {
  content: ""; position: absolute; inset: 12px; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.fb-doctor__initials { font-size: 2rem; font-weight: 700; letter-spacing: 0.04em; color: #fff; line-height: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.fb-doctor__mark {
  position: absolute; right: -2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--fb-accent); color: #fff; border: 3px solid var(--fb-surface); box-shadow: var(--fb-shadow-sm);
}
.fb-doctor__name { font-size: 1.25rem; margin-bottom: 4px; }
.fb-doctor__role { color: var(--fb-muted); font-size: 0.9375rem; margin-bottom: 14px; }
.fb-doctor__label { margin: 0 0 6px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--fb-muted); }
.fb-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.fb-chips li { padding: 4px 10px; border-radius: 999px; background: var(--fb-accent-soft); color: var(--fb-primary-dark); font-size: 0.8125rem; font-weight: 600; }
.fb-doctor__pdf { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--fb-border); }
.fb-doctor__pdf:hover { border-color: var(--fb-primary); background: var(--fb-primary-soft); }

/* ---------- Dove siamo ---------- */
.fb-where__grid { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.2fr); gap: 24px; align-items: stretch; }
.fb-where__card { display: flex; flex-direction: column; gap: 22px; }
.fb-contact-list { list-style: none; display: grid; gap: 18px; }
.fb-contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.fb-contact-list__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--fb-primary-soft); color: var(--fb-primary); }
.fb-contact-list__label { display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--fb-muted); margin-bottom: 2px; }
.fb-contact-list a { text-decoration: none; font-weight: 600; }
.fb-contact-list a[href^="tel:"], .fb-footer__list a[href^="tel:"] { white-space: nowrap; }
.fb-contact-list a:hover { text-decoration: underline; }
.fb-where__card .fb-btn { align-self: flex-start; margin-top: auto; }
.fb-map { border-radius: var(--fb-radius); overflow: hidden; border: 1px solid var(--fb-border); box-shadow: var(--fb-shadow-sm); min-height: 360px; background: var(--fb-primary-soft); }
.fb-map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* ---------- Contatti / form ---------- */
.fb-contact__grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.fb-contact__intro p { color: var(--fb-muted); }
.fb-contact__privacy-note { padding: 12px 14px; border-radius: var(--fb-radius-sm); background: var(--fb-accent-soft); color: var(--fb-primary-dark) !important; font-size: 0.9375rem; }
.fb-contact__card { display: flex; flex-direction: column; gap: 24px; }
.fb-contact__card .fb-btn { align-self: flex-start; }
.fb-contact__email { font-size: 1.125rem; word-break: break-all; }
.fb-contact-list small { display: block; margin-top: 2px; }

/* ---------- Pagina standard ---------- */
.fb-page { padding: clamp(40px, 6vw, 80px) 0; }
.fb-page__inner { max-width: 800px; }
.fb-page__header { margin-bottom: 28px; }
.fb-page__title { font-size: clamp(1.875rem, 3.5vw, 2.75rem); }
.fb-page__back { margin-top: 40px; }
.fb-legal__updated { color: var(--fb-muted); font-size: 0.9375rem; }

/* ---------- Footer ---------- */
.fb-footer { background: var(--fb-primary-dark); color: #d9e7ee; padding: clamp(40px, 6vw, 72px) 0 28px; }
.fb-footer a { color: #fff; text-decoration: none; }
.fb-footer a:hover { text-decoration: underline; }
.fb-footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 36px; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.fb-footer__logo { height: 52px; width: auto; background: #fff; padding: 8px 12px; border-radius: 10px; margin-bottom: 14px; }
.fb-footer__brand-name { display: inline-flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 500; color: #fff; margin-bottom: 10px; white-space: nowrap; }
.fb-logo__mark--footer { width: 30px; height: 30px; box-shadow: none; }
.fb-footer__tagline { margin-bottom: 14px; }
.fb-footer__fmh { display: inline-flex; align-items: center; gap: 14px; margin: 0; font-size: 0.9375rem; text-decoration: none; color: #fff; }
.fb-footer__fmh:hover { text-decoration: none; }
.fb-footer__fmh:hover .fb-footer__fmh-chip { transform: translateY(-1px); }
.fb-footer__fmh-chip { display: inline-flex; align-items: center; background: #fff; border-radius: 10px; padding: 8px 12px; transition: transform .2s ease; }
.fb-footer__fmh-chip img { height: 32px; width: auto; display: block; }
.fb-footer__fmh-text { line-height: 1.3; font-weight: 600; }
.fb-footer__fmh-text small { display: block; font-weight: 400; color: rgba(217, 231, 238, 0.75); }
.fb-footer__title { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin-bottom: 14px; }
.fb-footer__list { list-style: none; display: grid; gap: 8px; font-size: 0.9875rem; }
.fb-footer__muted { color: rgba(217, 231, 238, 0.7); }
.fb-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-top: 22px; font-size: 0.875rem; }
.fb-footer__copy { margin: 0; }
.fb-footer__legal { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .fb-hero__grid, .fb-about__grid, .fb-where__grid, .fb-contact__grid { grid-template-columns: 1fr; }
  .fb-hero__overlay { background: linear-gradient(180deg, rgba(245, 249, 251, 0.9) 0%, rgba(245, 249, 251, 0.8) 55%, var(--fb-bg) 100%); }
  .fb-hero__img { object-position: 70% center; }
  .fb-footer__grid { grid-template-columns: 1fr 1fr; }
  .fb-nav__list a { padding: 8px 10px; }
}
@media (max-width: 860px) {
  :root { --fb-header-h: 72px; }
  .fb-logo__img { height: 46px; }
  .fb-logo__text { font-size: 1.125rem; }
  .fb-logo__mark { width: 30px; height: 30px; }
  .fb-burger { display: flex; }
  .fb-nav {
    position: fixed; inset: var(--fb-header-h) 0 auto 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 8px;
    padding: 16px var(--fb-gutter) 24px; background: var(--fb-surface); border-bottom: 1px solid var(--fb-border); box-shadow: var(--fb-shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .fb-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .fb-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .fb-nav__list a { display: block; padding: 12px 14px; font-size: 1.0625rem; }
  .fb-nav__cta { justify-content: center; margin-top: 8px; }
  .fb-doctor { flex-direction: column; align-items: flex-start; }
  .fb-features--grid { grid-template-columns: 1fr; }
  .fb-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .fb-dl__row, .fb-dl a { white-space: normal; }
}
@media (max-width: 600px) {
  :root { --fb-gutter: 16px; }
  .fb-card { padding: 22px; }
  .fb-footer__grid { grid-template-columns: 1fr; }
  .fb-hero__actions .fb-btn { width: 100%; }
  .fb-hero__partner-logo { height: 30px; }
  .fb-logo__text { font-size: 1rem; }
  .fb-footer__brand-name { white-space: normal; }
  .fb-map, .fb-map iframe { min-height: 280px; }
}
@media print {
  .fb-header, .fb-burger, .fb-map, .fb-footer__legal { display: none !important; }
  body.fb-body { background: #fff; }
}
