/* =========================================================
   PAGINE LEGALI (privacy-policy.html, cookie-policy.html)
   Header/navbar identici alle altre pagine del sito; caricato dopo cork.css
   ========================================================= */
:root {
    --hp-verde: #1B7B2C;
    --hp-verde-scuro: #145E21;
    --hp-verde-chiaro: #9fd8a8;
    --hp-notte: #0D2613;
    --hp-scuro: #121614;
    --hp-gutter: clamp(20px, 4vw, 72px);
    --hp-topbar-h: 40px;
    --hp-nav-h: 84px;
            --hp-header-borders: 2px;  /* bordo 1px di top bar + 1px di navbar */
    --blu-scuro: #121614;
    --testo-nav: #121614;
    --oro-spei: #1B7B2C;
    --hp-salvia: #f7faf8;
    --hp-salvia-2: #E6F0E8;
    --hp-testo: #33403a;
    --hp-muted: #5f6b65;
    --hp-linea: #e3ebe5;
    --hp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }
body { color: var(--hp-testo); -webkit-font-smoothing: antialiased; }

.hp-wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
.hp-wrap--wide { max-width: none; padding: 0 var(--hp-gutter); }
.progress-wrap:hover { box-shadow: inset 0 0 0 2px rgba(18, 22, 20, 0.25); }

.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background-color .3s ease, color .3s ease, transform .3s var(--hp-ease);
}
.hp-btn--primary { background: var(--hp-verde); color: #fff; }
.hp-btn--primary:hover { background: var(--hp-verde-scuro); transform: translateY(-2px); }

a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--hp-verde-chiaro); outline-offset: 3px; }

/* ---------- Top bar ---------- */
.hp-topbar {
    position: relative;
    z-index: 1001;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.hp-topbar .hp-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--hp-topbar-h); }
.hp-topbar-list { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.hp-topbar a { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; transition: color .3s ease; }
.hp-topbar a:hover { color: #fff; }
.hp-topbar i { color: var(--hp-verde-chiaro); font-size: 12px; }
.hp-topbar-note { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }

/* ---------- Navbar ---------- */
.hp-nav { position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid rgba(255, 255, 255, 0.12); transition: box-shadow .3s ease, border-color .3s ease; }
.hp-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity .35s ease;
}
.hp-nav.is-scrolled { box-shadow: 0 10px 30px rgba(18, 22, 20, 0.08); border-bottom-color: var(--hp-linea); }
.hp-nav.is-scrolled::before { opacity: 1; }
.hp-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--hp-nav-h); transition: height .35s var(--hp-ease); }
.hp-nav.is-scrolled .hp-nav-inner { height: 68px; }

.hp-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; perspective: 1000px; }
.hp-brand img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
    transition: transform .8s cubic-bezier(0.4, 0, 0.2, 1), width .35s var(--hp-ease), height .35s var(--hp-ease);
}
.hp-brand:hover img { transform: rotateY(360deg); }
.hp-nav.is-scrolled .hp-brand img { width: 46px; height: 46px; }
.hp-brand-text strong { display: block; font-size: 17px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; line-height: 1.1; transition: color .3s ease; }
.hp-brand-text span { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--hp-verde-chiaro); margin-top: 3px; transition: color .3s ease; }
.hp-nav.is-scrolled .hp-brand-text strong { color: var(--hp-scuro); }
.hp-nav.is-scrolled .hp-brand-text span { color: var(--hp-verde); }

.hp-menu-panel { display: flex; align-items: center; gap: 20px; }
.hp-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.hp-menu a { position: relative; display: block; padding: 10px 14px; font-size: 15px; font-weight: 600; color: var(--hp-scuro); text-decoration: none; transition: color .3s ease; }
.hp-menu a::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    background: var(--hp-verde);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--hp-ease);
}
.hp-menu a:hover { color: var(--hp-verde); }
.hp-menu a:hover::after { transform: scaleX(1); }
.hp-nav-cta { padding: 12px 22px; font-size: 13px; }
.hp-menu-extra { display: none; }

