/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-right: 15px;
    padding: 5px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    /* Top Nav tweaks */
    .top-nav {
        padding: 0 10px;
        gap: 10px;
    }

    .top-nav nav {
        display: flex;
        overflow-x: auto;
        flex: 1;
        gap: 15px;
        /* Increased gap */
        align-items: center;
        /* Center items vertically */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-right: 15px;
        /* Add end padding for scroll */
    }

    .top-nav nav::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        white-space: nowrap;
        font-size: 1rem;
        /* Increased from 0.85rem */
        padding: 8px 12px;
        flex-shrink: 0;
        /* Prevent shrinking */
    }

    .menu-toggle {
        display: block;
        flex-shrink: 0;
    }

    .logo {
        display: block;
        /* Show logo again */
        font-size: 1.2rem;
        /* Smaller logo for mobile */
        margin-right: 10px;
        white-space: nowrap;
    }

    /* Sidebar Mobile */
    .sidebar {
        position: fixed;
        left: -280px;
        /* Width + padding */
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s ease;
        width: 260px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        display: block;
    }

    /* Content Area Mobile */
    .content-area {
        padding: 15px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }

    .dashboard-header h2 {
        font-size: 1.5rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
        /* Full width cards */
    }

    /* Show mobile nav links inside sidebar? 
       Ideally we inject them via JS or just have them there invisible on desktop.
       For now, let's keep it simple: Focus on the sidebar toggle as requested.
    */
}