/* Mobile and tablet layout corrections. Desktop rules remain in styles.css. */
@media (max-width: 1199px) {
    /* Let overflow checks expose real layout problems instead of clipping them. */
    html,
    body {
        overflow-x: visible;
    }

    .container,
    .row,
    [class*="col-"] {
        min-width: 0;
    }

    .container {
        max-width: 100%;
    }

    img,
    video,
    iframe,
    input,
    select,
    textarea {
        max-width: 100%;
    }

    p,
    li,
    address,
    .panel,
    .panel-body,
    .seo-footer,
    footer {
        overflow-wrap: anywhere;
    }
}

/* Shared WhatsApp contact button, rendered once by the global site layout. */
.whatsapp-float {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .28);
}

.whatsapp-float::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(204, 46, 53, .7);
    pointer-events: none;
    animation: whatsapp-reference-pulse 1.5s ease-out infinite;
}

@keyframes whatsapp-reference-pulse {
    0% { box-shadow: 0 0 0 0 rgba(204, 46, 53, .7); }
    70% { box-shadow: 0 0 0 19px rgba(204, 46, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(204, 46, 53, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-float::before { animation: none; }
}

.whatsapp-float:hover,
.whatsapp-float:focus {
    color: #fff;
    text-decoration: none;
}

@media (max-width: 767px) {
    .whatsapp-float {
        left: calc(16px + env(safe-area-inset-left, 0px));
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        width: 56px;
        height: 56px;
        font-size: 33px;
    }

    body {
        padding-top: 80px;
    }

    .navbar-fixed-top {
        width: 100%;
        min-height: 78px;
    }

    .navbar-fixed-top > .container {
        width: 100%;
        max-width: none;
        min-height: 78px;
        margin: 0;
        padding: 0 12px;
    }

    .navbar-fixed-top .navbar-header {
        display: flex;
        float: none;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 78px;
        margin: 0;
    }

    .navbar-brand#logo {
        float: none;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: min(220px, calc(100vw - 88px));
        height: 74px;
        margin: 0;
        padding: 4px 0;
    }

    .navbar-brand#logo img {
        width: min(205px, calc(100vw - 100px));
        max-width: 100%;
        max-height: 66px;
        height: auto;
        object-fit: contain;
    }

    .navbar-toggle {
        display: flex;
        float: none;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        margin: 0;
        padding: 10px;
        border: 0;
        color: #505453;
    }

    .navbar-toggle .fa-bars {
        font-size: 23px;
    }

    .navbar-fixed-top .navbar-collapse {
        max-height: calc(100vh - 78px);
        max-height: calc(100dvh - 78px);
        margin: 0 -12px;
        padding: 8px 12px 14px;
        overflow-y: auto;
        border-top: 1px solid rgba(80, 84, 83, .2);
        background: #95b3d7;
    }

    .navbar-fixed-top .navbar-nav {
        display: block;
        float: none;
        margin: 0;
    }

    .navbar-fixed-top .navbar-nav > li {
        float: none;
    }

    .navbar-fixed-top .navbar-nav > li > a {
        min-height: 46px;
        margin: 0;
        padding: 13px 14px;
        border-radius: 3px;
        color: #f5f8f7;
        line-height: 20px;
        white-space: normal;
    }

    .navbar-fixed-top .navbar-nav > li.active > a,
    .navbar-fixed-top .navbar-nav > li > a:hover,
    .navbar-fixed-top .navbar-nav > li.open > a {
        background: #c30f1d;
        color: #fff;
    }

    .navbar-fixed-top .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin: 0;
        padding: 4px 0 8px 12px;
        border: 0;
        border-radius: 0;
        background: rgba(255, 255, 255, .16);
        box-shadow: none;
    }

    .navbar-fixed-top .navbar-nav .dropdown-menu > li > a {
        min-height: 44px;
        padding: 12px 14px;
        color: #263b53;
        white-space: normal;
    }

    .hero-slider-section {
        margin-top: 0;
    }

    .hero-carousel .item {
        width: 100%;
        height: 720px;
        min-height: 720px;
        padding: 0;
        background-color: #090e17;
        background-repeat: no-repeat;
        background-size: cover;
    }

    .hero-carousel .carousel-inner {
        height: 720px;
    }

    .hero-carousel .hero-bg-img {
        display: none;
    }

    /* Keep each mobile slide at the same height so the carousel viewport stays stable. */
    .hero-carousel .hero-slide-ocean { background-image: url("../images/slider/hero-ocean-v2.png?v=20261008"); background-position: 64% center; }
    .hero-carousel .hero-slide-air { background-image: url("../images/slider/hero-air-v2.png?v=20261008"); background-position: 72% center; }
    .hero-carousel .hero-slide-road { background-image: url("../images/slider/hero-newroad-v2.png?v=20261008"); background-position: 24% center; }
    .hero-carousel .hero-slide-rail { background-image: url("../images/slider/hero-rail-v2.png?v=20261008"); background-position: 40% center; }
    .hero-carousel .hero-slide-warehouse { background-image: url("../images/slider/hero-warehouse-v2.png?v=20261008"); background-position: 56% center; }

    .hero-carousel .hero-overlay {
        right: 0;
        bottom: 0;
        width: auto;
        height: auto;
    }

    .hero-carousel .hero-overlay {
        background: rgba(8, 14, 26, .84);
    }

    .hero-carousel .hero-content-container {
        display: flex;
        align-items: center;
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 24px 15px 82px;
    }

    .hero-carousel .hero-content-box {
        width: 100%;
        max-width: 560px;
        margin: 0;
        padding: 0;
    }

    .hero-carousel .hero-kicker {
        margin-bottom: 8px;
        font-size: clamp(16px, 4.5vw, 19px);
        line-height: 1.35;
    }

    .hero-carousel .hero-title {
        margin: 0 0 16px;
        font-size: clamp(30px, 8.5vw, 40px);
        letter-spacing: .4px;
        line-height: 1.12;
        overflow-wrap: normal;
    }

    .hero-carousel .hero-caret-list {
        margin-bottom: 18px;
    }

    .hero-carousel .hero-caret-list li {
        margin-bottom: 10px;
        padding-left: 20px;
        font-size: clamp(15px, 4vw, 17px);
        line-height: 1.45;
    }

    .hero-carousel .hero-caret-list li::before {
        top: 7px;
    }

    .hero-carousel .hero-prompt {
        margin: 0 0 16px;
        font-size: clamp(19px, 5.2vw, 23px);
        line-height: 1.3;
    }

    .hero-carousel .hero-actions {
        width: min(100%, 340px);
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-carousel .btn-hero-quote,
    .hero-carousel .btn-hero-phone {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 50px;
        padding: 12px 16px;
        font-size: 15px;
        line-height: 1.25;
        white-space: normal;
        text-align: center;
    }

    .hero-carousel .carousel-indicators {
        bottom: 17px;
    }

    .hero-carousel .carousel-indicators li {
        width: 27px;
        margin: 0 4px;
    }

    .hero-carousel .carousel-indicators li.active {
        width: 42px;
    }

    .container > content > .row {
        margin-right: -8px;
        margin-left: -8px;
    }

    .container > content > .row > [class*="col-"] {
        width: 100%;
        margin-bottom: 20px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .container > content > .row .page-header {
        font-size: clamp(22px, 6vw, 26px);
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .panel-form {
        padding: 16px;
    }

    #quickContact .form-control,
    #quickContact .btn {
        min-height: 46px;
    }

    #quickContact .input-group {
        display: flex;
        width: 100%;
    }

    #quickContact .input-group > .form-control {
        flex: 1 1 0;
        width: 1%;
        min-width: 0;
    }

    #quickContact .input-group > select.form-control {
        flex: 0 1 54%;
    }

    .quote-modal-scrim {
        padding: 10px;
    }

    .quote-modal-dialog {
        width: 100%;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        padding: 20px 18px 24px;
    }

    .quote-field input,
    .quote-field select,
    .quote-field textarea {
        max-width: 100%;
    }

    .services-section-heading {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .services-section-heading .page-header {
        flex-basis: 100%;
        font-size: clamp(22px, 6vw, 26px);
        line-height: 1.25;
    }

    .service-card {
        flex-basis: 100%;
    }

    .service-card-image img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: initial;
    }

    .service-card-content {
        padding: 18px 18px 22px;
    }

    .global-reach-section {
        padding: 30px 12px 28px;
    }

    .global-reach-inner,
    .global-map {
        min-width: 0;
        max-width: 100%;
    }

    .global-reach-section h2 {
        font-size: clamp(22px, 6vw, 28px);
        line-height: 1.25;
    }

    footer > .row {
        display: flex;
        flex-wrap: wrap;
        margin-right: -8px;
        margin-left: -8px;
    }

    footer > .row > [class*="col-"] {
        float: none;
        width: 100%;
        max-width: 100%;
        margin-bottom: 14px;
        padding-right: 8px;
        padding-left: 8px;
    }

    footer .counter {
        text-align: left;
    }

    footer .seo-footer,
    footer .seo-footer a {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 430px) {
    .hero-carousel .carousel-inner { height: 760px; }
    .hero-carousel .item { height: 760px; min-height: 760px; }

    .hero-carousel .hero-content-container {
        height: 100%;
        min-height: 0;
        padding-right: 12px;
        padding-left: 12px;
    }

    .hero-carousel .hero-content-box {
        padding-right: 2px;
        padding-left: 2px;
    }

    .quote-modal-dialog {
        padding-right: 14px;
        padding-left: 14px;
    }

    .quote-status {
        display: block;
        margin: 10px 0 0;
        line-height: 1.4;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    body { padding-top: 80px; }

    .hero-slider-section,
    .global-reach-section {
        width: 100%;
        left: auto;
        right: auto;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-slider-section { margin-top: 0; }

    .hero-carousel .hero-content-container {
        padding-right: 45px;
        padding-left: 45px;
    }


    .container > content > .row > [class*="col-"] {
        min-width: 0;
    }

    .global-map {
        width: 100%;
    }
}

/* Shared mobile/tablet safeguards for all routed page templates. */
@media (max-width: 1199px) {
    .navbar-fixed-top { width: 100%; }

    .container > content img:not(.global-map-art),
    main.container img:not(.global-map-art),
    .container > content video,
    main.container video,
    .container > content iframe {
        max-width: 100%;
        height: auto;
    }

    .container > content .img-responsive,
    .container > content .thumbnail img {
        display: block;
        max-width: 100%;
        height: auto;
    }

    .container > content h1,
    .container > content h2,
    .container > content h3,
    .container > content h4,
    footer h1,
    footer h2,
    footer h3,
    footer h4 {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .container > content table {
        max-width: 100%;
    }

    .container > content .table-responsive {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #map-canvas {
        width: 100% !important;
        max-width: 100%;
        height: clamp(260px, 58vw, 380px) !important;
    }

    #features-list ul li {
        width: 50%;
        float: left;
    }
}

@media (max-width: 767px) {
    /* Full-bleed sections break out of Bootstrap's 15px phone gutters precisely. */
    .hero-slider-section,
    .global-reach-section {
        width: calc(100% + 30px);
        left: auto;
        right: auto;
        margin-left: -15px;
        margin-right: -15px;
    }

    .hero-slider-section { margin-top: 0; }

    .container > content > .row > [class*="col-"] {
        min-width: 0;
    }

    .container > content form,
    .container > content .form-horizontal,
    main.container form,
    main.container .form-horizontal {
        width: 100%;
        max-width: 100%;
    }

    .container > content form .form-control,
    main.container form .form-control,
    .container > content form input:not([type="checkbox"]):not([type="radio"]),
    main.container form input:not([type="checkbox"]):not([type="radio"]),
    .container > content form select,
    main.container form select,
    .container > content form textarea,
    main.container form textarea {
        min-width: 0;
        max-width: 100%;
    }

    .container > content form .form-control,
    main.container form .form-control,
    .container > content form button,
    main.container form button,
    .container > content form input[type="submit"],
    main.container form input[type="submit"] {
        min-height: 44px;
    }

    .container > content form textarea[cols],
    main.container form textarea[cols],
    .container > content #message[cols],
    .container > content #remarks[cols] {
        width: 100%;
    }

    .container > content form button,
    main.container form button,
    .container > content form input[type="submit"],
    main.container form input[type="submit"],
    .container > content form .btn,
    main.container form .btn {
        max-width: 100%;
        white-space: normal;
    }

    .container > content #map-canvas {
        height: clamp(260px, 78vw, 360px) !important;
    }

    .container > content .modal-dialog,
    .container > content .modal-content {
        width: auto;
        max-width: calc(100vw - 20px);
        margin-right: auto;
        margin-left: auto;
    }

    .container > content .modal-body img {
        max-width: 100%;
        height: auto;
    }

    footer > .row:first-of-type > [class*="col-"] {
        width: 50%;
    }

    footer .btn,
    footer .btn-flat {
        margin: 2px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .hero-carousel .item {
        width: 100%;
        height: 560px;
        min-height: 560px;
    }

    .hero-carousel .carousel-inner { height: 560px; }
    .hero-carousel .hero-bg-img { display: none; }
    .hero-carousel .item { background-repeat: no-repeat; background-size: cover; }
    .hero-carousel .hero-slide-ocean { background-image: url("../images/slider/hero-ocean-v2.png?v=20261008"); background-position: 64% center; }
    .hero-carousel .hero-slide-air { background-image: url("../images/slider/hero-air-v2.png?v=20261008"); background-position: 72% center; }
    .hero-carousel .hero-slide-road { background-image: url("../images/slider/hero-newroad-v2.png?v=20261008"); background-position: 24% center; }
    .hero-carousel .hero-slide-rail { background-image: url("../images/slider/hero-rail-v2.png?v=20261008"); background-position: 40% center; }
    .hero-carousel .hero-slide-warehouse { background-image: url("../images/slider/hero-warehouse-v2.png?v=20261008"); background-position: 56% center; }
    .hero-carousel .hero-content-container { height: 100%; min-height: 0; }
    .hero-carousel .hero-overlay { right: 0; bottom: 0; width: auto; height: auto; }

    .container > content form textarea[cols] { max-width: 100%; }
}

@media (max-width: 1199px) {
    .hero-carousel .carousel-inner { overflow: hidden; }
    .hero-carousel .item { box-sizing: border-box; }
    /* Bootstrap's incoming slides must overlay the active slide during motion. */
    .hero-carousel .carousel-inner > .item.next,
    .hero-carousel .carousel-inner > .item.prev {
        position: absolute;
        top: 0;
        width: 100%;
        max-width: 100%;
    }
}
