/* Base Styles for Dropdown Items */
.dropdown-item {
    max-width: 180px; /* Limit max width for small dropdown items */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words if necessary */
    word-break: break-word; /* Ensure long unbroken words wrap properly */
}

.dropdown-item2 {
    max-width: 1050px; /* Larger max-width for expanded dropdown items */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word;
    word-break: break-word;
    display: block;
    width: 100%;
    padding: 0.25rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    background-color: rgba(0, 0, 0, 0);
    border: 0;
}

/* Hover and Active States */
.dropdown-item2:hover,
.dropdown-item2:focus {
    color: #1e2125;
    background-color: #e9ecef;
}

.dropdown-item2.active,
.dropdown-item2:active {
    color: #fff;
    text-decoration: none;
    background-color: #3cbeee;
}

/* Disabled State */
.dropdown-item2.disabled,
.dropdown-item2:disabled {
    color: #adb5bd;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0);
}

/* Dropdown Menu */
.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    display: block;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
    text-align: left;
}

.dropdown-item2-text {
    display: block;
    padding: 0.25rem 1rem;
    color: #212529;
}

/* Dark Mode for Dropdown Menu */
.dropdown-menu-dark {
    color: #dee2e6;
    background-color: #343a40;
    border-color: rgba(0, 0, 0, 0.15);
}

.dropdown-menu-dark .dropdown-item2 {
    color: #dee2e6;
}

.dropdown-menu-dark .dropdown-item2:hover,
.dropdown-menu-dark .dropdown-item2:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

.dropdown-menu-dark .dropdown-item2.active,
.dropdown-menu-dark .dropdown-item2:active {
    color: #fff;
    background-color: #3cbeee;
}

.dropdown-menu-dark .dropdown-item2.disabled,
.dropdown-menu-dark .dropdown-item2:disabled {
    color: #adb5bd;
}

.dropdown-menu-dark .dropdown-divider {
    border-color: rgba(0, 0, 0, 0.15);
}

.dropdown-menu-dark .dropdown-item2-text {
    color: #dee2e6;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    /* .dropdown-menu.show{
        width: 400px;
    } */
    .navbar .nav-item:hover .dropdown-menu{
        width: 100%;
    }
    .dropdown-menu.mega-menu.show{
        width: 100%;
    }
    
}

/* For screens with a maximum width of 1024px */
@media (max-width: 1024px) {
    .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .dropdown-menu.mega-menu.show{
        width: 400px;
    }
}

/* For screens with a maximum width of 1200px */
@media (max-width: 1200px) {
    .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .dropdown-menu.show{
        width: 400px;
    }
    .navbar .nav-item:hover .dropdown-menu{
        width: 100%;
    }
}



@media (max-width: 768px) {
    .dropdown-item,
    .dropdown-item2 {
        max-width: 100%; /* Allow full width for smaller screens */
        font-size: 0.9rem; /* Slightly smaller text size */
        padding: 0.5rem; /* Adjust padding for compact view */
    }

    .dropdown-menu {
        width: 50px; /* Ensure dropdown adjusts to its content */
        padding: 0.5rem; /* Smaller padding for smaller screens */
    }
    .dropdown-menu.show{
        width: 400px;
    }
    .navbar .nav-item:hover .dropdown-menu{
        width: 100%;
    }
}

@media (max-width: 480px) {
    .d-flex.justify-content-between {
        flex-direction: column !important; /* Stack items vertically */
        align-items: flex-start !important; /* Align to the left */
    }
    .dropdown-item,
    .dropdown-item2 {
        font-size: 0.8rem; /* Reduce text size for extra-small screens */
        padding: 0.4rem; /* Compact padding for narrow screens */
    }

    .dropdown-menu {
        width: 400px; /* Dropdown takes full screen width on mobile */
        padding: 0.3rem; /* Reduce padding further for compact layout */
    }
    .dropdown-menu.mega-menu.show{
        width: 100%;
    }
    .navbar .nav-item:hover .dropdown-menu{
        width: 100%;
    }

}
