/* ==========================================================================
   Studio Dentistico Romano — tema Kris
   Desktop da Figma "Definitivo per conversione" (1440px, contenuto 1200px).
   Tablet e mobile derivati dallo stesso sistema.
   ========================================================================== */

/* Inter ospitato sul sito (file variabile: tutti i pesi in un solo file, caratteri latini).
   Niente Google Fonts: pagina più veloce e nessun IP inviato a Google. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Colori del design */
    --navy: #0D1D42;          /* Blu Scuro SDR */
    --green: #21EAAC;         /* Verde Chiaro SDR: su fondi scuri, pulsanti, accenti */
    --green-text: #0B7957;    /* stesso verde, scurito per i testi su fondo chiaro (contrasto 5,4:1) */
    --text-1: #3C4858;        /* SDR TESTO 1 */
    --text-2: #666A79;        /* SDR TESTO 2, scurito per il contrasto */
    --text-muted: #666A79;    /* testo secondario dei paragrafi (contrasto 5,4:1 sul bianco) */
    --pop-red: #FF534E;
    --pop-pink: #F29CFF;
    --pop-yellow: #FFED80;
    --accent-blue: #0D0ADB;   /* pallino attivo dei caroselli */
    --surface: #F5F5F5;
    --line: #EEEEEE;
    --placeholder: #E8E6E3;
    --white: #FFFFFF;

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --container: 1200px;
    --gutter: 20px;
    --radius-card: 16px;
    --radius-media: 24px;
    --radius-pill: 90px;

    --shadow-card: 0 10px 30px rgba(13, 29, 66, 0.06);
    --shadow-card-hover: 0 18px 40px rgba(13, 29, 66, 0.12);

    --section-space: clamp(56px, 7vw, 96px);
    --header-h: 99px;
}

@media (min-width: 768px) {
    :root { --gutter: 40px; }
}

/* --- Base --------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-1);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

body.is-menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, p { margin: 0; }

button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 3px;
}

.container {
    width: min(var(--container), 100% - 2 * var(--gutter));
    margin-inline: auto;
}

/* Contenitore largo per barra in alto, menu, hero e footer: sugli schermi grandi
   usa quasi tutta la larghezza, con un margine che cresce con lo schermo. */
.container--wide {
    width: min(1840px, 100% - 2 * clamp(20px, 4vw, 96px));
}

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    left: 16px; top: -100px;
    z-index: 200;
    padding: 12px 20px;
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius-pill);
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* --- Tipografia di sezione ---------------------------------------------- */

.eyebrow {
    font-size: clamp(14px, 1.1vw + 7px, 22px);
    font-weight: 400;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--green-text);
}

.section-title {
    margin-top: 16px;
    font-size: clamp(30px, 2.6vw + 14px, 48px);
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy);
    white-space: pre-line;
    text-wrap: balance;
}

.section-head { margin-bottom: clamp(32px, 4vw, 62px); }

.section-head--center { text-align: center; }

.section-head--split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.prose {
    font-size: clamp(16px, 0.25vw + 15px, 18px);
    line-height: 1.61;
    color: var(--text-muted);
}
.prose p + p { margin-top: 0; }
.prose a { color: var(--navy); }

/* --- Pulsanti ----------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 51px;
    padding: 14px 32px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--navy);
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
    background: #1A2D5C;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(13, 29, 66, 0.25);
}
.btn--lg { min-height: 56px; padding: 16px 32px; }

/* --- Top bar ------------------------------------------------------------ */

.topbar {
    background: var(--navy);
    color: var(--white);
    font-size: 16px;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 60px;
}

.topbar__contacts {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    white-space: nowrap;
}
.topbar__item img { width: 24px; height: 24px; flex: none; }
.topbar a.topbar__item:hover span,
.topbar__item a:hover { text-decoration: underline; }
.topbar__item a { text-decoration: none; }

.social {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}
.social a {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    transition: opacity 0.2s ease;
}
.social a:hover { opacity: 0.75; }
.social img,
.social .social__icon { display: block; width: 22px; height: 22px; }

/* --- Header / navigazione ---------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(13, 29, 66, 0.08); }

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    text-decoration: none;
}
.brand__mark { width: 58.5px; height: 40px; }
.brand__text { width: 75.3px; height: 38.4px; }

.nav__menu {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 36px;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 36px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.nav__link {
    position: relative;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.nav__link:hover,
.nav__link.is-active { color: var(--text-1); }
.nav__link.is-active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -8px;
    height: 2px;
    border-radius: 2px;
    background: var(--green);
}

.nav__toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--navy);
    cursor: pointer;
}
.nav__toggle-bars,
.nav__toggle-bars::before,
.nav__toggle-bars::after {
    display: block;
    width: 20px;
    height: 2px;
    margin-inline: auto;
    border-radius: 2px;
    background: var(--white);
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav__toggle-bars { position: relative; }
.nav__toggle-bars::before,
.nav__toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav__toggle-bars::before { top: -6px; }
.nav__toggle-bars::after { top: 6px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.nav__cta { flex: none; }

@media (max-width: 1180px) {
    :root { --header-h: 80px; }

    .nav__toggle { display: grid; place-items: center; }

    .nav__menu {
        position: fixed;
        inset: var(--menu-top, 80px) 0 0 0;
        flex-direction: column;
        align-items: stretch;
        gap: 32px;
        padding: 24px var(--gutter) 40px;
        background: var(--white);
        border-top: 1px solid var(--line);
        overflow-y: auto;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
    }
    .nav__menu.is-open {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .nav__links { flex-direction: column; align-items: stretch; gap: 0; margin: 0; }
    .nav__links li + li { border-top: 1px solid var(--line); }
    .nav__link {
        display: block;
        padding: 18px 0;
        font-size: 20px;
        color: var(--navy);
    }
    .nav__link.is-active::after { display: none; }
    .nav__link.is-active { color: var(--green); }

    .nav__cta { align-self: stretch; }
}

/* Sotto questa larghezza indirizzo e social non stanno più comodi insieme:
   l'indirizzo resta nel footer e in "Dove ci troviamo". */
@media (max-width: 1240px) {
    .topbar__item--address { display: none; }
}

@media (max-width: 767px) {
    .topbar { font-size: 14px; }
    .topbar__inner { min-height: 44px; }
    .topbar__contacts { gap: 16px; }
    .topbar__item img { width: 20px; height: 20px; }
    .topbar__item--email,
    .topbar__phone-sep,
    .topbar__phone-alt { display: none; }
}

/* Sui telefoni più stretti resta solo WhatsApp, il contatto più usato. */
@media (max-width: 400px) {
    .topbar .social a:not(.social__whatsapp) { display: none; }
}

/* --- Hero --------------------------------------------------------------- */

/* La hero riempie lo schermo sotto top bar e header, su ogni dispositivo.
   Su schermi verticali il <picture> carica la foto mobile, se presente. */
:root { --topbar-h: 60px; }
@media (max-width: 767px) {
    :root { --topbar-h: 44px; }
}

