/* Mobile Responsiveness Fixes */

/* 1. Prevent Horizontal Scroll & Zoom Issues */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation; /* Improves touch response */
}

/* 2. Container Constraints */
.container, 
.mainContainer, 
.md\:container,
.nav-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* 3. Image & Media Fluidity */
img, video, iframe, svg {
    max-width: 100% !important;
    height: auto !important;
}

/* 4. Grid & Flex Adjustments for Mobile */
@media (max-width: 768px) {
    /* Force single column for grids unless specifically overridden */
    .grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    
    /* Fix flex rows that should stack */
    .flex-row {
        flex-wrap: wrap !important;
    }
    
    /* Reset margins/paddings that might be too large */
    .p-6, .p-5, .p-4 {
        padding: 1rem !important;
    }
    
    .m-6, .m-5, .m-4 {
        margin: 0.5rem !important;
    }

    /* Font Size Readability */
    body {
        font-size: 16px !important; /* Prevents iOS zoom on input focus */
        line-height: 1.5;
    }
    
    h1 { font-size: 1.75rem !important; line-height: 1.3 !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    
    /* Navigation Wrapper Fix */
    .unified-navigation-wrapper {
        width: 100% !important;
        overflow: hidden !important;
    }
    
    /* Hide desktop-only elements if needed (optional) */
    .desktop-only {
        display: none !important;
    }
}

/* 5. Specific Component Fixes */

/* Job Items Stacking */
.status .grid > div {
    margin-bottom: 1rem;
}

/* Header Adjustments */
header.headerMain {
    padding: 0.5rem !important;
}

header.headerMain img {
    max-height: 60px !important;
    width: auto !important;
}

/* Search Bar */
.unified-search-container {
    width: 100% !important;
    padding: 0.5rem !important;
}

.search-input {
    font-size: 16px !important; /* Prevent zoom */
}
