/* =========================================================
   EsteticaDemo – stili
   Palette: inchiostro ardesia, petrolio, cipria, nebbia.
   Elemento distintivo: l'arco (cornice classica) per ritratti e immagini.
   ========================================================= */

:root {
	--ink: #1c2a31;
	--muted: #56666d;
	--petrol: #2f6f73;
	--petrol-dark: #23585b;
	--blush: #ead9d2;
	--blush-soft: #f6eeeb;
	--fog: #f1f4f4;
	--white: #ffffff;
	--line: #d6dfe0;

	--font-display: "Marcellus", "Times New Roman", serif;
	--font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

	--step--1: 0.875rem;
	--step-0: 1.0625rem;
	--step-1: 1.25rem;
	--step-2: 1.6rem;
	--step-3: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
	--step-4: clamp(2.4rem, 1.6rem + 3.2vw, 4.2rem);

	--wrap: 1200px;
	--gutter: clamp(16px, 4vw, 40px);
	--space: clamp(56px, 8vw, 112px);
	--radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol); text-underline-offset: 3px; }
a:hover { color: var(--petrol-dark); }
:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--white); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }

.ed-icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.2em; }

/* ---------- Pulsanti e link ---------- */
.btn {
	display: inline-flex; align-items: center; gap: .5em;
	padding: 14px 26px;
	border-radius: 999px;
	background: var(--petrol); color: var(--white);
	font-weight: 600; text-decoration: none; border: 1px solid var(--petrol);
	transition: background .2s, color .2s;
}
.btn:hover { background: var(--petrol-dark); border-color: var(--petrol-dark); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--light:hover { background: var(--blush); border-color: var(--blush); color: var(--ink); }
.btn--small { padding: 10px 18px; font-size: var(--step--1); }
.link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; white-space: nowrap; }

/* ---------- Barra superiore ---------- */
.topbar { background: var(--ink); color: #d9e2e4; font-size: var(--step--1); }
.topbar__inner { display: flex; align-items: center; gap: 24px; min-height: 40px; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: var(--white); }
.topbar__phone { display: inline-flex; gap: 8px; align-items: center; }
.topbar__nav { margin-left: auto; display: flex; gap: 20px; }
.topbar__nav .menu { display: flex; gap: 20px; list-style: none; }
.topbar__social { display: flex; gap: 12px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: .02em; }
.brand__tag { font-size: .8rem; color: var(--muted); }
.brand__logo { max-height: 56px; width: auto; }

.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.primary-nav .menu { display: flex; gap: 26px; list-style: none; }
.primary-nav .menu > li { position: relative; }
.primary-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.primary-nav .menu a:hover { color: var(--petrol); }
.primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a { color: var(--petrol); }
.primary-nav .sub-menu {
	list-style: none; position: absolute; top: 100%; left: -18px; min-width: 230px;
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 10px 0; margin-top: 12px; opacity: 0; visibility: hidden; transform: translateY(4px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
.primary-nav .sub-menu::before { content: ""; position: absolute; inset: -14px 0 auto; height: 14px; }
.primary-nav .sub-menu a { display: block; padding: 8px 18px; font-weight: 400; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav__cta.btn { color: var(--white); }

.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; color: var(--ink); cursor: pointer; }
.nav-toggle .ed-icon { width: 28px; height: 28px; }
.nav-toggle__close { display: none; }

@media (max-width: 1080px) {
	.topbar__nav, .topbar__social { display: none; }
	.nav-toggle { display: block; }
	.primary-nav {
		position: fixed; inset: var(--nav-top, 116px) 0 0; background: var(--white); flex-direction: column; align-items: stretch;
		gap: 0; padding: 12px var(--gutter) 40px; overflow-y: auto; display: none;
	}
	body.nav-open { overflow: hidden; }
	body.nav-open .primary-nav { display: flex; }
	body.nav-open .nav-toggle__open { display: none; }
	body.nav-open .nav-toggle__close { display: inline; }
	.primary-nav .menu { flex-direction: column; gap: 0; }
	.primary-nav .menu > li > a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
	.primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; border: 0; margin: 0; padding: 4px 0 8px 14px; }
	.primary-nav .sub-menu::before { display: none; }
	.primary-nav__cta { margin-top: 24px; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--blush-soft) 0%, var(--white) 100%); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 96px); align-items: end; padding-top: clamp(48px, 7vw, 96px); }
