/* =============================================
   SHIPDAY LOGISTICS — RESPONSIVE STYLES
   ============================================= */

/* ============ LAPTOPS & SMALL DESKTOPS (Under 1200px) ============ */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .nav-list {
        gap: 0;
    }

    .nav-item > a {
        padding: 10px 12px;
        font-size: 13px;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .quote-form-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-4);
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    .footer-grid {
        grid-template-columns: 1.2fr repeat(2, 1fr);
        gap: var(--space-8);
    }
}

/* ============ TABLETS (Under 992px) ============ */
@media (max-width: 992px) {
    .logo-img {
        width: 150px;
        height: auto;
    }
    .container {
        max-width: 720px;
    }

    .top-bar {
        display: none; /* Hide top bar on tablet/mobile */
    }

    .hamburger {
        display: flex;
    }

    .main-nav,
    .header-actions .btn {
        display: none; /* Hide desktop nav and button CTAs */
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-12);
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-features {
        justify-content: center;
    }

    .hero-visual {
        min-height: 400px;
    }

    .float-card-2 {
        left: 20px;
    }

    .float-card-1 {
        right: 20px;
    }

    .quote-card {
        padding: var(--space-6);
    }

    .quote-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }

    .why-us-grid,
    .business-grid,
    .coverage-grid {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }

    .why-us-content,
    .why-us-content .section-title,
    .why-us-content .section-desc,
    .business-content,
    .business-content .section-title,
    .business-content .section-desc {
        text-align: center;
    }

    .why-us-image,
    .business-image {
        order: 2; /* Put images below content on tablet/mobile */
        min-height: 350px;
    }

    .steps-grid {
        flex-direction: column;
        gap: var(--space-8);
    }

    .step-connector {
        transform: rotate(90deg);
        margin: var(--space-2) 0;
    }

    .step-card {
        width: 100%;
    }

    .coverage-map {
        min-height: 400px;
    }

    .footer-newsletter {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
        padding: var(--space-6);
    }

    .footer-newsletter-form {
        width: 100%;
        max-width: 100%;
    }
}

/* ============ MOBILE (Under 768px) ============ */
@media (max-width: 768px) {
    .logo-img {
        width: 120px;
        height: auto;
    }
    .container {
        max-width: 540px;
    }

    .section {
        padding: var(--space-16) 0;
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .quote-form-grid {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-item:last-child {
        grid-column: span 2;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }


    .stats-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        padding: var(--space-8) var(--space-6);
    }

    .testimonial-card::before {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer-col {
        text-align: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-about {
        align-items: center;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }

    .footer-bottom-info {
        flex-direction: column;
        gap: var(--space-2);
    }

    .floating-quote {
        display: none; /* Hide floating buttons on small screens */
    }

    .cookie-banner {
        width: calc(100% - 40px);
        left: 20px;
        bottom: 20px;
    }
}

/* ============ SMALL MOBILE (Under 480px) ============ */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }

    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .why-us-features {
        grid-template-columns: 1fr;
    }

    .coverage-city-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chat-window {
        width: calc(100vw - 60px);
        height: 400px;
    }

    .cookie-actions {
        flex-direction: column;
    }

    .cookie-actions .btn {
        width: 100%;
    }
}

/* ============ SERVICES BACKGROUND SECTION ============ */
/* On tablet and below: disable parallax for performance */
@media (max-width: 992px) {
    .services-bg-section .services-bg {
        background-attachment: scroll;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }

    .blog-main-layout {
        grid-template-columns: 1fr !important;
        gap: var(--space-8);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* Hero video: on very small screens just show poster */
    .hero.has-video-bg {
        min-height: 75vh;
    }

    /* Reduce FAQ section padding */
    .faq-section {
        padding: 48px 0;
    }

    /* Tighten section padding on mobile */
    .section {
        padding: var(--space-12) 0;
    }

    /* Fix blog section spacing */
    .blog-section {
        padding: var(--space-12) 0;
    }

    /* Ensure service card numbers don't overlap icon on mobile */
    .service-card {
        padding-top: calc(var(--space-8) + 24px) !important;
    }
}

@media (max-width: 480px) {
    /* Hero min height reduced */
    .hero {
        min-height: 70vh;
        padding: 60px 0 70px;
    }

    /* Make service cards fill nicely on small screens */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Ensure no horizontal overflow on tiny screens */
    .float-card {
        min-width: 180px;
    }

    .float-card-2 {
        left: 0;
    }
}

/* =============================================
   MOBILE LAYOUT FIXES & BLOG RESPONSIVENESS
   ============================================= */

/* Universal Layout & Media Bounds */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img, video, iframe, picture, svg, canvas {
    max-width: 100%;
    height: auto;
}

input, select, textarea, button, form, table {
    max-width: 100%;
    box-sizing: border-box;
}

/* Blog Page Grid & Article Layout */
.blog-main-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-12);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-8);
}

.blog-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.blog-card-img-wrap {
    width: 100%;
    max-height: 240px;
    overflow: hidden;
    position: relative;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-content,
.blog-card-title,
.blog-card-excerpt,
.blog-card-meta {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Responsive Cookie Banner Bounds & Touch Styling */
@media (max-width: 576px) {
    .cookie-banner {
        width: calc(100% - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        padding: var(--space-4) !important;
        padding-right: 44px !important;
        box-sizing: border-box !important;
    }

    .cookie-actions {
        flex-direction: column !important;
        width: 100% !important;
    }

    .cookie-actions .btn {
        width: 100% !important;
    }

    .chat-window {
        width: calc(100vw - 24px) !important;
        max-width: calc(100% - 24px) !important;
        left: 12px !important;
        right: 12px !important;
    }
}

/* Comprehensive Grid Collapse on Mobile Screens (320px to 640px) */
@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-6);
    }

    .about-grid,
    .why-us-grid-6,
    .calc-form-grid,
    .quote-options-grid,
    .vehicle-specs-grid,
    .vehicle-row,
    .vehicle-row.reverse {
        grid-template-columns: 1fr !important;
    }

    [style*="minmax(300px"],
    [style*="minmax(320px"],
    [style*="minmax(280px"],
    [style*="minmax(270px"],
    [style*="minmax(260px"] {
        grid-template-columns: 1fr !important;
    }
}

