/* ==========================================================================
   Studio Medico Lintas — design tokens & base  (palette blu del brand)
   ========================================================================== */
:root {
  --bg:        #ffffff;
  --bg-soft:   #f3f8fc;
  --bg-tint:   #eaf4fb;
  --ink:       #142433;
  --ink-soft:  #2f4456;
  --muted:     #5f7388;
  --line:      #e0e9f1;

  --primary:   #0e76bc;   /* blu Lintas */
  --primary-d: #0a5a90;
  --accent:    #1fa6e0;   /* azzurro caduceo */
  --accent-d:  #1689bd;

  --wa:        #25d366;
  --wa-d:      #1eb858;

  --shadow-sm: 0 1px 2px rgba(20,36,51,.06), 0 2px 8px rgba(20,36,51,.05);
  --shadow-md: 0 10px 34px rgba(14,118,188,.14);

  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1140px;

  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; color: var(--ink); margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; color: var(--ink-soft); }

a { color: var(--primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--primary-d); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }

.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent-d); margin-bottom: 14px;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--primary-d); color: #fff; box-shadow: var(--shadow-md); }
.btn--ghost { background: #fff; color: var(--primary); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--primary); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-d); color: #fff; }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 44px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { color: var(--ink-soft); font-weight: 500; font-size: .98rem; }
.nav__links a:hover, .nav__links a.is-active { color: var(--primary); }
.nav__links .btn { padding: 9px 20px; }
/* il bottone vince sulla regola .nav__links a (testo sempre bianco sul blu) */
.nav__links a.btn--primary,
.nav__links a.btn--primary:hover { color: #fff; }

@media (max-width: 760px) {
  .nav__links a:not(.btn) { display: none; }
  .brand img { height: 38px; }
}

/* ==========================================================================
   Hero  (foto della dottoressa come sfondo)
   ========================================================================== */
.hero {
  position: relative; color: #fff;
  background-color: #0a5a90;
  background-size: cover; background-position: center 28%;
  /* fallback JPEG, poi override WebP per i browser che lo supportano */
  background-image: linear-gradient(180deg, rgba(10,55,90,.72), rgba(10,55,90,.84)), url('/assets/slider-hero.jpg');
  background-image: linear-gradient(180deg, rgba(10,55,90,.72), rgba(10,55,90,.84)),
                    image-set(url('/assets/slider-hero.webp') type('image/webp'),
                              url('/assets/slider-hero.jpg') type('image/jpeg'));
}
.hero__inner { position: relative; z-index: 1; padding: 110px 0 100px; max-width: 760px; }
.hero__kicker { font-size: .85rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #bfe2f7; margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 6vw, 3.5rem); overflow-wrap: break-word; }
.hero h1 span { color: #7fd0f5; }
.hero p { color: rgba(255,255,255,.9); font-size: 1.18rem; margin: 16px 0 30px; max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ==========================================================================
   Highlights slider (band, dati da DB)
   ========================================================================== */
.hl {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border-radius: 20px;
}
.hl__viewport { overflow: hidden; }
.hl__track { display: flex; margin: 0; padding: 0; list-style: none; transition: transform .5s ease; }
.hl__slide {
  flex: 0 0 100%; min-width: 0;
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  padding: 34px 56px;
}
.hl__icon { flex: none; width: 60px; height: 60px; border-radius: 16px; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.hl__body { flex: 1; min-width: 200px; }
.hl__title { color: #fff; margin: 0 0 4px; font-size: 1.5rem; }
.hl__text { color: rgba(255,255,255,.9); margin: 0; }
.hl__slide .btn { margin-left: auto; }
.hl__slide .btn--ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.5); }
.hl__slide .btn--ghost:hover { background: rgba(255,255,255,.24); color: #fff; }

.hl__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.18); display: grid; place-items: center;
  transition: background .15s ease;
}
.hl__nav:hover { background: rgba(255,255,255,.32); }
.hl__nav--prev { left: 12px; }
.hl__nav--next { right: 12px; }

.hl__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; }
.hl__dot { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: rgba(255,255,255,.45); transition: background .15s ease, width .2s ease; }
.hl__dot.is-active { background: #fff; width: 22px; border-radius: 5px; }

@media (prefers-reduced-motion: reduce) {
  .hl__track { transition: none; }
}

/* ==========================================================================
   Section head + generic grids/cards
   ========================================================================== */
.section__head { max-width: 680px; margin: 0 auto 50px; text-align: center; }
.section__head .lead { margin: 0 auto; }

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__icon {
  width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center;
  margin-bottom: 16px; background: var(--bg-tint); color: var(--primary);
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: .96rem; }
.card__tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-d); margin-bottom: 8px; }

/* full diet list pills */
.pills { list-style: none; margin: 26px auto 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 760px; }
.pills li { font-size: .9rem; font-weight: 500; color: var(--primary-d); background: var(--bg-tint); border: 1px solid var(--line); padding: 7px 16px; border-radius: 999px; }

/* ==========================================================================
   Foto dello studio (le due foto della home)
   ========================================================================== */
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.photo { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; transition: transform .4s ease; }
.photo:hover img { transform: scale(1.04); }
.photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px;
  background: linear-gradient(transparent, rgba(10,55,90,.78)); color: #fff; font-weight: 500; font-size: .95rem;
}

/* ==========================================================================
   Sintomi / Test cards (icon + title + desc, compact)
   ========================================================================== */
.tile { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.tile__icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-tint); color: var(--primary); }
.tile h3 { font-size: 1.02rem; margin: 0 0 3px; }
.tile p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ==========================================================================
   Contatti + form
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; align-items: start; }
.contact-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 18px; }
.contact-item { display: flex; gap: 15px; align-items: flex-start; }
.contact-item__icon { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-tint); color: var(--primary); }
.contact-item__label { font-size: .76rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.contact-item__value { font-size: 1.05rem; color: var(--ink); font-weight: 500; }
.contact-item__value a { color: var(--ink); }
.contact-item__value a:hover { color: var(--primary); }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-md); }
.form h3 { margin-bottom: 6px; }
.form .field { margin-bottom: 16px; }
.form label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; font: inherit; color: var(--ink); padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fcfdfe; transition: border-color .15s ease, box-shadow .15s ease;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,166,224,.15); }
.form textarea { resize: vertical; min-height: 120px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form button { width: 100%; justify-content: center; }
.form__note { font-size: .82rem; color: var(--muted); margin: 12px 0 0; }
.form__msg { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .92rem; display: none; }
.form__msg.is-ok  { display: block; background: #e7f7ee; color: #157347; border: 1px solid #b6e6c9; }
.form__msg.is-err { display: block; background: #fdeaea; color: #b42318; border: 1px solid #f3c5c0; }

.map { border: 0; width: 100%; min-height: 320px; border-radius: var(--radius); box-shadow: var(--shadow-md); margin-top: 36px; }

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

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #0c2233; color: #b9cad7; padding: 56px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 40px; margin-bottom: 34px; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: #b9cad7; }
.site-footer a:hover { color: #fff; }
.footer-about img { height: 40px; margin-bottom: 14px; filter: brightness(0) invert(1); opacity: .92; }
.footer-about p { color: #8ba3b5; font-size: .94rem; max-width: 40ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: #7d96a8; }

/* Floating WhatsApp ---------------------------------------------------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.45); transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.07); color: #fff; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Pagina 404 ----------------------------------------------------------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound__code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 700; line-height: 1; color: var(--primary); letter-spacing: -.03em; }
.notfound h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 8px 0 12px; }
.notfound p { max-width: 46ch; margin: 0 auto 26px; }
.notfound__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Responsive ----------------------------------------------------------- */
@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .photos { grid-template-columns: 1fr; }
  .hl__slide { padding: 26px 22px 42px; gap: 16px; }
  .hl__slide .btn { margin-left: 0; width: 100%; justify-content: center; }
  .hl__nav { display: none; } /* su mobile: dot + swipe */
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
