/* ==========================================================================
   Sestante - Design system
   Palette: navy / ambra-oro / crema. Tipografia: Playfair Display + Inter.
   ========================================================================== */

:root {
    --navy: #1C2E44;
    --navy-700: #16263a;
    --navy-900: #101b2b;
    --amber: #C97B2F;
    --amber-dark: #a8631f;
    --cream: #F8F4EE;
    --cream-dark: #efe7da;
    --ink: #2D2D2D;
    --muted: #5d6b7a;
    --line: #e3dccf;
    --white: #ffffff;

    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 3px rgba(28, 46, 68, .08);
    --shadow: 0 14px 40px rgba(28, 46, 68, .12);
    --shadow-lg: 0 30px 70px rgba(28, 46, 68, .18);

    --container: 1140px;
    --gap: clamp(1.5rem, 4vw, 3rem);

    --serif: "Playfair Display", Georgia, serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--amber-dark); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--amber); }
ul { list-style: none; padding: 0; }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; color: var(--navy); font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

p { color: var(--ink); }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--muted); line-height: 1.6; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.2rem, 5vw, 2rem); }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-cream { background: var(--cream); }
/* La header e' sticky: dopo l'invio del form (action con #form-contatti) l'ancora
   deve fermarsi sotto la barra, cosi' l'esito/errori restano visibili e non coperti. */
#form-contatti { scroll-margin-top: 96px; }
.section-white { background: var(--white); }
.section-navy { background: var(--navy); color: var(--cream); }
.section-navy h1, .section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy .lead { color: rgba(248, 244, 238, .82); }

.eyebrow {
    display: inline-block;
    font-family: var(--sans);
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--amber-dark);
    margin-bottom: 1rem;
}
.section-navy .eyebrow { color: var(--amber); }

.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: .9rem; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 1000;
    background: var(--navy); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .55rem;
    background: var(--amber); color: #fff;
    font-family: var(--sans); font-weight: 600; font-size: 1rem;
    padding: .95rem 1.7rem; border-radius: 999px; border: 0; cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    box-shadow: 0 8px 22px rgba(201, 123, 47, .28);
}
.btn:hover { background: var(--amber-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(201, 123, 47, .35); }
.btn-sm { padding: .6rem 1.2rem; font-size: .92rem; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--navy); box-shadow: none; border: 1.5px solid var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--cream); color: var(--navy); }
.btn-outline-light { background: transparent; color: var(--cream); border: 1.5px solid rgba(248,244,238,.5); box-shadow: none; }
.btn-outline-light:hover { background: var(--cream); color: var(--navy); }

/* ---------- Header / nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(248, 244, 238, .9);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--navy); font-weight: 700; }
.brand:hover { color: var(--navy); }
.brand-mark { color: var(--amber); display: inline-flex; }
.brand-mark img { width: 68px; height: 77px; }
/* landing AI per PMI (header minimale): icona piu' piccola, esclusa dalla dimensione standard */
.site-header--minimal .header-inner { min-height: 70px; }
.site-header--minimal .brand-mark img { width: 44px; height: 50px; }
/* Mobile (dove parte il menu hamburger): icona ridotta del 20% rispetto alla base,
   per lasciare piu' spazio al nome del brand sugli schermi stretti. */
@media (max-width: 900px) {
    .brand-mark img { width: 54.4px; height: 61.6px; }
}
/* Da 1200px in su c'e' spazio per il menu completo: icona a dimensione piena.
   flex-shrink:0 evita che il layout flex dell'header + img{max-width:100%} la comprima.
   Sotto i 1200px il menu esteso non lascerebbe spazio, quindi si resta alla dimensione base. */
@media (min-width: 1200px) {
    .brand, .brand-mark, .brand-mark img { flex-shrink: 0; }
    .brand-mark img { width: 38px; height: 43px; }
}
.brand-name { font-family: var(--serif); font-size: 1.45rem; letter-spacing: .01em; }
.brand-light { color: var(--cream); }
.brand-light:hover { color: var(--white); }
.brand-light .brand-name { color: var(--cream); }

