/* Main menu (template-parts/navigator.php), oc:8869
 * With «Sorgenti Adottate» the desktop menu has one item more: from 1280px everything stays on one line.
 * The labels do not wrap and the items are a little closer, the newsletter button text is a little smaller,
 * and the language flags (one above the other) lose the extra padding of the WPML switcher CSS.
 * Between 1024px and 1279px there is not enough room for the full menu: the mobile menu (hamburger button
 * and side panel #mainNavPanelMobile) is used there too. The theme switches at 1024px with precompiled lg: classes,
 * so these rules repeat, in that range, what the theme and additional.css do below 1024px. */
@media (min-width: 1280px) {
    #mainNavPanel .n7-primary-navigation__list {
        gap: 0.5rem;
    }
    #mainNavPanel .n7-primary-navigation__list > li > a.p-3 {
        white-space: nowrap;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    #mainNavPanel .n7-hero__actions .n7-btn {
        white-space: nowrap;
        font-size: 16px;
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }
    #mainNavPanel .wpml-ls-legacy-list-horizontal {
        padding: 0;
    }
    #mainNavPanel .wpml-ls-legacy-list-horizontal a.wpml-ls-link {
        padding: 4px 4px;
    }
    /* One flag above the other, as before: narrower than side by side */
    #mainNavPanel .wpml-ls-legacy-list-horizontal li {
        display: block;
    }
}

/* Mobile menu up to 1279px (the theme alone switches at 1024px) */
@media (min-width: 1024px) and (max-width: 1279.98px) {
    .n7-main-heading {
        background-color: transparent;
    }
    .nav-container {
        background-color: #ffffff;
        color: rgb(37 74 159);
        border-radius: 0;
    }
    #siteNavWrapper {
        justify-content: normal;
    }
    #mobileNavToggle {
        display: flex;
        margin-left: 0;
        height: 44px;
        padding-left: 16px;
        padding-right: 12px;
    }
    #mobileNavToggle .icon-open {
        display: inherit;
    }
    #mobileNavToggle .icon-close {
        display: none;
    }
    #mobileNavToggle.active .icon-open {
        display: none;
    }
    #mobileNavToggle.active .icon-close {
        display: inherit;
    }
    #mainNavPanel {
        display: none;
    }
    .n7-primary-navigation__backdrop {
        display: block;
    }
}
