/* ==========================================================================
   ISOLATED MOBILE NAVIGATION OVERRIDES (Only applies to phone screens)
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* 1. Forces the body down to prevent the larger header from covering content */
    body {
        padding-top: 170px !important;
    }

    /* 2. Forces the header element itself to adjust height naturally */
    header {
        height: auto !important;
    }

    /* 3. Stacks the logo container on top and centers it */
    .nav-container {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 15px 10px !important;
    }

    .header-logo-link {
        justify-content: center !important;
        width: 100% !important;
    }

    .header-logo-img {
        height: 60px !important; /* Slightly smaller to fit phone screens elegantly */
        margin: 0 auto !important;
    }

    /* 4. Wraps the 7 navigation links onto the second row perfectly */
    nav ul {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px 15px !important; /* Proper thumb-tapping gap spacing */
        padding: 0 10px !important;
    }

    nav ul li a {
        font-size: 0.75rem !important; /* Scales text down so all links stay inline */
    }
}
