/* DESKTOP */
@media (min-width: 1025px) {
    body .fusion-logo,
    body .fusion-logo .fusion-logo-link,
    body .fusion-logo .fusion-logo-link img {
        max-width: 180px;
        height: 100%;
        min-height: 64px;
        object-fit: contain;
        position: relative;
    }

    .avada-menu-highlight-style-background:not(.fusion-header-layout-v6)
        .fusion-main-menu
        > ul
        > li
        > a,
    body nav .menu-item a {
        padding: 0 20px !important;
    }

    body .menu-item.menu-item-gtranslate > div {
        position: relative !important;
    }

    body .menu-item.menu-item-gtranslate .dropdown-menu.sub-menu {
        width: auto;
        max-width: unset;
    }

    body .menu-item.menu-item-gtranslate .dropdown-menu.sub-menu a {
        width: auto;
        max-width: unset;
        padding: 10px 20px !important;
        line-height: 1em;
        max-height: unset;
        height: auto;
    }
}

/* MOBILE */
@media (max-width: 1024px) {
    /* 0. Parent li: sits above the flyout layers and receives clicks */
    .fusion-flyout-mobile-menu.fusion-mobile-nav-holder
        li.menu-item-has-children:has(> a.gt-current-wrapper) {
        position: relative;
        z-index: 5;
        pointer-events: auto;
        padding: 0 !important;
        text-align: center;
    }

    /* 1. Always show the GTranslate sub-menu (theme sets display:none) and center the flags */
    .fusion-flyout-mobile-menu.fusion-mobile-nav-holder
        li.menu-item-has-children:has(> a.gt-current-wrapper)
        > ul.sub-menu {
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center; /* horizontal centering */
        align-items: center; /* vertical centering */
        gap: 12px;
        width: 100%;
        max-width: unset;
        margin: 0;
        padding: 10px 0;
        position: relative;
        z-index: 10;
        opacity: 1;
        visibility: visible !important;
        overflow: visible;
        height: auto;
        max-height: unset;
        border: 0;
        background: transparent;
        pointer-events: auto !important;
    }

    /* 2. Flag items: no stacking, no borders, no left indent */
    .fusion-flyout-mobile-menu.fusion-mobile-nav-holder
        li.menu-item-has-children:has(> a.gt-current-wrapper)
        > ul.sub-menu
        > li {
        display: block !important;
        float: none !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        text-align: center;
        position: relative;
        z-index: 10;
        pointer-events: auto !important;
    }

    .fusion-flyout-mobile-menu.fusion-mobile-nav-holder
        li.menu-item-has-children:has(> a.gt-current-wrapper)
        > ul.sub-menu
        > li
        > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto !important;
        height: auto;
        min-height: 0;
        padding: 8px !important;
        line-height: 1;
        border: 0 !important;
        position: relative;
        z-index: 10;
        pointer-events: auto !important;
        cursor: pointer;
    }

    .fusion-flyout-mobile-menu.fusion-mobile-nav-holder
        li.menu-item-has-children:has(> a.gt-current-wrapper)
        > ul.sub-menu
        > li
        > a
        img {
        display: block;
        width: 24px;
        height: 24px;
        pointer-events: none; /* click lands on the <a>, not the <img> */
    }

    /* 3. Remove the duplicate current flag: hide the trigger link and the submenu arrow,
          the current language stays visible inside the row */
    .fusion-flyout-mobile-menu.fusion-mobile-nav-holder
        li.menu-item-has-children:has(> a.gt-current-wrapper)
        > a.gt-current-wrapper,
    .fusion-flyout-mobile-menu.fusion-mobile-nav-holder
        li.menu-item-has-children:has(> a.gt-current-wrapper)
        > .fusion-open-submenu {
        display: none !important;
        pointer-events: none !important;
    }

    /* 4. Show which language is active */
    .fusion-flyout-mobile-menu.fusion-mobile-nav-holder
        ul.sub-menu
        a.gt-current-lang {
        outline: 2px solid currentColor;
        outline-offset: -2px;
        border-radius: 4px;
    }
    .fusion-flyout-mobile-menu.fusion-mobile-nav-holder
        ul.sub-menu
        a.glink:not(.gt-current-lang) {
        opacity: 0.7;
    }
}
