/* Menu fixes for navigation and theme toggle */

/* Theme toggle in main navigation */
.theme-toggle-item {
    margin-left: 15px;
}

.theme-toggle-item button {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    color: var(--text-dark);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle-item button i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.theme-toggle-item button:hover {
    background-color: rgba(79, 143, 192, 0.1);
    color: var(--primary-color);
}

/* Mobile theme toggle */
.mobile-theme-toggle {
    margin-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 20px;
}

/* Fix for dark mode border color */
[data-theme="dark"] .mobile-theme-toggle {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-theme-toggle button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(79, 143, 192, 0.1);
    border: none;
    border-radius: 8px;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-theme-toggle button i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.mobile-theme-toggle button:hover {
    background-color: rgba(79, 143, 192, 0.2);
}

/* Dark mode states */
[data-theme="dark"] .theme-toggle-item button i,
[data-theme="dark"] .mobile-theme-toggle button i {
    content: "\f185"; /* sun icon */
}

[data-theme="dark"] .theme-toggle-item button span,
[data-theme="dark"] .mobile-theme-toggle button span {
    content: "Light Mode";
}

/* Hide the original dark mode toggle */
.dark-mode-toggle {
    display: none !important;
}

/* Fix for mobile menu toggle in light mode */
.mobile-menu-toggle button {
    color: var(--dark-gray) !important;
    background-color: transparent !important;
}

.mobile-menu-toggle button i {
    font-size: 1.5rem !important;
}

[data-theme="dark"] .mobile-menu-toggle button {
    color: var(--white) !important;
}

/* Mobile navigation fixes for smooth scrolling */
@media (max-width: 991px) {
    .mobile-menu {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* For smoother scrolling on iOS */
    }
    
    .mobile-nav-link {
        display: block;
        width: 100%;
        padding: 15px !important;
        font-size: 1.1rem !important;
        font-weight: 500;
        transition: all 0.3s ease;
    }
    
    /* Active state for better feedback */
    .mobile-nav-link.active {
        background-color: rgba(79, 143, 192, 0.1);
        color: var(--primary-color) !important;
        border-radius: 8px;
    }
}