.hero {
    position: relative;
    height: calc(100vh - var(--topbar-h) - var(--header-h));
    height: calc(100svh - var(--topbar-h) - var(--header-h));
    min-height: 520px;
    overflow: hidden;
    background: var(--placeholder);
}
.hero__picture {
    display: block;
    width: 100%;
    height: 100%;
}
.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero {
    --scroll-bottom: clamp(16px, 2.5vw, 36px);
    --scroll-size: 44px;
}
/* Sfumatura navy dal basso: rende leggibile il testo bianco su foto chiare. */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to top,
        rgba(13, 29, 66, 0.85) 0%,
        rgba(13, 29, 66, 0.62) 35%,
        rgba(13, 29, 66, 0.3) 60%,
        rgba(13, 29, 66, 0) 82%);
}

/* Frase grande, titolo H1 e pulsante, in basso a sinistra. */
.hero__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--scroll-bottom) + var(--scroll-size) + 28px);
    z-index: 2;
    color: var(--white);
}
/* Gli a capo li decide il testo (Invio nel campo), non la larghezza dello schermo. */
.hero__claim {
    font-size: clamp(66px, 9vw, 150px);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.05em;
    white-space: pre-line;
}
/* Il punto finale nel verde del brand. */
.hero__claim::after {
    content: "";
    display: inline-block;
    width: 0.16em;
    height: 0.16em;
    margin-left: 0.04em;
    border-radius: 50%;
    background: var(--green);
}
.hero__title {
    max-width: 640px;
    white-space: pre-line;
    text-wrap: pretty;
    margin-top: clamp(16px, 2vw, 28px);
    font-size: clamp(17px, 0.5vw + 14px, 21px);
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
}
.hero__cta {
    position: relative;
    margin-top: clamp(20px, 2.4vw, 32px);
    background: var(--green);
    color: var(--navy);
    white-space: nowrap;
}
.hero__cta:hover { background: #4FF0BF; }

@media (max-width: 767px) {
    .hero::after {
        background: linear-gradient(to top,
            rgba(13, 29, 66, 0.88) 0%,
            rgba(13, 29, 66, 0.64) 42%,
            rgba(13, 29, 66, 0.3) 66%,
            rgba(13, 29, 66, 0) 84%);
    }
    .hero__cta { width: 100%; }
}

/* Onda morbida che parte dal bordo del pulsante ogni 5 secondi:
   richiama l'attenzione senza muovere il testo. Si ferma al passaggio. */
.hero__cta::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    animation: cta-halo 5s ease-out 1.5s infinite;
}
.hero__cta:hover::after { animation: none; }

@keyframes cta-halo {
    0%   { box-shadow: 0 0 0 0 rgba(33, 234, 172, 0.6); }
    28%  { box-shadow: 0 0 0 18px rgba(33, 234, 172, 0); }
    100% { box-shadow: 0 0 0 18px rgba(33, 234, 172, 0); }
}

/* Freccia "scorri": dice che sotto la hero c'è altro. Porta a Chi siamo. */
.hero__scroll {
    position: absolute;
    left: 50%;
    bottom: var(--scroll-bottom);
    display: grid;
    place-items: center;
    width: var(--scroll-size);
    height: var(--scroll-size);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    transform: translateX(-50%);
    animation: hero-scroll 2.4s ease-in-out infinite;
    transition: background-color 0.2s ease;
}
.hero__scroll:hover { background: rgba(255, 255, 255, 0.3); }
.hero__scroll-icon {
    width: 10px;
    height: 10px;
    margin-top: -4px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

@keyframes hero-scroll {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 6px; }
}

/* --- Chi siamo ---------------------------------------------------------- */

/* Pagina divisa in due: a sinistra il video (o la foto) a filo dello schermo,
   quasi quadrato; a destra il testo. Su mobile il video sta sopra, quadrato. */
.about--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
}

.about__media {
    position: relative;
    align-self: stretch;
    min-height: min(50vw, 80vh);
    min-height: min(50vw, 80svh);
    overflow: hidden;
    background: var(--navy);
}
/* Il blocco poggia direttamente sul nastro blu sotto, senza spazio bianco. */
.about--split + .marquee--spaced { margin-top: 0; }
.about__video,
.about__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Senza video né foto: il marchio verde al centro del blocco blu. */
.about__mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56%;
    height: auto;
    transform: translate(-50%, -50%);
}

/* Pausa/riproduci: obbligatorio per un video che parte da solo. */
.about__video-toggle {
    position: absolute;
    right: clamp(16px, 2vw, 28px);
    bottom: clamp(16px, 2vw, 28px);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(13, 29, 66, 0.45);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.about__video-toggle:hover { background: rgba(13, 29, 66, 0.7); }
.about__video-toggle::before {
    content: "";
    width: 12px;
    height: 14px;
    border-left: 4px solid var(--white);
    border-right: 4px solid var(--white);
}
.about__video-toggle.is-paused::before {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-style: solid;
    border-width: 8px 0 8px 13px;
    border-color: transparent transparent transparent var(--white);
}

.about--split .about__content {
    padding: clamp(40px, 5vw, 96px) clamp(20px, 4vw, 96px) clamp(40px, 5vw, 96px) clamp(32px, 5vw, 112px);
}
.about--split .about__content > * { max-width: 620px; }
.about--split .prose p + p { margin-top: 1em; }
.about__content .section-title { margin-bottom: 24px; }

@media (max-width: 900px) {
    .about--split { grid-template-columns: 1fr; }
    .about__media { min-height: 0; aspect-ratio: 1 / 1; }
    .about--split .about__content { padding: 40px var(--gutter) 56px; }
}

/* --- Nastro scorrevole -------------------------------------------------- */

.marquee {
    overflow: hidden;
    padding: 23px 0;
    background: var(--navy);
    color: var(--white);
    /* Elemento decorativo: niente cursore di testo né selezione. */
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}
.marquee--spaced { margin-top: clamp(56px, 6vw, 85px); }

.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee 32s linear infinite;
}

.marquee__list {
    display: flex;
    align-items: center;
    gap: 50px;
    margin: 0;
    padding: 0 50px 0 0;
    list-style: none;
}

.marquee__item {
    display: flex;
    align-items: center;
    gap: 50px;
    font-size: 32px;
    font-weight: 600;
    white-space: nowrap;
}
.marquee__item::before {
    content: "";
    flex: none;
    width: 58.6px;
    height: 39.45px;
    background: url("../images/marquee/m1.svg") center / contain no-repeat;
}
.marquee__item:nth-child(5n + 2)::before { background-image: url("../images/marquee/m2.svg"); }
.marquee__item:nth-child(5n + 3)::before { background-image: url("../images/marquee/m3.svg"); }
.marquee__item:nth-child(5n + 4)::before { background-image: url("../images/marquee/m4.svg"); }
.marquee__item:nth-child(5n + 5)::before { background-image: url("../images/marquee/m5.svg"); }

@keyframes marquee {
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .marquee__track { animation: none; }
}

@media (max-width: 767px) {
    .marquee { padding: 16px 0; }
    .marquee__list, .marquee__item { gap: 28px; }
    .marquee__list { padding-right: 28px; }
    .marquee__item { font-size: 22px; }
    .marquee__item::before { width: 42px; height: 28px; }
}

/* --- Caroselli (comune a Prima & Dopo e Studio) ------------------------ */

