/* =========================================================
   K-VetPhysio — styles (modern refresh of the original site)
   Warm cream base, mint and teal bands, rounded photos,
   pill buttons. Font: Poppins (as in the original site).
   ========================================================= */
:root {
  --cream: #fefff6;
  --mint: #7bbb96;
  --mint-light: #e5f1e8;
  --sage: #539b8b;
  --teal: #0c746a;
  --petrol: #005959;
  --ink: #0b4a47;
  --gold: #d2a24c;
  --radius: 22px;
  --width: 1180px;
  --font: "Poppins", -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
/* <picture> wrappers (responsive photos) must not change the layout */
picture { display: contents; }
picture > source { display: none; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; letter-spacing: -0.015em; }
b, strong { font-weight: 600; }

.wrap { width: min(var(--width), 100% - 3rem); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(254, 255, 246, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(11, 74, 71, 0.08);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 78px; }
.brand img { width: 170px; height: auto; }
.menu ul { list-style: none; display: flex; align-items: center; gap: 1.8rem; margin: 0; padding: 0; }
.menu a { text-decoration: none; font-size: 0.95rem; font-weight: 400; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.menu a:hover { border-color: var(--mint); }
.menu a[aria-current="page"] { font-weight: 600; border-color: var(--mint); }
.menu li:last-child a { background: var(--gold); color: #fff; padding: 0.55rem 1.3rem; border-radius: 999px; border: 0; font-weight: 500; }
.menu li:last-child a:hover { filter: brightness(1.06); }
.menu-apri { display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer; color: var(--ink); }
.menu-apri svg { width: 28px; height: 28px; }
@media (max-width: 900px) {
  .menu-apri { display: block; }
  .menu { position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08); display: none; }
  .menu.aperto { display: block; }
  .menu ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1.5rem 1.25rem; }
  .menu a { display: block; padding: 0.75rem 0; border: 0; font-size: 1.05rem; }
  .menu li:last-child a { display: inline-block; margin-top: 0.5rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.9rem 2rem; border-radius: 999px;
  background: var(--teal); color: #fff; text-decoration: none;
  font-weight: 500; font-size: 1rem; line-height: 1.2;
  transition: transform 0.15s, filter 0.15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.gold { background: var(--gold); }
.btn.white { background: #fff; color: var(--petrol); }
.btn:focus-visible, .menu a:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Hero: full-width photo, petrol gradient, left-aligned title ---------- */
.hero {
  position: relative;
  min-height: min(82vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.hero.short { min-height: min(70vh, 600px); }
.hero img.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    /* bottom edge melts into the teal band below the photo */
    linear-gradient(0deg, rgb(12, 116, 106) 0%, rgba(12, 116, 106, 0.75) 4%, rgba(12, 116, 106, 0) 14%),
    /* petrol shade on the left keeps the title readable */
    linear-gradient(90deg, rgba(5, 45, 43, 0.8) 0%, rgba(5, 45, 43, 0.32) 45%, rgba(5, 45, 43, 0) 70%),
    linear-gradient(0deg, rgba(5, 45, 43, 0.45) 0%, rgba(5, 45, 43, 0) 45%);
}
.hero .band-title {
  width: min(var(--width), 100% - 3rem);
  margin: 0 auto;
  padding-bottom: clamp(2.5rem, 8vh, 5rem);
}
.hero .band-title .icon { width: 64px; margin-bottom: 1.1rem; }
.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.hero .subtitle {
  margin-top: 0.9rem;
  max-width: 34ch;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  font-weight: 300;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
}
.hero .white-brand {
  position: absolute;
  top: 1.25rem;
  left: max(1.5rem, calc((100% - var(--width)) / 2));
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  font-weight: 600;
  color: var(--cream);
}
.hero .white-brand img { width: 52px; }
.hero .subtitle br { display: none; }
@media (max-width: 600px) {
  .hero::after {
    background:
      linear-gradient(0deg, rgb(12, 116, 106) 0%, rgba(12, 116, 106, 0.75) 3%, rgba(12, 116, 106, 0) 12%),
      linear-gradient(0deg, rgba(5, 45, 43, 0.75) 0%, rgba(5, 45, 43, 0.2) 60%, rgba(5, 45, 43, 0) 80%);
  }
}
/* One short entrance when the page opens (off for people who prefer less motion) */
@media (prefers-reduced-motion: no-preference) {
  .hero img.photo { animation: hero-zoom 2.4s cubic-bezier(.2, .7, .2, 1) both; }
  .hero .band-title > * { animation: hero-rise 0.9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero h1 { animation-delay: 0.15s; }
  .hero .subtitle { animation-delay: 0.3s; }
}
@keyframes hero-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes hero-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Bands ---------- */
.band { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.band.mint { background: var(--teal); color: #fff; margin-top: -1px; }
.band.teal { background: var(--teal); color: #fff; }
.band.tint { background: var(--mint-light); }
.band.centered { text-align: center; }
.quote { font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 500; line-height: 1.25; max-width: 22em; margin: 0 auto 1.8rem; }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); max-width: 54em; margin-inline: auto; }
.lead + .lead { margin-top: 1.1rem; }
.lead.strong { font-weight: 500; }

/* ---------- Section titles ---------- */
.section-title { font-size: clamp(1.9rem, 4vw, 2.6rem); text-align: center; margin-bottom: 2.5rem; }

/* ---------- Home: patient groups ---------- */
.group { background: var(--mint-light); border-radius: calc(var(--radius) + 6px); padding: clamp(1.2rem, 3vw, 2rem); }
.group + .group { margin-top: 2rem; }
.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 14px); }
.photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; }
.group .text { text-align: center; max-width: 720px; margin: 1.8rem auto 0.6rem; }
.group h3 { font-size: 1.6rem; margin-bottom: 0.7rem; }
.group .btn { margin-top: 1.4rem; }
@media (max-width: 600px) { .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Home: services ---------- */
.services .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.services .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.services .pair img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.services h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.services p { margin-top: 0.6rem; font-size: 1.2rem; }
.services .btn { margin-top: 1.8rem; }
@media (max-width: 820px) { .services .wrap { grid-template-columns: 1fr; } }

/* ---------- Rows: photo + text card ---------- */
.rows { padding: clamp(3rem, 7vw, 5rem) 0; }
.row { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1rem, 3vw, 2rem); align-items: stretch; }
.row + .row { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.row img { width: 100%; height: 100%; min-height: 360px; max-height: 620px; object-fit: cover; border-radius: var(--radius); }
.row .card { background: var(--mint-light); border-radius: var(--radius); padding: clamp(1.6rem, 3.5vw, 2.8rem); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.row.flip img { order: 2; }
.row.teal .card { background: var(--teal); color: #fff; }
.row.teal .tagline { color: var(--mint-light); }
.row h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.tagline { color: var(--teal); font-size: 1.1rem; font-weight: 400; margin: 0.4rem 0 1.3rem; line-height: 1.35; }
.row p + p { margin-top: 0.85rem; }
.row ul { margin: 0.2rem 0 0.9rem; padding-left: 1.2rem; }
.row li { margin: 0.15rem 0; }
.row ul.quals { list-style: none; padding: 0; margin: 0.6rem 0 1.1rem; }
.quals li { margin: 0; padding: 0.55rem 0 0.55rem 0.9rem; border-left: 3px solid var(--sage); }
.quals li + li { margin-top: 0.35rem; }
.quals b { display: block; line-height: 1.3; }
.quals span { display: block; font-size: 0.9em; opacity: 0.8; }
@media (max-width: 820px) {
  .row { grid-template-columns: 1fr; }
  .row.flip img { order: 0; }
  .row img { min-height: 0; aspect-ratio: 4 / 3; }
}

/* ---------- "In cosa consiste?" boxes ---------- */
/* Five boxes: 3 on the first row, 2 of the same width centred on the second */
.boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.boxes .box { grid-column: span 2; }
.boxes .box:nth-child(4) { grid-column: 2 / span 2; }
.boxes .box:nth-child(5) { grid-column: 4 / span 2; }
@media (max-width: 900px) {
  .boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boxes .box, .boxes .box:nth-child(n+4) { grid-column: span 1; }
  .boxes .box:last-child { grid-column: span 2; }
}
@media (max-width: 560px) {
  .boxes { grid-template-columns: minmax(0, 1fr); }
  .boxes .box:last-child { grid-column: span 1; }
}
.box { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.box h3 { font-size: 1.05rem; font-weight: 600; margin: 0; padding: 1rem 1.4rem; background: var(--teal); color: #fff; }
.box .in { padding: 0.5rem 1.4rem 1.2rem; }
.box .in p { margin: 0.6rem 0 0; }
.box ul { list-style: none; margin: 0; padding: 0; }
.box li { margin: 0; padding: 0.55rem 0; border-bottom: 1px solid #e3eee6; }
.box li:last-child { border-bottom: 0; }
.consiste-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.consiste-head img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.consiste-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
@media (max-width: 820px) { .consiste-head { grid-template-columns: 1fr; } }

/* ---------- Call to action ---------- */
.cta { text-align: center; padding: clamp(3.5rem, 7vw, 5rem) 1.5rem; }
.cta h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: 1.6rem; }

/* ---------- FAQ and contacts ---------- */
.faq { background: #fff; border-radius: var(--radius); padding: clamp(1rem, 3vw, 2rem) clamp(1.2rem, 3vw, 2.4rem); max-width: 900px; margin-inline: auto; }
.faq details { border-bottom: 1px solid rgba(11, 74, 71, 0.12); padding: 1.1rem 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 0.6rem; }
.contact-intro { text-align: center; font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 400; max-width: 900px; margin: 3.5rem auto 1.8rem; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; max-width: 900px; margin-inline: auto; }
.contact-card { background: var(--teal); color: #fff; border-radius: var(--radius); padding: 1.8rem; }
.contact-card b { display: block; font-weight: 500; opacity: 0.85; margin-bottom: 0.3rem; }
.contact-card a { font-size: 1.35rem; font-weight: 500; text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }
.contact-card .small { display: inline-block; margin-top: 0.6rem; font-size: 0.95rem; font-weight: 400; color: var(--mint-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--petrol); color: var(--cream); padding: 3.5rem 0 1.5rem; }
.site-footer .top { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; align-items: start; }
.site-footer .logo { width: 230px; }
.site-footer h2 { font-size: 1.2rem; font-weight: 500; margin-bottom: 0.8rem; }
.site-footer p + p { margin-top: 0.7rem; }
.site-footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(254, 255, 246, 0.2); font-size: 0.85rem; }
.social { display: flex; gap: 0.7rem; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--mint); color: #fff; }
.social svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 820px) { .site-footer .top { grid-template-columns: 1fr; } }
