/* Navbar Base Styles */
.navbar {
    padding: 0.5rem 1rem !important;
    background-color: #003366;
    margin-top: 0.5rem;
}

/* Navbar Nav */
.navbar-nav {
    width: 100%;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white !important;
    padding: 0.5rem 0.6rem !important;
    font-weight: 300;
    transition: all 0.3s ease;
}

/* Dropdown Menus */
.dropdown-menu {
    max-height: 80vh;
    overflow-y: auto;
    padding: 0.5rem 0;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    white-space: normal;
    word-wrap: break-word;
}


/* Hover Effects */
.nav-link:hover,
.dropdown-item:hover {
    background-color: rgb(255, 255, 255);
    color: #004494 !important;
    transition: background-color 0.2s ease;
    border-radius: 5px;
}

/* Mobile Responsive Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .dropdown-menu {
        background-color: rgba(0,0,0,0.1);
        border: none;
    }
    
    .dropdown-item {
        color: rgba(255,255,255,0.8) !important;
    }
    
    .dropdown-item:hover {
        background-color: rgba(255,255,255,0.1) !important;
        color: #fff !important;
    }

    .navbar-toggler {
        border-color: rgba(255,255,255,0.5);
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}

/* Navbar Brand */
.navbar-brand {
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

/* Dropdown Submenu */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

/* Highlight the active nav link */
.navbar-nav .nav-item .nav-link.active, .navbar-nav .nav-item.active .nav-link {
    background-color: #fff !important;
    color: #007bff !important;
    border-radius: 6px;
    font-weight: bold;
}

/* Optionally, for dropdowns */
.navbar-nav .dropdown-menu .dropdown-item.active, .navbar-nav .dropdown-menu .dropdown-item:active {
    background-color: #007bff !important;
    color: #fff !important;
}