.carousel { position: relative; }

.carousel__viewport {
    overflow: hidden;
    border-radius: var(--radius-media);
}

.carousel__track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.carousel__slide {
    flex: 0 0 100%;
    min-width: 0;
}

.carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 50px;
}
.carousel__controls[hidden] { display: none; }

.carousel__arrow {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.carousel__arrow:hover { background: rgba(13, 29, 66, 0.06); }
.carousel__arrow img { width: 52px; height: 52px; }
.carousel__arrow:disabled { opacity: 0.3; cursor: default; background: transparent; }

.carousel__dots {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 131px;
    justify-content: center;
}

/* Il pallino resta piccolo, ma l'area cliccabile è di 25 px (touch target). */
.carousel__dot {
    position: relative;
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #D9DCE3;
    cursor: pointer;
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
}
.carousel__dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25px;
    height: 25px;
    transform: translate(-50%, -50%);
}
.carousel__dot[aria-current="true"] {
    width: 14px;
    height: 14px;
    background: var(--accent-blue);
}

/* --- Prima & Dopo ------------------------------------------------------- */

.cases { padding-top: clamp(64px, 8vw, 112px); }

.compare {
    position: relative;
    aspect-ratio: 1200 / 586;
    overflow: hidden;
    background: var(--placeholder);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    cursor: ew-resize;
    --pos: 50%;
}

.compare__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.compare__after { clip-path: inset(0 0 0 var(--pos)); }

.compare__line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 2px;
    margin-left: -1px;
    background: var(--white);
    pointer-events: none;
}

.compare__handle {
    position: absolute;
    top: 50%;
    left: var(--pos);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--white);
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    transition: transform 0.15s ease;
}
.compare__handle img { width: 24px; height: 24px; }
/* Finché nessuno tocca il cursore, un'onda verde dal bordo invita a trascinarlo. */
.compare.is-hinting .compare__handle::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    pointer-events: none;
    animation: compare-halo 2.2s ease-out infinite;
}
@keyframes compare-halo {
    0%   { box-shadow: 0 0 0 0 rgba(33, 234, 172, 0.75); }
    60%  { box-shadow: 0 0 0 16px rgba(33, 234, 172, 0); }
    100% { box-shadow: 0 0 0 16px rgba(33, 234, 172, 0); }
}
.compare.is-dragging .compare__handle { transform: translate(-50%, -50%) scale(1.06); }

.compare__range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.compare:has(.compare__range:focus-visible) .compare__handle {
    outline: 3px solid var(--green);
    outline-offset: 3px;
}

.cases__stage { position: relative; }

.cases__labels {
    position: absolute;
    inset: 0 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 24px 32px;
    pointer-events: none;
}

.cases__label {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

@media (max-width: 767px) {
    .compare { aspect-ratio: 4 / 3; }
    .compare__handle { width: 52px; height: 52px; }
    .compare__handle img { width: 18px; height: 18px; }
    .cases__labels { padding: 14px 16px; }
    .cases__label { font-size: 14px; }
    .carousel__controls { margin-top: 28px; gap: 8px; }
    .carousel__arrow, .carousel__arrow img { width: 44px; height: 44px; }
}

/* --- Il nostro studio -------------------------------------------------- */

.studio {
    margin-top: clamp(64px, 6vw, 83px);
    padding: clamp(48px, 4vw, 59px) 0 32px;
    background: var(--surface);
}

.studio .carousel__viewport { border-radius: 0; }

.studio-slide { margin: 0; }

.studio-slide__media {
    aspect-ratio: 1200 / 586;
    overflow: hidden;
    border-radius: var(--radius-media);
    background: var(--placeholder);
}
.studio-slide__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.studio-slide__title {
    margin-top: clamp(24px, 3vw, 50px);
    font-size: clamp(24px, 1vw + 16px, 36px);
    font-weight: 600;
    line-height: 1.22;
    color: var(--navy);
}

.studio-slide__text {
    max-width: 640px;
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
}

.studio-controls { margin-top: clamp(32px, 4vw, 64px); }

@media (max-width: 767px) {
    .studio-slide__media { aspect-ratio: 4 / 3; }
}

/* --- Team --------------------------------------------------------------- */

.team { padding-top: clamp(56px, 6vw, 96px); }

.team__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.team-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.team-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.team-card__media {
    aspect-ratio: 379 / 330;
    overflow: hidden;
    background: var(--placeholder);
}
.team-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.4s ease;
}
.team-card:hover .team-card__media img { transform: scale(1.03); }

.team-card__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}
.team-card__placeholder img {
    width: 38%;
    height: auto;
    opacity: 0.35;
    object-fit: contain;
}

.team-card__body { padding: 24px 24px 24px; }

.team-card__name {
    font-size: clamp(18px, 0.5vw + 14px, 24px);
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy);
}

