/* Mega menu */

.autex-mega-menu-widget {
    display: flex;
    gap: 40px;
    width: 100%;
    max-width: 885px;
    margin-left: auto;
    flex-wrap: wrap;
}

.autex-mega-menu-widget .autex-mega-menu-list {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 300px;
}


.autex-mega-menu-widget .autex-mega-menu-list li.divider {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.autex-mega-menu-widget .autex-mega-menu-list li a {
    color: var(--brand-aa-black);
}

.autex-mega-menu-widget .autex-mega-menu-list li.bold a {
    font-weight: bold;
}

.autex-mega-menu-image {
    min-width: 330px;
    max-width: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.autex-mega-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 24px;
}

.autex-mega-menu-item a {
    flex: none;
    min-width: 200px;
}

.autex-mega-menu-item .expand-arrow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    width: 14px;
    height: 14px;
    transition: width 0.3s ease;
    opacity: 0.5;
}

.autex-mega-menu-item .expand-arrow svg {
    width: 13px;
    height: 13px;
    margin-right: -2px;
}

.autex-mega-menu-item .expand-arrow:before {
    content: ' ';
    height: 1px;
    width: calc(100% - 1px);
    display: block;
    position: absolute;
    top: calc(50% - 0.5px);
    left: 0;
    background-color: currentColor;
}

.autex-mega-menu-item:hover .expand-arrow {
    width: 40%;
    transition: width 0.3s ease;
    opacity: 1;
}


.autex-mega-menu-image .caption {
    color: var(--brand-aa-black);
    padding: 15px;
}

nav.elementor-nav-menu--layout-horizontal {
    flex-wrap: wrap;
}



li.menu-item.bold a {
    font-weight: 700 !important;
}

.menu-item>a {
    transform-origin: left;
}

.menu-item>a:after {
    opacity: 1 !important;
    transform: scaleX(0) !important;
    transition: transform 0.3s ease-in-out 0.1s;
    transform-origin: inherit;
}

.menu-item.current-menu-ancestor>a:after,
.menu-item.current-menu-item>a:after,
.menu-item.highlighted>a:after,
.menu-item:hover>a:after {
    transform: scaleX(1) !important;
    transition: transform 0.3s ease-in-out 0.1s;
    transform-origin: inherit;
}

@media (max-width:1024px) {

    li.menu-item>a:after,
    li.menu-item>a:hover:after {
        height: 2px !important;
        transform: scaleX(0) !important;
    }


    .menu-item.mega-menu .sub-menu .menu-item a {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .menu-item.mega-menu {
        position: relative;
    }

    .menu-item.mega-menu:after {
        transform: none !important;
        content: ' ' !important;
        display: block;
        width: 15px !important;
        height: 15px !important;
        background-image: url(/wp-content/themes/autexacoustics/assets/img/menu-down.svg);
        background-size: contain;
        background-repeat: no-repeat;
        opacity: 0.5 !important;
        position: absolute;
        right: 20px;
        top: 20px;
        pointer-events: none;
    }

    .menu-item.mega-menu .sub-menu .menu-item a:after {
        transform: none !important;
        content: ' ' !important;
        display: block;
        width: 15px !important;
        height: 15px !important;
        background-image: url(/wp-content/themes/autexacoustics/assets/img/menu-right.svg);
        background-size: contain;
        background-repeat: no-repeat;
        opacity: 0.5 !important;
        pointer-events: none;
    }

    .menu-item.mega-menu .sub-menu .menu-item.divider {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }


    li.menu-item.mega-menu .sub-menu {
        margin-left: 0 !important;
        margin-top: 0 !important;
        position: relative !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding-bottom: 5px;
        padding-top: 5px;
        margin-bottom: 10px !important;
        transition: max-height 0.5s ease;
    }

    li.menu-item.mega-menu .sub-menu[aria-expanded="true"] {
        max-height: 2000px;
        transition: max-height 0.5s ease;
    }




    li.menu-item.mega-menu>a.highlighted:after {
        transform: scaleX(1) !important;
    }

}

.mega-menu-wrap {
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    position: absolute;
    z-index: 1000;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.12)
}

.mega-menu-wrap.visible {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width:1025px) {
    .menu-item>a[data-template-id]~.sub-menu {
        display: none !important;
    }
}