/* ==========================================================================
   GTCSL SMART SOLUTIONS - MASTER RESPONSIVE MOBILE OVERRIDES
   ========================================================================== */
@media (max-width: 768px) {
    /* Navbar stack wrapper matrix constraint */
    .navbar {
        height: auto !important;
        padding: 15px 0 !important;
        position: relative !important;
    }

    /* Convert row distribution into a centered vertical column */
    .nav-container {
        flex-direction: column !important;
        gap: 15px !important;
        height: auto !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .nav-logo {
        max-width: 180px !important;
        margin: 0 auto !important;
        justify-content: center !important;
        height: auto !important;
        padding: 0 !important;
    }

    .brand-img {
        height: 45px !important;
        width: auto !important;
        margin: 0 auto !important;
    }

    /* Force links list arrays to wrap nicely on thin mobile screens */
    .nav-links {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 12px 16px !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .nav-links li {
        display: inline-block !important;
    }

    .nav-links a {
        font-size: 0.85rem !important;
        padding: 4px 0 !important;
    }

    .nav-links .nav-cta {
        padding: 6px 14px !important;
        font-size: 0.8rem !important;
        border-radius: 4px !important;
    }

    /* Clean up structural offsets for subpages and banner text wrappers */
    body {
        padding-top: 0 !important;
    }

    .hero {
        padding: 60px 0 !important;
    }

    .hero h1 {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
    }

    .hero p {
        font-size: 1rem !important;
        padding: 0 10px !important;
    }

    .subpage-hero {
        padding: 40px 0 !important;
    }

    .subpage-hero h1 {
        font-size: 1.5rem !important;
    }

    /* Ensure card grids and forms stretch safely without overlapping view bounds */
    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin-top: 25px !important;
    }

    .card {
        padding: 25px 20px !important;
    }

    .padding {
        padding: 35px 0 !important;
    }

    .form-layout {
        padding: 25px 20px !important;
        margin-top: 25px !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        text-align: center !important;
    }

    .nmea-showcase-single {
        margin: 15px auto 0 !important;
    }

    .footer-bottom {
        padding: 25px 20px 35px !important;
    }
    
        /* Force live telemetry maps to collapse height slightly to protect mobile aspect ratios */
    .container div[style*="height: 550px"] {
        height: 400px !important;
    }

}
