/* =========================================================
   BETHEL TALENT SOLUTIONS FINAL 13
   MOBILE & CROSS-DEVICE REFINEMENT
   Preserves approved desktop design.
========================================================= */

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    min-width: 0;
}

img,
svg,
video {
    max-width: 100%;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid rgba(30, 64, 175, .35);
    outline-offset: 3px;
}

/* ---------- TABLET / SMALL DESKTOP ---------- */
@media (max-width: 1100px) {
    .container {
        width: min(100% - 40px, 1180px);
    }

    .nav-menu {
        gap: 22px;
    }

    .hero-shell {
        gap: 16px;
        padding-left: 28px;
        padding-right: 28px;
    }

    .hero-left h1 {
        font-size: clamp(38px, 4.5vw, 48px);
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-grid {
        gap: 36px;
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

/* ---------- TABLET ---------- */
@media (max-width: 900px) {
    .header {
        height: 72px;
    }

    .nav-menu,
    .nav-actions {
        display: none;
    }

    .mobile-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        cursor: pointer;
        position: relative;
        z-index: 1002;
    }

    .nav-menu.active {
        display: flex;
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
        z-index: 1001;
    }

    .nav-menu.active li a {
        display: block;
        padding: 14px 16px;
        border-radius: 10px;
    }

    .nav-menu.active li a:hover {
        background: #f8fafc;
    }

    .hero-shell {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 32px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .hero-right,
    .hero-right img {
        min-height: 420px;
    }

    .about-us-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-us-content {
        max-width: none;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 36px;
    }
}

/* ---------- MOBILE ---------- */
@media (max-width: 640px) {
    .container {
        width: min(100% - 32px, 1180px);
    }

    .header {
        height: 68px;
    }

    .nav-menu.active {
        top: 68px;
        left: 12px;
        right: 12px;
    }

    .logo img {
        width: 135px;
        max-width: calc(100vw - 100px);
    }

    .hero {
        padding: 48px 0 28px;
    }

    .hero-shell {
        padding-left: 16px;
        padding-right: 16px;
        gap: 28px;
    }

    .hero-left h1 {
        font-size: clamp(32px, 9vw, 42px);
        line-height: 1.08;
    }

    .hero-left > p {
        font-size: 15px;
        line-height: 1.65;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .hero-buttons a {
        width: 100%;
        justify-content: center;
        min-height: 50px;
    }

    .hero-trust {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .hero-trust div {
        font-size: 12px;
    }

    .hero-right,
    .hero-right img {
        min-height: 300px;
    }

    .hero-right img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .hero-stats {
        width: 100%;
    }

    .hero-stat {
        padding: 0 8px;
        min-width: 0;
    }

    .hero-stat strong {
        font-size: 21px;
    }

    .hero-stat span {
        font-size: 10px;
        line-height: 1.35;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .about-us-section {
        padding: 72px 0;
    }

    .about-us-inner {
        width: min(100% - 32px, 1180px);
    }

    .about-us-image img {
        aspect-ratio: 16 / 11;
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }

    .contact-form button {
        min-height: 50px;
        width: 100%;
    }

    .contact-grid {
        gap: 32px;
    }

    .footer {
        padding-top: 56px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-logo {
        width: min(230px, 80vw);
    }

    .section-padding {
        padding-top: 72px;
        padding-bottom: 72px;
    }
}

/* ---------- VERY SMALL PHONES ---------- */
@media (max-width: 380px) {
    .logo img {
        width: 122px;
    }

    .hero-left h1 {
        font-size: 31px;
    }

    .hero-trust {
        grid-template-columns: 1fr;
    }

    .hero-stat strong {
        font-size: 19px;
    }

    .hero-stat span {
        font-size: 9px;
    }

    .hero-stats {
        gap: 0;
    }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


/* =========================================================
   FINAL MOBILE READABILITY PATCH
   Uses existing Bethel layout classes only.
========================================================= */

@media (max-width: 640px) {

    /* Keep page content inside the phone viewport */
    .container,
    .about-us-inner,
    .hero-shell {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }


    /* Readable body text */
    .hero-left > p,
    .about-us-content p,
    .service-card p,
    .industry-card p,
    .process-card p,
    .testimonial-card p,
    .contact-section p {
        font-size: 16px;
        line-height: 1.65;
    }


    /* Readable section headings */
    .section-title,
    .about-us-content h2,
    .contact-section h2 {
        line-height: 1.2;
    }


    /* Comfortable mobile cards */
    .service-card,
    .industry-card,
    .process-card,
    .testimonial-card {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }


    /* Comfortable form controls */
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }


    .contact-form input,
    .contact-form select {
        min-height: 52px;
    }


    .contact-form textarea {
        min-height: 150px;
    }


    /* Comfortable touch target */
    .contact-form button {
        width: 100%;
        min-height: 52px;
        font-size: 16px;
    }

}


