/* Responsive Design */

/* Large Desktop Styles */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .cars-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .about-features {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Desktop Styles */
@media (max-width: 1399px) and (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
    
    .cars-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .about-features {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Tablet Styles */
@media (max-width: 1024px) {
	.about-features {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
    
    .feature-item {
        flex: 0 1 calc(33.333% - 1rem);
        min-width: 280px;
    }
    
    .feature-item:nth-child(n+4) {
        flex: 0 1 calc(50% - 2rem);
        max-width: 350px;
    }
    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem 0;
        box-shadow: var(--shadow-medium);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 1000;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--accent-color);
        margin-top: 0.5rem;
    }
    
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .nav-actions {
        gap: 1rem;
    }
    
    .btn-call span {
        display: none;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .slogan-main {
        font-size: 1.8rem;
    }
    
    .slogan-details {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .slogan-separator {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    /* Typography */
    .section-title {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    /* Layout */
    section {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-slogan-title {
        font-size: 1.8rem;
    }
    
    .feature-item {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Cars Section */
    .category-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
        touch-action: manipulation;
    }
    
    .tab-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
        min-width: 120px;
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .tab-btn:active {
        transform: scale(0.95);
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 10px;
        min-height: 200px;
    }
    
    .car-card {
        max-width: 100%;
        touch-action: manipulation;
    }
    
    .car-image {
        height: 200px;
    }
    
    .car-name {
        font-size: 1.2rem;
    }
    
    .car-specs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .car-specs span {
        font-size: 0.9rem;
    }
    
    /* Mobile touch improvements */
    .car-book-btn {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-image {
        height: 200px;
    }
    
    .service-content {
        padding: 1.5rem;
    }
    
    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
        gap: 1rem;
    }
    
    /* Floating Widgets - Mobile Optimized */
    .floating-contact {
        bottom: 20px;
        right: 20px;
        z-index: 1000;
    }
    
    .contact-btn {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .visit-counter {
        bottom: 20px;
        left: 20px;
        z-index: 1000;
        max-width: 120px;
    }
    
    .counter-number {
        font-size: 1rem;
    }
    
    .contact-btn::before {
        content: '';
        position: absolute;
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
        background: var(--gradient-gold);
        border-radius: 50%;
        z-index: -1;
        opacity: 0;
        transition: var(--transition);
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 2rem;
    }

    .slogan-main {
        font-size: 1.5rem;
    }

    .slogan-item {
        font-size: 0.9rem;
        padding: 0.2rem 0.5rem;
    }
    
    .title-main,
    .title-sub {
        display: block;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Typography */
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-description {
        font-size: 0.9rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Navigation */
    .brand-text {
        font-size: 1.2rem;
    }
    
    .logo {
        height: 30px;
    }
    
    /* About Section */
    .feature-item {
        padding: 1rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Cars Section - VERY SMALL MOBILE */
    .category-tabs {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .tab-btn {
        width: 200px;
        text-align: center;
        padding: 0.6rem 1rem;
    }
    
    .cars-grid {
        padding: 0 5px;
        gap: 1rem;
    }
    
    .car-card {
        max-width: 100%;
    }
    
    .car-image {
        height: 180px;
    }
    
    .car-info {
        padding: 1rem;
    }
    
    .car-name {
        font-size: 1rem;
    }
    
    .car-specs {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .price {
        font-size: 1.1rem;
    }
    
    /* Contact Section */
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    /* Contact Map */
    .contact-map {
        margin-top: 1.5rem;
    }
    
    .map-container iframe {
        height: 200px;
    }
    
    .map-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Footer */
    .footer-logo img {
        height: 25px;
    }
    
    .footer-logo span {
        font-size: 1rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* Floating Widgets - Extra Small Mobile */
    .floating-contact {
        bottom: 15px;
        right: 15px;
    }
    
    .contact-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .visit-counter {
        bottom: 15px;
        left: 15px;
        max-width: 100px;
    }
    
    .counter-number {
        font-size: 0.9rem;
    }
    
    .contact-btn::before {
        top: -3px;
        left: -3px;
        right: -3px;
        bottom: -3px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 60vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .car-image {
        height: 150px;
    }
    
    .floating-contact {
        bottom: 10px;
        right: 10px;
    }
    
    .contact-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .visit-counter {
        bottom: 10px;
        left: 10px;
        max-width: 90px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-slide img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator i {
        animation: none;
    }
    
    .contact-btn {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #ffffff;
        --text-light: #cccccc;
    }
    
    .header {
        background: var(--dark-bg);
    }
    
    .nav-link {
        color: var(--text-dark);
    }
    
    .brand-text {
        color: var(--text-dark);
    }
    
    .about {
        background: var(--dark-bg);
    }
    
    .feature-item {
        background: var(--card-bg);
    }
    
    .feature-content h3 {
        color: var(--text-dark);
    }
    
    .service-item {
        background: var(--card-bg);
    }
    
    .service-content h3 {
        color: var(--text-dark);
    }
    
    .contact-form {
        background: var(--card-bg);
    }
    
    .form-group input,
    .form-group textarea {
        background: var(--accent-color);
        color: var(--text-dark);
        border: 1px solid var(--text-light);
    }
}

/* Print Styles */
@media print {
    .header,
    .floating-contact,
    .visit-counter,
    .nav-actions,
    .hero-buttons {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-content {
        color: #000;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    .btn {
        border: 1px solid #000;
        color: #000;
        background: none;
    }
    
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.nav-link:focus,
.tab-btn:focus,
.contact-btn:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading.loaded {
    opacity: 1;
    pointer-events: auto;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--accent-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-gold);
}

/* Mobile Floating Widgets Fix */
@media (max-width: 768px) {
    body .floating-contact {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
        pointer-events: auto;
    }
    
    body .visit-counter {
        position: fixed;
        bottom: 20px;
        left: 20px;
        z-index: 1000;
        pointer-events: auto;
    }
}

/* Additional Mobile Fixes */
@media (max-width: 768px) {
    .floating-contact {
        display: block !important;
    }
    
    .visit-counter {
        display: block !important;
    }
}

/* Debug Widgets */
.debug-widgets {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 9999;
}

/* Ensure widgets are always visible */
html .floating-contact,
html .visit-counter {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}