/* --------------------------------------------------
 * Mobile UX Optimizations
 * -------------------------------------------------- */

/* --- General & Typography --- */
@media (max-width: 767px) {
    body {
        -webk        /* --- General & Typography --- */
        @media (max-width: 767px) {
            body {
                -webkit-text-size-adjust: 100%; /* Older Safari/iOS */
                text-size-adjust: 100%; /* Modern browsers */
            }
            // ...existing code...it-text-size-adjust: 100%; /* Prevent iOS font scaling */
    }

    /* Increase base font size for readability on mobile */
    h1, .fs-1 { font-size: 2.5rem !important; }
    h2, .fs-2 { font-size: 2rem !important; }
    h3, .fs-3 { font-size: 1.75rem !important; }

    /* Ensure form inputs have 16px font size to prevent iOS auto-zoom */
    .form-control, .form-select {
        font-size: 16px !important;
    }

    /* Fix container overflow on mobile */
    .container {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Ensure no horizontal overflow */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw;
    }

    /* Fix wide elements */
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
}

/* --- Touch Targets --- */
/* Ensure buttons and links have a minimum touch target size */
.btn, .logo, .nav-link, .flip-card-ctas a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 640px) {
    /* Increase button sizes on mobile */
    button, .btn, a[class*="inline-flex"] {
        min-height: 44px !important;
        padding-top: 0.625rem !important;
        padding-bottom: 0.625rem !important;
    }

    /* Fix small text in buttons */
    button, .btn, a[class*="inline-flex"] {
        font-size: 0.9375rem !important; /* 15px */
    }
}

/* --- Header & Navigation --- */
/* Legacy header classes - only apply if they exist */
.main-header:not(#vwr-header) {
    display: none; /* Hide desktop header on mobile */
}

.mobile-header:not(#vwr-header) {
    display: block; /* Show mobile header */
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    background-color: #081923;
    border-bottom: 1px solid rgba(13, 91, 211, 0.2);
}

/* Premium header - ensure visible on all devices */
#vwr-header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-header .logo img {
    max-height: 40px;
}

.hamburger-menu {
    border: none;
    background: transparent;
    color: #0D5BD3;
    font-size: 28px;
}

.main-nav {
    display: none;
    position: fixed;
    top: 71px; /* Height of mobile header */
    left: 0;
    width: 100%;
    height: calc(100vh - 71px);
    background-color: #081923;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1020;
}

.main-nav.is-open {
    display: flex;
}

.main-nav .nav-link {
    color: #fff;
    font-size: 1.5rem;
    margin: 15px 0;
    text-transform: uppercase;
}

/* Add padding to body to prevent content from being hidden by fixed header */
/* Only for legacy headers - premium header handles its own spacing */
body:has(.mobile-header:not(#vwr-header)) {
    padding-top: 71px;
}


/* --- Process Timeline: Vertical Layout --- */
@media (max-width: 991px) {
    .timeline-container {
        position: relative;
        padding-left: 30px; /* Space for the timeline line */
    }

    .timeline-container::before {
        content: '';
        position: absolute;
        left: 15px; /* Center the line */
        top: 0;
        bottom: 0;
        width: 2px;
        background-color: #e9ecef;
    }

    .timeline-item-wrapper {
        width: 100%;
        padding: 20px 0;
        /* Reset alternating styles */
        margin-left: 0 !important;
        margin-right: 0 !important;
        justify-content: flex-start !important;
    }

    .timeline-item-wrapper.left,
    .timeline-item-wrapper.right {
        padding-left: 30px; /* Space from the main line */
    }

    .timeline-item {
        width: 100%;
        text-align: left;
    }

    .timeline-item::before {
        /* Hide arrows */
        display: none;
    }

    .timeline-icon {
        position: absolute;
        left: -14px; /* Position icon on the line */
        top: 50%;
        transform: translateY(-50%);
        z-index: 1;
    }
}

/* --- Flip Cards on Mobile --- */
@media (max-width: 767px) {
    .service-flip-card {
        height: 420px; /* Adjust height for mobile */
    }
}

/* --- Forms --- */
@media (max-width: 767px) {
    .form-information .row {
        flex-direction: column-reverse; /* Stack form above contact info */
    }
    .form-border {
        border-right: none;
        padding-right: 15px;
    }
    .get-touch {
        margin-top: 40px;
    }
}
