/* ==========================================================================
   Sterling Engineers - mobile refinements (phones, max-width: 767px)
   Loaded after style.css / responsive.css so these rules win.
   Nothing here affects tablet/desktop layouts.
   ========================================================================== */

@media only screen and (max-width: 767px) {

    /* Note: do NOT put overflow-x:hidden on html/body here - with this theme
       it stops the document scrolling vertically. The page has no horizontal
       overflow to clip anyway. */

    img {
        max-width: 100%;
        height: auto;
    }

    /* --- Section rhythm: theme ships 80px top/bottom on every block --- */
    .default-padding {
        padding-top: 45px;
        padding-bottom: 45px;
    }

    .default-padding-top {
        padding-top: 45px;
    }

    .site-heading {
        margin-bottom: 35px;
    }

    .site-heading h3,
    .site-heading h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    .site-heading p {
        font-size: 14.5px;
        line-height: 1.75;
    }

    /* ---------- Banner / slider ----------
       responsive.css turns .carousel-indicator (the wrapper around the slide
       dots) into left:0/bottom:0/width:100%/height:100%/z-index:999 - an
       invisible sheet over the whole banner. It sat above .content (z-index 9),
       so tapping "VIEW PROJECTS" hit the wrapper and the link never opened.
       Let taps fall through the wrapper, and keep the dots themselves tappable. */
    .banner-area .carousel-indicator {
        pointer-events: none;
    }

    .banner-area .carousel-indicator .carousel-indicators,
    .banner-area .carousel-indicator .carousel-indicators li {
        pointer-events: auto;
    }

    .banner-area .content h2 {
        font-size: 28px;
        line-height: 1.25;
        margin-bottom: 14px;
    }

    .banner-area .content p {
        font-size: 14.5px;
        line-height: 1.75;
        margin-bottom: 20px;
    }

    .banner-area .content .btn {
        padding: 12px 24px;
        font-size: 13px;
    }

    /* ---------- About ---------- */
    .about-area .info h3 {
        font-size: 20px;
    }

    .about-area .info h1 {
        font-size: 23px;
        line-height: 1.35;
    }

    /* long body copy reads badly centred on a narrow screen */
    .about-area .info p,
    .about-area .info ul {
        text-align: left;
        font-size: 14.5px;
        line-height: 1.8;
    }

    /* founder caption sat on top of the photo and slid under the sticky header */
    .about-area .thumb {
        margin-bottom: 30px;
    }

    .about-area .thumb .experiecne {
        position: static;
        display: block;
        width: 100%;
        max-width: none;
        padding: 12px 15px;
        text-align: center;
    }

    .about-area .thumb .experiecne h5 {
        font-size: 16px;
        margin: 0;
    }

    .about-area .bottom {
        display: block;
        text-align: left;
    }

    .about-area .bottom .call {
        margin-bottom: 18px;
    }

    /* ---------- Card grids: 2 per row instead of 1 ----------
       Applies to "Popular Products" and "Applications", which together
       stacked ~24 full-width cards and made the page ~22,000px tall. */
    .services-box .single-item {
        flex: 0 0 50%;
        max-width: 50%;
        display: flex;
        padding-left: 8px;
        padding-right: 8px;
    }

    .services-box .single-item .item {
        width: 100%;
        padding: 22px 12px;
        margin-bottom: 16px;
    }

    .services-box .single-item .item img {
        max-width: 62px;
        margin-bottom: 12px;
    }

    .services-box .single-item .item h3 {
        font-size: 13px;
        line-height: 1.4;
    }

    .services-box .single-item .item h4 {
        font-size: 13.5px;
        line-height: 1.45;
    }

    .services-box .single-item .item h4 a {
        font-size: 13.5px;
    }

    .services-box .single-item .item p {
        font-size: 12.5px;
        line-height: 1.65;
    }

    .services-box .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    /* ---------- Work process (3 steps, keep full width, trim height) ---------- */
    .work-pro-items .single-item .item-inner {
        padding: 30px 20px;
    }

    .work-pro-items .single-item .item-inner p {
        font-size: 14px;
        line-height: 1.7;
    }

    /* ---------- Recent blogs: 2 per row + uniform thumbnails ---------- */
    .recentblogs-main h3 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .recentblogs-main .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    .recentblogs-main .row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
        display: flex;
        padding-left: 8px;
        padding-right: 8px;
    }

    .recentblogs-main .card {
        width: 100%;
        margin-bottom: 16px !important;
    }

    /* thumbnails arrived in mixed aspect ratios and sizes */
    .recentblogs-main .card img {
        width: 100%;
        height: 120px;
        object-fit: cover;
    }

    .recentblogs-main .card-body {
        padding: 12px 10px;
    }

    .recentblogs-main .card-body h4.up-txt {
        font-size: 13px;
        line-height: 1.4;
    }

    /* ---------- Clients ----------
       The block keeps its light background on mobile, so the .text-light
       white headings were invisible; logos were also clipped at the edges. */
    .clients-area.text-light .cilent-text h3 {
        color: #022147;
        font-size: 22px;
    }

    .clients-area.text-light .cilent-text p {
        color: #444;
    }

    .clients-area .cilent-text {
        text-align: center;
        margin-bottom: 18px;
    }

    .clients-area .clients-box {
        padding-left: 20px;
        padding-right: 20px;
        overflow: hidden;
    }

    .clients-area .clients-box .item {
        padding: 0 10px;
    }

    .clients-area .clients-box .item h4 {
        margin: 0;
    }

    .clients-area .clients-box img {
        display: block;
        width: auto;
        max-width: 100%;
        max-height: 55px;
        margin: 0 auto;
        object-fit: contain;
    }

    /* ---------- Breadcrumb (inner page hero) ---------- */
    .breadcrumb-area h1 {
        font-size: 26px;
        line-height: 1.3;
    }

    .breadcrumb-area .breadcrumb li,
    .breadcrumb-area .breadcrumb li a {
        font-size: 12.5px;
    }

    /* ---------- About Us / inner-page intro paragraph ----------
       .about-p ships margin:50px on every side, which left only ~290px of
       text on a 390px screen, at 20px centred type. */
    .about-p {
        margin: 35px 18px 0;
    }

    .about-p p {
        font-size: 15px;
        line-height: 1.8;
        text-align: left;
    }

    /* ---------- Section titles ("COMPANY PROFILE", "LEADERSHIP & ...") ----------
       40px/48px is a desktop size; it wrapped to three lines on a phone. */
    .about-box-custom-color h3 {
        font-size: 22px;
        line-height: 1.3;
    }

    .about-area .about-box .thumb {
        margin-bottom: 25px;
    }

    .about-area .info p {
        font-size: 14.5px;
        line-height: 1.9;
    }

    /* ---------- Our People ----------
       .board-member-list is a col-2 / col-10 row, but the fa-user-tie icon is
       60px (75px wide) inside a 62px column, so it spilled over and sat on top
       of the name / designation text. Lay the row out as a proper flex strip
       with an icon column that actually fits the icon. */
    .board-member-list {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        margin-bottom: 16px;
    }

    .board-member-list .col-2 {
        flex: 0 0 46px;
        max-width: 46px;
        padding-right: 0;
        text-align: center;
    }

    .board-member-list .col-2 i {
        font-size: 30px;
        line-height: 1;
    }

    .board-member-list .col-10 {
        flex: 1 1 auto;
        max-width: none;
    }

    .board-member h5 {
        font-size: 16px;
        line-height: 1.35;
        margin-bottom: 2px;
    }

    .board-member p {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 0;
    }

    .custom-blue-h2 {
        font-size: 22px;
        line-height: 1.35;
    }

    .board-member .custom-blue-h2 {
        margin-bottom: 22px;
    }

    .manpower {
        margin-top: 35px;
    }

    .manpower p {
        font-size: 15px;
        line-height: 1.9;
    }

    /* ---------- Why choose us ----------
       The red panel is a desktop sidebar: 60px padding left a 297px block that
       was mostly empty, with the heading stuck in the top-left corner. */
    .why-us-area .left-info .content {
        padding: 28px 20px;
        text-align: center;
        margin-bottom: 30px;
    }

    .why-us-area .left-info .content h3 {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 18px;
    }

    /* the heading is hard-broken into three lines in the markup */
    .why-us-area .left-info .content h3 br {
        display: none;
    }

    .why-us-area .left-info .content .btn {
        display: inline-block;
        padding: 12px 26px;
        font-size: 13px;
    }

    .why-us-area .info .content ul li {
        margin-bottom: 22px;
    }

    .why-us-area .info .content h5 {
        font-size: 16px;
    }

    .why-us-area .info .content p {
        font-size: 14px;
        line-height: 1.75;
    }

    /* ---------- Our Clients logo grid ----------
       36 logos in an isotope grid that fell to one-per-row on phones: each tile
       was 371x257, so the grid alone was 9,244px tall. Two per row, with the
       logos normalised to a common tile height. Scoped to .clientname so the
       project-photo galleries (index "Recent Work") keep their full-width look. */
    /* responsive.css forces .gallery-area .gallery-items.colums-3 .pf-item to
       100% here, so this needs the extra .clientname class to outrank it */
    .gallery-area .gallery-items.colums-3.clientname .pf-item {
        width: 50%;
        padding: 8px;
    }

    .gallery-items.clientname .pf-item .overlay img {
        width: 100%;
        height: 110px;
        object-fit: contain;
        background: #fff;
        padding: 10px;
    }

    /* ---------- Product / service detail pages ----------
       These sections carry desktop-sized spacing, which stacks up into large
       empty bands between sections on a phone. */

    /* hero band: 150px desktop / 100px here, for one heading + breadcrumb */
    .breadcrumb-area {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    /* .product ships padding:35px on all four sides - the 35px left/right also
       added to the container's own 15px, leaving the copy in a narrow strip */
    /* keep 15px at the sides: the inner .row carries a negative margin, so
       dropping the side padding to 0 pushed the page 5px wide */
    .container.product {
        padding: 18px 15px 22px;
    }

    .product .answer-block {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .product h2 {
        margin: 10px 0;
    }

    /* "Technical Specification" block: 50px lead-in + 35px trailing margin */
    .product-technical {
        padding-top: 22px;
    }

    .product-technical.site-heading {
        margin-bottom: 20px;
    }

    /* boiler-pressure-parts page: 50px margin on the list plus 50px top and
       bottom padding on every row = ~100px between each product */
    .bpp-products {
        margin: 18px 0;
    }

    .bpp-single {
        padding: 18px 0;
    }

    /* the Applications block follows the product copy directly */
    .services-area.icon-only.bg-gray {
        padding-top: 38px;
    }

    /* ---------- Projects page ----------
       .accordian-container has margin:35px !important, so on a 390px screen the
       accordion was only 271px wide. Several descriptions are comma-run-ons with
       no spaces ("manufacture,supply of new front wall tubes,refractory,...") so
       they could not wrap, forced the box to 424px and pushed the whole document
       to 485px wide. */
    .project .accordian-container {
        margin: 18px 0 !important;
    }

    .project .accordian-container .panel p,
    .project .accordian-container .faq {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .project .accordian-container .faq {
        padding: 14px 14px;
        font-size: 14px;
        line-height: 1.45;
    }

    .project .accordian-container .panel p {
        padding: 12px 14px 16px;
        margin: 0;
        font-size: 14px;
        line-height: 1.75;
    }

    .project h2.custom-blue-h2 {
        margin-top: 22px !important;
        margin-bottom: 22px !important;
    }

    /* ---------- Resources page ----------
       .resources-highlight ships padding:50px + margin:15px, which ate 130px of
       a 390px screen and squeezed the two red bay cards to ~195px. */
    .resources-highlight {
        padding: 15px 0;
        margin: 10px 0;
        flex-wrap: wrap;
    }

    .resources-highlight .bay {
        width: 100%;
        margin: 10px 0;
        padding: 20px 16px;
    }

    .resources-highlight h5 {
        font-size: 20px;
        padding: 0 0 12px;
    }

    .resources-highlight p {
        font-size: 15px;
        line-height: 1.7;
        margin-left: 0;
    }

    /* The MACHINE & EQUIPMENT table was 476px wide on a 390px viewport, so the
       whole document scrolled sideways (scrollWidth 501). Let the table size to
       the screen, and keep overflow inside its own box as a safety net. */
    .resources-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .resources-list h2 {
        font-size: 22px;
        margin-bottom: 18px;
    }

    .resources-list .table {
        width: 100%;
        font-size: 12.5px;
        table-layout: auto;
    }

    .resources-list .table td {
        padding: 8px 6px;
        vertical-align: middle;
        word-break: break-word;
    }

    .resources-list .table th {
        padding: 8px 6px;
        vertical-align: middle;
    }

    /* column headings are single words - don't hyphenate "QUANTITY" mid-word */
    .resources-list .table thead th {
        white-space: nowrap;
        font-size: 11.5px;
    }

    /* thead is position:sticky with top:120px for the desktop header; on mobile
       that offset parked it over the first rows and hid them */
    .resources-list thead {
        position: static;
        top: auto;
    }

    .resources-list .table .sno {
        width: 34px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .resources-list p {
        padding: 20px 0;
        font-size: 15px;
        line-height: 1.8;
    }

    /* ---------- FAQ ---------- */
    .faq-accordion .faq-q {
        font-size: 15px;
        line-height: 1.45;
    }

    .faq-accordion .faq-a p {
        font-size: 14px;
        line-height: 1.75;
    }

    /* ---------- Footer ---------- */
    footer .f-items.default-padding {
        padding-top: 45px;
        padding-bottom: 20px;
    }

    footer .f-item {
        margin-bottom: 28px;
    }

    footer .service-area a {
        font-size: 12.5px;
    }

    /* keep the copyright clear of the fixed WhatsApp / Call Us bar */
    footer.footer-bottom {
        padding-bottom: 76px;
    }

    footer.footer-bottom .footer-copyright p {
        font-size: 12.5px;
        line-height: 1.7;
    }
}

/* Extra-small phones: 2-up cards get tight, so give the copy more width */
@media only screen and (max-width: 400px) {

    .services-box .single-item {
        padding-left: 6px;
        padding-right: 6px;
    }

    .services-box .row {
        margin-left: -6px;
        margin-right: -6px;
    }

    .services-box .single-item .item {
        padding: 20px 8px;
    }

    .services-box .single-item .item h3,
    .services-box .single-item .item h4,
    .services-box .single-item .item h4 a {
        font-size: 12.5px;
    }

    .services-box .single-item .item p {
        font-size: 12px;
        line-height: 1.6;
    }

    .recentblogs-main .card img {
        height: 105px;
    }

    .recentblogs-main .card-body h4.up-txt {
        font-size: 12.5px;
    }
}