.team-card__role {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.4;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

/* Colore per categoria (campo "category"): striscia sotto la foto sempre visibile,
   al passaggio del mouse la foto si stringe e lascia una cornice del colore. */
.team-card { --team-color: var(--line); }
.team-card[data-team="dentisti"] { --team-color: #21EAAC; }
.team-card[data-team="rc-ortodonzia"] { --team-color: #292BFF; }
.team-card[data-team="igienisti"] { --team-color: #F29CFF; }
.team-card[data-team="assistenti"] { --team-color: #41D2FF; }
.team-card[data-team="reception"] { --team-color: #FF534E; }
.team-card[data-team="tecnici"] { --team-color: #FFED80; }
.team-card__media {
    position: relative;
    background: var(--team-color);
}
.team-card__media::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: var(--team-color);
}
.team-card__placeholder {
    background: var(--placeholder);
    transition: transform 0.4s ease, border-radius 0.4s ease;
}
.team-card__media > img { transition: transform 0.4s ease, border-radius 0.4s ease; }
.team-card:hover .team-card__media > img,
.team-card:hover .team-card__placeholder {
    transform: scale(0.92);
    border-radius: 14px;
}
.team-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;
    padding: 6px 12px;
    border-radius: 999px;
    background: #292BFF;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}
.team-lab {
    margin-top: clamp(48px, 5vw, 80px);
    text-align: center;
}
.team-lab .team-card { text-align: left; }
.team-lab__title {
    font-size: clamp(20px, 0.8vw + 14px, 28px);
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy);
}
.team-lab__text {
    margin-top: 8px;
    color: var(--text-muted);
}
.team-lab .team__grid { margin-top: 24px; }

/* --- Avviso in alto (Generale > Avviso in alto) ---------------------------- */

.notice {
    background: #21EAAC;
    color: var(--navy);
}
.notice[hidden] { display: none; }
.notice__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.notice__text {
    margin: 0;
    padding: 0 40px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
}
.notice__link {
    font-weight: 700;
    color: inherit;
}
a.notice__link {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
a.notice__link:hover { text-decoration-color: transparent; }
.notice__close {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--navy);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.2s ease;
}
.notice__close:hover { background: rgba(13, 29, 66, 0.1); }
.notice__close:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.notice__close::before,
.notice__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}
.notice__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.notice__close::after { transform: translate(-50%, -50%) rotate(-45deg); }

@media (max-width: 767px) {
    .notice__text { padding: 0 32px 0 0; font-size: 13px; text-align: left; }
    .notice__close { right: 4px; }
}

@media (max-width: 480px) {
    .team__grid { gap: 12px; }
    .team-card__body { padding: 14px 14px 16px; }
    .team-card__role { margin-top: 6px; font-size: 13px; }
    .team-card__badge { top: 8px; left: 8px; padding: 4px 8px; font-size: 11px; }
}

/* --- Servizi ------------------------------------------------------------ */

.services-wrap { margin-top: clamp(56px, 6vw, 49px); }

.services {
    position: relative;
    padding: 33px 0 109px;
}
/* Arco grigio dietro i servizi, come nel design. */
.services::before {
    content: "";
    position: absolute;
    inset: -76px 0 0 0;
    z-index: -1;
    border-radius: 50% 50% 0 0 / 600px 600px 0 0;
    background: var(--surface);
}
.services-wrap { position: relative; z-index: 0; }

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 56px 32px;
}

/* Card compatta blu: titolo e icona nel colore scelto per ogni servizio
   (--card-accent, impostato da main.js dal campo "color"). */
.service-card {
    --card-accent: var(--green);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    padding: 24px 24px 28px;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.service-card:has(.service-card__trigger):hover,
.service-card:focus-within {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}
.service-card:focus-within { outline: 3px solid var(--card-accent); outline-offset: 3px; }

.services__grid .service-card.is-extra { display: none; }
.services__grid.is-expanded .service-card.is-extra { display: flex; }

.service-card__icon {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 76px;
    height: 76px;
    object-fit: contain;
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.service-card:hover .service-card__icon { opacity: 0.5; transform: scale(1.05); }

.service-card__title {
    padding-right: 72px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--card-accent);
}

/* Il titolo è il pulsante che apre la finestra: tutta la card è cliccabile. */
.service-card__trigger {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.service-card__trigger::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
.service-card__trigger:focus-visible { outline: none; }

.service-card__text {
    margin-top: 14px;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

.services__more[hidden] { display: none; }

@media (max-width: 1023px) {
    .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

@media (max-width: 640px) {
    .services { padding-bottom: 64px; }
    .services::before { inset: -40px 0 0 0; border-radius: 50% 50% 0 0 / 160px 160px 0 0; }
    .services__grid { grid-template-columns: 1fr; gap: 16px; }
    .service-card { min-height: 0; padding: 20px 20px 24px; }
    .service-card__icon { width: 64px; height: 64px; }
    .service-card__title { font-size: 20px; }
    .service-card__text { font-size: 15px; }
}

@media (max-width: 767px) {
    .section-head--split { flex-direction: column; align-items: flex-start; }
}

/* --- Dove ci troviamo -------------------------------------------------- */

.location { padding-top: clamp(64px, 8vw, 122px); }

.location__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 479px;
    min-height: 609px;
    overflow: hidden;
    border-radius: var(--radius-card);
}

.location__map {
    position: relative;
    min-height: 360px;
    background: var(--placeholder);
}
.location__map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(0.25);
}

.location__card {
    padding: 75px 29px 48px;
    background: var(--navy);
    color: var(--white);
}

.location__block + .location__block { margin-top: 32px; }

.location__heading {
    margin-bottom: 18px;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.23;
    color: var(--green);
}

.location__text,
.location__list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 16px;
    line-height: 24px;
}
.location__text { white-space: pre-line; }
.location__list li + li { margin-top: 8.8px; }
.location__list a { text-decoration: none; }
.location__list a:hover { text-decoration: underline; }
.location__list .label { display: inline-block; min-width: 88px; }

.hours { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; }
.hours__row { display: contents; }
.hours__days,
.hours__time { margin: 0; padding-block: 4px; }
.hours__time::before { content: ": "; }
.hours__note {
    grid-column: 1 / -1;
    margin: -4px 0 0;
    font-size: 12px;
    line-height: 18px;
    opacity: 0.85;
}

@media (max-width: 1023px) {
    .location__grid { grid-template-columns: 1fr; min-height: 0; }
    .location__card { padding: 40px 24px; }
    .location__heading { font-size: 24px; margin-bottom: 12px; }
}

/* --- Social ------------------------------------------------------------- */

.social-section { padding-top: clamp(64px, 6vw, 78px); }

.social-embeds {
    display: grid;
    gap: 78px;
}

.social-embed {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--white);
}

/* L'embed del profilo mostra intestazione + 2 righe da 3 post quadrati:
   l'altezza segue la larghezza del contenitore. */
.social-embed--instagram iframe {
    display: block;
    width: 100%;
    height: calc(185px + min(100vw - 2 * var(--gutter), var(--container)) * 2 / 3);
    border: 0;
}

/* Iframe diretto del profilo (più affidabile dello script embed.js):
   TikTok centra la scheda con larghezza massima di circa 780px. */
.social-embed--tiktok { border: 0; border-radius: 0; background: transparent; }
.social-embed--tiktok iframe {
    display: block;
    width: 100%;
    height: 500px;
    border: 0;
}

.social-embed__fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 24px;
    font-weight: 600;
    color: var(--navy);
}

@media (max-width: 767px) {
    .social-embeds { gap: 40px; }
    .social-embed--tiktok iframe { height: 410px; }
}

/* --- Newsletter -------------------------------------------------------- */

.newsletter {
    margin-top: clamp(64px, 6vw, 68px);
    padding: clamp(56px, 7vw, 125px) 0 clamp(56px, 6vw, 96px);
    background: var(--surface);
    text-align: center;
}

.newsletter .section-title { max-width: 1033px; margin-inline: auto; }

.newsletter__form {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.newsletter__field {
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(416px, 100%);
    height: 66px;
    padding: 8px 24px 8px 8px;
    border-radius: var(--radius-pill);
    background: var(--white);
}
.newsletter__field:focus-within { outline: 3px solid var(--green); outline-offset: 2px; }

.newsletter__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--navy);
}
.newsletter__icon img { width: 32px; height: 32px; }

.newsletter__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 16px;
}
.newsletter__input::placeholder { color: var(--text-muted); }

