/* Mobile Optimization for CargoDzen Cosmic Glass Theme */

@media (max-width: 768px) {

    .container,
    .article-container {
        padding: 0 1.25rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* --- Navigation --- */
    /* Switch from bottom floating pill to top fixed bar for better mobile usability */
    .nav {
        top: 0;
        bottom: auto;
        border-radius: 0;
        width: 100%;
        min-width: 0;
        /* Override the 600px min-width */
        left: 0;
        transform: none;
        justify-content: space-between;
        padding: 1rem 1.5rem;
        background: rgba(15, 23, 42, 0.95);
        border-bottom: 1px solid var(--border);
        border-top: none;
        border-left: none;
        border-right: none;
        height: auto;
        max-height: 80px;
        flex-wrap: nowrap;
    }

    .nav-links {
        display: none;
        /* Simple solution: Hide links, keep CTA */
    }

    .nav-actions {
        margin-left: auto;
    }

    .nav-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .logo {
        margin-right: 0;
        font-size: 1.1rem;
    }

    /* --- Hero Section --- */
    .hero {
        padding-top: 6rem;
        /* Space for top nav */
        padding-bottom: 3rem;
        flex-direction: column;
        display: flex;
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-text {
        order: 1;
        /* Text first */
        align-items: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
        /* Reduce form 4rem */
        line-height: 1.2;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image {
        order: 2;
        width: 100%;
        margin-top: 1rem;
    }

    .hero-image img {
        width: 100%;
        transform: none !important;
        /* Disable 3D tilt on mobile */
    }

    /* --- General Grids --- */
    .features-grid,
    .steps-grid,
    .comparison-grid,
    .screenshots-grid,
    .benefits-grid,
    .grid {
        grid-template-columns: 1fr !important;
        /* Force single column */
        gap: 2rem;
    }

    /* --- Comparison Tables --- */
    .comparison-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .comparison-column {
        padding: 1.5rem;
    }

    .comparison-header {
        flex-direction: column;
        text-align: center;
    }

    /* --- Screenshots --- */
    .screenshot-item {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .screenshot-item:nth-child(even) {
        direction: ltr;
        /* Fix direction swap */
    }

    .screenshot-content {
        order: 2;
    }

    .screenshot-image {
        order: 1;
    }

    .screenshot-content h3 {
        font-size: 1.75rem;
    }

    .screenshot-feature {
        justify-content: center;
    }

    /* --- Blog --- */
    .article-container {
        padding-top: 8rem;
    }

    h1 {
        font-size: 2.25rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }
}