/* ============================================
   TU-AUTO.NET - Responsive Styles
   Mobile-First Breakpoints
   ============================================ */

/* ============================================
   Extra Large Devices (1400px and up)
   ============================================ */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
}

/* ============================================
   Large Devices (1200px and up)
   ============================================ */
@media (max-width: 1399.98px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   Medium-Large Devices (992px - 1199px)
   ============================================ */
@media (max-width: 1199.98px) {
    :root {
        --section-padding: 80px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .payment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .guarantee-card {
        padding: 50px;
    }
    
    .guarantee-features {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Medium Devices (768px - 991px)
   ============================================ */
@media (max-width: 991.98px) {
    :root {
        --section-padding: 70px;
    }
    
    /* Navigation */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 20px;
        border-top: 1px solid var(--color-gray-800);
    }
    
    .navbar-nav {
        gap: 0;
    }
    
    .nav-link {
        padding: 15px 0 !important;
        border-bottom: 1px solid var(--color-gray-800);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .navbar-collapse .btn-primary-custom {
        width: 100%;
        justify-content: center;
        margin-top: 20px;
        margin-left: 0 !important;
    }
    
    /* Hero */
    .hero-content {
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-features {
        justify-content: center;
    }
    
    /* About */
    .about-content {
        padding-right: 0;
        text-align: center;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .about-cta {
        text-align: center;
    }
    
    /* Catalog */
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Guarantee */
    .guarantee-content {
        text-align: center;
    }
    
    /* Footer */
    .footer-brand {
        text-align: center;
    }
    
    .footer-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-links,
    .footer-contact {
        text-align: center;
    }
    
    .footer-contact ul li {
        justify-content: center;
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    .footer-bottom .col-md-6 {
        margin-bottom: 10px;
    }
}

/* ============================================
   Small Devices (576px - 767px)
   ============================================ */
@media (max-width: 767.98px) {
    :root {
        --section-padding: 60px;
    }
    
    html {
        font-size: 15px;
    }
    
    /* Hero */
    .hero-section {
        min-height: 100vh;
    }
    
    .hero-content {
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-scroll {
        bottom: 20px;
    }
    
    /* Brands */
    .brand-item span {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    /* Section Headers */
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    /* About Stats */
    .about-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .service-card {
        padding: 30px 25px;
    }
    
    .service-number {
        font-size: 2.5rem;
    }
    
    /* Catalog */
    .catalog-filters {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vehicle-image {
        height: 200px;
    }
    
    .vehicle-content {
        padding: 20px;
    }
    
    .price-value {
        font-size: 1.35rem;
    }
    
    /* Guarantee */
    .guarantee-card {
        padding: 30px 20px;
    }
    
    .guarantee-features {
        gap: 15px;
    }
    
    .g-feature {
        padding: 15px;
    }
    
    /* Payment */
    .payment-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .payment-card {
        padding: 30px 25px;
    }
    
    /* Contact */
    .social-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: 30px 20px;
    }
    
    .form-title {
        font-size: 1.25rem;
    }
    
    /* Footer */
    .footer {
        padding-top: 50px;
    }
    
    .footer-content {
        padding-bottom: 30px;
    }
    
    .footer-links h5,
    .footer-contact h5 {
        margin-top: 20px;
    }
    
    /* WhatsApp & Back to Top */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        right: 85px;
        bottom: 20px;
    }
}

/* ============================================
   Extra Small Devices (Below 576px)
   ============================================ */
@media (max-width: 575.98px) {
    :root {
        --section-padding: 50px;
    }
    
    html {
        font-size: 14px;
    }
    
    /* Navbar */
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar {
        padding: 15px 0;
    }
    
    /* Hero */
    .hero-badge {
        padding: 8px 16px;
        margin-bottom: 20px;
    }
    
    .hero-badge span:last-child {
        font-size: 0.75rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .btn-primary-custom,
    .btn-outline-custom {
        padding: 12px 24px;
        font-size: 0.85rem;
    }
    
    /* Section Badge */
    .section-badge {
        padding: 6px 16px;
    }
    
    .section-badge span {
        font-size: 0.7rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Features */
    .feature-card {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon {
        margin: 0 auto;
    }
    
    /* Vehicle Cards */
    .vehicle-specs {
        flex-direction: column;
        gap: 8px;
    }
    
    .vehicle-financing {
        padding: 8px 12px;
    }
    
    .vehicle-financing span {
        font-size: 0.8rem;
    }
    
    /* Info Cards */
    .info-card {
        flex-direction: column;
        text-align: center;
    }
    
    .info-icon {
        margin: 0 auto;
    }
    
    /* Social Cards */
    .social-card {
        padding: 20px 15px;
    }
    
    .social-card i {
        font-size: 1.75rem;
    }
    
    /* Form */
    .contact-form .form-control {
        padding: 12px 15px;
    }
    
    /* Footer */
    .footer-logo {
        font-size: 1.5rem;
    }
    
    .copyright,
    .developer {
        font-size: 0.8rem;
    }
}

/* ============================================
   Very Small Devices (Below 400px)
   ============================================ */
@media (max-width: 399.98px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .price-value {
        font-size: 1.2rem;
    }
    
    .guarantee-card {
        padding: 25px 15px;
    }
    
    .g-feature {
        flex-direction: column;
        text-align: center;
    }
    
    .g-feature-icon {
        margin: 0 auto 10px;
    }
}

/* ============================================
   Landscape Mode on Mobile
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .hero-content {
        padding-top: 0;
    }
    
    .hero-scroll {
        display: none;
    }
}

/* ============================================
   High DPI / Retina Displays
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-bg,
    .vehicle-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .navbar,
    .hero-scroll,
    .whatsapp-float,
    .back-to-top,
    #preloader,
    .vehicle-overlay {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 40px 0;
    }
    
    .hero-bg,
    .hero-overlay {
        display: none;
    }
    
    .hero-content {
        color: #000;
    }
    
    .hero-title,
    .title-line {
        color: #000 !important;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    .vehicle-card,
    .service-card,
    .payment-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable auto dark mode */
    /*
    :root {
        --color-cream: #1a1a1a;
        --color-white: #0a0a0a;
        --color-black: #ffffff;
        --color-gray-100: #2a2a2a;
        --color-gray-200: #333;
        --color-gray-300: #444;
        --color-gray-400: #666;
        --color-gray-500: #888;
        --color-gray-600: #aaa;
        --color-gray-700: #ccc;
        --color-gray-800: #ddd;
        --color-gray-900: #eee;
    }
    */
}

/* ============================================
   Touch Device Optimizations
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .vehicle-card:hover {
        transform: none;
    }
    
    .vehicle-overlay {
        opacity: 1;
        background: rgba(10, 10, 10, 0.5);
    }
    
    .btn-whatsapp {
        transform: translateY(0);
        opacity: 1;
    }
    
    .service-card:hover,
    .feature-card:hover,
    .payment-card:hover {
        transform: none;
    }
    
    .hover-lift:hover {
        transform: none;
    }
}

/* ============================================
   Safe Area Insets (Notched Devices)
   ============================================ */
@supports (padding: max(0px)) {
    .navbar {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    .footer {
        padding-bottom: max(25px, env(safe-area-inset-bottom));
    }
    
    .whatsapp-float {
        right: max(20px, env(safe-area-inset-right));
        bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .back-to-top {
        right: max(85px, calc(env(safe-area-inset-right) + 65px));
        bottom: max(20px, env(safe-area-inset-bottom));
    }
}
