/* Aesthetic Clinic: colori dal marchio (Pantone 7621 C e 424 C) */
@font-face { font-family: "Poppins"; src: url(/fonts/poppins-light.woff) format("woff"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(/fonts/poppins-regular.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(/fonts/poppins-medium.woff) format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Lora"; src: url(/fonts/lora-italic.woff) format("woff"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --white: #ffffff;
  --ink: #2b2b2a;
  --grey: #707372;
  --red: #ab2328;
  --mist: #f2f2f1;
  --line: #dcdcda;
  --night: #1e1e1d;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 17px/1.65 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
h1, h2, h3 { font-weight: 300; line-height: 1.25; color: var(--ink); margin: 0 0 .6em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); }
h3 { font-size: 1.15rem; font-weight: 500; }
p { margin: 0 0 1em; }
.lead { font-size: 1.12rem; color: #4a4a49; max-width: var(--measure); }
.todo { background: #fff3c4; color: #5c4600; padding: 0 .3em; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--white); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.bar { max-width: 1280px; margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { width: 138px; height: auto; }
.site-header nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: .95rem; padding: 6px 0; border-bottom: 1px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: var(--red); }
.menu-toggle { display: none; font: 500 .95rem var(--sans); background: none; border: 1px solid var(--ink); color: var(--ink); padding: 8px 16px; cursor: pointer; }

@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .site-header nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); }
  .site-header nav.open { display: block; }
  .site-header nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .site-header nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .brand img { width: 118px; }
}

/* Carosello: fascia scura con miniature, come il sito originale */
.hero { position: relative; background: var(--night); }
.slides { list-style: none; margin: 0; padding: 0; position: relative; height: clamp(340px, 68vh, 760px); overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-controls { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px var(--gutter) 22px; }
.thumbs { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; }
.thumbs button { display: block; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; opacity: .55; transition: opacity .2s; }
.thumbs button[aria-current="true"], .thumbs button:hover { opacity: 1; border-color: var(--white); }
.thumbs img { width: 96px; height: 64px; object-fit: cover; filter: grayscale(1); }
.thumbs button[aria-current="true"] img { filter: none; }
.arrow { background: none; border: 1px solid rgba(255,255,255,.5); color: var(--white); width: 40px; height: 40px; font-size: 1.6rem; line-height: 1; cursor: pointer; flex: none; }
.arrow:hover { border-color: var(--white); }
@media (max-width: 600px) { .thumbs img { width: 64px; height: 44px; } .arrow { display: none; } }

/* Apertura: la voce della clinica */
.intro { max-width: 980px; margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter) 24px; text-align: center; }
.intro h1 { font-size: clamp(1.35rem, 1rem + 1.6vw, 2.25rem); text-transform: uppercase; letter-spacing: .06em; color: var(--grey); font-weight: 300; }
.motto { font: italic 400 clamp(1.3rem, 1.05rem + 1vw, 1.8rem)/1.4 var(--serif); color: var(--red); margin: 1.4em 0; }
.credo p { font: italic 400 clamp(1.15rem, 1rem + .6vw, 1.45rem)/1.6 var(--serif); color: var(--ink); }