.newsletter__submit { min-width: 152px; height: 66px; }
.newsletter__form.is-sending .newsletter__submit { opacity: 0.7; cursor: progress; }
.newsletter__field:has(input[aria-invalid="true"]) { box-shadow: 0 0 0 2px #D92D20; }

.newsletter__privacy {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}
.newsletter__privacy a { color: var(--navy); }

.form-status {
    margin-top: 16px;
    font-size: 15px;
    color: var(--navy);
}
.form-status[hidden] { display: none; }
.form-status.is-error { color: #B42318; }

@media (max-width: 640px) {
    .newsletter__form { flex-direction: column; align-items: stretch; }
    .newsletter__field { width: 100%; height: 58px; }
    .newsletter__icon { width: 42px; height: 42px; }
    .newsletter__icon img { width: 26px; height: 26px; }
    .newsletter__submit { height: 56px; }
}

/* --- Lavora con noi ---------------------------------------------------- */

.jobs {
    padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 9vw, 135px);
    background: var(--surface);
}

.jobs__grid {
    display: grid;
    grid-template-columns: minmax(0, 481fr) minmax(0, 687fr);
    gap: 32px;
    margin-top: clamp(32px, 5vw, 107px);
}

.jobs__text {
    font-size: clamp(18px, 0.4vw + 15px, 22px);
    line-height: 1.36;
    color: var(--text-muted);
}
.jobs__text p + p { margin-top: 1.36em; }

.form { display: grid; gap: 24px; }

/* Honeypot: fuori schermo invece di display:none, che alcuni bot riconoscono. */
.form__hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form.is-sending .form__submit { opacity: 0.7; cursor: progress; }
.form-status.is-success { color: #067647; }

.form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.form__field { display: grid; gap: 12px; }

.form__label {
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
    color: var(--navy);
}

.form__input,
.form__textarea {
    width: 100%;
    min-height: 58px;
    padding: 16px 24px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--white);
    font-size: 16px;
    line-height: 22px;
    transition: border-color 0.2s ease;
}
.form__textarea { min-height: 200px; resize: vertical; }
.form__input::placeholder,
.form__textarea::placeholder { color: var(--text-muted); }
.form__input:focus,
.form__textarea:focus { outline: 0; border-color: var(--navy); }
.form__input:user-invalid,
.form__textarea:user-invalid,
.form__input[aria-invalid="true"],
.form__textarea[aria-invalid="true"] { border-color: #D92D20; }
.consent input[aria-invalid="true"],
.file-picker__input[aria-invalid="true"] + .file-picker__button { box-shadow: 0 0 0 2px #D92D20; }

.form__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 24px;
}

.file-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.file-picker__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.file-picker__button {
    display: inline-flex;
    align-items: center;
    height: 58px;
    padding: 0 24px;
    border-radius: 12px;
    background: var(--white);
    font-size: 16px;
    white-space: nowrap;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}
.file-picker__button:hover { box-shadow: inset 0 0 0 1px var(--navy); }
.file-picker__input:focus-visible + .file-picker__button { outline: 3px solid var(--green); outline-offset: 3px; }
.file-picker__name {
    max-width: 225px;
    overflow: hidden;
    font-size: 12px;
    line-height: 18px;
    color: var(--text-1);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.consent {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 7px;
    font-size: 12px;
    line-height: 18px;
    cursor: pointer;
}
.consent input {
    flex: none;
    width: 44px;
    height: 44px;
    margin: 0;
    border: 1px solid #C9CCD3;
    border-radius: 10px;
    background: var(--white);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.consent input::after {
    content: "";
    width: 14px;
    height: 8px;
    border: solid var(--white);
    border-width: 0 0 3px 3px;
    transform: rotate(-45deg) translate(1px, -1px);
    opacity: 0;
}
.consent input:checked { background: var(--navy); border-color: var(--navy); }
.consent input:checked::after { opacity: 1; }
.consent a { color: inherit; }

.form__submit { justify-self: start; margin-top: 43px; min-width: 244px; }

@media (max-width: 900px) {
    .jobs__grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
    .form__row { grid-template-columns: 1fr; }
    .form__label { font-size: 16px; }
    .form__submit { justify-self: stretch; margin-top: 16px; }
    .consent { padding-bottom: 0; }
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
    padding: clamp(56px, 6vw, 80px) 0 32px;
    background: var(--navy);
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.6;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
    gap: 48px;
}

.site-footer .brand__mark { width: 58.5px; height: 40px; }
.site-footer__about p { max-width: 360px; margin-top: 20px; }
.site-footer .social { gap: 12px; margin-top: 24px; }

.site-footer__heading {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--green);
}

.site-footer__list { margin: 0; padding: 0; list-style: none; }
.site-footer__list li + li { margin-top: 6px; }
.site-footer__list a { text-decoration: none; }
.site-footer__list a:hover { color: var(--white); text-decoration: underline; }
.site-footer .hours { font-size: 15px; }

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}
.site-footer__bottom a { color: inherit; }
.site-footer__bottom a:hover { color: var(--white); }

/* Nota di trasparenza (L. 124/2017): presente ma discreta. */
.site-footer__legal-text { max-width: 640px; }
.site-footer__note {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

.site-footer__legal { align-items: baseline; }

/* Credit di chi ha realizzato il sito: riga a sé, sotto le note legali. */
.site-footer__credit {
    margin-top: 16px;
    font-size: 12px;
    text-align: right;
    color: rgba(255, 255, 255, 0.7);
}
.site-footer__credit a { color: inherit; text-decoration: none; }
.site-footer__credit a:hover { color: var(--white); text-decoration: underline; }

@media (max-width: 560px) {
    .site-footer__credit { text-align: left; }
}

@media (max-width: 900px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* --- Tag (slide Prima & Dopo) ----------------------------------------- */

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tags:empty { display: none; }

.tag {
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Tag in basso a sinistra sulla foto, come nel design. */
.compare__tags {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 24px;
    pointer-events: none;
}

@media (max-width: 767px) {
    .compare__tags { left: 12px; right: 12px; bottom: 12px; gap: 6px; }
    .tag { padding: 3px 10px; font-size: 11px; line-height: 16px; }
}

/* --- Finestra descrittiva dei servizi ---------------------------------- */

.service-dialog {
    width: min(720px, calc(100% - 32px));
    max-height: calc(100dvh - 48px);
    padding: 0;
    border: 0;
    border-radius: var(--radius-media);
    background: var(--white);
    color: var(--text-1);
    box-shadow: 0 30px 80px rgba(13, 29, 66, 0.3);
    overflow: auto;
    overscroll-behavior: contain;
}
.service-dialog::backdrop {
    background: rgba(13, 29, 66, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.service-dialog[open] { animation: dialog-in 0.25s ease; }

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
}

.service-dialog__panel {
    position: relative;
    padding: 40px;
}

.service-dialog__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--surface);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.service-dialog__close:hover { background: var(--line); }
.service-dialog__close span,
.service-dialog__close span::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--navy);
    transform: translate(-50%, -50%) rotate(45deg);
}
.service-dialog__close span::before {
    content: "";
    transform: translate(-50%, -50%) rotate(90deg);
}

.service-dialog__head {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 48px;
}
.service-dialog__badge {
    display: grid;
    place-items: center;
    flex: none;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--navy);
}
.service-dialog__badge img { width: 52px; height: 52px; object-fit: contain; }

.service-dialog__media {
    margin-top: 24px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-card);
}
.service-dialog__media img { width: 100%; height: 100%; object-fit: cover; }

.service-dialog__title {
    font-size: clamp(24px, 1vw + 18px, 32px);
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy);
}

.service-dialog__lead {
    margin-top: 24px;
    font-size: 18px;
    line-height: 1.55;
    color: var(--text-1);
}

.service-dialog__body { margin-top: 16px; }
.service-dialog__body p + p { margin-top: 1em; }

body.is-dialog-open { overflow: hidden; }

@media (max-width: 640px) {
    .service-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
    .service-dialog__panel { padding: 28px 22px; }
    .service-dialog__close { top: 14px; right: 14px; }
    .service-dialog__head { flex-direction: column; align-items: flex-start; gap: 16px; }
    .service-dialog__badge { width: 72px; height: 72px; }
    .service-dialog__badge img { width: 42px; height: 42px; }
    .service-dialog__lead { font-size: 16px; }
}

