/* Site-wide mobile layout fixes */

@media (max-width: 767px) {
    /* Multi-image groups — show only the first image on mobile */
    .details-content-wrap .img-grp .row > [class*="col-"]:not(:first-child) {
        display: none !important;
    }

    .details-content-wrap .img-grp .row > [class*="col-"]:first-child {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Swiper stacks all slides before JS — show one slide only */
    .swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) {
        display: none;
    }

    /* Stack Bootstrap md/lg/xl columns on phones */
    .row > [class*="col-md-"],
    .row > [class*="col-lg-"],
    .row > [class*="col-xl-"],
    .row > [class*="col-xxl-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .container,
    .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* About page feature cards */
    .about-page-feature-section .single-feature {
        padding: 28px 20px;
    }

    .about-page-feature-section .single-feature h4 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    /* Override global img-grp crop (style.css forces 250px cover on mobile) */
    .industry-details-page .details-content-wrap .img-grp,
    .service-details-page .details-content-wrap .img-grp {
        text-align: center;
    }

    .industry-details-page .details-content-wrap .img-grp .row > [class*="col-"],
    .service-details-page .details-content-wrap .img-grp .row > [class*="col-"] {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }

    .industry-details-page .details-content-wrap .img-grp img,
    .service-details-page .details-content-wrap .img-grp img {
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: 340px !important;
        object-fit: contain !important;
        object-position: center center;
        display: inline-block;
        margin: 0 auto;
    }

    .industry-details-page .details-content-wrap .post-thumb img,
    .service-details-page .details-content-wrap .post-thumb img {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: 280px;
        object-fit: contain;
        object-position: center center;
    }

    /* Service detail slider */
    .service-details-page .service-details-post-slider .swiper-slide img {
        width: 100%;
        height: auto;
        max-height: 280px;
        object-fit: cover;
        object-position: center center;
    }

    /* Long breadcrumb labels */
    .breadcrumb-section .banner-content .breadcrumb-list {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }

    .breadcrumb-section .banner-content .breadcrumb-list li {
        text-align: center;
        word-break: break-word;
    }

    /* Case study listing stats */
    .case-study-page .case-study-card2.two .case-study-content-wrap .case-study-content ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    /* Case study detail sidebar */
    .case-study-details-page .case-study-details-info-wrap table tbody tr td {
        display: block;
        width: 100% !important;
        padding-bottom: 12px;
    }

    .case-study-details-page .case-study-details-info-wrap table tbody tr td:last-child {
        padding-bottom: 20px;
    }

    /* Award tables on about / awards pages */
    body.about-msorg .award-table.two tbody tr td,
    .award-section .award-table.two tbody tr td {
        white-space: normal;
        word-break: break-word;
    }

    /* Service listing / banner blocks */
    .service-page-banner-section .banner-content-wrap .row > [class*="col-"] {
        margin-bottom: 1rem;
    }

    /* Prevent horizontal scroll from wide embeds */
    .details-content-wrap iframe,
    .details-content-wrap video,
    .details-content-wrap table {
        max-width: 100%;
    }

    body {
        overflow-x: clip;
    }
}

@media (max-width: 576px) {
    .breadcrumb-section .banner-content h1 {
        font-size: 24px;
        line-height: 1.3;
    }

    .case-study-details-page .details-content-wrap h2 {
        font-size: 20px;
        line-height: 1.35;
    }

    .industry-details-page .details-content-wrap h2,
    .service-details-page .details-content-wrap h2 {
        font-size: 22px;
        line-height: 1.35;
    }

    .about-page-feature-section .single-feature h4 {
        font-size: 22px;
    }
}
