/* Custom Dropdown Overrides for Attractive & Responsive Menu */

/* Desktop Dropdown Animation */
@media (min-width: 992px) {
    header #mainmenu li ul {
        display: block !important;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        pointer-events: none;
        top: 100%; /* Ensure it aligns correctly */
        background: #fff;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border: none !important;
        border-radius: 0 0 8px 8px;
        min-width: 220px;
        padding: 10px 0;
    }

    header #mainmenu li:hover > ul {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    header #mainmenu li ul li {
        border: none;
        padding: 0;
    }

    header #mainmenu li ul li a {
        color: #555;
        padding: 8px 20px;
        font-weight: 500;
        font-size: 14px;
        text-transform: none; /* Make it look more modern */
        transition: all 0.2s ease;
        display: block;
        text-align: left;
    }

    header #mainmenu li ul li a:hover {
        background: #f8f9fa;
        color: var(--primary-color, #249F6E);
        padding-left: 25px; /* Subtle slide effect */
    }
}

/* Mobile Dropdown Styling */
@media (max-width: 991px) {
    header #mainmenu li ul {
        background: transparent;
        box-shadow: none;
        padding-left: 20px;
        display: none; /* JS will toggle this usually, or we use :hover/focus hack if JS is missing */
    }

    header #mainmenu li.has-child.open > ul {
        display: block;
    }
    
    /* Ensure text is readable on mobile */
    header #mainmenu li ul li a {
        color: #333 !important; /* Force legible color */
        padding: 10px 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
}

/* General Tweaks */
header #mainmenu li.has-child > a::after {
    /* Ensure the arrow is consistent */
    font-size: 10px;
    margin-left: 5px;
}