.primary-nav ul { display: flex; align-items: center; gap: 1.4rem; }
.primary-nav a { display: block; text-align: center; color: var(--navy); font-weight: 500; font-size: .98rem; position: relative; white-space: nowrap; }
.primary-nav a:hover { color: var(--amber-dark); }
.primary-nav a.is-active { color: var(--amber-dark); }
.primary-nav a.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--amber);
}
.nav-cta a { color: #fff; }
.lang-switch { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted); }
.lang-switch a { color: var(--muted); font-weight: 600; }
.lang-switch a.is-active { color: var(--navy); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background:
        linear-gradient(150deg, rgba(28,46,68,.93) 0%, rgba(22,38,58,.88) 55%, rgba(32,55,79,.85) 100%),
        url("../img/site/hero-home.jpg") center / cover no-repeat;
    color: var(--cream);
    overflow: hidden;
}
.hero::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(closest-side at 85% 10%, rgba(201,123,47,.22), transparent 70%);
    pointer-events: none;
}
.hero .container { position: relative; z-index: 1; padding-block: clamp(3.5rem, 9vw, 7rem); max-width: 900px; text-align: center; }
.hero .hero-actions { justify-content: center; }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(248,244,238,.85); margin-top: 1.3rem; }
.hero .eyebrow { color: var(--amber); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.hero-page {
    background:
        linear-gradient(160deg, rgba(28,46,68,.92) 0%, rgba(22,38,58,.9) 100%),
        url("../img/site/hero-inner.jpg") center / cover no-repeat;
}
.hero-page .container { padding-block: clamp(2.8rem, 6vw, 4.5rem); }

/* ---------- Grid & cards ---------- */
.grid { display: grid; gap: clamp(1.2rem, 3vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.1rem); box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
    height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--muted); }
.card-icon {
    width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(201,123,47,.12); color: var(--amber-dark); margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }
/* Card bianche dentro una banda navy: titoli/testo restano scuri e leggibili */
.section-navy .card h3 { color: var(--navy); }
.section-navy .card p { color: var(--muted); }
.card-num {
    font-family: var(--serif); font-size: 2.2rem; color: var(--amber); line-height: 1; margin-bottom: .6rem;
}

/* ---------- Offer / step blocks ---------- */
.tier { position: relative; }
.tag {
    display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--amber-dark); background: rgba(201,123,47,.12); padding: .3rem .7rem; border-radius: 999px; margin-bottom: .9rem;
}
.tier .when { color: var(--muted); font-size: .9rem; font-weight: 600; margin-bottom: .9rem; }
.tier-head { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.tier-head .card-icon, .tier-head .tag { margin-bottom: 0; }
.tier .out, .tier .price { font-size: .95rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--line); color: var(--ink); }
.tier .price { border-top: 0; padding-top: .3rem; color: var(--muted); }

/* Righe interne allineate tra le card affiancate (solo quando sono su una riga sola, >=901px) */
@supports (grid-template-rows: subgrid) {
    @media (min-width: 901px) {
        .tiers { row-gap: .9rem; column-gap: clamp(1.2rem, 3vw, 2rem); }
        .tiers > .tier {
            grid-row: span 6;
            display: grid;
            grid-template-rows: subgrid;
            align-content: start;
        }
        .tiers > .tier > * { margin: 0; }
        .tiers > .tier .tag { justify-self: start; }
        .tiers > .tier .out { margin-top: .3rem; padding-top: .9rem; }
        .tiers > .tier .price { margin-top: .3rem; padding-top: 0; }

        /* Card icona + titolo + testo (3 righe condivise) */
        .cards-eq { row-gap: .9rem; column-gap: clamp(1.2rem, 3vw, 2rem); }
        .cards-eq > .card {
            grid-row: span 3;
            display: grid;
            grid-template-rows: subgrid;
            align-content: start;
        }
        .cards-eq > .card > * { margin: 0; }

        /* Formule della formazione: senza allineamento riga per riga le tre card
           si leggono come blocchi separati, non come un confronto. */
        .plans { row-gap: .9rem; column-gap: clamp(1.2rem, 3vw, 2rem); }
        .plans > .plan {
            grid-row: span 8;
            display: grid;
            grid-template-rows: subgrid;
            align-content: start;
        }
        .plans > .plan > * { margin: 0; }
        .plans > .plan .plan-specs { grid-row: span 6; display: grid; grid-template-rows: subgrid; row-gap: .8rem; }
    }
}

/* timeline steps */
.steps { display: grid; gap: 1.4rem; }
.step {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: clamp(1.4rem, 3vw, 2rem); display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: start;
    box-shadow: var(--shadow-sm);
}
.step-marker {
    width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
    background: var(--navy); color: var(--amber); font-family: var(--serif); font-size: 1.2rem; font-weight: 700;
}
.step .when { color: var(--amber-dark); font-weight: 600; font-size: .88rem; }
.step h3 { margin: .2rem 0 .5rem; }
.step .out { margin-top: .7rem; font-size: .93rem; color: var(--navy); font-weight: 500; }

/* ---------- KPI / list highlights ---------- */
.tick-list li { position: relative; padding-left: 1.8rem; margin-bottom: .7rem; color: var(--ink); }
.tick-list li::before {
    content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 7px;
    border-left: 2px solid var(--amber); border-bottom: 2px solid var(--amber);
    transform: rotate(-45deg);
}

