/* Mobile Navigation & Layout Fixes */

/* Hamburger Menu Toggle */
.mobile-toggle {
    display: none;
    /* Hidden on desktop */
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
    z-index: 1001;
}

/* Base Mobile Styles */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
    }

    /* Top Bar for Mobile */
    .sidebar {
        width: 100%;
        height: 60px;
        padding: 0 1.5rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
    }

    .brand-logo {
        height: 32px;
        width: auto;
    }

    .mobile-toggle {
        display: block;
    }

    /* Navigation Links Overlay */
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        height: calc(100vh - 60px);
        align-items: center;
        transform: translateX(100%);
        /* Hidden by default */
        transition: transform 0.3s ease-in-out;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        transform: translateX(0);
        /* Slide in */
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-radius: 8px;
        font-size: 1.1rem;
    }

    /* Content Area Adjustments */
    .content-area {
        padding: 1.5rem;
        padding-top: 80px;
        /* Space for fixed header */
        height: auto;
        overflow-y: visible;
    }

    .slide {
        min-height: calc(100vh - 80px);
        /* Ensure full height minus header */
        height: auto;
        opacity: 1;
        /* Ensure visible on mobile scroll if JS fails */
        margin-bottom: 2rem;
    }

    /* Typography Sizes */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    /* Component Stacking */
    .split-layout,
    .card-grid,
    .pattern-grid,
    .cards-horizontal,
    .checklist {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .split-layout {
        flex-direction: column-reverse;
        /* Visuals top on mobile? No, context first. Keep column. */
        flex-direction: column;
    }

    .visual-content {
        width: 100%;
        min-height: 250px;
        margin-top: 1rem;
    }

    .full-width-image,
    .pattern-image,
    .pattern-preview {
        max-height: 300px;
        object-fit: contain;
    }
}