/* --- Pulsante secondario ---------------------------------------------- */

.btn--ghost {
    background: transparent;
    color: var(--navy);
    box-shadow: inset 0 0 0 2px var(--navy);
}
.btn--ghost:hover {
    background: var(--navy);
    color: var(--white);
}

/* ==========================================================================
   Landing Logopedia: tema lilla
   Colore principale #DF9BFF; il blu del sito diventa una prugna scura per
   testi, pulsanti e superfici forti. Header e footer restano quelli dello
   studio.
   ========================================================================== */

.theme-lilac {
    --lilac: #DF9BFF;
    --lilac-soft: #F8EEFF;
    --lilac-mid: #EBC8FF;
    --plum: #3D1A5B;

    --navy: var(--plum);
    --green: var(--lilac);          /* accenti su fondo scuro */
    --eyebrow: #9B45D1;             /* occhielli su fondo chiaro */
    --surface: var(--lilac-soft);
    --accent-blue: #9B45D1;
    --shadow-card: 0 10px 30px rgba(61, 26, 91, 0.08);
    --shadow-card-hover: 0 18px 40px rgba(61, 26, 91, 0.16);
}

.theme-lilac .eyebrow { color: var(--eyebrow); }
.theme-lilac .btn:hover { background: #5A2A80; }
.theme-lilac :focus-visible { outline-color: #9B45D1; }

/* Hero: stessa struttura della homepage (foto a tutto schermo, frase grande,
   un pulsante), nei colori della logopedia. Senza foto resta un fondo prugna. */
.theme-lilac .hero {
    background:
        radial-gradient(70% 90% at 85% 15%, rgba(223, 155, 255, 0.55) 0%, rgba(223, 155, 255, 0) 70%),
        var(--plum);
}
.theme-lilac .hero::after {
    background: linear-gradient(to top,
        rgba(61, 26, 91, 0.88) 0%,
        rgba(61, 26, 91, 0.62) 35%,
        rgba(61, 26, 91, 0.3) 60%,
        rgba(61, 26, 91, 0) 82%);
}
.theme-lilac .hero__cta:hover { background: #EBC8FF; }
.theme-lilac .hero__cta::after { animation-name: cta-halo-lilac; }

@keyframes cta-halo-lilac {
    0%   { box-shadow: 0 0 0 0 rgba(223, 155, 255, 0.65); }
    28%  { box-shadow: 0 0 0 18px rgba(223, 155, 255, 0); }
    100% { box-shadow: 0 0 0 18px rgba(223, 155, 255, 0); }
}

@media (max-width: 767px) {
    .theme-lilac .hero::after {
        background: linear-gradient(to top,
            rgba(61, 26, 91, 0.9) 0%,
            rgba(61, 26, 91, 0.66) 42%,
            rgba(61, 26, 91, 0.3) 66%,
            rgba(61, 26, 91, 0) 84%);
    }
}

/* La logopedista */
.lp-about { padding: clamp(64px, 8vw, 112px) 0; }

.lp-about__grid {
    display: grid;
    grid-template-columns: minmax(0, 379px) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
}

.lp-about__card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--white);
    box-shadow: var(--shadow-card);
}
.lp-about__media {
    aspect-ratio: 379 / 420;
    background: var(--lilac-soft);
}
.lp-about__media > img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.lp-about__media .team-card__placeholder { height: 100%; }

.lp-about__content .section-title { margin-bottom: 24px; }
.lp-about__text p + p { margin-top: 1em; }

.checklist {
    display: grid;
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}
.checklist__item {
    position: relative;
    padding-left: 36px;
    font-size: 17px;
    font-weight: 500;
    line-height: 24px;
    color: var(--navy);
}
.checklist__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--lilac, var(--green));
}
.checklist__item::after {
    content: "";
    position: absolute;
    left: 9px;
    top: 5px;
    width: 6px;
    height: 11px;
    border: solid var(--navy);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

@media (max-width: 900px) {
    .lp-about__grid { grid-template-columns: 1fr; }
    .lp-about__card { width: min(100%, 379px); margin-inline: auto; }
}

/* La landing chiude con "Dove ci troviamo": serve respiro prima del footer. */
.theme-lilac .location { padding-bottom: var(--section-space); }

/* Problematiche: riusa la griglia dei servizi con il tema lilla */
.lp-problems { margin-top: 76px; }

/* Percorso */
.lp-steps { padding: clamp(64px, 8vw, 112px) 0 0; }

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 32px;
    border-radius: var(--radius-card);
    background: var(--white);
    box-shadow: var(--shadow-card);
    counter-increment: step;
}
.step::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 24px;
    border-radius: 50%;
    background: var(--lilac, var(--green));
    color: var(--navy);
    font-size: 22px;
    font-weight: 600;
}
.step__title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--navy);
}
.step__text {
    margin-top: 10px;
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .steps { grid-template-columns: 1fr; gap: 16px; }
    .step { display: grid; grid-template-columns: 56px 1fr; column-gap: 20px; padding: 24px; }
    .step::before { grid-row: span 2; margin: 0; }
}

/* Box finale */
.lp-cta { padding-top: clamp(64px, 8vw, 112px); }

.lp-cta__box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 48px;
    padding: clamp(32px, 5vw, 64px);
    border-radius: var(--radius-media);
    background:
        radial-gradient(70% 120% at 100% 0%, rgba(223, 155, 255, 0.55) 0%, rgba(223, 155, 255, 0) 60%),
        linear-gradient(120deg, var(--plum) 0%, #6A2F96 100%);
    color: var(--white);
}
.lp-cta__title {
    font-size: clamp(26px, 1.4vw + 18px, 40px);
    font-weight: 600;
    line-height: 1.2;
}
.lp-cta__text {
    max-width: 560px;
    margin-top: 12px;
    font-size: 18px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
}
.lp-cta .btn {
    background: var(--lilac);
    color: var(--plum);
}
.lp-cta .btn:hover { background: var(--white); }

/* ==========================================================================
   Cookie: banner, contenuti bloccati e pagine delle informative
   La logica del consenso è in kris/core/scripts/consent.js (framework).
   ========================================================================== */

.cookie-banner {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 300;
    width: min(460px, calc(100% - 48px));
}
.cookie-banner[hidden] { display: none; }

/* --- Recensioni Google -----------------------------------------------------
   Un riquadro unico, cliccabile: voto grande, stelle che si riempiono in base
   al voto (main.js imposta --rating), numero di recensioni e link a Google. */