.quote-band { background: var(--navy); color: var(--cream); text-align: center; }
.quote-band blockquote {
    font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.4; color: #fff;
    max-width: 820px; margin-inline: auto;
}
.quote-band cite { display: block; margin-top: 1.2rem; font-family: var(--sans); font-style: normal; color: var(--amber); font-weight: 600; font-size: 1rem; }

/* ---------- Team ---------- */
.team-card { display: grid; grid-template-columns: 108px 1fr; gap: 1.6rem; align-items: start; position: relative; overflow: hidden; }
.team-card::before {
    content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px;
    background: linear-gradient(var(--amber), var(--amber-dark)); opacity: 0; transition: opacity .25s ease;
}
.team-card:hover::before { opacity: 1; }
.team-avatar {
    width: 108px; height: 108px; border-radius: 50%; background: linear-gradient(150deg, var(--navy), #2c4a6b);
    color: var(--amber); display: grid; place-items: center; font-family: var(--serif); font-size: 2.1rem; font-weight: 700;
    box-shadow: 0 0 0 4px var(--white), 0 0 0 6px rgba(201, 123, 47, .55);
}
.team-avatar.has-photo { background: var(--cream-dark); overflow: hidden; }
.team-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.team-role {
    display: inline-block; color: var(--amber-dark); font-weight: 600; font-size: .76rem;
    letter-spacing: .05em; text-transform: uppercase;
    background: rgba(201, 123, 47, .1); border-radius: 999px; padding: .28rem .8rem; margin-bottom: .8rem;
}

/* Team compatto (membri non fondatori): monogramma al posto della foto */
.team-mini-head { margin-top: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 1.4rem; }
.team-mini-head h3 { font-size: 1.2rem; }
.team-mini-head span { display: block; color: var(--muted); font-size: .92rem; margin-top: .25rem; }
.grid-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.mini-card {
    display: flex; align-items: flex-start; gap: 1rem;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm);
}
.mini-avatar {
    flex: 0 0 auto; width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(150deg, var(--navy), #2c4a6b); color: var(--amber);
    display: grid; place-items: center; font-family: var(--serif); font-size: 1.2rem; font-weight: 700;
    box-shadow: 0 0 0 3px var(--white), 0 0 0 4px rgba(201, 123, 47, .5);
}
.mini-card h4 { font-family: var(--serif); font-size: 1.1rem; color: var(--navy); font-weight: 600; line-height: 1.2; }
.mini-role {
    display: inline-block; color: var(--amber-dark); font-weight: 600; font-size: .72rem;
    letter-spacing: .05em; text-transform: uppercase; margin: .35rem 0 .5rem;
}
.mini-bio { color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* Rete di professionisti esterni */
.network {
    margin-top: clamp(2.4rem, 5vw, 3.4rem);
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3.5vw, 2.4rem); box-shadow: var(--shadow-sm);
}
.network-intro { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.2rem, 3vw, 2.2rem); align-items: center; }
.network-count { text-align: center; padding-right: clamp(1.2rem, 3vw, 2.2rem); border-right: 1px solid var(--line); }
.network-num { display: block; font-family: var(--serif); font-size: clamp(3rem, 7vw, 4.4rem); font-weight: 700; color: var(--amber); line-height: 1; }
.network-num-label {
    display: block; margin-top: .5rem; max-width: 10rem; color: var(--navy);
    font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; line-height: 1.35;
}
.network-intro h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.network-intro p { color: var(--muted); }
.network-areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: clamp(1.4rem, 3vw, 2rem); }
.network-area { background: var(--cream); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.network-area .card-icon { width: 40px; height: 40px; border-radius: 10px; margin-bottom: .8rem; }
.network-area .card-icon svg { width: 22px; height: 22px; }
.network-area h4 { font-family: var(--serif); font-size: 1.05rem; color: var(--navy); font-weight: 600; line-height: 1.25; margin-bottom: .3rem; }
.network-area p { color: var(--muted); font-size: .88rem; line-height: 1.5; text-align: left; }

/* Filigrana bussola (tema Sestante) su banda navy */
.section-compass { position: relative; overflow: hidden; }
.section-compass > .container { position: relative; z-index: 1; }
.section-compass::before {
    content: ""; position: absolute; top: 50%; right: -120px; transform: translateY(-50%);
    width: 520px; height: 520px; pointer-events: none; opacity: .1;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23C97B2F' stroke-width='1.4'%3E%3Ccircle cx='100' cy='100' r='94'/%3E%3Ccircle cx='100' cy='100' r='72'/%3E%3C/g%3E%3Cpath d='M100 14 L110 90 L186 100 L110 110 L100 186 L90 110 L14 100 L90 90 Z' fill='%23C97B2F'/%3E%3Cpath d='M100 42 L106 94 L158 100 L106 106 L100 158 L94 106 L42 100 L94 94 Z' fill='none' stroke='%23F8F4EE' stroke-width='1.4'/%3E%3C/svg%3E");
}

/* ---------- Cases: teaser (elenco) ---------- */
.case-head { background: var(--navy); color: var(--cream); padding: 1.1rem 1.5rem; font-weight: 600; letter-spacing: .02em; }
.case-teaser {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; height: 100%;
    transition: transform .25s ease, box-shadow .25s ease;
}
.case-teaser:hover { transform: translateY(-3px); box-shadow: var(--shadow-md, 0 14px 30px rgba(28,46,68,.12)); }
.case-teaser-body { padding: clamp(1.4rem, 3vw, 1.9rem); display: flex; flex-direction: column; flex: 1; }
.case-teaser-body h3 { margin-bottom: .6rem; line-height: 1.25; }
.case-teaser-body h3 a { color: var(--navy); }
.case-teaser-body h3 a:hover { color: var(--amber-dark); }
.case-hook { color: var(--muted); flex: 1; }
.case-teaser .read-more { margin-top: 1.1rem; font-weight: 600; align-self: start; }
.case-teaser-metric { display: flex; flex-direction: column; gap: .2rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.case-teaser-metric-value { font-family: var(--serif); font-weight: 700; color: var(--amber-dark); font-size: clamp(1.7rem, 3.5vw, 2.2rem); line-height: 1; }
.case-teaser-metric-label { color: var(--muted); font-size: .85rem; line-height: 1.3; }

/* Teaser su griglia multi-riga: gap uniforme su entrambi gli assi (.grid).
   Il link "Approfondisci" resta in basso grazie al flex (.case-hook{flex:1}),
   così le card di righe diverse non si attaccano quando i casi superano una riga. */

/* ---------- Cases: metriche (banda navy del dettaglio) ---------- */
.case-metrics {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: clamp(1.5rem, 5vw, 4rem); text-align: center;
}
.case-metric { flex: 0 1 auto; min-width: 0; }
.case-metric-value {
    font-family: var(--serif); font-weight: 700; color: var(--amber);
    font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; white-space: nowrap;
}
.case-metric-label {
    margin-top: .55rem; color: rgba(248,244,238,.72);
    font-size: clamp(.78rem, 1.5vw, .92rem); line-height: 1.35;
}

/* ---------- Cases: dettaglio ---------- */
.case-detail { max-width: 760px; margin-inline: auto; }
.case-detail > .read-more { display: inline-block; margin-bottom: 1.8rem; }
.case-section { margin-bottom: 2rem; }
.case-section-title {
    font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--amber-dark); margin-bottom: .7rem;
}
.case-detail p { font-size: 1.08rem; }
.case-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.case-steps li {
    position: relative; padding-left: 1.9rem; font-size: 1.08rem; text-align: left; hyphens: none;
}
.case-steps li::before {
    content: ""; position: absolute; left: 0; top: .55em;
    width: .7rem; height: .7rem; border-radius: 50%;
    background: var(--amber); box-shadow: 0 0 0 4px rgba(201,123,47,.18);
}
.case-quote {
    margin: 2.4rem 0; padding: 1.6rem 1.8rem; border-left: 4px solid var(--amber);
    background: var(--white); border-radius: var(--radius-md, .6rem); box-shadow: var(--shadow-sm);
}
.case-quote p { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--navy); }
.case-quote cite { display: block; margin-top: .8rem; font-style: normal; font-size: .9rem; color: var(--muted); }
.case-result-block {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: clamp(1.4rem, 3vw, 1.9rem); box-shadow: var(--shadow-sm);
}
.case-result-block .case-section-title { color: var(--navy); }

