/* Il Fondo 1.2.50: menu a scomparsa anche su desktop.
   Non modifica le regole del menu mobile (<= 900px). */

/* Rende l'icona attivabile e identificabile da tastiera. */
#gh-head .gh-burger:focus-visible {
    outline: 2px solid #60788b;
    outline-offset: 4px;
    border-radius: 4px;
}

@media (min-width: 901px) {
    #gh-head {
        position: relative;
        z-index: 100;
        overflow: visible;
    }

    /* Logo originale a sinistra, ricerca/accesso e pulsante menu a destra. */
    #gh-head .gh-head-inner {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: clamp(20px, 2.6vw, 38px);
        align-items: center;
    }

    #gh-head .gh-head-brand {
        display: contents;
    }

    #gh-head .gh-head-logo {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        width: fit-content;
        max-width: 100%;
    }

    #gh-head .gh-head-logo img {
        max-width: 100%;
        height: auto;
    }

    #gh-head .gh-head-actions {
        grid-column: 2;
        grid-row: 1;
        margin-left: 0 !important;
        white-space: nowrap;
    }

    /* Ricerca e accesso: comando distinto, senza sovrapposizioni. */
    #gh-head .gh-head-actions-list {
        display: inline-flex;
        align-items: center;
        gap: clamp(20px, 2.1vw, 34px);
    }

    #gh-head .gh-head-actions-list a:first-child svg {
        margin-left: 0;
    }

    #gh-head .gh-burger {
        grid-column: 3;
        grid-row: 1;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        width: auto;
        min-width: 124px;
        height: 48px;
        gap: 13px;
        padding: 5px 6px;
        color: inherit;
        white-space: nowrap;
    }

    #gh-head .gh-desktop-menu-label {
        display: inline-block;
        font-size: 1.8rem;
        line-height: 1;
        letter-spacing: 0.02em;
        font-weight: 600;
    }

    /* Il menu non occupa spazio nella testata: si apre in sovrapposizione. */
    #gh-head .gh-head-menu {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        z-index: 110;
        box-sizing: border-box;
        width: min(365px, calc(100vw - 40px));
        max-width: none !important;
        max-height: min(76vh, 660px);
        overflow-y: auto;
        padding: 18px 24px;
        background: #fff;
        border: 1px solid #e2e2e2;
        border-radius: 8px;
        box-shadow: 0 12px 28px rgb(0 0 0 / 12%);
    }

    body.gh-head-open #gh-head .gh-head-menu {
        display: block;
    }

    #gh-head .gh-head-menu .nav {
        display: flex;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        width: 100%;
        margin: 0;
    }

    #gh-head .gh-head-menu .nav li {
        min-width: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    #gh-head .gh-head-menu .nav li + li {
        border-top: 1px solid #f0f0f0;
    }

    #gh-head .gh-head-menu .nav a {
        display: block;
        padding: 8px 2px;
        font-size: 1.7rem;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    #gh-head .gh-head-menu .nav a:hover,
    #gh-head .gh-head-menu .nav a:focus-visible {
        color: #284966;
    }
}

/* Su tablet e smartphone il pulsante rimane quello originario: solo icona. */
@media (max-width: 900px) {
    #gh-head .gh-desktop-menu-label {
        display: none !important;
    }
}