@media (min-width: 993px) {
    .hp-nav:not(.is-scrolled) .hp-menu a { color: rgba(255, 255, 255, 0.9); }
    .hp-nav:not(.is-scrolled) .hp-menu a:hover { color: #fff; }
    .hp-nav:not(.is-scrolled) .hp-menu a::after { background: var(--hp-verde-chiaro); }
    .hp-nav:not(.is-scrolled) .hp-nav-cta { background: #fff; color: var(--hp-scuro); }
    .hp-nav:not(.is-scrolled) .hp-nav-cta:hover { background: var(--hp-verde); color: #fff; }
}

.hp-burger, .hp-backdrop { display: none; }

@media (max-width: 992px) {
    :root { --hp-topbar-h: 0px; --hp-nav-h: 68px; --hp-header-borders: 1px; }
    .hp-topbar { display: none; }
    .hp-nav-inner, .hp-nav.is-scrolled .hp-nav-inner { height: 68px; }
    .hp-brand img, .hp-nav.is-scrolled .hp-brand img { width: 46px; height: 46px; }

    .hp-burger {
        position: relative;
        z-index: 3;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 46px;
        height: 46px;
        border: 1px solid rgba(255, 255, 255, 0.4);
        border-radius: 50%;
        background: transparent;
        cursor: pointer;
        transition: background-color .3s ease, border-color .3s ease;
    }
    .hp-burger span { width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .35s var(--hp-ease), opacity .2s ease, background-color .3s ease; }
    .hp-nav.is-scrolled .hp-burger, .hp-nav.is-open .hp-burger { background: #fff; border-color: var(--hp-linea); }
    .hp-nav.is-scrolled .hp-burger span, .hp-nav.is-open .hp-burger span { background: var(--hp-scuro); }
    .hp-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hp-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .hp-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .hp-menu-panel {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 2;
        width: min(86vw, 380px);
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 96px 32px 32px;
        background: #fff;
        box-shadow: -20px 0 50px rgba(13, 38, 19, 0.18);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .45s var(--hp-ease), visibility 0s linear .45s;
        overflow-y: auto;
    }
    .hp-nav.is-open .hp-menu-panel { transform: none; visibility: visible; transition: transform .45s var(--hp-ease), visibility 0s; }
    .hp-menu { flex-direction: column; align-items: stretch; gap: 0; }
    .hp-menu a { padding: 18px 0; font-size: 22px; font-weight: 700; border-bottom: 1px solid var(--hp-linea); }
    .hp-menu a::after { display: none; }
    .hp-nav-cta { margin-top: 28px; padding: 16px; font-size: 14px; }
    .hp-menu-extra { display: block; margin-top: auto; padding-top: 32px; font-size: 14px; color: var(--hp-muted); }
    .hp-menu-extra a { color: var(--hp-scuro); text-decoration: none; display: flex; gap: 10px; align-items: center; padding: 6px 0; }
    .hp-menu-extra i { color: var(--hp-verde); width: 16px; }
    .hp-signature { font-family: "Caveat", cursive; font-size: 26px; color: var(--hp-verde); margin-top: 18px; }

    .hp-backdrop { display: block; position: fixed; inset: 0; z-index: 1; background: rgba(13, 38, 19, 0.5); opacity: 0; pointer-events: none; transition: opacity .4s ease; }
    .hp-nav.is-open .hp-backdrop { opacity: 1; pointer-events: auto; }
}
body.hp-lock { overflow: hidden; }
@media (max-width: 1200px) { .hp-topbar-note { display: none; } }

/* =========================================================
   HERO COMPATTA
   ========================================================= */
.lg-hero {
    position: relative;
    margin-top: calc(-1 * (var(--hp-topbar-h) + var(--hp-nav-h) + var(--hp-header-borders)));
    padding: calc(var(--hp-topbar-h) + var(--hp-nav-h) + clamp(48px, 8vw, 96px)) 0 clamp(48px, 6vw, 72px);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(700px circle at 0% 100%, rgba(27, 123, 44, 0.45), transparent 60%),
        radial-gradient(600px circle at 100% 0%, rgba(27, 123, 44, 0.25), transparent 60%),
        var(--hp-notte);
}
.lg-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1.2px, transparent 1.4px);
    background-size: 18px 18px;
    -webkit-mask-image: linear-gradient(90deg, #000, transparent 75%);
    mask-image: linear-gradient(90deg, #000, transparent 75%);
}
.lg-crumbs { display: flex; gap: 10px; align-items: center; list-style: none; margin: 0 0 22px; padding: 0; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.lg-crumbs a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.lg-crumbs a:hover { color: #fff; }
.lg-crumbs i { font-size: 10px; }
.lg-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}
.lg-hero h1 span { color: var(--hp-verde-chiaro); }
.lg-hero-lead { margin: 0; max-width: 640px; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.7; color: rgba(255, 255, 255, 0.82); }
.lg-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.lg-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(159, 216, 168, 0.35);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--hp-verde-chiaro);
}

/* =========================================================
   LAYOUT: indice sticky + testo
   ========================================================= */
.lg-body { padding: clamp(56px, 7vw, 96px) 0 clamp(72px, 9vw, 120px); background: #fff; }
.lg-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }

.lg-toc { position: sticky; top: 100px; }
.lg-toc-title { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--hp-muted); margin: 0 0 14px; }
.lg-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--hp-linea); }
.lg-toc a {
    display: block;
    margin-left: -1px;
    padding: 8px 0 8px 18px;
    border-left: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--hp-muted);
    text-decoration: none;
    transition: color .3s ease, border-color .3s ease;
}
.lg-toc a:hover { color: var(--hp-scuro); }
.lg-toc a.is-active { color: var(--hp-verde); border-left-color: var(--hp-verde); font-weight: 700; }
.lg-toc-mobile { display: none; }