/* ---------- Cases: grafici statici (SVG generato server-side) ---------- */
.case-charts { display: grid; gap: 2.2rem; }
.case-chart {
    margin: 0; background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: clamp(1.1rem, 3vw, 1.6rem);
    box-shadow: var(--shadow-sm);
}
.case-chart-title {
    font-family: var(--serif); font-weight: 600; color: var(--navy);
    font-size: 1.05rem; line-height: 1.3; margin-bottom: 1rem;
}
.case-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.case-chart text { fill: var(--ink); }
.chart-val { font-size: 11px; font-weight: 700; fill: var(--navy); }
.chart-cat { font-size: 11.5px; fill: var(--muted); }
.chart-axis { font-size: 10px; fill: var(--muted); }
.chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-zero { stroke: #c9c0b0; stroke-width: 1.2; }
.case-chart-legend { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1rem; }
.case-chart-legend span {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .85rem; color: var(--ink);
}
.case-chart-legend i { width: .85rem; height: .85rem; border-radius: 2px; flex: 0 0 auto; }
.case-chart-note { font-size: .92rem; color: var(--muted); margin-top: .9rem; }
.case-chart--gauge svg { max-width: 460px; margin-inline: auto; }
.gauge-value { font-family: var(--serif); font-weight: 700; fill: var(--navy); }
.gauge-vlabel { font-size: 11.5px; fill: var(--muted); }
.gauge-tick { font-size: 11px; fill: var(--muted); }
.gauge-pin { font-size: 11px; font-weight: 700; }

/* ---------- FAQ ---------- */
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
    padding: 1.2rem 1.4rem; font-family: var(--serif); font-size: 1.1rem; color: var(--navy); font-weight: 600;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-q .chev { transition: transform .25s ease; color: var(--amber); flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 1.4rem 1.3rem; color: var(--muted); }

/* ---------- Formazione: schede corso apribili + formule ---------- */
.courses { max-width: 880px; margin-inline: auto; }
/* L'accordion chiuso non si annuncia da solo: la riga di istruzione sopra la lista
   dice esplicitamente che le schede si aprono, oltre all'etichetta su ogni card. */
.courses-hint {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    color: var(--muted); font-size: .95rem; text-align: center;
    margin-bottom: 1.4rem;
}
.courses-hint svg { color: var(--amber-dark); flex-shrink: 0; }

.course-item {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    margin-bottom: 1rem; overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.course-item:hover { box-shadow: var(--shadow-sm); }
.course-item.open { border-color: rgba(201, 123, 47, .45); box-shadow: var(--shadow-sm); }
.course-head {
    width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
    padding: 1.15rem 1.4rem;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
}
.course-head-ic {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(201, 123, 47, .12); color: var(--amber-dark);
}
.course-head-ic svg { width: 22px; height: 22px; }
.course-title { display: block; font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--navy); line-height: 1.25; }
.course-teaser { display: block; margin-top: .25rem; color: var(--muted); font-size: .92rem; line-height: 1.4; }
.course-toggle {
    display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
    color: var(--amber-dark); font-size: .8rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
}
.course-head:hover .course-toggle { color: var(--amber); }
.course-toggle .chev { display: inline-flex; transition: transform .25s ease; }
.course-item.open .course-toggle .chev { transform: rotate(180deg); }
.course-toggle .ct-open { display: none; }
.course-item.open .course-toggle .ct-closed { display: none; }
.course-item.open .course-toggle .ct-open { display: inline; }

.course-panel { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.course-panel-inner { padding: .2rem 1.4rem 1.5rem; }
.course-panel-inner p { text-align: left; hyphens: manual; color: var(--muted); }
.course-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.1rem; }
.course-chips li {
    font-size: .82rem; font-weight: 600; color: var(--navy);
    background: var(--cream); border: 1px solid var(--line);
    border-radius: 999px; padding: .3rem .8rem;
}
.course-panel-inner p.course-label {
    font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--amber-dark); margin: 1.3rem 0 .5rem;
}
.course-prog { display: grid; gap: .5rem; }
.course-prog li { position: relative; padding-left: 1.5rem; color: var(--muted); font-size: .96rem; line-height: 1.5; }
.course-prog li::before {
    content: ""; position: absolute; left: .3rem; top: .6em;
    width: 6px; height: 6px; border-radius: 50%; background: var(--amber);
}
.course-panel-inner p.course-out {
    margin-top: 1.3rem; padding-top: 1rem; border-top: 1px dashed var(--line);
    font-size: .96rem; color: var(--ink);
}
.course-out strong { color: var(--navy); }

