/* ==========================================================================
   STREAK INTEGRATED - MOBILE RESPONSIVE OVERRIDES
   ========================================================================== */

/* Large Tablets and Mobile Screens (max-width: 991.98px) */
@media (max-width: 991.98px) {

    /* 1. Hero Section Layout Adjustments */
    .hero-section {
        margin-top: 0 !important;
        padding-top: 120px !important;
        padding-bottom: 60px !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    .hero-section .row {
        min-height: auto !important;
        align-items: flex-start !important;
    }

    .hero-content {
        margin-top: 10px !important;
    }

    /* 2. Responsive Hero Typography Scale to prevent layout overflow */
    .hero-title {
        font-size: 28px !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }

    .hero-text {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 25px !important;
    }

    /* 3. Hero Visual Spacing when stacked */
    .hero-visual {
        margin-top: 50px !important;
        padding-bottom: 60px !important;
        /* Accommodates floating absolute badge */
    }

    /* 4. Fix overlapping white trust metrics section on stacked layout */
    .metrics-section {
        margin-top: 0 !important;
        padding: 40px 0 !important;
        z-index: 5 !important;
    }

    /* 5. Add clean margins for stacked metric boxes */
    .metrics-section .row>div {
        margin-bottom: 15px !important;
    }

    .metrics-section .row>div:last-child {
        margin-bottom: 0 !important;
    }

    .metric-box {
        padding: 20px 15px !important;
    }
}

/* Medium Mobile Devices (max-width: 767.98px) */
@media (max-width: 767.98px) {
    .hero-title {
        font-size: 24px !important;
    }

    .hero-text {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .hero-buttons a {
        text-align: center !important;
        width: 100% !important;
    }
}

/* Small Mobile Devices (max-width: 575.98px) */
@media (max-width: 575.98px) {

    body,
    html {
        overflow-x: hidden !important;
    }

    .hero-section {
        padding-top: 100px !important;
        padding-bottom: 40px !important;
    }

    .hero-title {
        font-size: 20px !important;
    }

    .hero-text {
        font-size: 13px !important;
    }

    /* 6. Convert absolute floating badge to inline stack to prevent clipping & horizontal scroll */
    .hero-visual {
        flex-direction: column !important;
        align-items: stretch !important;
        padding-bottom: 0 !important;
        margin-top: 30px !important;
    }

    .tracking-card {
        padding: 20px !important;
    }

    .tracking-card h4 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }

    /* Transition absolute card to relative centered layout below tracking card */
    .metric-card {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        margin-top: 15px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    }
}

/* ==========================================================================
   ADDITIONAL MOBILE FIXES — append to responsive.css
   ========================================================================== */

/* ── 1. Tracking Dashboard Section (padding: 50px causes overflow at 400px) ── */
@media (max-width: 991.98px) {
    .tracking-dashboard {
        padding: 25px 15px !important;
        margin-top: 40px !important;
    }

    .tracking-info-panel {
        padding-left: 0 !important;
        margin-top: 30px !important;
    }

    .operation-metrics {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .shipment-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
}

/* ── 2. Mockup Search bar (min-width: 260px overflows on 400px screens) ── */
@media (max-width: 767.98px) {
    .mockup-search {
        min-width: 0 !important;
        width: 100% !important;
    }

    .mockup-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 15px !important;
    }
}

/* ── 3. Why Section (padding-right/left: 40px on both sides eats width) ── */
@media (max-width: 991.98px) {
    .why-image-wrapper {
        padding-right: 0 !important;
        margin-bottom: 50px !important;
    }

    .floating-info-card {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        max-width: 100% !important;
        margin-top: 20px !important;
    }

    .why-content {
        padding-left: 0 !important;
    }
}

/* ── 4. Section titles too large on mobile (48px, 54px) ── */
@media (max-width: 767.98px) {
    .section-title {
        font-size: 28px !important;
        line-height: 1.3 !important;
    }

    .cta-content h2,
    .cta-title {
        font-size: 26px !important;
    }
}

/* ── 5. CTA Wrapper (padding: 70px is too large for 400px) ── */
@media (max-width: 991.98px) {
    .cta-wrapper {
        padding: 40px 25px !important;
        border-radius: 24px !important;
    }
}

/* ── 6. Global safety net — catch any remaining overflow element ── */
@media (max-width: 575.98px) {

    .container,
    .container-fluid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    section,
    .hero-section,
    .services-section,
    .why-section,
    .tracking-preview-section,
    .metrics-section,
    .industries-section,
    .process-section,
    .cta-section,
    .testimonials-section {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}

/* ==========================================================================
   HERO TRACKING CARD + TITLE — Mobile Overflow Fixes
   ========================================================================== */

@media (max-width: 991.98px) {

    /* Hero title — scale down aggressively */
    .hero-title {
        font-size: 26px !important;
        line-height: 1.25 !important;
        margin-bottom: 16px !important;
        word-break: break-word !important;
    }

    /* Tracking card — prevent it from exceeding column width */
    .tracking-card {
        max-width: 100% !important;
        width: 100% !important;
        padding: 24px 20px !important;
        box-sizing: border-box !important;
    }

    .tracking-card h4 {
        font-size: 22px !important;
        margin-bottom: 20px !important;
        word-break: break-word !important;
    }

    /* Location labels — prevent overflow from space-between on small screens */
    .tracking-locations {
        font-size: 12px !important;
        gap: 4px !important;
    }

    /* hero-visual must not exceed viewport */
    .hero-visual {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
}

@media (max-width: 575.98px) {

    /* Even smaller title on phones */
    .hero-title {
        font-size: 22px !important;
    }

    /* Tighter card padding on very small screens */
    .tracking-card {
        padding: 18px 15px !important;
        border-radius: 16px !important;
    }

    /* Route dots and line — ensure they stay inside card */
    .tracking-route {
        overflow: hidden !important;
        width: 100% !important;
    }

    /* Prevent subtitle text overflow */
    .hero-subtitle {
        font-size: 12px !important;
        letter-spacing: 1px !important;
    }

    .hero-text {
        font-size: 13px !important;
        max-width: 100% !important;
    }
}