/* Testo e immagine affiancati */
.pair { max-width: 1180px; margin: 0 auto; padding: 48px var(--gutter) 72px; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.pair-text { max-width: 52ch; }
.pair-text h2 + p { margin-bottom: 2em; }
.pair-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* Servizi: elenco, non schede */
.services { background: var(--mist); padding: clamp(56px, 7vw, 96px) var(--gutter); }
.services > h2, .services > .lead { max-width: 1180px; margin-left: auto; margin-right: auto; }
.service-list { list-style: none; margin: 32px auto 0; padding: 0; max-width: 1180px; border-top: 1px solid var(--line); }
.service-list li { display: grid; grid-template-columns: 1.1fr 1.6fr 1.3fr; gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); }
.service-list h3, .service-list p { margin: 0; }
.service-list p { color: #4a4a49; }
.service-list a { justify-self: end; text-align: right; }

/* Sezioni divise a metà (come "Il Dottore" del sito originale) */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; }
.split-img { position: relative; min-height: 480px; }
.split-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split-text { padding: clamp(40px, 6vw, 96px); align-self: center; max-width: 640px; }
.split.dark { background: var(--night); color: #e6e6e4; }
.split.dark h2 { color: var(--white); }
.split.dark a:not(.btn) { color: #f0b3b5; }
.role { color: var(--grey); }
.split.dark .role { color: #b9b9b6; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 8px; height: 1px; background: var(--red); }

/* Pulsanti */
.btn { display: inline-block; font: 500 .95rem var(--sans); padding: 12px 22px; background: var(--red); color: var(--white); border: 1px solid var(--red); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn.light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn.light:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.btn.ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn.ghost:hover { border-color: var(--white); background: transparent; }
.btn.ghost-dark { background: transparent; color: var(--ink); border-color: var(--ink); }

.band { background: var(--mist); text-align: center; padding: clamp(56px, 7vw, 96px) var(--gutter); }
.band-inner { max-width: 640px; margin: 0 auto; }

/* Pagine interne */
.page-head { max-width: 1180px; margin: 0 auto; padding: clamp(48px, 6vw, 88px) var(--gutter) 40px; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.page-head p { max-width: var(--measure); }
.page-head.narrow { max-width: 820px; }
.prose h2 { font-size: 1.35rem; font-weight: 500; margin-top: 1.6em; }
.source { color: #4a4a49; font-size: .95rem; }

.gallery { max-width: 1280px; margin: 0 auto; padding: 72px var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.grid figcaption { font-size: .9rem; color: #4a4a49; padding-top: 8px; }

.service-block { max-width: 1180px; margin: 0 auto; padding: 48px var(--gutter); display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; border-top: 1px solid var(--line); }
.service-block figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Moduli */
.form-section { max-width: 920px; margin: 0 auto; padding: 24px var(--gutter) 96px; }
form p { margin: 0 0 18px; }
label { display: block; font-size: .92rem; font-weight: 500; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: 400 1rem var(--sans); color: var(--ink); background: var(--white); border: 1px solid #b9b9b6; padding: 12px 14px; border-radius: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: var(--red); }
.fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.fields .wide { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; flex: none; margin-top: 3px; }
.check label { font-weight: 400; margin: 0; }
.hint { font-size: .9rem; color: #4a4a49; }
.hp { position: absolute; left: -9999px; }

.contact { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter) 72px; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); }
.contact-info figure { margin-top: 28px; }
.map-section { background: var(--mist); }
.map { max-width: 1180px; margin: 0 auto; padding: 48px var(--gutter); text-align: center; }
.map iframe { width: 100%; height: 420px; border: 0; display: block; }

/* Footer */
.site-footer { background: var(--night); color: #cfcfcc; font-size: .95rem; }
.site-footer a { color: #e6e6e4; }
.site-footer a:hover { color: var(--white); }
.foot { max-width: 1280px; margin: 0 auto; padding: 64px var(--gutter) 40px; display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.2fr; gap: 32px; }
.foot h2 { font-size: .95rem; font-weight: 500; color: var(--white); margin-bottom: .8em; }
.foot-brand img { width: 170px; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { margin-bottom: .35em; }
.legal { max-width: 1280px; margin: 0 auto; padding: 20px var(--gutter) 32px; border-top: 1px solid #3a3a39; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .85rem; }
.legal p { margin: 0; }
.legal a + a { margin-left: 18px; }

@media (max-width: 900px) {
  .pair, .split, .contact, .service-block { grid-template-columns: 1fr; }
  .split { min-height: 0; }
  .split .split-img { order: -1; }
  .split-img { min-height: 0; }
  .split-img img { position: static; height: auto; aspect-ratio: 4 / 3; }
  .service-list li { grid-template-columns: 1fr; gap: 6px; }
  .service-list a { justify-self: start; text-align: left; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .foot { grid-template-columns: 1fr 1fr; }
  .fields { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .foot { grid-template-columns: 1fr; } }

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

/* Video della clinica: anteprima statica, YouTube caricato solo al clic */
.video { padding: clamp(56px, 7vw, 96px) var(--gutter); }
.video-inner { max-width: 1080px; margin: 0 auto; text-align: center; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--night); overflow: hidden; margin-top: 24px; }
.video-frame img, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-play { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(0,0,0,.18); border: 0; cursor: pointer; transition: background .2s; }
.video-play:hover, .video-play:focus-visible { background: rgba(0,0,0,.32); }
.video-play span { position: absolute; left: 22%; top: 55%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--red); box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.video-play span::after { content: ""; position: absolute; left: 34px; top: 26px; border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent #fff; }
.video-note { font-size: .875rem; color: var(--grey); margin-top: 14px; }
@media (max-width: 600px) { .video-play span { width: 64px; height: 64px; margin: -32px 0 0 -32px; } .video-play span::after { left: 25px; top: 19px; border-width: 13px 0 13px 21px; } }

/* Pulsante WhatsApp fisso */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.25); transition: transform .2s; }
.wa-float:hover, .wa-float:focus-visible { transform: scale(1.06); }
@media print { .wa-float { display: none; } }

/* Pagine dei trattamenti */
.crumbs { font-size: .85rem; color: var(--grey); }
.crumbs a { color: var(--grey); }
.signed { font-size: .85rem; color: var(--grey); margin-top: 2em; border-top: 1px solid var(--line); padding-top: 1em; }
.btn.light-on-white { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.tech-list ul { padding-left: 1.1em; }
.tech-list li { margin: .5em 0; }
.table-wrap { overflow-x: auto; margin: 1em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 500; color: var(--grey); }

/* Blog */
.author-box { margin-top: 2.5em; padding: 18px 20px; background: var(--mist); border-left: 3px solid var(--red); font-size: .95rem; }
.author-box p { margin: .3em 0; }
.post-list { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter) 80px; }
.post-list ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.post-card a { color: inherit; text-decoration: none; display: block; }
.post-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post-card h2 { font-size: 1.15rem; font-weight: 500; margin: .8em 0 .4em; }
.post-card p { color: var(--grey); font-size: .95rem; margin: 0; }
.post-card a:hover h2 { color: var(--red); }
.revisione-medica { font-size: .9rem; color: var(--grey); margin-top: 2.5em; }
.author-photo { max-width: 200px; height: auto; border-radius: 15px; margin: 10px 0; display: block; }
.author-sign { max-width: 180px; height: auto; display: block; margin-top: 8px; }

/* Banner cookie */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0,0,0,.15); padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; font-size: .92rem; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1 1 320px; }
.cookie-actions { display: flex; gap: 10px; }
