/* Root variables for easy theme management and consistent styling */
:root {
    --primary-color: #28a745;
    --hover-color: #218838;
    --text-color: #fff;
    --dropdown-bg-color: #f8f9fa;
    --dropdown-item-hover-bg: #e9ecef;
    --transition-speed: 0.3s;
    --dropdown-delay: 0.5s;
}

/* Positioning for dropdown parent */
.nav-item.dropdown {
    position: relative;
}

/* Button styles for the 'Donate Now' and 'User' dropdowns */
.enhanced-dropdown .btn {
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 30px;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    color: var(--text-color);
    background-color: var(--primary-color); /* Button is always green, even without hover */
    border: 1px solid transparent;
}

/* Remove hover and focus styles for the 'Donate Now' button, so color does not change */
.enhanced-dropdown .btn:hover,
.enhanced-dropdown .btn:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-color);
}

/* Icon style when user is logged in */
.bi-person-circle.logged-in {
    color: var(--primary-color); /* Green color for logged-in icon */
}

/* Remove hover effect for the user icon */
.bi-person-circle:hover {
    color: inherit; /* Keeps the icon color the same on hover */
}

/* General dropdown menu styling */
.dropdown-menu {
    margin-top: 0.125rem; /* Small gap to prevent accidental menu close on hover-out */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: none;
    transition: visibility var(--transition-speed) ease, opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
    transform-origin: top center;
    opacity: 0;
    visibility: hidden; /* Hidden by default */
    position: absolute;
    z-index: 1000; /* Ensures dropdown is on top of other elements */
}

/* Hover and focus states to display dropdown menus */
.nav-item.dropdown:hover .dropdown-menu,
.nav-item.dropdown:focus-within .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible; /* Show dropdown */
    transform: translateY(0);
}

/* Delay the hiding of the dropdown menu on hover-out */
.nav-item.dropdown:hover .dropdown-menu,
.nav-item.dropdown:focus-within .dropdown-menu {
    transition-delay: 0s, var(--dropdown-delay), var(--dropdown-delay);
}

/* Dropdown item styles */
.dropdown-menu .dropdown-item {
    transition: background-color var(--transition-speed) ease;
    padding: 12px 20px;
    color: #333; /* Darker text for better contrast */
}

/* Hover and focus states for dropdown items */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background-color: var(--dropdown-item-hover-bg);
    color: var(--primary-color); /* Primary color text for clear hover indication */
}

/* Divider styling */
.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid #e9ecef;
}

/* Optional: Enhance the toggle icon with a hover effect */
.nav-item.dropdown:hover .bi-person-circle,
.nav-item.dropdown:focus-within .bi-person-circle {
    color: var(--hover-color); /* Same hover color as the button for consistency */
}

/* User Profile Dropdown Specific Enhancements */
.dropdown-menu-end {
    right: 0;
    left: auto;
    padding: 5px;
    border-radius: 5px; /* Slightly rounder corners for a modern look */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Consistent shadow with the main dropdown */
}




/* Ensure you remove any inline styles from the HTML to prevent conflicts with these CSS rules */
