/* Mobile Layout Fix - Proper display order on mobile */

@media (max-width: 768px) {

    /* Use flexbox to control display order */
    .app-container {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Display Order: Main Content -> Right Sidebar -> Footer */
    .main-content {
        order: 1 !important;
        /* Main content first */
        width: 100% !important;
        margin-left: 0 !important;
    }

    .sidebar-right {
        order: 2 !important;
        /* Right sidebar second */
        display: block !important;
        position: relative !important;
        width: 100% !important;
        margin: 20px 0 !important;
        padding: 0 15px !important;
    }

    footer {
        order: 999 !important;
        /* Footer last */
    }

    /* Left Sidebar - Keep hidden, overlay when menu button clicked */
    .sidebar {
        order: -1 !important;
        /* Put it first in flex order but hidden */
        position: fixed !important;
        /* Fixed positioning for overlay */
        z-index: 1000 !important;
        /* Ensure it's on top */
        /* Default transform: translateX(-100%) from style.css keeps it hidden */
        /* Will slide in when .active class is added */
    }
}