/*
Author: KSXO
Version: 2.1
*/

/* Reset and base styles */
body, h1, h2, h3, p, ul, li {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f4f7f9;
    color: #333;
    font-size: 18px;
    line-height: 1.7;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c3e50;
    padding: 5px 5%;
    flex-direction: row;
    border-bottom: 2px solid #34495e;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
}

.logo {
    max-width: auto;
    height: 60px;
}

.menu-toggle {
    display: none; /* Hidden by default */
    cursor: pointer;
    font-size: 24px;
    color: #ecf0f1;
    position: absolute;
    top: 10px;
    right: 5%;
}

nav.active ul {
    display: block;
}

nav ul {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    gap: 10px;
    text-align: center;
}

nav li {
    display: inline;
}

nav a {
    color: #3498db;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
    border-radius: 5px;
    padding: 5px 5px;
}

nav a:hover {
    color: #2980b9;
    background-color: #ecf0f1;
}

.banner {
    background: url("images/car4.jpg") no-repeat center center/cover;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    background-color: #ecf0f1;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

section {
    padding: 30px 10%;
}

footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid #34495e;
}

a {
    transition: color 0.3s;
}

a:hover {
    color: #2980b9;
}

#cars h3, #cars p {
    text-align: center;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    justify-items: center;
    margin-top: 20px;
}

.car-image img {
    max-width: 450px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.car-image:hover img {
    transform: scale(1.05);
}

#about h3, #about p {
    text-align: center;
}

#faqs h3 {
    text-align: center;
}

.faq-item {
    background-color: #ecf0f1;
    color: #2c3e50;
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s;
    padding: 15px;
}

.faq-item:hover {
    background-color: #2c3e50;
    color: #ecf0f1;
}

.faq-question {
    font-weight: 600;
    margin-bottom: 10px;
}

.faq-answer {
    margin-left: 20px;
}

/* Reviews Section */
#reviews {
    text-align: center;
}

.review-item {
    background-color: #ecf0f1;
    border-radius: 5px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Location Section */
#location {
    text-align: center;
    position: relative;
    height: 400px; /* You can adjust this based on the desired map height */
    margin-bottom: 30px; /* Add this line */
}

#location iframe {
    width: 100%;        /* Adjusted to 100% to make it full width */
    height: 400px;
    border: 0;          /* Remove border */
    display: block;
}

/* Contact Section */
#contact {
    background-color: #3498db;
    color: #fff;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
    border-radius: 0px;
    padding: 40px;
    text-align: center;
    display: flex;           /* Add Flexbox */
    justify-content: space-around;  /* Space them equally */
    flex-wrap: wrap;        /* Wrap if space is limited */
}

#contact h3 {
    color: #fff;
    width: 100%;            /* Make it span the full width */
    text-align: center;
}

#contact a {
    background-color: #fff;
    color: #3498db;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    margin: 10px 0;
    display: inline-block;
}

#contact a:hover {
    background-color: #ecf0f1;
    color: #2980b9;
}

#contact p {
    margin: 10px 0;
    flex: 1;                /* Allow each item to grow and take up equal width */
    text-align: center;
}

#contact p strong {
    color: #fff;
    display: block;
}

/* Media Queries for Responsiveness */
@media only screen and (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        padding-top: 10px;
    }

    .cars-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .car-image img {
        max-width: 250px;
    }

    #contact {
        flex-direction: column;
    }

    #contact p {
        flex: none; /* Reset the flex value */
        margin-bottom: 20px; /* Add some margin for spacing */
    }
    .menu-toggle {
        display: block; /* Show burger icon on smaller screens */
    }

    nav {
        width: 100%;
    }

    nav ul {
        display: none; /* Hide links by default on smaller screens */
        flex-direction: column;
        gap: 10px;
    }

    nav.active ul {
        display: flex; /* Show links when menu is active */
    }
}