/* Credito allo strumento di terze parti (Zensimu per il lean game): visibile ma
   subordinato al contenuto del corso, non e' un badge di partnership. */
.course-credit {
    display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
    margin-top: 1.2rem; padding: .85rem 1rem;
    background: var(--cream); border: 1px solid var(--line); border-radius: 12px;
}
.course-credit img { height: 15px; width: auto; flex-shrink: 0; }
.course-credit span { flex: 1 1 260px; font-size: .8rem; line-height: 1.5; color: var(--muted); }

/* La CTA vive dentro il pannello aperto: si vede nel momento di massimo interesse,
   subito dopo il programma, e non aggiunge rumore alle schede chiuse. */
.course-panel-inner .course-cta {
    display: inline-flex; align-items: center; gap: .45rem; margin-top: 1.2rem;
    font-size: .92rem; font-weight: 700; color: var(--amber-dark);
}
.course-cta svg { transition: transform .2s ease; }
.course-cta:hover svg { transform: translateX(3px); }
/* Corso AI: non e' un accordion ma un rimando alla sua landing. Bordo ambra e
   bottone al posto dell'etichetta "Vedi il programma" per dire, prima del clic,
   che questa scheda porta altrove invece di aprirsi. */
.course-item--featured { border-color: rgba(201, 123, 47, .45); background: linear-gradient(180deg, #fffaf4, var(--white) 60%); }
.course-item--featured:hover { box-shadow: var(--shadow); }
.course-featured {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
    padding: 1.3rem 1.4rem; color: inherit;
}
.course-featured:hover { color: inherit; }
/* Il blocco di testo e' alto: l'icona centrata verticalmente finirebbe a meta' del
   paragrafo invece che accanto al titolo. */
.course-featured .course-head-ic { align-self: start; margin-top: .2rem; }
.course-featured .tag { margin-bottom: .5rem; }
.course-featured .course-title { font-size: 1.2rem; }
.course-featured-desc { display: block; margin-top: .35rem; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.course-featured-note { display: block; margin-top: .5rem; color: var(--amber-dark); font-size: .87rem; font-weight: 600; }
.course-featured .btn { white-space: nowrap; }

/* Formule: card di confronto. Su desktop le righe di specifica sono allineate
   fra le tre card via subgrid (vedi blocco @supports piu' sopra). */
.plan-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.plan-head .tag { margin-bottom: 0; }
.plan-hook { margin-bottom: 1.3rem; }
.plan-specs { display: grid; gap: .8rem; }
.plan-specs > div { border-top: 1px solid var(--line); padding-top: .7rem; }
.plan-specs dt {
    font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted); margin-bottom: .25rem;
}
.plan-specs dd { font-size: .95rem; line-height: 1.45; color: var(--ink); }
.courses-cta { text-align: center; margin-top: clamp(1.6rem, 3vw, 2.2rem); }
.courses-cta p { max-width: 620px; margin: 0 auto 1.2rem; text-align: center; color: var(--muted); }
.plans-note { max-width: 760px; margin: clamp(1.8rem, 4vw, 2.6rem) auto 0; text-align: center; color: var(--muted); }
.plans-funding {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    max-width: 760px; margin: 1rem auto 0; text-align: center; color: var(--navy); font-weight: 500;
}
.plans-funding-badge {
    display: grid; place-items: center; flex-shrink: 0;
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(201, 123, 47, .14); color: var(--amber-dark);
}

@media (max-width: 640px) {
    /* Su schermo stretto l'etichetta "Vedi il programma" non sta in riga: va sotto,
       ma resta visibile (e' l'affordance principale dell'accordion). */
    .course-head { grid-template-columns: auto 1fr; row-gap: .7rem; padding: 1.05rem 1.1rem; }
    .course-toggle { grid-column: 1 / -1; }
    .course-panel-inner { padding-inline: 1.1rem; }
    .course-featured { grid-template-columns: auto 1fr; row-gap: 1rem; padding: 1.2rem 1.1rem; }
    .course-featured .btn { grid-column: 1 / -1; justify-self: start; }
    .plans-funding { text-align: left; }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.2rem; max-width: 620px; }
.form-row { display: grid; gap: 1.2rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; color: var(--navy); }
.field input, .field textarea {
    width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
    padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(201,123,47,.16); }
/* Campo bloccato dalla validazione: bordo rosso ben visibile (il solo testo sotto il campo passava inosservato) */
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179,38,30,.12); }
.field .err { color: #b3261e; font-size: .85rem; margin-top: .3rem; }
.form-note { font-size: .85rem; color: var(--muted); }
.field-consent .consent { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: 0; font-weight: 400; cursor: pointer; }
.field-consent .consent input { width: auto; flex: 0 0 auto; margin-top: .25rem; }
.field-consent .consent span { font-size: .9rem; font-weight: 400; color: var(--muted); }
.field-consent .consent a { color: var(--amber); text-decoration: underline; }
.alert { padding: 1rem 1.2rem; border-radius: 10px; font-weight: 500; margin-bottom: 1.4rem; }
.alert-success { background: #e7f3ec; color: #1d6b3f; border: 1px solid #bfe0cc; }
.alert-error { background: #fbeae8; color: #b3261e; border: 1px solid #f1c9c4; }

/* ---------- Blog ---------- */
.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card.has-cover { padding-top: 0; overflow: hidden; }
.post-card.is-hidden { display: none; }
.load-more-wrap { text-align: center; margin-top: clamp(2rem, 4vw, 3rem); }
.post-card-media {
    display: block; margin: 0 calc(-1 * clamp(1.5rem, 3vw, 2.1rem)) 1.3rem;
    aspect-ratio: 16 / 9; overflow: hidden; background: var(--cream-dark);
}
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.post-card:hover .post-card-media img { transform: scale(1.045); }
.post-card .meta { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; }
.post-card h3 { margin-bottom: .5rem; }
.post-card p { color: var(--muted); flex: 1; }
.post-card .read-more { margin-top: 1rem; font-weight: 600; }

/* Blog: righe (cover, meta, titolo, excerpt, link) allineate tra le card */
@supports (grid-template-rows: subgrid) {
    @media (min-width: 901px) {
        #blog-grid { row-gap: .75rem; column-gap: clamp(1.2rem, 3vw, 2rem); }
        #blog-grid > .post-card {
            grid-row: span 5;
            display: grid;
            grid-template-rows: subgrid;
        }
        #blog-grid > .post-card .post-card-media { margin-bottom: 0; }
        #blog-grid > .post-card .meta,
        #blog-grid > .post-card h3,
        #blog-grid > .post-card p { margin: 0; }
        #blog-grid > .post-card .read-more { margin-top: 0; align-self: end; }
    }
}
.article { max-width: 760px; margin-inline: auto; }
.article .meta { color: var(--muted); margin-bottom: 1.5rem; }
.article-cover { margin: 0 0 2.2rem; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow-sm); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article h1 { margin-bottom: .6rem; }
.article-body { font-size: 1.08rem; }
.article-body p { margin-bottom: 1.2rem; }
.article-body h2 { margin: 2rem 0 .8rem; }
.article-body h3 { margin: 1.6rem 0 .6rem; }
.article-body ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1.2rem; }
.article-body li { margin-bottom: .4rem; }

/* ---------- Media band (immagini di sezione) ---------- */
.media-band {
    margin: 0; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow); aspect-ratio: 12 / 5; background: var(--cream-dark);
}
.media-band img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) { .media-band { aspect-ratio: 16 / 10; } }

