/* --- Global Styles --- */
:root {
    --primary-color: #007bff; /* Blue */
    --secondary-color: #28a745; /* Green */
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --white-color: #ffffff;
    --border-radius: 8px;
    --spacing-large: 4rem;
    --spacing-medium: 2rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-medium);
}

.section-padding {
    padding: var(--spacing-large) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-medium);
    font-size: 2.5rem;
    color: var(--dark-color);
}

.bg-light {
    background-color: var(--light-color);
}

/* --- Header & Navigation --- */
.main-header {
    background: var(--dark-color);
    color: var(--white-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li a {
    color: var(--white-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

/* --- Hero Section with Background and Animation --- */
.hero-section {
    background: url('https://via.placeholder.com/1600x800?text=Modern+Car+Dealership+Background') no-repeat center center/cover;
    height: 80vh; /* 80% of viewport height */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden; /* Important for the overlay animation */
}

/* Hero Content */
.hero-content {
    color: var(--white-color);
    z-index: 2; /* Place content above the overlay */
    max-width: 600px;
}

.hero-content h2 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Hero Overlay for subtle animation */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay for text readability */
    z-index: 1;
    /* Subtle pulsating animation */
    animation: pulse 15s infinite alternate;
}

@keyframes pulse {
    0% { background: rgba(0, 0, 0, 0.4); }
    100% { background: rgba(0, 0, 0, 0.6); }
}


/* --- Call to Action Button --- */
.cta-button {
    display: inline-block;
    padding: 10px 25px;
    margin: 5px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color 0.3s, transform 0.3s;
    border: none;
}

.cta-button.primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.cta-button.primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.cta-button.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-button.secondary:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* --- Featured Listings --- */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-medium);
}

.car-card {
    background: var(--white-color);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Brand Logo Styles */
.brand-logo {
    width: 60px;
    height: auto;
    margin: 1rem auto;
    display: block;
    border-radius: 50%;
    background: var(--light-color);
    padding: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.car-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.car-card h3 {
    margin: 1rem 0 0.5rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.car-card h3:nth-of-type(2) {
    font-size: 1rem;
    color: var(--dark-color);
    font-weight: normal;
    margin: 0.5rem 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.details-button {
    display: block;
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 0.75rem;
    text-decoration: none;
    transition: background-color 0.3s;
    margin-bottom: 0.5rem;
}

.details-button:hover {
    background-color: var(--primary-color);
}

.order-button {
    display: block;
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 0.75rem;
    text-decoration: none;
    transition: background-color 0.3s;
    border-radius: var(--border-radius);
}

.order-button:hover {
    background-color: #1e7e34;
}

.view-all {
    text-align: center;
    margin-top: var(--spacing-medium);
}

/* --- Why Choose Us Section --- */
.features-grid {
    display: flex;
    justify-content: space-around;
    gap: var(--spacing-medium);
    text-align: center;
}

.feature-item {
    flex: 1;
    max-width: 300px;
    padding: var(--spacing-medium);
    border-radius: var(--border-radius);
    background: var(--white-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.feature-item .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* --- CTA Banner --- */
.cta-banner {
    background: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: var(--spacing-large) 0;
}

.cta-banner h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cta-banner p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* Adjust secondary button style for banner */
.cta-banner .cta-button.secondary {
    color: var(--white-color);
    border-color: var(--white-color);
}

.cta-banner .cta-button.secondary:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
}


/* --- Footer --- */
.main-footer {
    background: var(--dark-color);
    color: var(--white-color);
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

.main-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--white-color);
    text-decoration: none;
    margin-left: 10px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* --- Media Queries for Responsiveness --- */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }

    .hero-content h2 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .features-grid {
        flex-direction: column;
        align-items: center;
    }

    .feature-item {
        margin-bottom: 1.5rem;
    }

    .main-footer .container {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        margin-top: 10px;
    }

    .brand-logo {
        width: 50px;
    }

    .car-card h3 {
        font-size: 1.1rem;
    }

    .car-card h3:nth-of-type(2) {
        font-size: 0.9rem;
    }
}


.partners-section {
    background-color: var(--light-color);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-medium);
}

.partner-card {
    background: var(--white-color);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    padding: 1rem;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.partner-logo {
    width: 80px;
    height: auto;
    margin: 0 auto 1rem;
    display: block;
    border-radius: 50%;
    background: var(--light-color);
    padding: 0.5rem;
}

.partner-card h3 {
    margin: 0 0 0.5rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.partner-card p {
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 0.9rem;
}