/* Mobile Navigation Enhancements */

/* Hamburger animation */
#mobile-menu-toggle.active #hamburger-line-1 {
    transform: translateY(6px) rotate(45deg);
}

#mobile-menu-toggle.active #hamburger-line-2 {
    opacity: 0;
}

#mobile-menu-toggle.active #hamburger-line-3 {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu transitions */
#mobile-menu {
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
}

/* Explicitly ensure the menu is hidden by default */
#mobile-menu {
    transform: translateX(100%) !important;
}

/* Only when the drawer is shown by Flowbite */
#mobile-menu.drawer-show {
    transform: translateX(0) !important;
}

/* For manual toggle in case Flowbite fails */
#mobile-menu:not(.translate-x-full) {
    transform: translateX(0) !important;
}

/* Mobile menu overlay animation */
#mobile-menu-overlay {
    transition: opacity 0.3s ease;
}

/* Mobile menu links hover effect */
#mobile-menu a {
    position: relative;
    overflow: hidden;
}

#mobile-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-500);
    transition: width 0.3s ease;
}

#mobile-menu a:hover::after {
    width: 100%;
}

/* Fix for ARIA issue with focus and aria-hidden */
#mobile-menu[aria-hidden="true"] {
    visibility: hidden;
}

#mobile-menu[aria-hidden="false"] {
    visibility: visible;
    transform: translateX(0) !important;
}

/* Ensure the close button is accessible */
#mobile-menu-close:focus {
    outline: 2px solid var(--accent-500);
    outline-offset: 2px;
}

/* Custom scrollbar for mobile menu */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--primary-300);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-400);
}