/* ---------- Hero stats (contatori animati, riga unica) ---------- */
.hero-stats {
    display: flex; flex-wrap: nowrap; gap: clamp(1.2rem, 4vw, 3rem);
    margin-top: clamp(2.2rem, 5vw, 3.2rem); padding-top: clamp(1.6rem, 3vw, 2.2rem);
    border-top: 1px solid rgba(248,244,238,.18);
}
.hero-stats .stat { flex: 1 1 0; min-width: 0; }
.hero-stats .stat-num {
    font-family: var(--serif); font-weight: 700; color: var(--amber);
    font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1; font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.hero-stats .stat-label {
    margin-top: .5rem; color: rgba(248,244,238,.7);
    font-size: clamp(.72rem, 1.4vw, .85rem); line-height: 1.35;
}
@media (max-width: 700px) {
    .hero-stats { flex-wrap: wrap; gap: 1.4rem 1rem; }
    .hero-stats .stat { flex: 1 1 40%; }
}

/* ---------- Method layout (immagine affiancata agli step) ---------- */
.method-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.method-figure {
    margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
    aspect-ratio: 4 / 5; background: var(--cream-dark); position: sticky; top: 90px;
}
.method-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
    .method-layout { grid-template-columns: 1fr; gap: 2rem; }
    .method-figure { position: static; aspect-ratio: 16 / 10; }
}

