/* ==========================================================================
   Tre Esse Progettazione Biomedica – foglio di stile
   Ricalca la grafica del precedente tema WordPress (The7 + WPBakery).
   Breakpoint: 1200px (layout con immagine di sfondo), 1100px (menu mobile), 768px.
   ========================================================================== */

/* Font (ospitati sul sito, nessuna richiesta a Google Fonts) */
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/fira-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/fira-sans-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/fira-sans-700.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/fira-sans-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/open-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-3-400.woff2") format("woff2"); }

:root {
    --accent: #ef7b1e;
    --accent-dark: #d0600c;
    --text: #4c4c4c;
    --heading: #111111;
    --light-bg: #f5f5f5;
    --footer-text: #aaaaaa;
    --font: "Fira Sans", Helvetica, Arial, Verdana, sans-serif;
    --font-alt: "Source Sans 3", "Source Sans Pro", Helvetica, Arial, sans-serif;
    --header-h: 90px;
    --topbar-h: 40px;
    --gutter: 25px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 20px;
    line-height: 30px;
    color: var(--text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4, h5, h6 { margin: 0 0 10px; color: var(--heading); font-weight: 400; }
h1 { font-size: 42px; line-height: 52px; }
h2 { font-size: 36px; line-height: 46px; }
h3 { font-size: 24px; line-height: 34px; }

p { margin: 0 0 10px; }
strong { font-weight: 700; }

button { font: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only {
    position: absolute; 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: -9999px; top: 0; z-index: 1000; background: #fff; padding: 10px 15px; }
.skip-link:focus { left: 10px; top: 10px; }

.icon { width: 1em; height: 1em; fill: currentColor; flex: 0 0 auto; }

/* --- Pulsanti ------------------------------------------------------------ */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: 0;
    background: var(--accent);
    color: #fff;
    font-family: var(--font);
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}
.btn:hover, .btn:focus-visible { background: var(--accent-dark); color: #fff; }

.link-button {
    padding: 0; border: 0; background: none; color: inherit;
    font-size: inherit; line-height: inherit; text-decoration: none; cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

/* --- Header -------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 0 15px 1px rgba(0, 0, 0, .07);
}

.topbar {
    display: flex;
    gap: 20px;
    align-items: center;
    height: var(--topbar-h);
    /* Contenuto largo al massimo 1600px e centrato, come nel tema originale */
    padding: 5px max(40px, calc((100% - 1600px) / 2 + 40px));
    background: var(--accent);
}
.topbar a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-family: var(--font-alt);
    font-size: 16px;
    line-height: 22px;
    text-decoration: none;
}
.topbar a:hover { text-decoration: underline; }
.topbar .icon { width: 14px; height: 14px; }

.masthead {
    display: flex;
    align-items: stretch;
    height: var(--header-h);
    padding: 0 max(30px, calc((100% - 1600px) / 2 + 30px));
}

.brand { display: flex; align-items: center; flex: 0 0 auto; }
/* Sempre 264px, come nell'originale: e' la meta' esatta del logo HD (528px),
   quindi sugli schermi ad alta densita' non viene ridimensionato e resta nitido. */
.brand img { width: 264px; height: auto; }

.nav-toggle, .nav__close, .nav__contacts { display: none; }

.nav { flex: 1 1 auto; display: flex; }
.nav__list { display: flex; flex: 1 1 auto; margin: 0; padding: 0; list-style: none; }

.nav__item {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
}
.nav__item + .nav__item { border-left: 1px solid rgba(0, 0, 0, .08); }

.nav__link {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 8px 15px 4px;
    border: 0;
    background: none;
    color: var(--heading);
    font-family: var(--font);
    font-size: 16px;
    line-height: 20px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}
.nav__text { position: relative; padding: 0 0 6px; }
.nav__text::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform .25s;
}
.nav__arrow { width: 10px; height: 10px; margin: 0 0 6px 3px; }

.nav__item:hover > .nav__link,
.nav__item.is-active > .nav__link,
.nav__link:focus-visible { color: var(--accent); }
.nav__item:hover > .nav__link .nav__text::after,
.nav__item.is-active > .nav__link .nav__text::after { transform: scaleX(1); }

.nav__sub {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    width: 298px;
    margin: 0;
    padding: 10px;
    list-style: none;
    background: #fff;
    box-shadow: 0 0 4px rgba(0, 0, 0, .2);
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s, visibility .2s;
}
.nav__item--parent:hover .nav__sub,
.nav__item--parent:focus-within .nav__sub,
.nav__item--parent.is-open .nav__sub {
    visibility: visible;
    opacity: 1;
    transform: none;
}
.nav__sub a {
    display: block;
    padding: 6px 0 7px;
    color: var(--heading);
    font-family: var(--font-alt);
    font-size: 18px;
    line-height: 22px;
    text-decoration: none;
    transition: color .2s;
}
.nav__sub a:hover, .nav__sub a:focus-visible, .nav__sub a.is-active { color: var(--accent); }

/* Sotto l'header (z-index 100), che contiene il pannello del menu mobile */
.nav-overlay { position: fixed; inset: 0; z-index: 99; background: rgba(0, 0, 0, .5); }

/* --- Hero home ----------------------------------------------------------- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: max(560px, calc(100vh - var(--topbar-h) - var(--header-h)));
    overflow: hidden;
    background: #11344f var(--bg) center / cover no-repeat;
    color: #fff;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .3));
}
.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 543px);
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    padding: 60px 0 60px 70px;
}
.hero__title {
    margin: 0 0 40px;
    color: #fff;
    font-family: "Fira Sans Condensed", var(--font);
    font-size: 60px;
    line-height: 66px;
    font-weight: 700;
}
.hero__lead {
    max-width: 530px;
    margin: 0;
    font-family: "Open Sans", var(--font);
    font-size: 20px;
    line-height: 32px;
    font-weight: 600;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 45px; }
.btn--hero {
    width: 180px;
    padding: 15px 18px;
    font-family: "Fira Sans Condensed", var(--font);
    font-size: 16px;
    line-height: 18px;
    font-weight: 700;
}
.btn--white { background: #fff; color: #303030; }
.btn--white:hover, .btn--white:focus-visible { background: #e8e8e8; color: #303030; }
.hero__media img { width: 543px; }

@media (prefers-reduced-motion: no-preference) {
    .hero__title, .hero__lead, .hero__actions { animation: fade-up .9s both; }
    .hero__lead { animation-delay: .25s; }
    .hero__actions { animation-delay: .5s; }
    .hero__media { animation: fade-left 1.1s .2s both; }
}
@keyframes fade-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes fade-left { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }

/* --- Sezioni interne ----------------------------------------------------- */
/* Su tablet e smartphone: sfondo chiaro e testo scuro.
   Da 1200px: immagine di sfondo con riquadro scuro semitrasparente a destra. */
.feature { background: var(--light-bg); padding: 40px 0 30px; }
.feature__inner { max-width: 1350px; margin: 0 auto; padding: 0 var(--gutter); }

.feature__figure { margin: 0; padding: 0 var(--gutter) 30px; background: var(--light-bg); }
.feature__figure img { width: 100%; max-width: 1200px; margin: 0 auto; }

.kicker-title { font-size: 36px; line-height: 46px; }

.heading-line { margin: 20px 0 25px; font-size: 36px; line-height: 46px; }

.infobox { display: flex; align-items: center; gap: 15px; margin: 0 0 15px; }
.infobox--spaced { margin: 20px 0 10px; }
.infobox__icon { width: 75px; height: 45px; color: var(--accent); }
.infobox__title { margin: 0; font-size: 22px; line-height: 30px; font-weight: 700; }
.infobox__text { margin: 0; font-size: 18px; line-height: 26px; }
.infobox__text--list { font-size: 18px; line-height: 26px; }

/* Brevetti e studio clinico */
.badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: #fff;
}
.badge-icon .icon { width: 22px; height: 22px; }

.patents { margin-top: 10px; }
.patent { padding: 30px 20px; margin: 0 0 30px; border: 1px solid #bababa; text-align: center; }
.patent__head { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-bottom: 10px; }
.patent .badge-icon { width: 60px; height: 60px; }
.patent .badge-icon .icon { width: 32px; height: 32px; }
.patent__title { margin: 0; font-size: 24px; line-height: 30px; font-weight: 700; }
.patent p { margin: 0; font-size: 18px; line-height: 25px; }

.study-title { display: flex; align-items: center; gap: 15px; margin: 20px 0 30px; }

/* Elenchi puntati con pallino rosso */
.bullet-list { margin: 15px 0 10px; padding: 0; list-style: none; }
.bullet-list li { position: relative; margin: 0 0 15px; padding-left: 22px; font-size: 18px; line-height: 26px; }
.bullet-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 3l3 3-3 3' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.bullet-list a { color: inherit; }

/* Note bibliografiche */
.notes { margin: 30px 0 0; padding: 0; list-style: none; counter-reset: note; font-size: 13px; line-height: 1.5; }
.notes li { counter-increment: note; }
.notes li::before { content: counter(note) ") "; }
.notes a { color: inherit; }

/* About us */
.pullquote { margin: 15px 10px 20px 0; padding: 5px 20px 5px 0; border-right: 3px solid var(--accent); }
.pullquote p { margin: 0; color: var(--heading); font-size: 20px; line-height: 30px; font-weight: 700; }

.fancy-title { display: flex; align-items: center; gap: 15px; margin: 30px 0 20px; font-size: 20px; line-height: 30px; }
.fancy-title::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--accent); }

