/* ==========================================================================
   Valmo Courier Franchise - Responsive Layout Styles
   Breakpoints: 1440px, 1024px, 768px, 425px, 375px, 320px
   ========================================================================== */

/* 1. LARGE LAPTOP & DESKTOP (1440px) */
@media (max-width: 1440px) {
    .container {
        max-width: 1200px;
    }
}

/* 2. SMALL LAPTOP & TABLET LANDSCAPE (1024px) */
@media (max-width: 1024px) {
    :root {
        --header-height: 70px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .hero-container {
        gap: 30px;
    }

    .section-title {
        font-size: 2rem;
    }

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

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

    .partner-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .partner-visual {
        order: 2;
        max-width: 500px;
        margin: 0 auto;
    }

    .partner-content {
        order: 1;
    }

    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .masonry-item:nth-child(2) { grid-column: span 1; }
    .masonry-item:nth-child(5) { grid-column: span 1; }
}

/* 3. TABLET PORTRAIT (768px) */
@media (max-width: 768px) {
    .padding-y {
        padding-top: 70px;
        padding-bottom: 70px;
    }

    /* Mobile Hamburger Menu Navigation */
    .hamburger-menu {
        display: flex;
        z-index: 1100;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 100px 40px 40px 40px;
        gap: 24px;
        box-shadow: -10px 0 30px rgba(8, 26, 56, 0.1);
        transition: var(--transition-smooth);
        z-index: 1000;
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        width: 100%;
        padding: 8px 0;
    }

    .nav-cta {
        margin-left: 0;
        margin-top: 16px;
        width: 100%;
    }

    /* Hamburger Animation States */
    .hamburger-menu.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger-menu.open span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.open span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -7px);
    }

    /* Hero Stacking */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-title .highlight-text {
        font-size: 2.2rem;
    }

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

    .investment-highlight-card {
        margin-left: auto;
        margin-right: auto;
    }

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

    .hero-benefits-grid {
        max-width: 580px;
        margin: 0 auto 30px auto;
    }

    .hero-trust-list {
        margin: 0 auto;
        text-align: left;
    }

    /* Timeline Linear Layout */
    .timeline-container::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        justify-content: flex-start;
        padding-left: 50px;
        padding-bottom: 40px;
    }

    .timeline-item:nth-child(even) {
        margin-left: 0;
    }

    .timeline-badge {
        left: 0 !important;
        right: auto !important;
    }

    .timeline-content {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Contact Stacking */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .map-placeholder {
        min-height: 300px;
    }

    /* Footer Stacking */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Floating Action Bar on Mobile */
    .floating-cta-bar {
        display: block;
    }

    body {
        padding-bottom: 72px; /* Prevent floating CTA overlap with footer content */
    }

    .back-to-top {
        bottom: 88px; /* Position above floating CTA bar */
    }
}

/* 4. MOBILE LANDSCAPE & SMALL DEVICES (425px) */
@media (max-width: 425px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-title .highlight-text {
        font-size: 1.8rem;
    }

    .investment-highlight-card {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    .hero-benefits-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .hero-trust-list ul {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .glass-form-card {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 24px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .masonry-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 180px;
    }

    .masonry-item:nth-child(1) { grid-row: span 1; }

    .lightbox-close {
        top: 20px;
        right: 20px;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next {
        right: 20px;
    }
}

/* 5. SMALL MOBILE (375px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 2rem;
    }

    .trust-item {
        font-size: 0.85rem;
    }

    .form-title {
        font-size: 1.4rem;
    }
}

/* 6. EXTRA SMALL MOBILE (320px) */
@media (max-width: 320px) {
    .nav-brand {
        gap: 6px;
    }

    .brand-logo {
        height: 22px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .stats-section .stat-item h3 {
        font-size: 2.8rem;
    }
}

/* Sticky Mobile CTA Override */
@media (max-width: 768px) {
    .sticky-mobile-cta {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(6, 17, 36, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 12px 20px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .sticky-mobile-cta .btn {
        width: 100%;
        padding: 14px;
        font-weight: 700;
        font-size: 1.05rem;
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    }
    /* Add padding to body so footer content is not blocked by sticky button */
    body {
        padding-bottom: 74px;
    }
}