/* ---------- Media split (testo + immagine affiancati) ---------- */
.media-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.media-split.is-reverse { direction: rtl; }
.media-split.is-reverse > * { direction: ltr; }
.media-split .media-split-text { max-width: 38rem; }
.media-split-text h2, .media-split-text h3 { margin-bottom: 1.1rem; }
.media-split-text p + p { margin-top: 1rem; }
.media-split .media-split-media {
    margin: 0; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--cream-dark);
}
.media-split .media-split-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
    .media-split { grid-template-columns: 1fr; gap: 2rem; }
    .media-split.is-reverse { direction: ltr; }
    .media-split .media-split-media { aspect-ratio: 16 / 10; }
}

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(150deg, var(--navy), #25405d); color: var(--cream); border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(248,244,238,.85); max-width: 620px; margin: 1rem auto 1.8rem; }

/* ---------- Admin ---------- */
.admin-shell { max-width: 900px; margin: 3rem auto; padding-inline: 1.5rem; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table th, .admin-table td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--cream-dark); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); }
.badge { font-size: .75rem; padding: .2rem .6rem; border-radius: 999px; font-weight: 600; }
.badge-on { background: #e7f3ec; color: #1d6b3f; }
.badge-off { background: #f0eadd; color: #8a6d2f; }
.login-box { max-width: 380px; margin: 5rem auto; background: #fff; padding: 2.2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(248, 244, 238, .82); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer-grid {
    display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.4fr; gap: clamp(1.8rem, 4vw, 3.5rem);
    padding-bottom: clamp(2.2rem, 4vw, 3rem);
}
.footer-brand .brand { margin-bottom: 1rem; }
.footer-tagline { color: rgba(248, 244, 238, .72); max-width: 34ch; }
.footer-contact-line { color: rgba(248, 244, 238, .72); margin-bottom: 1.1rem; max-width: 34ch; }
.site-footer h3 { color: var(--white); font-family: var(--sans); font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-nav ul { display: grid; gap: .55rem; }
.site-footer a { color: rgba(248, 244, 238, .82); }
.site-footer a:hover { color: var(--amber); }
.footer-contact p { color: rgba(248, 244, 238, .82); margin-bottom: 1.1rem; }
.footer-bottom {
    display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
    padding-block: 1.4rem; margin-top: clamp(1.5rem, 3vw, 2.2rem);
    border-top: 1px solid rgba(248, 244, 238, .14); font-size: .85rem;
}
.footer-bottom p { color: rgba(248, 244, 238, .6); margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-legal-info { flex-basis: 100%; order: 3; font-size: .8rem; color: rgba(248, 244, 238, .45) !important; }
/* link nella riga legale (es. telefono): stesso colore attenuato del testo, non il
   bianco dei link footer standard; l'hover amber resta come affordance */
.footer-legal-info a { color: inherit; }

/* ---------- Reveal on scroll (progressive enhancement) ---------- */
.js [data-reveal] {
    opacity: 0; transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
    will-change: opacity, transform;
}
.js [data-reveal].in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Giustificazione testi di contenuto (hero e blocchi centrati esclusi) ---------- */
main p,
.article-body li {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}
.hero p,
.section-head.center p,
.cta-band p,
.quote-band p,
.text-center,
.text-center p {
    text-align: inherit;
    hyphens: manual;
}
@media (max-width: 600px) {
    main p, .article-body li { text-align: left; hyphens: none; }
}
/* Nelle card le colonne sono strette: testo a sinistra (no giustificato/sillabazione) */
.card p, .case p, .case-row p { text-align: left; hyphens: manual; }

/* ---------- Helpers ---------- */
.text-center { text-align: center; }
.items-center { align-items: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1.1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .network-areas { grid-template-columns: repeat(2, 1fr); }
}
/* Nav: hamburger gia da tablet in verticale (<=900px), dove la barra desktop non ci sta */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: fixed; inset: 84px 0 auto 0; background: var(--cream);
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        transform: translateY(-150%); transition: transform .3s ease; visibility: hidden;
    }
    .primary-nav.open { transform: translateY(0); visibility: visible; }
    .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 1rem clamp(1.2rem,5vw,2rem) 1.5rem; }
    .primary-nav li { padding: .25rem 0; }
    .primary-nav a { display: block; text-align: left; padding: .65rem 0; font-size: 1.05rem; }
    .primary-nav a.is-active::after { display: none; }
    .nav-cta { margin-top: .6rem; }
    .nav-cta a { display: inline-flex; }
    .lang-switch { margin-top: 1rem; }
}
@media (max-width: 760px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .step { grid-template-columns: 1fr; }
    .step-marker { width: 46px; height: 46px; }
    .team-card { grid-template-columns: 1fr; }
    .team-avatar { width: 72px; height: 72px; }
    .grid-mini { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .network-intro { grid-template-columns: 1fr; }
    .network-count {
        display: flex; align-items: baseline; gap: .8rem; text-align: left;
        padding: 0 0 1rem; border-right: 0; border-bottom: 1px solid var(--line);
    }
    .network-num-label { margin-top: 0; max-width: none; }
}
@media (max-width: 520px) {
    .network-areas { grid-template-columns: 1fr; gap: .75rem; }
    .network-area { display: grid; grid-template-columns: 40px 1fr; column-gap: .9rem; align-items: start; }
    .network-area .card-icon { grid-row: span 2; margin-bottom: 0; }
}
/* Telefoni stretti: il numero lungo dell'hero non deve essere tagliato */
@media (max-width: 380px) {
    .hero-stats .stat-num { font-size: 1.2rem; }
}
/* Admin (backend): tabella scrollabile in orizzontale su mobile */
@media (max-width: 640px) {
    .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ===== Banner consenso cookie (GA4 / Consent Mode v2) ===== */
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1000;
    background: var(--navy);
    color: var(--white);
    border-top: 3px solid var(--amber);
    box-shadow: 0 -4px 20px rgba(28, 46, 68, 0.25);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 0;
}
.cookie-banner-text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--cream);
}
.cookie-banner-text a {
    color: var(--white);
    text-decoration: underline;
}
.cookie-banner-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}
.cookie-btn {
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 1.3rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
/* Accetta e Rifiuta hanno pari evidenza (richiesto dal Garante) */
.cookie-btn-accept {
    background: var(--amber);
    color: var(--white);
    border-color: var(--amber);
}
.cookie-btn-accept:hover { background: var(--amber-dark); border-color: var(--amber-dark); }
.cookie-btn-reject {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.55);
}
.cookie-btn-reject:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); }
@media (max-width: 640px) {
    .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 0.85rem; }
    .cookie-banner-actions { justify-content: stretch; }
    .cookie-btn { flex: 1; text-align: center; }
}
