/* =====================================================================
   CARGORATES.ai - Mobile responsive overrides
   Every rule in this file is inside a max-width media query, so the
   desktop layout (992px and wider) is not affected in any way.
   ===================================================================== */

/* ---------- Tablets & phones (<= 991px): safety rules only ---------- */
@media (max-width: 991.98px) {
    html, body { overflow-x: hidden; }
    img, video, iframe, svg, canvas { max-width: 100%; }
    img { height: auto; }
    /* Marquee logo strips must keep their natural widths */
    .text-wrapper-animate span { flex-shrink: 0; }
    .text-wrapper-animate img { max-width: none; }

    /* Wide tables scroll inside themselves instead of breaking the page */
    .blog-guide-table,
    .blogsMainContainer table,
    .blog-content table,
    .article-content table {
        display: block;
        width: 100% !important;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .carriers-table-comparision,
    .carrier-details-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ---------- Phones (<= 767px) ---------- */
@media (max-width: 767.98px) {

    /* ---- Typography ---- */
    h1, h2, h3, h4, h5, h6, p, li, a, span, td, th { overflow-wrap: break-word; word-wrap: break-word; }
    .sub-head-title,
    .our_carr { font-size: 28px !important; line-height: 1.3 !important; }
    .title-box h2.sub-head-title,
    .title-box h1.sub-head-title { display: block; }
    .sub-head-desc { font-size: 16px; }

    /* ---- Large vertical gaps between sections ---- */
    .tpm24vid-sec,
    .solutions-section,
    .blogsSectionCR,
    .callToActionSec,
    .swiperCardPlatformSec { padding-top: 45px !important; padding-bottom: 45px !important; }
    .features-nofusss-sec,
    .moduleCTASection,
    .world-section { padding-top: 35px !important; padding-bottom: 35px !important; }
    .faq-section { padding-bottom: 35px !important; }
    .Service-half-top.p-t80 { padding-top: 40px !important; }
    .textSlideLR { padding: 20px 15px 30px !important; }
    .sub-page-title-box { padding-top: 25px !important; padding-bottom: 25px !important; }
    .videotitle-box { padding: 20px 0 !important; }
    .videotitle-box .title-box { margin-top: 30px !important; }
    .crPlatformModuleWrapper { margin-top: 25px !important; }
    .notfound-section { padding-top: 60px !important; }

    /* ---- Text blocks squeezed by desktop side padding ---- */
    .mainInfoActionBox .text-subtitle,
    p.textLRPad { padding-right: 0 !important; }
    .moduleCustmWrapper .text-section,
    .containerModuleBox .text-section { padding-right: 0 !important; }
    .moduleBoxDiv { padding: 28px 22px !important; }
    .services-box.box-outwrapper { padding: 12px !important; }
    .services-innerdiv { padding: 22px 18px !important; }
    .benefits-cpoints-box { padding: 10px 0 !important; }
    .benefits-cpoints-box .nav-link { width: 100%; }

    /* ---- Logo / client sliders ---- */
    .textSlideLR .sliderTextWrap { width: 100% !important; }

    /* ---- Footer ---- */
    .footer .row.g-5 { --bs-gutter-y: 1.75rem; }
    .footer .container.py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .newFooterSection.mt-5,
    .footer.mt-5 { margin-top: 1.5rem !important; }
    .footer-mob-text .col-md-6 > span { margin-top: 16px !important; }

    /* ---- Blog article pages ---- */
    .blogsMainContainer .col-md-8 { padding-right: 12px !important; }
    .blog-guide-definition { padding: 18px 16px !important; }
    .blogsCustmBreadCrumb { margin-left: 0 !important; margin-right: 0 !important; }
    .blogsCustmBreadCrumb > [class*="col-"] { padding-left: 14px !important; padding-right: 14px !important; }
    .blog-bread { flex-wrap: wrap; }

    /* ---- Standalone blog (blogs/index.html) ---- */
    .article-header,
    .article-content { padding: 22px 16px !important; }
    .article-title { font-size: 28px !important; line-height: 1.25 !important; }
    .article-content .cta-section { padding-left: 14px !important; padding-right: 14px !important; }
    .main-layout { display: block !important; }
    .main-layout > * { margin-bottom: 24px; }

    /* ---- Blog listing cards (blog1.html) ---- */
    #blog-list .card-img-top,
    .card-img-top.widhei { width: 100% !important; height: auto !important; }

    /* ---- Login / Register ---- */
    .login-section { height: auto !important; min-height: 0 !important; padding: 20px 0 40px; background-size: cover !important; }
    .login-wrapper { margin: 20px 0 !important; box-shadow: none; }
    .login-wrapper .aero-freight,
    .login-wrapper .truck-freight,
    .login-wrapper .ship-freight { display: none !important; }
    .login-inner-div .row > [class*="col-md-"] { width: 100%; flex: 0 0 100%; max-width: 100%; }
    .login-inner-div .col-md-5 > div[style*="padding-top"] { padding-top: 0 !important; margin-bottom: 15px; }
    .login-inner-div .col-md-5 .logo-text { font-size: 34px !important; }
    .login-section .login-img-part { height: auto !important; padding: 20px !important; }
    .login-section .login-img-part img { margin-top: 0 !important; max-height: 220px; }
    .login-section .login-form-part,
    .login-form-part { padding: 24px 18px !important; margin: 0 !important; }
    .login-form-part .intro-title { padding-top: 10px !important; }
    .login-form-part .form-box .input-box input,
    .login-form-part .form-box .input-box select,
    .login-form-part .form-box .input-box textarea { width: 100% !important; max-width: 100%; }
    .login-form-part .form-box .row > .input-box { width: 100%; flex: 0 0 100%; max-width: 100%; }
    .login-form-part .form-box .login-submit-btn { width: 100%; }
    .login-form-part .top-link { text-align: center; }

    /* ---- Carrier details comparison table ---- */
    .carriers-table-comparision { display: block !important; padding: 10px !important; }
    .carriers-table-comparision table { min-width: 760px; }
    .carriers-table-comparision thead { position: static !important; }
    .carriers-table-comparision th img { max-width: none; }

    /* ---- Forms / buttons ---- */
    input, select, textarea { max-width: 100%; }
    .actionBtnWrapperNew .btn,
    .ctaBtnWrapper .btn { white-space: normal; }
}

/* ---------- Small phones (<= 400px) ---------- */
@media (max-width: 400px) {
    .sub-head-title,
    .our_carr { font-size: 25px !important; }
    .moduleBoxDiv { padding: 24px 16px !important; }
}

/* =====================================================================
   Mobile bottom navigation (app-style) - injected by js/mobile-bottom-nav.js
   Hidden everywhere except phones.
   ===================================================================== */
.cr-bottom-nav { display: none; }

@media (max-width: 767.98px) {
    html.has-cr-bottom-nav body { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
    html.has-cr-bottom-nav .back-to-top { bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; right: 16px !important; }

    .cr-bottom-nav {
        display: block;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        z-index: 1040; /* above page content & sticky header, below Bootstrap modals (1050+) */
        transform: translate3d(0, 0, 0);
        transition: transform .38s cubic-bezier(.22, .9, .3, 1), opacity .25s ease;
        -webkit-tap-highlight-color: transparent;
        font-family: "Work Sans", "Open Sans", system-ui, -apple-system, sans-serif;
    }
    .cr-bottom-nav.is-hidden,
    .cr-bottom-nav.is-typing,
    body.modal-open .cr-bottom-nav {
        transform: translate3d(0, calc(100% + 30px), 0);
        opacity: 0;
        pointer-events: none;
    }

    .cr-bottom-nav__inner {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        height: 66px;
        padding: 0 6px;
        border-radius: 22px;
        background: rgba(14, 14, 16, .82);
        -webkit-backdrop-filter: saturate(170%) blur(18px);
        backdrop-filter: saturate(170%) blur(18px);
        border: 1px solid rgba(255, 255, 255, .09);
        box-shadow: 0 12px 32px rgba(0, 0, 0, .38), 0 2px 6px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .06);
    }

    .cr-bottom-nav__item {
        position: relative;
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 0;
        color: rgba(255, 255, 255, .62) !important;
        text-decoration: none !important;
        font-size: 10.5px;
        font-weight: 500;
        letter-spacing: .2px;
        line-height: 1;
        transition: color .25s ease, transform .18s ease;
        outline: none;
    }
    .cr-bottom-nav__icon { display: inline-flex; width: 23px; height: 23px; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
    .cr-bottom-nav__icon svg {
        width: 100%; height: 100%;
        fill: none; stroke: currentColor; stroke-width: 1.8;
        stroke-linecap: round; stroke-linejoin: round;
    }
    .cr-bottom-nav__label { white-space: nowrap; }

    /* Active tab: red tint + glowing indicator */
    .cr-bottom-nav__item.is-active { color: #fff !important; }
    .cr-bottom-nav__item.is-active .cr-bottom-nav__icon { color: #ff2a3d; transform: translateY(-1px); }
    .cr-bottom-nav__item.is-active::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        width: 22px;
        height: 3px;
        margin-left: -11px;
        border-radius: 0 0 4px 4px;
        background: #DA0D20;
        box-shadow: 0 0 10px 1px rgba(218, 13, 32, .75);
    }

    /* Press feedback */
    .cr-bottom-nav__item.is-pressed { transform: scale(.9); }
    .cr-bottom-nav__item:focus-visible { color: #fff !important; }
    .cr-bottom-nav__item:focus-visible .cr-bottom-nav__icon { outline: 2px solid rgba(255, 255, 255, .5); outline-offset: 4px; border-radius: 6px; }

    /* Center "Demo" call-to-action */
    .cr-bottom-nav__item--cta { color: #fff !important; }
    .cr-bottom-nav__item--cta .cr-bottom-nav__icon {
        width: 52px;
        height: 52px;
        margin-top: -30px;
        padding: 13px;
        border-radius: 50%;
        color: #fff;
        background: linear-gradient(145deg, #ff3346 0%, #DA0D20 55%, #a8000f 100%);
        border: 4px solid rgba(14, 14, 16, .95);
        box-shadow: 0 8px 20px rgba(218, 13, 32, .5), 0 0 0 1px rgba(255, 255, 255, .08);
        animation: crNavPulse 2.8s ease-out infinite;
    }
    .cr-bottom-nav__item--cta .cr-bottom-nav__icon svg { stroke-width: 2; }
    .cr-bottom-nav__item--cta .cr-bottom-nav__label { color: rgba(255, 255, 255, .9); }
    .cr-bottom-nav__item--cta.is-pressed .cr-bottom-nav__icon { transform: scale(.92); }

    @keyframes crNavPulse {
        0%   { box-shadow: 0 8px 20px rgba(218, 13, 32, .5), 0 0 0 0 rgba(218, 13, 32, .45); }
        70%  { box-shadow: 0 8px 20px rgba(218, 13, 32, .5), 0 0 0 12px rgba(218, 13, 32, 0); }
        100% { box-shadow: 0 8px 20px rgba(218, 13, 32, .5), 0 0 0 0 rgba(218, 13, 32, 0); }
    }

    @media (prefers-reduced-motion: reduce) {
        .cr-bottom-nav, .cr-bottom-nav__item, .cr-bottom-nav__icon { transition: none !important; }
        .cr-bottom-nav__item--cta .cr-bottom-nav__icon { animation: none; }
    }
}

/* Browsers without backdrop blur: use a solid background */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .cr-bottom-nav__inner { background: rgba(14, 14, 16, .97); }
}

/* =====================================================================
   Sub-page top area (title banner / breadcrumb / first heading)
   Removes the empty space under the navbar on phones only.
   ===================================================================== */
@media (max-width: 767.98px) {

    /* Title banner (About, Contact, Services, Resources, Demo, Blog...) */
    .other-page-header.py-3 { padding-top: 22px !important; padding-bottom: 22px !important; }
    .other-page-header .row.g-5 { --bs-gutter-y: 0; margin-top: 0 !important; }
    .other-page-header .row.g-5 > * { margin-top: 0 !important; }
    /* Right column only holds a decorative image that does not exist (img/hero-2.png) */
    .other-page-header .row > .animated.fadeIn { display: none !important; }
    .other-page-header .sub-page-title { margin-top: 0 !important; margin-bottom: 6px !important; line-height: 1.25; }
    .other-page-header .breadcrumb { margin-bottom: 0 !important; flex-wrap: wrap; row-gap: 2px; }
    .other-page-header .breadcrumb .brd-para { margin-bottom: 0 !important; }

    /* Blog banner box */
    .blogsCustmBreadCrumb { margin-top: 0 !important; margin-bottom: 0 !important; }
    .blogsCustmBreadCrumb > [class*="col-"] { padding-top: 16px !important; padding-bottom: 16px !important; }
    .blogsMainContainer .post-meta-guide,
    .blogsMainContainer > .row > .col-md-8 > :first-child { margin-top: 18px !important; }
    .container.mt-4 { margin-top: 18px !important; }

    /* First section heading under the banner */
    .sub-page-title-box { padding: 20px 0 12px !important; }
    .sub-page-title-box .sub-head-desc { margin-bottom: 4px !important; }
    .about-section .contents-part { padding-top: 14px !important; padding-bottom: 20px !important; }
    .features-nofusss-sec.new-featues-section { padding-top: 6px !important; }

    /* Platform / BCO / NVOCC pages: breadcrumb sat on top of a 100px empty band */
    .module-section-top { padding-top: 14px !important; padding-bottom: 0 !important; }
    .module-section-top .breadcrumb-sec { margin-bottom: 28px !important; }
    .topFixedBreadCrumb { position: static !important; top: auto !important; padding: 0 !important; }
    .topFixedBreadCrumb .breadcrumb { margin-bottom: 0 !important; }
    .module-section-top .rate-title-carrier { padding-top: 6px; }
    .module-landing-sec { margin-top: 14px !important; }
    .module-section-top + .module-explantion-section { margin-top: 0 !important; }

    /* Privacy policy / Thank-you */
    .privacyPolicy-section { padding-top: 16px !important; }
    .sub-page-title-box[style*="padding"] { padding-left: 0 !important; padding-right: 0 !important; }
}

/* =====================================================================
   Rate Management page: module tabs shown as stacked cards on phones
   ===================================================================== */
.crMobileModuleCard { display: none !important; }

@media (max-width: 767.98px) {
    .crMobileModuleCard { display: block !important; margin-top: 18px; }
    .moduleSwiperWrap .moduleBotmSliderBox { display: none !important; }
    .moduleSwiperWrap #fadeWrapper { opacity: 1 !important; }
}

/* Footer copyright: tighter gap between the two stacked lines on phones */
@media (max-width: 767.98px) {
    .copyright .row > .mb-3 { margin-bottom: 4px !important; }
}

/* Header logo: a little larger on phones (top navbar only, footer untouched) */
@media (max-width: 767.98px) {
    .blackCompactNavbar .navbar-brand .logo-text { font-size: 21px !important; line-height: 1.15; }
    .blackCompactNavbar .logo-slogan2 { font-size: 12.5px !important; margin-top: 1px !important; }
}

/* About page: main heading left-aligned on phones */
@media (max-width: 767.98px) {
    body:has(.world-section) .about-section > .container > .sub-page-title-box { text-align: left !important; }
    body:has(.world-section) .about-section > .container > .sub-page-title-box h1 { text-align: left !important; display: block; }
}
