/* FiVi Education - Responsive Layout Fixes */

/* Mobile Navigation Toggle Button */
.sidebar-toggler {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--fivi-blue);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
}

/* Responsive Breakpoint */
@media (max-width: 992px) {
    /* Sidebar hidden by default on mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        width: 250px; /* Ensure width is fixed */
    }

    /* Show sidebar when active class is added */
    .sidebar.show {
        transform: translateX(0);
    }

    /* Main content takes full width */
    .main-content {
        margin-left: 0 !important;
        padding: 1rem !important;
    }

    /* Show the toggler button */
    .sidebar-toggler {
        display: inline-block;
    }

    /* Overlay when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99; /* Below sidebar (100) but above content */
    }

    .sidebar-overlay.show {
        display: block;
    }
    
    /* Adjust stats cards for mobile */
    .stat-card, .content-card, .module-card {
        margin-bottom: 1rem;
    }
    
    .col-md-2 {
        width: 50% !important; /* 2 columns on mobile for stats */
        flex: 0 0 auto;
    }
}

@media (max-width: 576px) {
    .col-md-2 {
        width: 100% !important; /* 1 column on very small screens */
    }
}
