/*
 * Risi Group - Header UI
 */

/* ==============================
   HEADER
   ============================== */

#masthead.site-header {
    position: sticky;
    top: 0;
    z-index: 9990;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid rgba(15, 0, 104, 0.08);
    box-shadow: none;
    transition:
        box-shadow 0.25s ease,
        background 0.25s ease;
}

body.admin-bar #masthead.site-header {
    top: 32px;
}

body.risigroup-header-scrolled #masthead.site-header {
    background: rgba(255, 255, 255, 0.985);
    box-shadow: 0 8px 28px rgba(20, 20, 35, 0.08);
}


/* ==============================
   LAYOUT
   ============================== */

#masthead .site-header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 82px;
    padding: 10px 0 !important;
}

#masthead .site-branding {
    flex: 0 0 auto;
}

#masthead .custom-logo-link {
    display: flex;
    align-items: center;
}

#masthead .custom-logo {
    display: block;
    width: auto;
    max-width: 158px !important;
    max-height: 56px;
    object-fit: contain;
}


/* ==============================
   NAVIGAZIONE DESKTOP
   ============================== */

#masthead .main-navigation {
    flex: 1 1 auto;
    text-align: right;
    box-shadow: none;
}

#masthead .main-navigation > .site-container {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
}

#masthead #overlay-main-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin: 0;
}

#masthead #overlay-main-menu > li > a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 11px 13px !important;
    border-radius: 9px;
    color: #222;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        transform 0.18s ease;
}

#masthead #overlay-main-menu > li > a:hover,
#masthead #overlay-main-menu > li > a:focus-visible {
    color: #0f0068;
    background: rgba(15, 0, 104, 0.065);
}

#masthead #overlay-main-menu > li.current-menu-item > a,
#masthead #overlay-main-menu > li.current-menu-ancestor > a {
    color: #0f0068;
    background: rgba(15, 0, 104, 0.06);
}


/* ==============================
   CTA CONTATTI
   ============================== */

#masthead #menu-item-18 {
    margin-left: 7px;
}

#masthead #menu-item-18 > a {
    padding: 12px 19px !important;
    color: #fff !important;
    background: #0f0068 !important;
    border-radius: 10px;
    box-shadow: 0 5px 14px rgba(15, 0, 104, 0.17);
}

#masthead #menu-item-18 > a:hover,
#masthead #menu-item-18 > a:focus-visible {
    color: #fff !important;
    background: #090046 !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(15, 0, 104, 0.23);
}


/* ==============================
   DROPDOWN
   ============================== */

#masthead .main-navigation ul ul {
    padding: 7px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.10);
}

#masthead .main-navigation ul ul a {
    padding: 10px 13px !important;
    border-radius: 7px;
}


/* ==============================
   ACCESSIBILITÀ
   ============================== */

#masthead a:focus-visible,
#masthead button:focus-visible {
    outline: 3px solid rgba(15, 0, 104, 0.25);
    outline-offset: 3px;
}


/* ==============================
   MOBILE
   ============================== */

@media (max-width: 960px) {

    #masthead .site-header-inner {
        min-height: 70px;
        gap: 12px;
        padding: 7px 0 !important;
    }

    #masthead .site-branding {
        flex: 1 1 auto;
    }

    #masthead .custom-logo {
        max-width: 130px !important;
        max-height: 46px;
    }

    #masthead .main-navigation {
        flex: 0 0 auto;
    }

    #masthead .menu-toggle {
        min-width: 46px;
        min-height: 46px;
        padding: 9px 12px;
        border: 1px solid rgba(15, 0, 104, 0.13);
        border-radius: 10px;
        background: #fff;
        color: #0f0068;
        font-weight: 600;
        box-shadow: none;
    }

    #masthead #overlay-main-menu {
        display: block;
        text-align: left;
    }

    #masthead #overlay-main-menu > li {
        margin: 2px 0;
    }

    #masthead #overlay-main-menu > li > a {
        min-height: 48px;
        padding: 14px 15px !important;
        border-radius: 8px;
        font-size: 15px;
    }

    #masthead #menu-item-18 {
        margin: 10px 0 0;
    }

    #masthead #menu-item-18 > a {
        justify-content: center;
        text-align: center;
        padding: 14px 18px !important;
    }

}

@media (max-width: 782px) {

    body.admin-bar #masthead.site-header {
        top: 46px;
    }

}
