/* General Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --dark-bg: #212529;
    --light-bg: #f8f9fa;
    --text-color: #343a40;
    --light-text-color: #f8f9fa;
    --border-color: #dee2e6;
    --font-family: 'Montserrat', sans-serif;
    --heading-font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--light-text-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font-family);
    color: var(--text-color);
    margin-bottom: 1rem;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: var(--light-text-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background-color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .header {
    background-color: #343a40;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--heading-font-family);
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

body.dark-mode .logo {
    color: var(--primary-color);
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-menu li {
    margin-left: 25px;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

body.dark-mode .nav-menu a {
    color: var(--light-text-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    height: 3px;
    width: 25px;
    background-color: var(--text-color);
    margin-bottom: 5px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

body.dark-mode .nav-toggle span {
    background-color: var(--light-text-color);
}

/* Hero Section */
.hero {
    background: url('https://images.pexels.com/photos/170811/pexels-photo-170811.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* Search Widget */
.search-widget {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: -50px; /* Overlap with hero section */
    position: relative;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: flex-end;
}

body.dark-mode .search-widget {
    background-color: #343a40;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.search-widget .form-group {
    flex: 1;
    min-width: 200px;
}

.search-widget label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

body.dark-mode .search-widget label {
    color: var(--light-text-color);
}

.search-widget input[type="text"],
.search-widget input[type="date"],
.search-widget select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: #f0f2f5;
    color: var(--text-color);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

body.dark-mode .search-widget input,
body.dark-mode .search-widget select {
    background-color: #495057;
    border-color: #6c757d;
    color: var(--light-text-color);
}

.search-widget input:focus,
.search-widget select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.search-widget .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    width: auto;
    min-width: 150px;
}

/* Sections */
.section {
    padding: 80px 0;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Featured Cars */
.featured-cars .car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.car-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .car-card {
    background-color: #343a40;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.car-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.car-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.car-card-content {
    padding: 20px;
}

.car-card h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.car-card .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.car-card .features {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.car-card .features li {
    background-color: #e9ecef;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9rem;
    color: var(--text-color);
}

body.dark-mode .car-card .features li {
    background-color: #495057;
    color: var(--light-text-color);
}

/* Testimonials */
.testimonials {
    background-color: var(--light-bg);
}

body.dark-mode .testimonials {
    background-color: var(--dark-bg);
}

.testimonial-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    margin-top: 40px;
}

.testimonial-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin: 0 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

body.dark-mode .testimonial-item {
    background-color: #343a40;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.testimonial-item p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: bold;
    color: var(--primary-color);
}

/* Call to Action */
.cta {
    background-color: var(--primary-color);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.cta h2 {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn {
    background-color: var(--accent-color);
}

.cta .btn:hover {
    background-color: #218838;
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: var(--light-text-color);
    padding: 50px 0;
    font-size: 0.9rem;
}

.footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li:not(:last-child) {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--light-text-color);
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.social-links a {
    display: inline-block;
    height: 40px;
    width: 40px;
    background-color: rgba(255,255,255,0.2);
    margin: 0 10px 10px 0;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    background-color: #fff;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    margin-left: 20px;
    transition: color 0.3s ease;
}

body.dark-mode .dark-mode-toggle {
    color: var(--light-text-color);
}

.dark-mode-toggle:hover {
    color: var(--primary-color);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }