/* Responsive Styles */

/* Extra small devices (phones, 600px and down) */
@media (max-width: 600px) {
    .header .container {
        flex-wrap: wrap;
    }

    .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        display: none; /* Hidden by default, toggled by JS */
        text-align: center;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin: 10px 0;
    }

    .nav-toggle {
        display: flex;
        position: absolute;
        right: 15px;
        top: 15px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .search-widget {
        flex-direction: column;
        padding: 20px;
    }

    .search-widget .form-group {
        width: 100%;
        min-width: unset;
    }

    .search-widget .btn {
        width: 100%;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .car-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-item {
        margin: 0 5px;
        padding: 20px;
    }

    .cta h2 {
        font-size: 2rem;
    }

    .cta p {
        font-size: 1rem;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-col {
        min-width: unset;
        width: 100%;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        display: flex;
        justify-content: center;
    }
}

/* Small devices (portrait tablets and large phones, 600px to 768px) */
@media (min-width: 601px) and (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        width: 100%;
        display: none; /* Hidden by default, toggled by JS */
        text-align: center;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin: 10px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .search-widget {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-widget .form-group {
        flex: 0 0 calc(50% - 10px); /* Two columns */
    }

    .search-widget .btn {
        width: calc(100% - 10px);
    }

    .car-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .footer .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (landscape tablets, 768px to 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .nav-menu li {
        margin-left: 15px;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .search-widget .form-group {
        flex: 0 0 calc(33.333% - 10px); /* Three columns */
    }

    .car-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .footer .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large devices (laptops and desktops, 992px to 1200px) */
@media (min-width: 993px) and (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1201px) {
    .container {
        max-width: 1140px;
    }
}