/* Shared layout fixes for the main site and location product pages. */
body img {
    max-width: 100%;
}

body #carouselExampleCaptions .carousel-caption h2 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(30px, 4.5vw, 68px);
    line-height: 1.12;
    overflow-wrap: break-word;
}

/* Explicitly preserve the original inset on tablet and desktop. */
@media (min-width: 768px) {
    body .smog-image-stack {
        display: block;
        position: relative;
        overflow: hidden;
        border-radius: 28px;
    }

    body .smog-image-stack .smog-image-secondary {
        position: absolute;
        z-index: 3;
        right: 24px;
        bottom: 24px;
        width: 42%;
        height: 42%;
        border: 6px solid #fff;
        border-radius: 14px;
        object-fit: cover;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    }
}

/* Stack screening images only on mobile; retain the original desktop inset. */
@media (max-width: 767px) {
    body .smog-image-stack {
        display: grid;
        gap: 18px;
        overflow: visible;
        border-radius: 0;
    }

    body .smog-image-stack img,
    body .smog-image-stack .smog-image-secondary {
        position: static;
        display: block;
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
        border: 0;
        border-radius: 22px;
        box-shadow: none;
    }

    body .smog-image-stack::before,
    body .smog-image-stack .mist-effect {
        display: none;
    }
}

/* Keep the red machine square and crop the bikes out of the frame. */
body .smog-image-stack .smog-image-secondary {
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: 60% center;
}

@media (max-width: 1199px) {
    body .construction-machinery-section {
        padding-top: 32px;
    }

    body .construction-machinery-section .section-title {
        margin-top: 0;
        padding: 0;
    }

    body .hero-3 {
        top: 0;
    }

    body .header-3 .container-fluid {
        padding-inline: 20px;
    }

    body .header-main .header-left,
    body .header-main .header-right {
        min-width: 0;
    }

    body .header-main .logo img {
        width: auto;
        max-width: min(240px, 65vw);
        height: 72px;
    }

    body .offcanvas__info {
        width: min(400px, 84%);
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    body .offcanvas__wrapper {
        height: auto;
        min-height: 100%;
        padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    }

    body .offcanvas__wrapper .offcanvas__contact .social-icon {
        flex-wrap: wrap;
        margin-top: 20px;
    }

    body .offcanvas__wrapper .offcanvas__contact .social-icon a {
        flex-shrink: 0;
    }

    body .mean-container .mean-nav ul li a {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    body #carouselExampleCaptions .carousel-caption {
        width: auto;
        max-width: 720px;
        left: 8%;
        right: 8%;
        padding: 28px 0 48px !important;
    }

    body #carouselExampleCaptions .carousel-caption p {
        max-width: 100%;
        overflow-wrap: break-word;
    }

    body #carouselExampleCaptions .hero-slide-image {
        height: auto;
        object-fit: contain;
    }

    body .about-breadcrumb {
        height: auto;
        min-height: 300px !important;
        padding: 60px 0;
    }

    body .about-breadcrumb .page-heading {
        min-width: 0;
    }

    body .about-breadcrumb h1,
    body .about-breadcrumb h3 {
        font-size: clamp(28px, 4.5vw, 48px);
        line-height: 1.2;
        letter-spacing: 0;
        overflow-wrap: break-word;
    }

    body .about-breadcrumb .breadcrumb-items {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 18px;
    }

    body .about-breadcrumb .breadcrumb-items ul {
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 0;
    }

    body .about-breadcrumb .breadcrumb-items li,
    body .about-breadcrumb .breadcrumb-items a {
        font-size: 18px;
        overflow-wrap: anywhere;
    }

    body .about-breadcrumb .title {
        max-width: 100%;
        font-size: clamp(32px, 7vw, 72px);
        overflow-wrap: anywhere;
    }

    body .smog-wrapper,
    body .config-layout,
    body .why-grid,
    body .contact-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    body .smog-wrapper > *,
    body .config-layout > *,
    body .why-grid > *,
    body .contact-container > *,
    body .form-row > *,
    body .reach-wrapper > * {
        min-width: 0;
    }

    body .smog-image:not(.smog-image-stack) img,
    body .why-image img {
        height: auto;
        max-height: 560px;
        object-fit: contain;
    }

    body .contact-container {
        width: calc(100% - 40px);
    }

    body .contact-info h2 {
        font-size: clamp(30px, 4.5vw, 44px);
        line-height: 1.2;
    }

    body .info-box > div,
    body .example-box > div,
    body .single-footer-widget {
        min-width: 0;
    }

    body .contact-info p,
    body .footer-content a,
    body .footer-content p,
    body .offcanvas__contact a {
        overflow-wrap: anywhere;
    }

    body .section-title h2,
    body .smog-content h2,
    body .why-content h2 {
        font-size: clamp(28px, 4.5vw, 42px);
        line-height: 1.2;
        overflow-wrap: break-word;
    }

    body .market-area-item h2,
    body .market-area-item h3,
    body .market-area-item h4 {
        font-size: clamp(24px, 3.8vw, 34px);
        line-height: 1.3;
        overflow-wrap: break-word;
    }

    body .input-box input,
    body .input-box select,
    body .input-box textarea {
        min-width: 0;
        max-width: 100%;
    }

    body .about-wrapper .about-image {
        display: grid;
        gap: 20px;
        max-width: 100%;
    }

    body .about-wrapper .about-image .about-image-2 {
        position: static;
        width: 100%;
        max-width: none;
        margin: 0;
        border: 0;
        box-shadow: none;
    }

    body .about-wrapper .about-image img,
    body .about-wrapper .about-image .about-image-2 img {
        display: block;
        width: 100%;
        height: auto;
    }

    body .about-wrapper .about-content {
        right: 0;
    }
}

