/* =========================================================
   TOTAL TRADE TRANSPORTATION LLC — ENHANCED RESPONSIVENESS
   Phase 4 + Phase 5 Mobile Polish
   ========================================================= */

@media (max-width: 1024px) {
    .section-title {
        font-size: clamp(2.5rem, 6vw, 4rem);
    }
}

@media (max-width: 768px) {

    /* Base Spacing */
    .section {
        padding: 3rem 1.25rem !important;
    }

    .page-hero {
        padding: 8rem 1.25rem 3.5rem !important;
        text-align: center;
    }

    /* Typography */
    .hero-title {
        font-size: clamp(2.6rem, 8vw, 4rem);
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1.15rem;
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 2.4rem;
        line-height: 1.15;
    }

    .section-body {
        font-size: 1rem;
    }

    .hero-eyebrow {
        justify-content: center;
    }

    /* Grids & Structure */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }

    .reveal-left,
    .reveal-right {
        transform: translateY(40px);
        /* Override left/right slide on mobile */
        text-align: center;
    }

    .reveal-left.visible,
    .reveal-right.visible {
        transform: translateY(0);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .gallery-masonry {
        columns: 1 !important;
    }

    .img-panel {
        min-height: 300px;
    }

    /* Stats Band Folding */
    .stats-band {
        padding: 3rem 1.25rem;
    }

    .stats-band-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem 1.5rem;
    }

    .stat-number {
        font-size: 2.8rem;
    }

    .stat-divider:nth-child(2n) {
        display: none !important;
    }

    /* Hero Stats Formatting */
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
        align-items: center;
    }

    .hero-divider {
        width: 80px;
        height: 1px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-location {
        bottom: 1.5rem;
        font-size: 0.75rem;
    }

    /* ════════════════════════════════════════════
       NAVIGATION OVERRIDES (Fixing Overlaps/Display)
       ════════════════════════════════════════════ */
    .nav-links {
        display: none !important;
        /* Hide by default on mobile */
        background: rgba(8, 20, 38, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        top: 76px !important;
        z-index: 999 !important;
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 2.5rem;
        padding: 2.5rem 1rem 5rem 1rem !important;
        overflow-y: auto !important;
    }

    /* VERY IMPORTANT: This class controls the menu opening */
    .nav-links.open {
        display: flex !important;
    }

    /* Force the toggle button to be visible and functional */
    .nav-toggle {
        display: flex !important;
        z-index: 1001 !important;
        position: relative;
    }

    /* Footer adjustments */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .footer-brand p {
        margin: 1rem auto;
    }

    .footer-contact-item {
        justify-content: center;
        text-align: left;
        display: inline-flex;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {

    /* Extreme Mobile Downscale */
    .section-title {
        font-size: 2.1rem;
    }

    .hero-title {
        font-size: 2.3rem;
    }

    .stat-number {
        font-size: 2.4rem;
    }

    /* Stack stats purely vertically on tiny phones */
    .stats-band-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stat-divider {
        display: none !important;
    }

    /* Make buttons full width on small screens globally */
    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .gallery-controls {
        flex-direction: column;
        width: 100%;
    }

    .gallery-filter-btn {
        width: 100%;
    }
}