/* General Styles */
:root {
    --primary-color: #0056b3; /* Darker blue for accents */
    --secondary-color: #007bff; /* Main blue for buttons, links */
    --accent-color: #ffc107; /* Yellow for highlights */
    --dark-bg: #212529; /* Dark background for dark mode */
    --light-bg: #f8f9fa; /* Light background for light mode */
    --text-color-dark: #f8f9fa;
    --text-color-light: #212529;
    --card-bg-light: #ffffff;
    --card-bg-dark: #343a40;
    --border-color-light: #dee2e6;
    --border-color-dark: #495057;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--light-bg);
    color: var(--text-color-light);
    transition: background-color 0.3s, color 0.3s;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-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(--accent-color);
}

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

/* Header */
header {
    background-color: var(--card-bg-light);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

body.dark-mode header {
    background-color: var(--card-bg-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

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

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

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

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

.nav-links a {
    color: var(--text-color-light);
    font-weight: 500;
    transition: color 0.3s;
}

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

.nav-links a:hover {
    color: var(--secondary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    height: 3px;
    width: 25px;
    background-color: var(--text-color-light);
    margin: 4px 0;
    transition: 0.3s;
}

body.dark-mode .menu-toggle .bar {
    background-color: var(--text-color-dark);
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    transform: translate(-50%, -50%);
    background-size: cover;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

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

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
    font-weight: 500;
}

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

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Sections */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

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

/* Car Cards */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.car-card {
    background-color: var(--card-bg-light);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

body.dark-mode .car-card {
    background-color: var(--card-bg-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

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

.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;
    color: var(--primary-color);
}

body.dark-mode .car-card h3 {
    color: var(--accent-color);
}

.car-card-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

body.dark-mode .car-card-details {
    color: #ced4da;
}

.car-card-details span {
    display: flex;
    align-items: center;
}

.car-card-details span i {
    margin-right: 5px;
    color: var(--secondary-color);
}

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

body.dark-mode .car-card-price {
    color: var(--accent-color);
}

/* About Section */
.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.about-text p {
    line-height: 1.7;
    margin-bottom: 15px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.contact-form-container, .contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-form-container {
    background-color: var(--card-bg-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .contact-form-container {
    background-color: var(--card-bg-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color-light);
    border-radius: 5px;
    background-color: var(--light-bg);
    color: var(--text-color-light);
    transition: border-color 0.3s;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    border: 1px solid var(--border-color-dark);
    background-color: var(--dark-bg);
    color: var(--text-color-dark);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.contact-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.contact-info p i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.map-container {
    margin-top: 20px;
    height: 300px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 40px 0;
    text-align: center;
}

footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
}

footer .footer-col {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

footer h4 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

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

footer ul li {
    margin-bottom: 10px;
}

footer ul li a {
    color: #adb5bd;
    transition: color 0.3s;
}

footer ul li a:hover {
    color: white;
}

.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: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
    background-color: white;
}

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

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

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

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

/* Back to Top Button */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.3s;
    z-index: 999;
}

#back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}