/* =================================================
   DRIVENLUXURY - MOBILE & RESPONSIVE OPTIMIZATIONS
   ================================================= */

/* Mobile-first approach improvements */
@media (max-width: 1400px) {
    .luxury-container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 1200px) {
    .luxury-container {
        max-width: 960px;
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .cars-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .experience-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .visual-grid {
        height: 400px;
    }
}

@media (max-width: 992px) {
    /* Header adjustments */
    .nav-desktop {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero section mobile */
    .hero-luxury {
        height: 80vh;
        min-height: 600px;
    }
    
    .hero-title {
        font-size: 3rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 1rem;
    }
    
    .btn-luxury,
    .btn-luxury-outline {
        min-width: 200px;
        justify-content: center;
    }
    
    /* Sections mobile */
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .featured-cars-section,
    .services-section,
    .experience-section {
        padding: 60px 0;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    /* Stats mobile */
    .experience-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .stat {
        padding: 1rem 0.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* CTA mobile */
    .cta-title {
        font-size: 2.5rem;
    }
    
    .cta-subtitle {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    /* Footer mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
        gap: 1rem;
    }
    
    /* Fleet page mobile */
    .filter-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .view-toggle {
        justify-self: start;
        margin-top: 1rem;
    }
    
    .fleet-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        text-align: center;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    /* Booking mobile */
    .booking-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .booking-sidebar {
        position: static;
        order: -1;
    }
    
    .booking-steps {
        flex-wrap: wrap;
        gap: 1rem 0.5rem;
    }
    
    .step {
        flex: 1;
        min-width: calc(50% - 0.25rem);
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-title {
        font-size: 0.8rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .search-filters {
        grid-template-columns: 1fr;
    }
    
    .extras-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .car-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Typography adjustments */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    /* Page headers */
    .page-header {
        padding: 120px 0 60px;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    /* Hero mobile */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    /* Cards mobile */
    .car-card,
    .fleet-card {
        margin-bottom: 1rem;
    }
    
    .car-image-container,
    .fleet-card-image {
        height: 200px;
    }
    
    .car-specs,
    .spec-item {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
    
    .car-features {
        gap: 0.3rem;
    }
    
    .feature-tag {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    /* Services mobile */
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    /* Experience mobile */
    .experience-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .visual-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(3, 150px);
        height: auto;
        gap: 0.5rem;
    }
    
    .visual-item.large {
        grid-row: auto;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    .luxury-container {
        padding: 0 10px;
    }
    
    /* Typography */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-title::after {
        width: 60px;
    }
    
    /* Buttons */
    .btn-luxury,
    .btn-luxury-outline {
        padding: 12px 20px;
        font-size: 0.85rem;
        min-width: auto;
    }
    
    .btn-luxury.large,
    .btn-luxury-outline.large {
        padding: 15px 25px;
        font-size: 0.9rem;
    }
    
    /* Hero buttons mobile */
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .hero-buttons .btn-luxury,
    .hero-buttons .btn-luxury-outline {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    
    /* Cards extra small */
    .car-card-content,
    .fleet-card-content {
        padding: 1rem;
    }
    
    .car-name {
        font-size: 1.2rem;
    }
    
    .price-amount {
        font-size: 1.5rem;
    }
    
    .card-actions {
        gap: 0.5rem;
    }
    
    /* Stats mobile */
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* CTA mobile */
    .cta-section {
        padding: 60px 0;
    }
    
    .cta-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .cta-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    /* Footer extra mobile */
    .footer-main {
        padding: 40px 0 30px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Booking extra mobile */
    .booking-header {
        padding: 120px 0 60px;
    }
    
    .booking-form-container {
        padding: 1.5rem;
    }
    
    .step-heading {
        font-size: 1.5rem;
    }
    
    .booking-steps {
        gap: 0.5rem;
    }
    
    .step {
        min-width: calc(50% - 0.25rem);
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .step-title {
        font-size: 0.75rem;
    }
    
    .extras-grid {
        grid-template-columns: 1fr;
    }
    
    .extra-card {
        padding: 1rem;
    }
    
    .summary-card {
        padding: 1rem;
    }
    
    .support-item {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-spacer {
        display: none;
    }
}

@media (max-width: 400px) {
    /* Extra extra small devices */
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .booking-steps {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .step {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        min-width: auto;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .step-title {
        font-size: 0.85rem;
        text-align: left;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-luxury {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .hero-video,
    .car-image,
    .fleet-card-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-video {
        animation: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* Dark mode support (future feature) */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark theme */
}

/* Print styles */
@media print {
    .header-luxury,
    .footer-luxury,
    .mobile-nav,
    .preloader,
    .scroll-indicator,
    .hero-video,
    .cta-section,
    .social-links {
        display: none !important;
    }
    
    .hero-luxury {
        height: auto;
        padding: 2rem 0;
        background: white !important;
        color: black !important;
    }
    
    .hero-title,
    .section-title {
        color: black !important;
    }
    
    .luxury-container {
        max-width: none;
        padding: 0;
    }
    
    .car-card,
    .service-card {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Touch-friendly interactions */
    .btn-luxury,
    .btn-luxury-outline,
    .action-btn,
    .quick-action,
    .nav-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    .car-card:hover,
    .service-card:hover,
    .fleet-card:hover {
        transform: none;
    }
    
    .car-overlay {
        opacity: 1;
    }
    
    .image-overlay {
        opacity: 1;
    }
}

/* Focus improvements for keyboard navigation */
.btn-luxury:focus,
.btn-luxury-outline:focus,
.luxury-input:focus,
.nav-link:focus {
    outline: 2px solid var(--luxury-gold);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--luxury-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Error states */
.error-state {
    border-color: #ff4757 !important;
    background-color: rgba(255, 71, 87, 0.1) !important;
}

.success-state {
    border-color: var(--luxury-gold) !important;
    background-color: rgba(212, 175, 55, 0.1) !important;
}

/* Skeleton loading for better UX */
.skeleton {
    background: linear-gradient(90deg, var(--luxury-gray) 25%, var(--luxury-gray-light) 50%, var(--luxury-gray) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}