/* Top-level dropdown menu — direction toggled by JS via .dropdown / .dropup */
.nav-item.dropdown > .dropdown-menu,
.nav-item.dropup > .dropdown-menu {
    position: absolute;
    left: 0;
    z-index: 1050;
}

.nav-item.dropdown > .dropdown-menu {
    top: 100%;
    bottom: auto;
}

.nav-item.dropup > .dropdown-menu {
    top: auto;
    bottom: 100%;
}

/* Submenu position */
.dropdown-submenu > .dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%; /* Opens to the right */
    z-index: 1050;
}

/* Ensure a smooth transition */
.dropdown-menu {
    transition: all 0.3s ease-in-out;
}

nav.navbar {
    border-radius: 0;
}