.reviews { padding: clamp(40px, 5vw, 72px) 0 0; }
.reviews__card {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(20px, 2.5vw, 28px) clamp(20px, 3vw, 36px);
    border: 1px solid var(--line);
    border-radius: var(--radius-media);
    background: var(--white);
    box-shadow: var(--shadow-card);
    color: var(--navy);
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.reviews__card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.reviews__score {
    font-size: clamp(44px, 4vw, 60px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}
.reviews__info { display: grid; gap: 6px; flex: 1; }
.reviews__stars {
    position: relative;
    display: inline-block;
    width: max-content;
    font-size: 24px;
    line-height: 1;
    letter-spacing: 2px;
    color: #E3E5EA;
}
.reviews__stars::before { content: "\2605\2605\2605\2605\2605"; }
.reviews__stars-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--rating, 100%);
    overflow: hidden;
    color: #FBBC04;
    white-space: nowrap;
}
.reviews__stars-fill::before { content: "\2605\2605\2605\2605\2605"; }
.reviews__meta { color: var(--text-1); font-size: 16px; }
.reviews__meta strong { color: var(--navy); font-weight: 700; }
.reviews__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
    padding: 12px 22px;
    border-radius: var(--radius-pill);
    background: var(--navy);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
}
.reviews__arrow {
    width: 8px;
    height: 8px;
    border: solid currentColor;
    border-width: 2px 2px 0 0;
    transform: rotate(45deg);
}
@media (max-width: 640px) {
    .reviews__card { flex-wrap: wrap; }
    .reviews__cta { width: 100%; justify-content: center; }
}

/* --- Domande frequenti -------------------------------------------------------
   Titolo a sinistra, domande a destra; chiuse di default per non allungare la pagina. */
.faq { padding-top: var(--section-space); }
.faq__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: start;
}
.faq__head { position: sticky; top: calc(var(--header-h) + 24px); }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0;
    color: var(--navy);
    font-size: clamp(17px, 0.4vw + 15px, 20px);
    font-weight: 600;
    line-height: 1.35;
    list-style: none;
    cursor: pointer;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question:hover { color: var(--accent-blue); }
.faq__icon {
    position: relative;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    transition: background-color 0.2s ease, transform 0.25s ease;
}
.faq__icon::before,
.faq__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--navy);
    transform: translate(-50%, -50%);
}
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.25s ease; }
.faq__item[open] .faq__icon { background: var(--green); }
.faq__item[open] .faq__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq__answer {
    max-width: 640px;
    padding: 0 52px 24px 0;
    color: var(--text-1);
    line-height: 1.6;
}
.faq__answer p + p { margin-top: 0.8em; }

@media (max-width: 900px) {
    .faq__inner { grid-template-columns: 1fr; gap: 24px; }
    .faq__head { position: static; }
    .faq__answer { padding-right: 0; }
}

/* Link "Approfondisci" in fondo alla finestra di un servizio. */
.service-dialog__more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 12px 22px;
    border: 1.5px solid var(--navy);
    border-radius: var(--radius-pill);
    color: var(--navy);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.service-dialog__more:hover { background: var(--navy); color: var(--white); }
.service-dialog__more-arrow {
    width: 8px;
    height: 8px;
    border: solid currentColor;
    border-width: 2px 2px 0 0;
    transform: rotate(45deg);
}

/* --- Pagine servizio --------------------------------------------------------
   Pagine di approfondimento corte: titolo, una frase, un pulsante, testo, FAQ. */
.svc__narrow { width: min(820px, 100% - 2 * var(--gutter)); }
.svc-hero {
    padding: clamp(40px, 6vw, 88px) 0 clamp(40px, 5vw, 64px);
    background:
        radial-gradient(60% 90% at 90% 10%, rgba(33, 234, 172, 0.14) 0%, rgba(33, 234, 172, 0) 70%),
        var(--navy);
    color: var(--white);
}
.svc-crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.svc-crumbs li { color: rgba(255, 255, 255, 0.7); }
.svc-crumbs li + li::before { content: "/"; margin-right: 8px; color: rgba(255, 255, 255, 0.4); }
.svc-crumbs a { color: var(--green-text); text-decoration: none; }
.svc-crumbs a:hover { text-decoration: underline; }
.svc-hero__title {
    margin-top: clamp(20px, 3vw, 32px);
    font-size: clamp(36px, 4.5vw, 64px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-wrap: balance;
}
.svc-hero__lead {
    max-width: 640px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(17px, 0.5vw + 14px, 21px);
    line-height: 1.5;
}
.svc-hero__cta { margin-top: 28px; }
.svc-media { margin-top: clamp(32px, 4vw, 56px); }
.svc-media img { width: 100%; height: auto; border-radius: var(--radius-media); }
.svc-body { padding-top: clamp(32px, 4vw, 56px); color: var(--text-1); font-size: 17px; line-height: 1.7; }
.svc-body h2 { margin: 1.6em 0 0.5em; color: var(--navy); font-size: clamp(22px, 1vw + 16px, 28px); font-weight: 700; line-height: 1.25; }
.svc-body h2:first-child { margin-top: 0; }
.svc-body p + p, .svc-body ul + p, .svc-body p + ul { margin-top: 0.9em; }
.svc-body ul { padding-left: 1.2em; }
.svc-body li + li { margin-top: 0.4em; }
.svc-faq { padding-top: clamp(40px, 5vw, 72px); }
.svc-faq__title { margin-bottom: 16px; font-size: clamp(22px, 1vw + 16px, 28px); font-weight: 700; line-height: 1.25; }
.svc-cta { padding: clamp(40px, 5vw, 72px) 0 var(--section-space); }
.svc-cta__box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: clamp(24px, 3vw, 40px);
    border-radius: var(--radius-media);
    background: var(--navy);
    color: var(--white);
}
.svc-cta__title { font-size: clamp(22px, 1vw + 16px, 30px); font-weight: 700; line-height: 1.2; }
.svc-cta__box .hero__cta { margin-top: 0; }
.svc-back { margin-top: 24px; }
.svc-back a { color: var(--navy); font-weight: 600; }
@media (max-width: 767px) {
    .svc-hero .hero__cta, .svc-cta__box .hero__cta { width: 100%; }
}

/* --- Pagina 404 ------------------------------------------------------------
   Stessa voce della hero: fondo blu, titolo grande in Inter quasi black,
   pulsante verde. A destra il marchio dello studio (o l'immagine scelta). */
.notfound {
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--topbar-h) - var(--header-h));
    min-height: calc(100svh - var(--topbar-h) - var(--header-h));
    padding: clamp(56px, 8vw, 120px) 0;
    background:
        radial-gradient(60% 80% at 85% 30%, rgba(33, 234, 172, 0.14) 0%, rgba(33, 234, 172, 0) 70%),
        var(--navy);
    color: var(--white);
}
.notfound__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: clamp(40px, 6vw, 120px);
    align-items: center;
}
.notfound__code {
    color: var(--green-text);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}