.hero__text { padding-bottom: clamp(48px, 7vw, 104px); }
.hero__title { font-size: var(--step-4); max-width: 14ch; margin-bottom: .35em; }
.hero__lead { font-size: var(--step-1); color: var(--muted); max-width: 42ch; margin-bottom: 2em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__visual { justify-self: end; width: 100%; max-width: 440px; }

.arch { border-radius: 999px 999px 0 0; overflow: hidden; aspect-ratio: 3 / 4; width: 100%; object-fit: cover; }
.arch--hero { aspect-ratio: 4 / 5.2; }

@media (max-width: 820px) {
	.hero__inner { grid-template-columns: 1fr; }
	.hero__text { padding-bottom: 0; }
	.hero__visual { justify-self: center; max-width: 320px; }
}

/* Segnaposto immagine (quando manca l'immagine in evidenza) */
.ed-placeholder {
	display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10;
	background:
		radial-gradient(120% 90% at 30% 20%, #f3e7e2 0%, transparent 60%),
		linear-gradient(160deg, var(--blush) 0%, #c9d8d8 100%);
	color: var(--petrol-dark); font-family: var(--font-display); font-size: 2.2rem;
}
.ed-placeholder.arch { aspect-ratio: 3 / 4; }
.ed-placeholder--hero {
	background:
		radial-gradient(60% 40% at 50% 38%, rgba(255,255,255,.75) 0%, transparent 70%),
		linear-gradient(170deg, #e7d3cb 0%, #b9cfd0 100%);
}

/* ---------- Sezioni ---------- */
.section { padding: calc(var(--space) * .6) 0; }
.treatments, .testimonials { padding: var(--space) 0; margin: calc(var(--space) * .4) 0; }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section__title { font-size: var(--step-3); margin: 0; }
.section__title--sub { margin: 56px 0 24px; font-size: var(--step-2); }
.section__intro { color: var(--muted); max-width: 56ch; margin: 12px 0 0; }

.grid { display: grid; gap: clamp(20px, 3vw, 36px); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.grid--sedi { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }

/* Punti di forza */
.pillars { padding-top: clamp(40px, 6vw, 72px); }
.pillars__list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 56px; }
.pillar .ed-icon { width: 30px; height: 30px; color: var(--petrol); margin-bottom: 14px; }
.pillar h3 { font-size: var(--step-1); margin-bottom: .35em; }
.pillar p { color: var(--muted); margin: 0; max-width: 34ch; }
@media (max-width: 820px) { .pillars__list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pillars__list { grid-template-columns: 1fr; } }

/* Tabs trattamenti */
.treatments { background: var(--fog); }
.tabs__list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tabs__list button {
	font: inherit; font-weight: 600; padding: 10px 20px; border-radius: 999px;
	border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer;
}
.tabs__list button[aria-selected="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }

.card-tratt__link { display: block; text-decoration: none; color: inherit; }
.card-tratt__media { display: block; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.card-tratt__media img, .card-tratt__media .ed-placeholder { aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s; }
.card-tratt__link:hover .card-tratt__media img, .card-tratt__link:hover .card-tratt__media .ed-placeholder { transform: scale(1.03); }
.card-tratt__area { font-size: var(--step--1); color: var(--petrol); font-weight: 600; }
.card-tratt__title { font-size: var(--step-2); margin: 4px 0 8px; }
.card-tratt__link:hover .card-tratt__title { color: var(--petrol); }
.card-tratt__text { color: var(--muted); margin: 0; }

/* Équipe: ritratti ad arco */
.card-medico__portrait { display: block; margin-bottom: 18px; text-decoration: none; }
.card-medico__portrait img, .card-medico__portrait .ed-placeholder { border-radius: 999px 999px 0 0; aspect-ratio: 3 / 4; object-fit: cover; }
.card-medico__name { font-size: var(--step-1); margin-bottom: 4px; }
.card-medico__name a { color: var(--ink); text-decoration: none; }
.card-medico__name a:hover { color: var(--petrol); }
.card-medico__title { margin: 0; font-weight: 600; }
.card-medico__role { margin: 0 0 8px; color: var(--muted); font-size: var(--step--1); }
.card-medico__sedi { font-size: var(--step--1); color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.card-medico__sedi .ed-icon { color: var(--petrol); }

/* Testimonianze */
.testimonials { background: var(--blush-soft); }
.slider__track {
	display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min(86%, 380px), 1fr);
	gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin;
}
.slider__nav { display: flex; gap: 10px; margin-top: 24px; }
.slider__btn {
	width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ink); background: transparent;
	font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.slider__btn:hover { background: var(--ink); color: var(--white); }
.card-testi { margin: 0; scroll-snap-align: start; background: var(--white); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; }
.card-testi__video { position: relative; display: block; margin: -32px -32px 24px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card-testi__play { position: absolute; inset: 0; display: grid; place-items: center; color: var(--white); }
.card-testi__play .ed-icon { width: 64px; height: 64px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.35)); }
.card-testi__quote { margin: 0 0 24px; font-family: var(--font-display); font-size: var(--step-1); line-height: 1.45; flex: 1; }
.card-testi__who { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: var(--step--1); }
.card-testi__who span { color: var(--muted); }
.tag-demo { font-style: normal; background: var(--fog); color: var(--muted); padding: 2px 8px; border-radius: 999px; }

/* Contatti */
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-top: 56px; padding-bottom: 56px; }
@media (max-width: 820px) { .contact__inner { grid-template-columns: 1fr; } }
.contact-strip { display: grid; gap: 14px; }
.contact-strip__item {
	display: flex; align-items: center; gap: 18px; padding: 20px 24px; border-radius: var(--radius);
	background: var(--fog); color: var(--ink); text-decoration: none; font-size: var(--step-1); font-weight: 600;
}
.contact-strip__item:hover { background: var(--blush); color: var(--ink); }
.contact-strip__item .ed-icon { width: 30px; height: 30px; color: var(--petrol); }
.contact-strip__item small { display: block; font-size: var(--step--1); color: var(--muted); font-weight: 500; }

/* Sedi */
.card-sede { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card-sede a { display: block; padding: 28px 24px; color: inherit; text-decoration: none; height: 100%; }
.card-sede a:hover { background: var(--fog); }
.card-sede__title { font-size: var(--step-2); margin-bottom: 10px; }
.card-sede__addr { margin: 0; color: var(--muted); font-size: var(--step--1); }

/* Blog */
.card-post a { display: block; color: inherit; text-decoration: none; }
.card-post__media { display: block; border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.card-post__media img, .card-post__media .ed-placeholder { aspect-ratio: 16 / 9; object-fit: cover; }
.card-post__date { font-size: var(--step--1); color: var(--muted); }
.card-post__title { font-size: var(--step-1); margin-top: 4px; }
.card-post a:hover .card-post__title { color: var(--petrol); }

/* Prefooter e footer */
.prefooter { background: var(--petrol); color: var(--white); }
.prefooter__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 56px; padding-bottom: 56px; }
.prefooter__title { font-size: var(--step-3); margin: 0; max-width: 20ch; }

.site-footer { background: var(--ink); color: #c9d4d7; font-size: var(--step--1); padding-top: 64px; }
.site-footer a { color: #e6edef; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 40px; padding-bottom: 48px; }
.site-footer__brand .brand__name { color: var(--white); display: block; margin-bottom: 8px; }
.site-footer h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 14px; }
.site-footer .menu { list-style: none; display: grid; gap: 8px; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; padding-bottom: 96px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer__legal .menu { display: flex; gap: 20px; list-style: none; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

.wa-float {
	position: fixed; right: 18px; bottom: 18px; z-index: 60;
	display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px;
	background: #1f7a4d; color: var(--white); text-decoration: none; font-weight: 600; font-size: var(--step--1);
	box-shadow: 0 6px 20px rgba(28, 42, 49, .25);
}
.wa-float:hover { background: #18633e; color: var(--white); }
.wa-float .ed-icon { width: 24px; height: 24px; }
@media (max-width: 520px) { .wa-float span { display: none; } .wa-float { padding: 14px; } }

/* ---------- Pagine interne ---------- */
.page-head { background: var(--blush-soft); padding: clamp(48px, 7vw, 88px) 0; }
.page-head__title { font-size: var(--step-4); margin: 0; max-width: 18ch; }
.page-head__intro { font-size: var(--step-1); color: var(--muted); max-width: 52ch; margin: 18px 0 28px; }
.page-head__meta { font-size: var(--step--1); color: var(--muted); display: flex; gap: 12px; margin-bottom: 12px; }
.page-head__meta a { font-weight: 600; text-decoration: none; }
.page-head--split { padding-bottom: 0; }
.page-head__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: end; }
.page-head__grid > div:first-child { padding-bottom: clamp(48px, 7vw, 88px); }
.page-head__visual { max-width: 360px; justify-self: end; width: 100%; }
@media (max-width: 820px) {
	.page-head__grid { grid-template-columns: 1fr; }
	.page-head__grid > div:first-child { padding-bottom: 0; }
	.page-head__visual { justify-self: start; max-width: 240px; }
}
.breadcrumbs { font-size: var(--step--1); color: var(--muted); margin-bottom: 14px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid var(--line); border-radius: var(--radius); transform: translateY(-1px); background: var(--white); }
.facts__item { padding: 22px 24px; border-left: 1px solid var(--line); }
.facts__item:first-child { border-left: 0; }
.facts dt { font-size: var(--step--1); color: var(--muted); }
.facts dd { margin: 4px 0 0; font-family: var(--font-display); font-size: var(--step-1); }
@media (max-width: 720px) {
	.facts { grid-template-columns: 1fr 1fr; }
	.facts__item:nth-child(3) { border-left: 0; }
	.facts__item:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.filter { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 32px; }
.filter a { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--step--1); }
.filter a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

.medico__sedi { display: flex; gap: 8px; color: var(--muted); }
.sede { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.sede__info { background: var(--fog); border-radius: var(--radius); padding: 28px; }
.sede__info p { display: flex; gap: 12px; align-items: flex-start; }
.sede__info .ed-icon { color: var(--petrol); margin-top: 3px; }
@media (max-width: 820px) { .sede { grid-template-columns: 1fr; } }

.single__media { margin-top: -40px; }
.single__media img { border-radius: var(--radius); width: 100%; }

/* Testo lungo (editor a blocchi) */
.prose { max-width: 72ch; }
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--blush); font-family: var(--font-display); font-size: var(--step-1); }
.prose img { border-radius: var(--radius); }

.nav-links { display: flex; gap: 8px; margin-top: 48px; }
.page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.page-numbers.current { background: var(--ink); color: var(--white); border-color: var(--ink); }

.search-form { display: flex; gap: 8px; max-width: 480px; margin-bottom: 24px; }
.search-form label { flex: 1; }
.search-field { width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; font: inherit; }
.search-submit { padding: 12px 20px; border-radius: 999px; border: 0; background: var(--ink); color: var(--white); font: inherit; font-weight: 600; cursor: pointer; }

/* Ritocchi */
.wrap.prose { max-width: var(--wrap); }
.wrap.prose > * { max-width: 72ch; }
.section > .wrap > .section__title { margin-bottom: 32px; }
@media (max-width: 560px) {
	.grid--4 { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
	.card-medico__name { font-size: 1.05rem; }
}