.lg-article { max-width: 780px; }
.lg-article section { scroll-margin-top: 100px; }
.lg-article section + section { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--hp-linea); }
.lg-article h2 {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 0 0 18px;
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--hp-scuro);
}
.lg-article h2 small { font-size: 14px; font-weight: 700; letter-spacing: 0.1em; color: var(--hp-verde); }
.lg-article h3 { margin: 28px 0 10px; font-size: 17px; font-weight: 700; color: var(--hp-scuro); }
.lg-article p, .lg-article li { font-size: 16px; line-height: 1.8; color: var(--hp-testo); }
.lg-article p { margin: 0 0 14px; }
.lg-article ul { margin: 0 0 14px; padding-left: 0; list-style: none; }
.lg-article ul li { position: relative; padding-left: 22px; margin-bottom: 6px; }
.lg-article ul li::before { content: ''; position: absolute; left: 2px; top: 0.75em; width: 7px; height: 7px; border-radius: 50%; background: var(--hp-verde); }
.lg-article strong { color: var(--hp-scuro); }
.lg-article a { color: var(--hp-verde); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.lg-article a:hover { color: var(--hp-verde-scuro); }

/* Riquadro "In breve" */
.lg-summary {
    margin: 0 0 56px;
    padding: 28px 30px;
    border-radius: 20px;
    background: var(--hp-salvia);
    border: 1px solid var(--hp-linea);
}
.lg-summary h2 { margin: 0 0 16px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--hp-verde); }
.lg-summary ul { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; margin: 0; }
.lg-summary li { display: flex; gap: 12px; align-items: flex-start; padding: 0 !important; margin: 0 !important; font-size: 15px !important; line-height: 1.6 !important; }
.lg-summary li::before { display: none; }
.lg-summary li i { color: var(--hp-verde); margin-top: 4px; width: 16px; flex-shrink: 0; }

