/* ========================================
   Responsive Design
   ======================================== */

/* Tablets and below */
@media (max-width: 1200px) {
    :root {
        --navbar-height: 70px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-map {
        min-height: 350px;
    }
    
    .location-block {
        padding: var(--spacing-xl);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-brand {
        grid-column: span 2;
    }

    /* Mobile Navigation */
    .nav-logo {
        margin-right: auto;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1100;
    }

    .menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-base);
        z-index: 900;
    }

    .menu-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 100px;
        padding-bottom: 40px;
        gap: var(--spacing-xl);
        transform: translateX(100%);
        opacity: 1;
        visibility: visible;
        transition: transform var(--transition-base);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        z-index: 1050;
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        font-size: 1.25rem;
    }

    .nav-cta {
        margin-left: 0;
        margin-top: var(--spacing-lg);
    }

    .nav-link-cta {
        padding: var(--spacing-md) var(--spacing-xl);
        font-size: 1rem;
    }

    .nav-link-promo {
        margin-right: var(--spacing-sm);
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.8rem;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --spacing-3xl: 3rem;
        --spacing-4xl: 4rem;
    }
    
    /* Buttons stack full-width on phones (hero handles its own layout) */
    .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Vehicles */
    .vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    /* Team */
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-image {
        width: 150px;
        height: 150px;
    }
    
    /* Contact - Locations */
    .locations-container {
        gap: var(--spacing-2xl);
    }
    
    .location-block {
        padding: var(--spacing-lg);
    }
    
    .location-header {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .location-title {
        font-size: 1.25rem;
    }
    
    .location-subtitle {
        font-size: 0.9rem;
    }
    
    .contact-info {
        gap: var(--spacing-md);
    }
    
    .contact-card {
        padding: var(--spacing-md);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-brand {
        grid-column: auto;
        max-width: 100%;
    }
}

/* Small mobile devices */
@media (max-width: 400px) {
    .section-title {
        font-size: 2rem;
    }
}

/* Responsive for new pages */
@media (max-width: 1024px) {
    .vehicle-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .vehicle-gallery {
        position: relative;
        top: 0;
    }
    
    .gallery-main img {
        height: 350px;
        object-fit: contain;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding-top: calc(var(--navbar-height) + var(--spacing-2xl));
    }
    
    .filter-bar:not(.vehicle-filter-bar) {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-controls {
        width: 100%;
    }
    
    .filter-group {
        flex: 1;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .vehicles-grid-full {
        grid-template-columns: 1fr;
    }
    
    .gallery-main img {
        height: 280px;
        object-fit: contain;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .thumbnail img {
        height: 50px;
        object-fit: cover;
    }
    
    .vehicle-detail-name {
        font-size: 1.5rem;
    }
    
    .vehicle-detail-price {
        font-size: 1.75rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .vehicles-grid {
        grid-template-columns: 1fr;
    }

    /* Vehicle detail quick specs: wrap if they don't fit in one line */
    .vehicle-quick-specs {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}