.partners { display: grid; gap: 30px; }
.partner img { width: 200px; margin-bottom: 10px; }
.partner__text { margin: 0; font-size: 16px; line-height: 26px; }
.partner__text a { color: inherit; }

/* Contatti */
.form { margin: 20px 0 0; }
.form__row { margin: 0 0 10px; }
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dddddd;
    border-radius: 0;
    background: #fff;
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 22px;
}
.form textarea { min-height: 90px; resize: vertical; }
.form ::placeholder { color: #999999; opacity: 1; }
.form [aria-invalid="true"] { border-color: var(--accent); }
.form__row--check { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 20px; }
.form__row--check input { margin: 3px 0 0; accent-color: var(--accent); }
.form__row--check label { flex: 1 1 0; }
.form__row--check .form__error { flex-basis: 100%; }
.form__error { display: block; margin-top: 4px; color: var(--accent); font-size: 14px; line-height: 20px; }
.form__status { margin: 0 0 15px; padding: 10px 15px; font-size: 16px; line-height: 22px; border-left: 4px solid; background: #fff; }
.form__status--ok { border-color: #2e9e4f; color: #1f6b35; }
.form__status--ko { border-color: var(--accent); color: var(--accent-dark); }
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn--submit { margin-top: 5px; }

.contact-intro { margin-bottom: 0; }

.contact-info {
    display: grid;
    gap: 0 30px;
    margin: 25px 0 0;
    padding: 25px 0 0;
    border-top: 1px solid rgba(0, 0, 0, .1);
    list-style: none;
}
.contact-info li { display: flex; align-items: center; gap: 15px; padding-bottom: 20px; font-size: 20px; line-height: 30px; color: var(--heading); }
.contact-info a { color: inherit; text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }
.badge-round {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
}
.badge-round .icon { width: 18px; height: 18px; }

@media (min-width: 768px) and (max-width: 1199px) {
    .contact-info { grid-template-columns: 1fr 1fr; }
    .partners { grid-template-columns: 1fr 1fr; }
}

/* --- Layout con immagine di sfondo (desktop) ----------------------------- */
@media (min-width: 1200px) {
    .feature {
        position: relative;
        margin-top: 2px;
        padding: 70px 0;
        background: var(--light-bg) var(--bg) center / cover no-repeat;
    }
    .feature::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, var(--overlay, .3));
    }
    .feature--about { padding-bottom: 110px; }
    .feature__inner { position: relative; }
    .feature__panel {
        width: 50%;
        margin-left: auto;
        padding: 30px 30px 20px;
        background: rgba(0, 0, 0, .5);
        color: #fff;
    }
    .feature--about .feature__panel { padding-bottom: 40px; }
    .feature__panel h1, .feature__panel h2, .feature__panel h3,
    .feature__panel .pullquote p, .feature__panel a,
    .feature__panel .contact-info li { color: #fff; }
    .feature__figure { display: none; }

    .kicker-title { font-size: 24px; line-height: 34px; }
    .heading-line { margin: 20px 0 25px; padding-bottom: 5px; font-size: 38px; line-height: 50px; border-bottom: 4px solid var(--accent); }
    .infobox__icon { color: #fff; }

    .patent { margin: 0; padding: 15px 0 10px; border: 0; text-align: left; }
    .patent + .patent { border-top: 1px solid rgba(255, 255, 255, .55); }
    .patent__head { flex-direction: row; gap: 15px; }
    .patent .badge-icon { width: 40px; height: 40px; }
    .patent .badge-icon .icon { width: 22px; height: 22px; }

    .partners { grid-template-columns: 1fr 1fr; }

    .form input[type="text"], .form input[type="email"], .form input[type="tel"], .form textarea { border-color: transparent; }
    .form [aria-invalid="true"] { border-color: var(--accent); }
    .form__error { color: #ffb3b6; }
    .contact-intro { display: none; }
    .contact-info { border-top-color: rgba(255, 255, 255, .35); }
    .contact-info__extra { display: none !important; }
}

/* --- Pagine di testo (privacy, cookie, 404) ------------------------------ */
.doc { background: var(--light-bg); padding: 60px 0 70px; }
.doc__inner { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter); }
.doc h2 { margin-top: 35px; font-size: 26px; line-height: 34px; }
.doc h3 { margin-top: 20px; font-size: 20px; line-height: 28px; font-weight: 700; }
.doc p, .doc li { font-size: 18px; line-height: 28px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc__meta { color: #878787; font-size: 15px !important; }
.doc--center { text-align: center; min-height: 50vh; }
.table-wrap { overflow-x: auto; margin: 10px 0 15px; }
.doc table { width: 100%; border-collapse: collapse; background: #fff; font-size: 16px; line-height: 24px; }
.doc th, .doc td { padding: 10px 12px; border: 1px solid #dddddd; text-align: left; vertical-align: top; }
.doc th { background: #eeeeee; color: var(--heading); }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
    padding: 20px;
    background: var(--light-bg);
    color: var(--footer-text);
    font-size: 14px;
    line-height: 24px;
    text-align: center;
}
.site-footer p { margin: 0; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; }

.to-top {
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, .2);
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s, background-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--accent); color: #fff; }
.to-top .icon { width: 16px; height: 16px; }

/* --- Banner cookie (riquadro compatto in basso a sinistra) --------------- */
.cookie-banner {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 300;
    width: min(440px, calc(100% - 40px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 18px 20px 20px;
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 2px 16px rgba(0, 0, 0, .22);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__title { margin: 0 30px 6px 0; color: var(--heading); font-size: 18px; line-height: 24px; font-weight: 700; }
.cookie-banner__text { margin: 0; font-size: 14px; line-height: 21px; }
.cookie-banner__close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    padding: 6px;
    border: 0;
    background: none;
    color: var(--text);
    cursor: pointer;
}
.cookie-banner__close:hover { color: var(--accent); }
.cookie-banner__close .icon { width: 16px; height: 16px; }

.cookie-prefs { margin-top: 12px; }
.cookie-prefs__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    border-top: 1px solid #e5e5e5;
    font-size: 13px;
    line-height: 19px;
}
.cookie-prefs__row:last-child { border-bottom: 1px solid #e5e5e5; }
.cookie-prefs__row strong { display: block; color: var(--heading); font-size: 14px; }
.cookie-prefs__row label { cursor: pointer; }
.cookie-prefs__always { flex: 0 0 auto; color: #1a7f37; font-weight: 700; }

.cookie-switch {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 22px;
    margin: 0;
    border-radius: 11px;
    background: #c4c4c4;
    cursor: pointer;
    transition: background-color .2s;
}
.cookie-switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s;
}
.cookie-switch:checked { background: var(--accent); }
.cookie-switch:checked::before { transform: translateX(18px); }

.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cookie-btn {
    flex: 1 1 auto;
    padding: 7px 10px;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background: #fff;
    color: var(--accent);
    font-size: 14px;
    line-height: 18px;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}
.cookie-btn:hover, .cookie-btn:focus-visible { background: #fdf1e7; }
.cookie-btn[hidden] { display: none; }
.cookie-btn--primary { background: var(--accent); color: #fff; }
.cookie-btn--primary:hover, .cookie-btn--primary:focus-visible { border-color: var(--accent-dark); background: var(--accent-dark); }

.preview-badge {
    position: fixed;
    left: 10px;
    bottom: 10px;
    z-index: 250;
    padding: 4px 10px;
    background: #ffcc00;
    color: #111;
    font-size: 13px;
    line-height: 18px;
    font-weight: 700;
    text-transform: uppercase;
    pointer-events: none;
}

/* --- Header mobile ------------------------------------------------------- */
@media (max-width: 1099px) {
    .topbar { display: none; }
    .masthead { position: relative; height: 75px; padding: 0 70px; }
    /* Centrato se c'e' spazio, altrimenti allineato a sinistra dopo il pulsante (come The7) */
    .brand { margin: 0 auto; }
    .brand img { max-width: calc(100vw - 80px); }

    .nav-toggle {
        position: absolute;
        left: 0;
        top: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 60px;
        height: 60px;
        padding: 0;
        border: 0;
        background: var(--accent);
        color: #fff;
        cursor: pointer;
    }
    .nav-toggle .icon { width: 24px; height: 24px; }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 200;
        display: block;
        width: min(270px, 85vw);
        padding: 45px 15px 30px 30px;
        overflow-y: auto;
        background: #444444;
        box-shadow: 0 0 30px rgba(0, 0, 0, .3);
        transform: translateX(-105%);
        transition: transform .3s;
    }
    .nav.is-open { transform: none; }
    .nav__close {
        position: absolute;
        top: 15px;
        right: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        padding: 0;
        border: 0;
        background: var(--accent);
        color: #fff;
        cursor: pointer;
    }
    .nav__close .icon { width: 16px; height: 16px; }
    .nav__list { display: block; }
    .nav__item { display: block; }
    .nav__item + .nav__item { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
    .nav__link { width: 100%; justify-content: space-between; padding: 15px 0; color: #fff; text-align: left; text-transform: none; }
    .nav__text { padding: 0; }
    .nav__text::after { display: none; }
    .nav__arrow { margin: 0; color: rgba(255, 255, 255, .35); transition: transform .2s; }
    .nav__item.is-open .nav__arrow { transform: rotate(180deg); }
    .nav__sub {
        position: static;
        display: none;
        width: auto;
        margin: 0;
        padding: 0 0 16px 20px;
        background: none;
        box-shadow: none;
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: none;
    }
    .nav__item--parent:hover .nav__sub, .nav__item--parent:focus-within .nav__sub { display: none; }
    .nav__item--parent.is-open .nav__sub { display: block; }
    .nav__sub a { padding: 5px 0 6px; color: #fff; font-family: var(--font); font-size: 14px; line-height: 18px; }
    .nav__sub a:hover, .nav__sub a:focus-visible, .nav__sub a.is-active { color: var(--accent); }

    /* Telefono ed email sotto il menu, come nel pannello mobile originale */
    .nav__contacts { display: block; margin: 34px 0 0; padding: 0; list-style: none; }
    .nav__contacts li + li { margin-top: 10px; }
    .nav__contacts a {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #fff;
        font-family: var(--font-alt);
        font-size: 18px;
        line-height: 22px;
        text-decoration: none;
    }
    .nav__contacts a:hover { text-decoration: underline; }
    .nav__contacts .icon { width: 16px; height: 16px; color: #ed7b22; }

    .hero { min-height: calc(100vh - 75px); }
    .hero__inner { grid-template-columns: 1fr; justify-items: center; gap: 20px; padding: 30px 20px 50px; text-align: center; }
    .hero__media { order: -1; }
    .hero__media img { width: min(420px, 75vw); }
    .hero__title { margin-bottom: 20px; font-size: 44px; line-height: 50px; }
    .hero__lead { max-width: 480px; margin: 0 auto; font-size: 18px; line-height: 30px; }
    .hero__actions { justify-content: center; margin-top: 30px; }
}

@media (max-width: 767px) {
    :root { --gutter: 20px; }
    body { font-size: 18px; line-height: 28px; }
    h1 { font-size: 36px; line-height: 44px; }
    h2, .kicker-title, .heading-line { font-size: 32px; line-height: 40px; }
    .hero__title { font-size: 35px; line-height: 40px; }
    .hero__lead { font-size: 16px; line-height: 28px; font-weight: 400; }
    .btn--hero { width: 150px; }
    .infobox { gap: 10px; }
    .infobox__icon { width: 55px; }
    .contact-info li { font-size: 17px; line-height: 26px; }
    .doc { padding: 40px 0 50px; }
    .cookie-banner { left: 10px; bottom: 10px; width: calc(100% - 20px); max-height: calc(100vh - 20px); padding: 16px; }
}

@media (max-width: 480px) {
    /* Reject e Accept affiancati, Customize/Save su tutta la larghezza sotto */
    .cookie-banner__actions { display: grid; grid-template-columns: 1fr 1fr; }
    .cookie-btn--wide { grid-column: 1 / -1; order: 1; }
}
