/* Force Elementor Nav Menu to be horizontal and centered */
.elementor-nav-menu--main,
.elementor-nav-menu {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    flex-wrap: wrap !important;
}

/* Ensure menu items don't stack vertically but allow dropdowns */
.elementor-nav-menu--main > .menu-item,
.elementor-nav-menu > .menu-item {
    display: flex !important;
    position: relative; /* Crucial for dropdown positioning */
}

/* Ensure the wrapper also allows for centering */
.elementor-widget-nav-menu .elementor-widget-container {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

/* Default WordPress menu fallback */
ul.menu {
    display: flex !important;
    justify-content: center !important;
    flex-direction: row !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
}

ul.menu > li {
    margin: 0 15px !important;
    display: flex !important;
    position: relative;
}

/* Fix Dropdown Visibility */
ul.sub-menu {
    display: none; /* Hide by default */
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    z-index: 9999;
    flex-direction: column !important;
}

.menu-item:hover > ul.sub-menu,
.menu-item.elementor-item-active > ul.sub-menu {
    display: flex !important; /* Show on hover */
}

ul.sub-menu .menu-item {
    display: block !important;
}