@media (max-width: 767px) {
    body .header-3 .container-fluid {
        padding-inline: 16px;
    }

    body .header-main {
        padding-block: 10px;
    }

    body .header-main .logo img {
        height: 60px;
        max-width: 210px;
    }

    body #carouselExampleCaptions .carousel-caption {
        position: absolute;
        inset: 0 30px;
        width: auto;
        max-width: none;
        height: 100% !important;
        padding: 16px 0 30px !important;
        background: transparent;
    }

    body #carouselExampleCaptions .hero-slide-image {
        height: clamp(280px, 75vw, 380px);
        object-fit: cover;
        object-position: center;
    }

    body #carouselExampleCaptions .carousel-item > .position-absolute {
        display: block;
    }

    body #carouselExampleCaptions .carousel-caption h2 {
        font-size: clamp(20px, 5.3vw, 28px);
        line-height: 1.15;
        margin-bottom: 10px !important;
    }

    body #carouselExampleCaptions .carousel-caption p {
        font-size: clamp(12px, 3vw, 14px);
        line-height: 1.5;
        margin-bottom: 12px !important;
    }

    body #carouselExampleCaptions .carousel-caption .theme-btn {
        min-height: 36px;
        padding: 10px 14px;
        font-size: 11px;
        line-height: 1.2;
    }

    body #carouselExampleCaptions .carousel-control-prev,
    body #carouselExampleCaptions .carousel-control-next {
        width: 30px;
        height: 100%;
    }

    body #carouselExampleCaptions .carousel-control-prev-icon,
    body #carouselExampleCaptions .carousel-control-next-icon {
        width: 20px;
    }

    body .about-breadcrumb {
        min-height: 280px !important;
        padding: 48px 0;
    }

    body .about-breadcrumb .breadcrumb-items .title {
        font-size: clamp(28px, 8vw, 44px);
    }

    body .smog-section,
    body .smog-app-section,
    body .sunrise-why,
    body .config-section {
        padding-block: 48px;
    }

    body .smog-section .container,
    body .smog-app-section .container,
    body .sunrise-why .container {
        width: 100%;
        padding-inline: 20px;
    }

    body .smog-wrapper,
    body .why-grid,
    body .config-layout {
        gap: 28px;
    }

    body .smog-image,
    body .why-image img {
        border-radius: 18px;
    }

    body .smog-content p,
    body .why-content p {
        font-size: 16px;
        line-height: 1.75;
    }

    body .smog-card h3 {
        font-size: clamp(20px, 3vw, 24px);
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    body .why-content,
    body .form-wrapper {
        padding: 28px 22px;
    }

    body .why-content h2,
    body .smog-cta h2,
    body .smog-single-box h2 {
        font-size: clamp(26px, 7vw, 34px);
        line-height: 1.25;
        overflow-wrap: break-word;
    }

    body .example-box {
        padding: 20px;
        gap: 14px;
    }

    body .example-box .icon,
    body .info-box .icon {
        flex-shrink: 0;
    }

    body .smog-cta a,
    body .theme-btn {
        max-width: 100%;
        white-space: normal;
    }

    body .contact-section {
        padding-block: 48px;
        padding-inline: 0;
    }

    body .contact-info h2 br {
        display: initial;
    }

    body .form-row {
        grid-template-columns: minmax(0, 1fr);
    }

    body .form-row .full {
        grid-column: 1 / -1;
    }

    body .form-row input,
    body .form-row select,
    body .form-row textarea {
        font-size: 16px;
    }

    /* Bootstrap's large gutters must stay inside their mobile container. */
    body .container .row.g-5 {
        --bs-gutter-x: 24px;
    }

    body .reach-wrapper {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Match the vertical contact and social buttons on either side. */
    body .floating-iconss,
    body .social-floating-right {
        top: min(80%, calc(100% - 110px));
        bottom: auto;
        width: auto;
        height: auto;
        padding: 0;
        transform: translateY(-50%);
        flex-direction: column;
        align-items: center;
        gap: 18px;
        background: transparent;
        border: 0;
    }

    body .floating-iconss {
        left: 8px;
    }

    body .social-floating-right {
        right: 8px;
    }

    body .floating-iconss .icons,
    body .social-floating-right .social-icons {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
        padding: 10px;
        animation: none;
    }

    body .back-to-top {
        bottom: 20px;
    }

    body .mouse-cursor {
        display: none;
    }
}

@media (max-width: 374px) {
    body .example-box {
        flex-direction: column;
    }
}
