/* Navbar condivisa per HTML, ASP e ASPX. Caricare dopo gli stili del sito. */
:root { --sg-green: #008000; --sg-dark: #075328; --sg-ink: #16372a; --sg-muted: #596b60; --sg-line: #dce7df; --sg-tint: #f1f6f1; }
        .sg-header [hidden], .sg-backdrop[hidden] { display: none !important; }
        .sg-js .sg-header:not([data-sg-initialized]) { visibility: hidden; }
        .sg-skip { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 14px; background: white; transform: translateY(-150%); }
        .sg-skip:focus { transform: none; }
        .sg-header { position: sticky; top: 0; z-index: 30; background: white; box-shadow: 0 4px 20px #123c2110; }
        .sg-shell { max-width: 1360px; margin: auto; padding-inline: 40px; }
        .sg-masthead { display: flex; align-items: center; gap: 28px; min-height: 112px; }
        .sg-nav-brand { display: inline-flex; align-items: center; gap: 15px; text-decoration: none; flex-shrink: 0; }
        .sg-emblem { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--sg-green); }
        .sg-emblem img { width: 58px; height: 44px; object-fit: contain; }
        .sg-brand-name { display: block; font: 600 29px/1.1 Dosis, sans-serif; letter-spacing: -.4px; }
        .sg-brand-detail { display: block; margin-top: 6px; color: var(--sg-muted); font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; }
        .sg-utility { display: flex; align-items: center; gap: 25px; margin-left: auto; }
        .sg-utility > a { font-size: 13px; text-decoration: none; }
        .sg-utility > a:hover { color: var(--sg-green); text-decoration: underline; text-underline-offset: 5px; }
        .sg-social { display: flex; gap: 6px; border-left: 1px solid var(--sg-line); padding-left: 18px; }
        .sg-social a { display: grid; place-items: center; width: 36px; min-height: 44px; color: var(--sg-muted); text-decoration: none; }
        .sg-social a:hover { color: var(--sg-green); }
        .sg-book { display: inline-flex; justify-content: center; align-items: center; gap: 22px; padding: 16px 23px; min-height: 48px; background: var(--sg-green); color: white; border-radius: 5px; text-decoration: none; font: 600 18px/1.2 Dosis, sans-serif; }
        .sg-book:hover { background: var(--sg-dark); }
        .sg-menu-toggle { display: none; }
        .sg-nav-band { background: var(--sg-green); }
        .sg-nav-frame { position: relative; }
        .sg-menu, .sg-menu ul { list-style: none; padding: 0; margin: 0; }
        .sg-menu { display: flex; align-items: stretch; gap: 6px; }
        .sg-menu > li { margin: 0 !important; position: static !important; }
        .sg-menu a, .sg-menu button { text-decoration: none; }
        .sg-menu p { margin: 0; font: inherit; }
        .sg-menu .caret, .sg-menu .fa-caret-left { display: none; }
        .sg-menu > li > a, .sg-menu > li > button, .sg-menu > li > .sg-link-row { min-height: 60px; }
        .sg-menu > li > a, .sg-menu > li > button { display: flex; align-items: center; gap: 11px; padding: 0 20px; color: white; border: 0; background: transparent; font: 500 18px/1.2 Dosis, sans-serif; }
        .sg-menu > li > a:hover, .sg-menu > li > button:hover, .sg-menu > li > button[aria-expanded="true"] { background: #006b00; }
        .sg-menu > .active > a { box-shadow: inset 0 -3px #c3e6a5; background: #ffffff10; }
        .sg-menu > .sg-search { margin-left: auto !important; }
        .sg-menu > .sg-search a { border-left: 1px solid #ffffff38; padding-right: 4px; }
        .sg-menu > .sg-search i { margin-left: 8px; font-size: 14px; }
        .sg-chevron { flex-shrink: 0; display: inline-block; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); transition: transform .18s; margin-left: auto; }
        [aria-expanded="true"] > .sg-chevron { transform: rotate(225deg) translate(-2px, -1px); }
        /* Il primo livello si apre in un pannello ampio; i livelli successivi sono accordion. */
        .sg-menu > li > ul { position: absolute; top: 100%; left: 40px; right: 40px; display: grid; grid-template-columns: 210px 1fr; background: white; color: var(--sg-ink); box-shadow: 0 22px 40px #06291226; border-radius: 0 0 8px 8px; overflow-y: auto; max-height: calc(100dvh - 192px); }
        .sg-panel-intro { grid-column: 1; grid-row: 1; background: var(--sg-tint); padding: 30px 25px; border-right: 1px solid var(--sg-line); }
        .sg-panel-eyebrow { display: block; margin-bottom: 13px; color: var(--sg-muted); font-size: 10px; font-weight: 500; letter-spacing: 1.6px; text-transform: uppercase; }
        .sg-panel-title { display: block; color: var(--sg-dark); font: 500 30px/1.15 Dosis, sans-serif; }
        .sg-panel-mark { display: block; width: 32px; height: 3px; margin-top: 24px; background: var(--sg-green); }
        .sg-panel-items { grid-column: 2; padding: 20px; }
        .sg-menu .sg-panel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; align-items: stretch; }
        .sg-panel-grid > li { border-bottom: 1px solid #e9efea; min-width: 0; }
        .sg-panel-grid a, .sg-panel-grid button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 49px; padding: 13px 10px; border: 0; text-align: left; color: var(--sg-ink); background: transparent; font: 400 14px/1.5 Roboto, sans-serif; overflow-wrap: anywhere; border-radius: 3px; }
        .sg-panel-grid a:hover, .sg-panel-grid button:hover, .sg-panel-grid button[aria-expanded="true"] { color: var(--sg-dark); background: var(--sg-tint); }
        .sg-panel-grid br { display: none; }
        .sg-panel-grid ul { margin: 0 0 12px 10px; padding-left: 10px; border-left: 2px solid var(--sg-green); }
        .sg-panel-grid ul a { font-size: 13px; }
        .sg-link-row { display: flex; align-items: stretch; }
        .sg-link-row > a { flex: 1; }
        .sg-link-row > button { width: 44px; flex-shrink: 0; }
        .sg-mobile-links { display: none; }
        .sg-backdrop { position: fixed; inset: 0; z-index: 20; background: #0a211c40; }
        @media (min-width: 1321px) and (max-width: 1350px) {
            .sg-shell { padding-inline: 24px; }
            .sg-menu > li > a, .sg-menu > li > button { padding-inline: 14px; }
            .sg-utility { gap: 17px; }
            .sg-social { padding-left: 8px; }
            .sg-menu > li > ul { left: 24px; right: 24px; grid-template-columns: 170px 1fr; }
            .sg-menu .sg-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        }
        @media (max-width: 1320px) {
            .sg-shell { padding-inline: 22px; }
            .sg-masthead { min-height: 88px; gap: 14px; }
            .sg-emblem { width: 52px; height: 52px; }
            .sg-emblem img { width: 46px; height: 35px; }
            .sg-nav-brand { gap: 10px; }
            .sg-brand-name { font-size: 24px; }
            .sg-brand-detail { font-size: 9px; letter-spacing: .8px; }
            .sg-utility { display: none; }
            .sg-masthead > .sg-book { margin-left: auto; padding: 12px 16px; font-size: 16px; }
            .sg-menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 48px; height: 48px; padding: 0 12px; background: white; border: 1px solid var(--sg-line); color: var(--sg-dark); border-radius: 4px; }
            .sg-toggle-icon, .sg-toggle-icon::before, .sg-toggle-icon::after { display: block; width: 18px; height: 2px; background: currentColor; transition: transform .18s; }
            .sg-toggle-icon { position: relative; }
            .sg-toggle-icon::before, .sg-toggle-icon::after { content: ''; position: absolute; left: 0; top: -6px; }
            .sg-toggle-icon::after { top: 6px; }
            .sg-menu-toggle[aria-expanded="true"] .sg-toggle-icon { background: transparent; }
            .sg-menu-toggle[aria-expanded="true"] .sg-toggle-icon::before { top: 0; transform: rotate(45deg); }
            .sg-menu-toggle[aria-expanded="true"] .sg-toggle-icon::after { top: 0; transform: rotate(-45deg); }
            .sg-nav-band { border-top: 3px solid var(--sg-green); background: white; }
            .sg-nav-frame { padding-inline: 22px; }
            .sg-ready .sg-nav-band { display: none; }
            .sg-ready .sg-nav-band.is-open { display: block; max-height: calc(100dvh - 88px); overflow-y: auto; overscroll-behavior: contain; }
            .sg-menu { display: block; padding-block: 12px; }
            .sg-menu > li { border-bottom: 1px solid var(--sg-line); }
            .sg-menu > li > a, .sg-menu > li > button { width: 100%; min-height: 56px; padding: 14px 6px; color: var(--sg-ink); font-size: 22px; text-align: left; }
            .sg-menu > li > a:hover, .sg-menu > li > button:hover, .sg-menu > li > button[aria-expanded="true"] { background: var(--sg-tint); color: var(--sg-dark); }
            .sg-menu > .active > a { box-shadow: none; color: var(--sg-green); }
            .sg-menu > .sg-search a { border: 0; }
            .sg-menu > li > ul { display: block; position: static; max-height: none; box-shadow: none; overflow: visible; border-radius: 0; }
            .sg-panel-intro { display: none; }
            .sg-panel-items { padding: 0 0 16px 10px; }
            .sg-menu .sg-panel-grid { display: block; }
            .sg-panel-grid a, .sg-panel-grid button { font-size: 15px; min-height: 48px; padding-block: 12px; }
            .sg-panel-grid ul a { font-size: 14px; }
            .sg-mobile-links { display: flex; gap: 22px; padding: 14px 6px 25px; flex-wrap: wrap; }
            .sg-mobile-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--sg-dark); font-size: 14px; text-underline-offset: 5px; }
            body.sg-locked { overflow: hidden; }
        }
        @media (max-width: 540px) {
            .sg-shell { padding-inline: 18px; }
            .sg-masthead { min-height: 82px; flex-wrap: wrap; column-gap: 8px; row-gap: 0; padding-block: 12px; }
            .sg-brand-name { font-size: 21px; }
            .sg-brand-detail { font-size: 8px; letter-spacing: .6px; }
            .sg-emblem { width: 44px; height: 44px; }
            .sg-emblem img { width: 39px; height: 30px; }
            .sg-masthead > .sg-book { order: 3; width: 100%; margin-top: 12px; min-height: 42px; padding: 10px; }
            .sg-menu-toggle { margin-left: auto; padding-inline: 10px; }
            .sg-toggle-label { display: none; }
            .sg-ready .sg-nav-band.is-open { max-height: calc(100dvh - 126px); }
        }
        @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
    
        /* Integrazione isolata: la homepage mantiene i propri stili e contenuti. */
        :root { --sg-banner-height: 0px; --sg-bar-height: 76px; }
        :root:has(#newsOverlay) { --sg-banner-height: 30px; }
        @media (max-width: 700px) { :root { --sg-bar-height: 131px; } }
        @media (max-width: 540px) { :root { --sg-bar-height: 127px; } }
        /* Lo spazio resta stabile anche durante il caricamento delle due risorse. */
        .sg-js [data-sg-navbar]:not([data-sg-loaded]):not([data-sg-error]) {
            height: calc(var(--sg-banner-height) + var(--sg-bar-height));
            visibility: hidden;
        }
        .sg-js [data-sg-navbar]:not([data-sg-loaded]):not([data-sg-error])::before {
            content: '';
            position: fixed;
            top: var(--sg-banner-height);
            left: 0;
            right: 0;
            height: var(--sg-bar-height);
            background: var(--sg-green);
            visibility: visible;
            z-index: 1000;
        }
        body.sg-navbar-page { padding-top: 0 !important; }
        .sg-header, .sg-header * { box-sizing: border-box; }
        .sg-header { position: fixed; top: var(--sg-banner-height); left: 0; right: 0; z-index: 1000; background: var(--sg-green); color: white; font-family: Roboto, Arial, sans-serif; }
        .sg-header a { text-decoration: none; }
        .sg-header button { cursor: pointer; }
        .sg-header :focus-visible, .sg-skip:focus { outline: 3px solid #e8c75a !important; outline-offset: -3px; }
        .sg-skip { z-index: 100001; }
        .sg-header-inner { display: flex; align-items: center; gap: 68px; max-width: 1700px; min-height: 76px; padding-inline: 26px; }
        .sg-nav-brand { gap: 6px; color: white; }
        .sg-nav-brand:hover, .sg-nav-brand:focus { color: white; }
        .sg-emblem { width: auto; height: auto; border-radius: 0; background: none; }
        .sg-emblem img { display: block; width: 60px; height: 48px; object-fit: contain; }
        .sg-brand-name { font-size: 23px; letter-spacing: 0; }
        .sg-brand-kicker { display: block; margin-bottom: 2px; color: white; font: 400 11px/1.2 Roboto, sans-serif; }
        .sg-brand-detail { display: block; margin-top: 3px; font: 400 10px/1.2 Roboto, sans-serif; letter-spacing: .8px; color: white; text-transform: uppercase; }
        .sg-nav-band { flex: 1; min-width: 0; border: 0; background: transparent; }
        .sg-nav-frame { position: static; max-width: none; padding: 0; }
        .sg-menu { gap: 0; }
        .sg-menu li { display: block; }
        .sg-menu p { word-spacing: normal; }
        .sg-menu > li > a, .sg-menu > li > button, .sg-menu > li > .sg-link-row { min-height: 44px; margin-block: 16px; border-radius: 6px; }
        .sg-menu > li > a, .sg-menu > li > button { padding-inline: 11px; font-size: 17px; }
        .sg-menu > .active > a, .sg-menu > .active > button { background: #e1efda; color: #064c24; box-shadow: none; font-weight: 600; }
        .sg-menu > .active > a:hover { background: #f0f7ec; }
        .sg-menu > li > button[aria-expanded="true"] { background: white; color: #075328; box-shadow: 0 2px 5px #00380022; }
        .sg-menu > .sg-search a { border-left: 0; padding-inline: 12px; }
        .sg-menu > .sg-social-item > a { padding-inline: 9px; font-size: 14px; min-width: 32px; }
        .sg-menu > li > ul { left: 50%; right: auto; transform: translateX(-50%); width: min(920px, calc(100% - 48px)); grid-template-columns: 160px 1fr; max-height: calc(100dvh - var(--sg-banner-height) - var(--sg-bar-height) - 16px); border-top: 3px solid #c5ddb9; }
        .sg-menu .sg-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
        .sg-panel-intro { padding: 26px 20px; }
        .sg-panel-title { font-size: 27px; }
        .sg-panel-grid .active > a, .sg-panel-grid [aria-current="page"], .sg-panel-grid button[aria-expanded="true"] { background: #e7f2e1; color: #075328; box-shadow: inset 3px 0 #008000; font-weight: 500; }
        .sg-panel-grid li { position: static !important; }
        .sg-panel-grid a { white-space: normal; }
        .sg-menu .sg-panel-intro { display: block; }
        .sg-header .sg-book { flex-shrink: 0; gap: 12px; min-height: 42px; padding: 11px 16px; background: white; color: #006400; font-size: 17px; }
        .sg-header .sg-book:hover { background: #edf5e9; }
        .sg-report { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; min-height: 42px; padding: 10px 13px; border: 1px solid #ffffffa6; border-radius: 5px; color: white; font: 600 17px/1.2 Dosis, sans-serif; white-space: nowrap; }
        .sg-report:hover, .sg-report:focus { background: #ffffff17; color: white; }
        .sg-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
        .sg-actions .fa { font-size: 15px; }
        .sg-header .sg-book { white-space: nowrap; }
        .sg-backdrop { z-index: 990; }
        .sg-header-space { height: calc(var(--sg-banner-height) + var(--sg-bar-height)); }
        body.sg-navbar-page #myModalMessage, body.sg-navbar-page #myModal { z-index: 1050; }
        /* Le pagine interne avevano già un margine per la vecchia navbar fissa. */
        body.sg-navbar-page #contenuto > .contact-content,
        body.sg-navbar-page #contenuto > .detail-content,
        body.sg-navbar-page #contenuto > .blog-content,
        body.sg-navbar-page #contenuto > .forma-content,
        body.sg-navbar-page #contenuto > .down-content { margin-top: 24px; }
        /* Il menu laterale resta sotto la testata anche sui telefoni a due righe. */
        @media (max-width: 991px) {
            body.sg-navbar-page .mobile-side-menu-overlay,
            body.sg-navbar-page #menu_lat {
                top: calc(var(--sg-banner-height) + var(--sg-bar-height));
            }
            body.sg-navbar-page #menu_lat {
                height: calc(100dvh - var(--sg-banner-height) - var(--sg-bar-height));
            }
        }
        @media (max-width: 1350px) and (min-width: 1321px) {
            .sg-header-inner { padding-inline: 18px; gap: 12px; }
            .sg-menu > li > a, .sg-menu > li > button { padding-inline: 9px; }
            .sg-brand-name { font-size: 20px; }
            .sg-emblem img { width: 52px; }
        }

        @media (max-width: 1320px) {
            .sg-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 0; gap: 0; padding: 0; }
            .sg-nav-brand { grid-column: 1; grid-row: 1; justify-self: start; min-height: 70px; margin-left: 22px; gap: 12px; }
            .sg-brand-name { font-size: 23px; }
            .sg-brand-kicker { font-size: 11px; }
            .sg-brand-detail { display: block; font-size: 10px; }
            .sg-emblem img { width: 55px; height: 46px; }
            .sg-menu-toggle { grid-column: 2; grid-row: 1; order: 0; justify-self: end; min-width: 88px; height: 44px; margin: 0 22px 0 0; padding: 0 13px; color: white; background: transparent; border-color: #ffffff80; font: 500 14px Roboto, sans-serif; }
            .sg-toggle-label { display: inline; }
            .sg-actions { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 8px 22px; background: #f3f7f0; border-bottom: 1px solid #dce7df; }
            .sg-header .sg-actions a { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; margin: 0; padding: 10px 12px; border-radius: 4px; font: 500 14px/1.25 Roboto, sans-serif; }
            .sg-actions .sg-report { background: white; border: 1px solid #b5cbb8; color: #075328; }
            .sg-actions .sg-report:hover { background: #e5efdf; }
            .sg-actions .sg-book { background: #008000; color: white; border: 1px solid #008000; }
            .sg-actions .sg-book:hover { background: #075328; border-color: #075328; }
            .sg-book-detail, .sg-report-detail, .sg-report-icon { display: inline; }
            .sg-nav-band { position: absolute; top: 100%; left: 0; right: 0; background: white; color: var(--sg-ink); }
            .sg-ready .sg-nav-band.is-open { max-height: calc(100dvh - var(--sg-banner-height) - var(--sg-bar-height)); }
            .sg-nav-frame { display: flex; flex-direction: column; padding: 0 22px; }
            .sg-menu { padding-top: 0; }
            .sg-menu > li > a, .sg-menu > li > button, .sg-menu > li > .sg-link-row { min-height: 52px; margin-block: 4px; font-size: 20px; padding: 12px; }
            .sg-menu > .active > a { background: #e7f2e1; color: #075328; box-shadow: inset 3px 0 #008000; }
            .sg-menu > li > button[aria-expanded="true"] { background: #e7f2e1; box-shadow: inset 3px 0 #008000; }
            .sg-menu .sg-panel-intro { display: none; }
            .sg-menu > li > ul { max-height: none; width: auto; transform: none; border-top: 0; }
            .sg-menu .sg-panel-grid { display: block; }
            .sg-menu > .sg-social-item { display: inline-block; border: 0; }
            .sg-menu > .sg-social-item > a { min-width: 44px; min-height: 44px; justify-content: center; }
            .sg-menu > .sg-search a { padding-inline: 12px; }
            .sg-mobile-links { display: block; order: -1; padding: 14px 0; }
            .sg-mobile-links .sg-contact { display: grid; grid-template-columns: 24px minmax(0, 1fr) 16px; align-items: center; gap: 12px; min-height: 68px; padding: 12px 16px; border: 1px solid #c6d8c8; border-radius: 5px; background: #f3f7f0; color: #075328; text-decoration: none; }
            .sg-contact > .fa { font-size: 22px; text-align: center; }
            .sg-contact strong { display: block; font: 500 15px/1.3 Roboto, sans-serif; }
            .sg-contact small { display: block; margin-top: 4px; color: #506452; font: 400 12px/1.4 Roboto, sans-serif; }
            .sg-mobile-links .sg-contact:hover { background: #e5efdf; border-color: #008000; }
        }
        @media (min-width: 701px) and (max-width: 1320px) {
            .sg-header-inner { display: flex; min-height: 76px; gap: 16px; padding-inline: 22px; }
            .sg-nav-brand { margin: 0; min-height: 76px; }
            .sg-actions { display: flex; margin-left: auto; padding: 0; border: 0; background: transparent; }
            .sg-header .sg-actions a { width: auto; padding-inline: 16px; }
            .sg-actions .sg-report { min-width: 150px; background: transparent; border-color: #ffffff99; color: white; }
            .sg-actions .sg-report:hover { background: #ffffff17; }
            .sg-actions .sg-book { min-width: 175px; background: white; border-color: white; color: #075328; }
            .sg-actions .sg-book:hover { background: #e5efdf; border-color: #e5efdf; }
            .sg-menu-toggle { order: 3; margin: 0; }
        }
        @media (max-width: 540px) {
            .sg-nav-brand { min-height: 68px; margin-left: 16px; gap: 10px; }
            .sg-emblem img { width: 49px; height: 43px; }
            .sg-brand-name { font-size: 22px; }
            .sg-menu-toggle { min-width: 80px; width: auto; margin-right: 16px; padding-inline: 11px; }
            .sg-actions { gap: 8px; padding: 7px 12px; }
            .sg-header .sg-actions a { font-size: 13px; gap: 7px; padding-inline: 7px; }
            .sg-actions .fa { font-size: 14px; }
            .sg-nav-frame { padding-inline: 16px; }
        }
        /* Un'unica metrica tipografica evita distanze irregolari fra le tre righe. */
        .sg-brand-copy { display: flex; flex-direction: column; gap: 0; text-align: left; white-space: nowrap; word-spacing: normal; }
        .sg-nav-brand .sg-emblem img { width: auto; height: 52px; }
        .sg-nav-brand .sg-brand-kicker { margin: 0; font: 400 12px/14px Dosis, sans-serif; letter-spacing: 0; }
        .sg-nav-brand .sg-brand-name { margin: 0; font: 400 20px/23px Dosis, sans-serif; letter-spacing: 0; }
        .sg-nav-brand .sg-brand-detail { margin: 2px 0 0; font: 400 11px/13px Dosis, sans-serif; letter-spacing: .4px; }