.notfound__title {
    margin-top: 16px;
    font-size: clamp(48px, 7vw, 112px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.05em;
    text-wrap: balance;
}
/* Il punto finale verde, come nella hero. */
.notfound__title::after {
    content: "";
    display: inline-block;
    width: 0.16em;
    height: 0.16em;
    margin-left: 0.04em;
    border-radius: 50%;
    background: var(--green);
}
.notfound__text {
    max-width: 520px;
    margin-top: clamp(16px, 2vw, 28px);
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(17px, 0.5vw + 14px, 21px);
    line-height: 1.5;
}
.notfound__cta {
    margin-top: clamp(24px, 3vw, 40px);
    background: var(--green);
    color: var(--navy);
}
.notfound__cta:hover { background: #4FF0BF; }
.notfound__visual { justify-self: center; width: 100%; max-width: 460px; }
.notfound__mark { width: 100%; height: auto; opacity: 0.9; }
.notfound__image { width: 100%; height: auto; border-radius: var(--radius-media); }

@media (max-width: 767px) {
    .notfound__inner { grid-template-columns: 1fr; }
    .notfound__visual { order: -1; justify-self: start; max-width: 120px; }
    .notfound__cta { width: 100%; }
}

/* --- Pulsante WhatsApp fisso ---------------------------------------------
   Nascosto all'inizio: main.js aggiunge .is-visible dopo un po' di scorrimento
   e lo toglie sopra il footer, con il banner cookie o il menu mobile aperti. */
.wa-float {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 250;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.92);
    transform-origin: bottom right;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
.wa-float.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
}
@media (min-width: 768px) {
    .wa-float { right: 28px; bottom: 28px; }
}

.wa-float__toggle {
    position: relative;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: #25D366;
    color: var(--white);
    box-shadow: 0 10px 28px rgba(13, 29, 66, 0.28);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.wa-float__toggle:hover { background: #1EBE5B; transform: scale(1.05); }
.wa-float__toggle .wa-float__icon { width: 32px; height: 32px; }
/* Due onde quando compare, per farsi notare senza disturbare. */
.wa-float.is-new .wa-float__toggle::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    animation: wa-halo 1.8s ease-out 0.3s 2;
}
@keyframes wa-halo {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    100% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
}

.wa-float__panel {
    position: relative;
    width: min(330px, calc(100vw - 32px));
    overflow: hidden;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 20px 50px rgba(13, 29, 66, 0.28);
    animation: wa-panel-in 0.25s ease-out;
}
.wa-float__panel[hidden] { display: none; }
@keyframes wa-panel-in {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

.wa-float__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 52px 16px 16px;
    background: var(--navy);
    color: var(--white);
}
.wa-float__avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}
.wa-float__avatar img { width: 28px; height: auto; }
.wa-float__name { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.wa-float__status { display: block; margin-top: 2px; font-size: 13px; line-height: 1.3; opacity: 0.75; }

.wa-float__close {
    position: absolute;
    top: 14px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.wa-float__close::before,
.wa-float__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--white);
    transform: translate(-50%, -50%) rotate(45deg);
}
.wa-float__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.wa-float__close:hover { background: rgba(255, 255, 255, 0.12); }

.wa-float__body { padding: 20px 16px 8px; background: #F3EFEA; }
.wa-float__bubble {
    max-width: 92%;
    padding: 12px 14px;
    border-radius: 4px 16px 16px 16px;
    background: var(--white);
    box-shadow: 0 1px 2px rgba(13, 29, 66, 0.08);
    color: var(--text-1);
    font-size: 15px;
    line-height: 1.5;
}
.wa-float__foot { padding: 12px 16px 16px; background: #F3EFEA; }
.wa-float__cta {
    width: 100%;
    background: #25D366;
    color: var(--white);
}
.wa-float__cta:hover { background: #1EBE5B; }
.wa-float__cta .wa-float__icon { width: 20px; height: 20px; flex: none; }

@media (prefers-reduced-motion: reduce) {
    .wa-float, .wa-float.is-visible { transition: none; }
    .wa-float.is-new .wa-float__toggle::after,
    .wa-float__panel { animation: none; }
}

.cookie-banner__panel {
    padding: 28px;
    border-radius: var(--radius-media);
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 24px 60px rgba(13, 29, 66, 0.35);
    animation: dialog-in 0.3s ease;
}

.cookie-banner__title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--green);
}

.cookie-banner__text {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
}
.cookie-banner__text a { color: var(--white); }

/* "Rifiuta" e "Accetta" hanno lo stesso peso visivo, come chiede il Garante. */
.cookie-banner__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}
.cookie-banner__btn {
    min-height: 48px;
    padding: 12px 20px;
    background: var(--white);
    color: var(--navy);
}
.cookie-banner__btn:hover { background: #E6E9F0; box-shadow: none; }
.cookie-banner__btn--accept { background: var(--green); }
.cookie-banner__btn--accept:hover { background: #4FF0BF; }
.cookie-banner :focus-visible { outline-color: var(--white); }
.cookie-banner__panel {
    max-height: calc(100svh - 48px);
    overflow-y: auto;
}

/* "Personalizza": scelte per categoria, sotto il testo. */
.cookie-banner__customize {
    display: block;
    margin: 14px auto 0;
    padding: 4px 8px;
    border: 0;
    background: none;
    color: var(--white);
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.cookie-banner__customize[aria-expanded="true"] { display: none; }
.cookie-banner__details {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.cookie-banner__details[hidden] { display: none; }
.cookie-banner__option {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 12px;
    align-items: start;
}
.cookie-banner__option input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--green);
    cursor: pointer;
}
.cookie-banner__option label {
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
}
.cookie-banner__option label strong {
    display: block;
    font-weight: 600;
    color: var(--white);
}
.cookie-banner__option--fixed input,
.cookie-banner__option--fixed label { cursor: default; }
.cookie-banner__option--fixed input { opacity: 0.6; }
.cookie-banner__save { width: 100%; margin-top: 4px; }

@media (max-width: 560px) {
    .cookie-banner { left: 12px; right: 12px; bottom: 12px; width: auto; }
    .cookie-banner__panel { padding: 22px 20px; }
}

/* Riquadro al posto di mappa ed embed finché non c'è il consenso. */
.consent-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 280px;
    padding: 32px 24px;
    background: var(--surface);
    text-align: center;
}
.consent-placeholder__text {
    max-width: 380px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-1);
}
.consent-placeholder__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
}
.consent-placeholder__link {
    font-weight: 600;
    color: var(--navy);
}

iframe[data-consent-src] { display: none; }
.is-consented > .consent-placeholder { display: none; }

.location__map .consent-placeholder {
    position: absolute;
    inset: 0;
    min-height: 0;
    background: var(--placeholder);
}

/* Pagine Privacy e Cookie policy */
.legal-page { padding: clamp(40px, 6vw, 88px) 0 var(--section-space); }
.legal-page__inner { max-width: 820px; }
.legal-page__updated { margin-top: 12px; font-size: 14px; color: var(--text-muted); }
.legal-page__actions { margin-top: 28px; }

.legal-owner {
    margin-top: 32px;
    padding: 24px 28px;
    border-radius: var(--radius-card);
    background: var(--surface);
    line-height: 1.7;
}
.legal-owner__title { margin-bottom: 8px; font-size: 18px; font-weight: 600; color: var(--navy); }
.legal-owner a { color: var(--navy); }

.legal-page__body { margin-top: 40px; }
.legal-page__body h2 {
    margin: 32px 0 10px;
    font-size: 22px;
    font-weight: 600;
    color: var(--navy);
}
.legal-page__body p + p,
.legal-page__body ul { margin-top: 12px; }
.legal-page__body li + li { margin-top: 6px; }
.legal-page__draft {
    padding: 14px 18px;
    border-left: 4px solid var(--green);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-1);
}

/* Link legali nel footer */
.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}
.site-footer__link-btn {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.site-footer__link-btn:hover { color: var(--white); }
