* { box-sizing: border-box; }

/* Testata sempre visibile */
.site-header-shell {
    position: sticky;
    top: 0;
    z-index: 9000;
    width: 100%;
    background: #faf9f7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    border-bottom: 1px solid #d7d7d7;
}

/* Riga inferiore come sul sito madre, distinta dall’ombra */
.site-header-shell::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: #d7d7d7;
    pointer-events: none;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 106px;
    padding: 15px 0;
    transition: min-height .35s ease-in-out, padding .35s ease-in-out;
}
.logo { width: 230px; flex: 0 0 auto; transition: width .35s ease-in-out; }
.logo a { display: block; line-height: 0; }
.logo a:focus-visible, .header-right a:focus-visible, .menumobileico button:focus-visible {
    outline: 3px solid #000000;
    outline-offset: 5px;
}
.logo img { width: 230px; height: auto; display: block; transition: width .35s ease-in-out; }
.header-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.header-right a { font-size: 16px; line-height: 1.4; font-weight: 400; color: #000000; text-decoration: none; }
.header-right a:hover, .header-right a:focus { text-decoration: underline; }
.header-separator { color: #777777; }

.site-header-shell.header-compact .header { min-height: 81px; padding: 5px 0; }
.site-header-shell.header-compact .logo, .site-header-shell.header-compact .logo img { width: 165px; }

.menumobileico { display: none; }
.menumobileico button { display: block; width: 36px; height: 30px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.menumobileico span { display: block; width: 36px; height: 4px; margin: 0 0 8px; background: #000000; }
.menumobileico span:last-child { margin-bottom: 0; }
.header .clear_both { display: none; }

/* BOX MENU MOBILE */
.boxmenumobile {
    display: none;
}





@media all and (max-width: 1020px) {

    body.menumobile-open {
        overflow: hidden;
    }





    /* Testata mobile */
    .header { min-height: 90px; padding: 8px 0; }
    .logo, .logo img { width: 200px; }
    .header-right { display: none; }
    .menumobileico { display: block; margin-left: auto; }
    .site-header-shell.header-compact .header { min-height: 73px; padding: 4px 0; }
    .site-header-shell.header-compact .logo,
    .site-header-shell.header-compact .logo img { width: 140px; }

    /* MENU MOBILE - BOX */
    .boxmenumobile {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 420px;
        height: 100vh;
        background-color: #ffffff;
        z-index: 9999;
        box-shadow: -8px 0 20px rgba(0,0,0,0.12);
        visibility: hidden;
        transition: right 0.22s ease, visibility 0.22s ease;
    }

    .boxmenumobile.open {
        right: 0;
        visibility: visible;
    }

    .menumobiletop {
        width: 100%;
        padding: 20px 30px;
        border-bottom: 1px solid rgba(0,0,0,0.10);
    }

    .menumobiletitle {
        float: left;
        font-size: 18px;
        line-height: 1em;
        font-weight: bold;
        color: #000000;
    }

    .chiudimenumobile {
        float: right;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        font-size: 34px;
        line-height: 18px;
        font-weight: normal;
        color: #000000;
        text-decoration: none;
        cursor: pointer;
        font-family: 'Poppins', Arial, Helvetica, sans-serif;
    }

    .chiudimenumobile:focus-visible {
        outline: 3px solid #000000;
        outline-offset: 6px;
    }

    .menumobiletop:after {
        content: "";
        display: block;
        clear: both;
    }

    .menumobilebody {
        height: calc(100vh - 59px);
        overflow-y: auto;
        padding: 10px 0 25px 0;
    }

    .linkmobile {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .linkmobile li {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(0,0,0,0.10);
    }

    .linkmobile > li > a {
        display: block;
        padding: 18px 30px;
        font-size: 16px;
        line-height: 1.2em;
        font-weight: normal;
        color: #000000;
        text-decoration: none;
    }

    .linkmobile a:hover,
    .linkmobile a:focus,
    .linkmobile a:active {
        color: #000000;
        text-decoration: underline;
    }

    .linkmobile a:focus-visible {
        outline: 3px solid #000000;
        outline-offset: -6px;
        text-decoration: underline;
    }





    /* VOCI CON SOTTOMENU MOBILE */
    .has-submenu-mobile {
        margin: 0;
        padding: 0;
    }

    .vocemobile {
        width: 100%;
        display: flex;
        align-items: stretch;
        justify-content: space-between;
    }

    .vocemobile > a,
    .vocemobile > .submenu-label {
        display: flex;
        align-items: center;
        flex: 1;
        min-height: 58px;
        margin: 0;
        padding: 18px 30px;
        border: 0;
        background: transparent;
        font-size: 16px;
        line-height: 1.2em;
        font-weight: normal;
        color: #000000;
        text-decoration: none;
        cursor: pointer;
        font-family: 'Poppins', Arial, Helvetica, sans-serif;
        text-align: left;
    }

    .vocemobile > .submenu-label:hover,
    .vocemobile > .submenu-label:focus,
    .vocemobile > .submenu-label:active {
        color: #000000;
        text-decoration: underline;
    }

    .vocemobile > .submenu-label:focus-visible {
        outline: 3px solid #000000;
        outline-offset: -6px;
        text-decoration: underline;
    }

    .submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 64px;
        min-width: 64px;
        min-height: 58px;
        border: 0;
        border-left: 1px solid rgba(0,0,0,0.08);
        background-color: transparent;
        cursor: pointer;
        padding: 0;
        text-align: center;
        color: #000000;
        font-family: 'Poppins', Arial, Helvetica, sans-serif;
    }

    .submenu-toggle:focus-visible {
        outline: 3px solid #000000;
        outline-offset: -6px;
    }

    .simbolo-toggle {
        display: block;
        width: 20px;
        height: 20px;
        font-size: 28px;
        line-height: 18px;
        font-weight: normal;
        text-align: center;
        color: #000000;
    }

    .has-submenu-mobile > ul {
        display: none;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
        background-color: rgba(0,0,0,0.025);
    }

    .has-submenu-mobile.open > ul {
        display: block;
    }

    .has-submenu-mobile.open > .vocemobile .simbolo-toggle {
        font-size: 0;
        line-height: 0;
    }

    .has-submenu-mobile.open > .vocemobile .simbolo-toggle:before {
        content: "-";
        display: block;
        width: 20px;
        height: 20px;
        font-size: 32px;
        line-height: 15px;
        font-weight: normal;
        text-align: center;
        color: #000000;
    }





    /* LIVELLI INTERNI MENU MOBILE */
    .linkmobile .has-submenu-mobile.open > ul {
        display: block;
    }

    .linkmobile .has-submenu-mobile > ul > li {
        border-bottom: 1px solid rgba(0,0,0,0.08);
    }

    .linkmobile .has-submenu-mobile > ul > li > a {
        display: block;
        padding-top: 14px;
        padding-bottom: 14px;
        padding-right: 30px;
        font-size: 14px;
        line-height: 1.25em;
        color: rgba(0,0,0,0.80);
        text-decoration: none;
    }

    .linkmobile .livello-mobile-2 > a,
    .linkmobile .livello-mobile-2 > .vocemobile > a,
    .linkmobile .livello-mobile-2 > .vocemobile > .submenu-label {
        padding-left: 48px;
    }

    .linkmobile .livello-mobile-3 > a,
    .linkmobile .livello-mobile-3 > .vocemobile > a,
    .linkmobile .livello-mobile-3 > .vocemobile > .submenu-label {
        padding-left: 66px;
        font-size: 13px;
    }

    .linkmobile .livello-mobile-4 > a,
    .linkmobile .livello-mobile-4 > .vocemobile > a,
    .linkmobile .livello-mobile-4 > .vocemobile > .submenu-label {
        padding-left: 84px;
        font-size: 13px;
    }

    .linkmobile .livello-mobile-5 > a,
    .linkmobile .livello-mobile-5 > .vocemobile > a,
    .linkmobile .livello-mobile-5 > .vocemobile > .submenu-label {
        padding-left: 102px;
        font-size: 13px;
    }

}
@media all and (max-width: 420px) {
    .logo, .logo img { width: 185px; }
    .site-header-shell.header-compact .logo,
    .site-header-shell.header-compact .logo img { width: 130px; }
}

@media (prefers-reduced-motion: reduce) {
    .header, .logo, .logo img { transition: none; }
}
