/* Clean Modern Dropdown Menu Styling */
.navbar .dropdown-menu {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    min-width: 200px;
    margin-top: 0px;
    position: absolute;
    z-index: 1000;
    list-style: none;
}

.navbar .dropdown-item {
    color: #222222;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 400;
    transition: background 0.15s ease, color 0.15s ease;
    position: relative;
    text-decoration: none;
    display: block;
}

.navbar .dropdown-item:hover, 
.navbar .dropdown-item:focus {
    background: #f5f5f5;
    color: #A30301;
}

.navbar .dropdown-items-divide-hr {
    border-top: 1px solid #e0e0e0;
    margin: 6px 0;
}

.navbar .dropdown-toggle::after {
    margin-left: 8px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.navbar .nav-item.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.navbar .dropdown-menu {
    animation: dropdownFade 0.25s ease forwards;
    transform-origin: top center;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(15px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Make sure dropdown is visible on hover */
.navbar .nav-item.dropdown:hover .dropdown-menu {
    display: block;
    transition-delay: 0s; /* Add delay to dropdown disappearing */
}

.navbar .nav-item.dropdown {
    position: relative; /* Ensure the dropdown stays visible with a delay when mouse leaves */
}

/* Create invisible area to bridge the gap between nav item and dropdown */
.navbar .nav-item.dropdown::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.navbar .nav-item.dropdown .dropdown-menu {
    transition: visibility 0s linear 0.2s, opacity 0.2s linear; /* Add delay to dropdown disappearing */
}