/* Scheda titolare */
.lg-card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 28px;
    margin: 6px 0 14px;
    padding: 24px 26px;
    border-radius: 16px;
    border: 1px solid var(--hp-linea);
}
.lg-card div span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hp-muted); margin-bottom: 4px; }
.lg-card div strong, .lg-card div a { font-size: 15.5px; }

/* Tabelle */
.lg-table-wrap { margin: 8px 0 18px; overflow-x: auto; border: 1px solid var(--hp-linea); border-radius: 16px; }
.lg-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.lg-table th {
    text-align: left;
    padding: 14px 18px;
    background: var(--hp-salvia);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hp-muted);
    border-bottom: 1px solid var(--hp-linea);
}
.lg-table td { padding: 14px 18px; vertical-align: top; line-height: 1.6; color: var(--hp-testo); border-bottom: 1px solid var(--hp-linea); }
.lg-table tr:last-child td { border-bottom: 0; }
.lg-table td:first-child { font-weight: 700; color: var(--hp-scuro); }

/* Nota evidenziata */
.lg-note {
    display: flex;
    gap: 14px;
    margin: 18px 0;
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--hp-salvia-2);
    font-size: 15px;
    line-height: 1.7;
    color: var(--hp-scuro);
}
.lg-note i { color: var(--hp-verde); margin-top: 4px; }

/* Contatto finale */
.lg-contact {
    margin-top: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 28px 30px;
    border-radius: 20px;
    color: #fff;
    background:
        radial-gradient(500px circle at 0% 0%, rgba(27, 123, 44, 0.45), transparent 60%),
        var(--hp-notte);
}
.lg-contact strong { display: block; font-size: 18px; margin-bottom: 4px; color: #fff; }
.lg-contact span { color: rgba(255, 255, 255, 0.75); font-size: 15px; }
.lg-contact .hp-btn { text-decoration: none; color: #fff; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
    /* minmax(0, 1fr): senza, la colonna si allarga fino alla larghezza minima delle tabelle (560px) */
    .lg-grid { grid-template-columns: minmax(0, 1fr); }
    .lg-toc { display: none; }
    .lg-toc-mobile {
        display: block;
        margin-bottom: 40px;
        border: 1px solid var(--hp-linea);
        border-radius: 14px;
        overflow: hidden;
    }
    .lg-toc-mobile summary {
        list-style: none;
        cursor: pointer;
        padding: 16px 20px;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--hp-scuro);
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--hp-salvia);
    }
    .lg-toc-mobile summary::-webkit-details-marker { display: none; }
    .lg-toc-mobile summary i { transition: transform .3s ease; color: var(--hp-verde); }
    .lg-toc-mobile[open] summary i { transform: rotate(180deg); }
    .lg-toc-mobile ol { margin: 0; padding: 8px 20px 16px 40px; }
    .lg-toc-mobile li { padding: 6px 0; font-size: 15px; }
    .lg-toc-mobile a { color: var(--hp-testo); text-decoration: none; }
}

@media (max-width: 600px) {
    .lg-summary ul, .lg-card { grid-template-columns: 1fr; }
    .lg-summary, .lg-card, .lg-contact { padding: 22px 20px; }

    /* Tabelle a schede: ogni riga diventa un blocco, l'intestazione va in data-label */
    .lg-table-wrap { overflow: visible; }
    .lg-table { min-width: 0; }
    .lg-table thead { display: none; }
    .lg-table, .lg-table tbody, .lg-table tr, .lg-table td { display: block; width: 100%; }
    .lg-table tr { padding: 16px 18px; border-bottom: 1px solid var(--hp-linea); }
    .lg-table tr:last-child { border-bottom: 0; }
    .lg-table td { padding: 0; border: 0; }
    .lg-table td + td { margin-top: 10px; }
    .lg-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--hp-muted);
    }
    .lg-table td:first-child { font-size: 16px; }
    .lg-table td:first-child::before { display: none; }

    .lg-article h2 { gap: 10px; }
    .lg-contact .hp-btn { width: 100%; padding: 14px 18px; font-size: 12px; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
