/* Mobile Optimization */

/* Hamburger Button - Hidden on Desktop */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.8em;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

@media (max-width: 768px) {

    /* Global Adjustments */
    body {
        padding-top: 70px;
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
    }

    .container {
        padding: 15px;
        width: 100%;
        max-width: 100%;
    }

    h1 {
        font-size: 1.8em !important;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.5em !important;
    }

    /* Navbar Responsive Layout */
    .navbar {
        height: auto !important;
        min-height: 70px;
        padding: 10px 20px;
    }

    .navbar-container {
        flex-wrap: wrap;
        height: auto !important;
    }

    /* Navbar Brand - Keep on left */
    .navbar-brand {
        font-size: 1.4em !important;
    }

    /* Hamburger - Show on right */
    .mobile-menu-btn {
        display: block;
        color: white;
        /* Default to white if inherit fails */
    }

    /* Usually Auth is on the right, we might want to hide it or move it */
    .navbar-auth {
        display: none;
        /* Simplify headers for now, or move into menu if needed */
    }

    /* Navbar Menu - Stacked and Hidden */
    .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 15px;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        align-items: flex-start;
        /* Align left */
    }

    .navbar-menu.mobile-open {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    .navbar-link {
        width: 100%;
        display: block;
        padding: 12px 15px !important;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 10px !important;
    }

    /* Grid System Overrides - Force Single Column */
    .student-grid,
    .quick-actions,
    .student-stats,
    .stats-bar,
    .grid-container,
    .projects-grid,
    .clients-grid {
        grid-template-columns: 1fr !important;
        display: grid !important;
        gap: 15px !important;
    }

    .stats-bar {
        flex-direction: column;
        gap: 20px;
    }

    /* Table Responsiveness */
    .connections-table,
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }

    /* Inputs and Buttons - Touch Friendly */
    button,
    .action-btn,
    .navbar-btn,
    select,
    input {
        min-height: 48px;
        /* Touch target size */
    }

    .search-input {
        width: 100%;
        max-width: none;
    }

    /* Staging / Student Progress Specifics */
    .student-card {
        padding: 15px;
    }

    .student-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        /* 2 columns might fit for stats */
    }

    /* Sidebar logic - HIDE completely on mobile as requested */
    #student-folder-sidebar {
        display: none !important;
    }

    /* Hide Connections Button on mobile */
    .connection-monitor-btn,
    #connectionBtn {
        display: none !important;
    }

    .page-content {
        margin-right: 0 !important;
        padding: 15px;
        width: 100% !important;
    }

    .page-content {
        margin-right: 0 !important;
        padding: 15px;
    }

    /* Project Page */
    .video-container {
        padding-bottom: 56.25%;
        /* 16:9 Aspect Ratio */
        height: 0;
        position: relative;
    }

    .video-container iframe,
    .video-container video {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}