/* --- Global Styles & Variables --- */
:root {
    --primary-color: #007BFF; /* A vibrant blue */
    --secondary-color: #28a745; /* A friendly green */
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --text-color: #495057;
    --white-color: #ffffff;
    --font-family: 'Poppins', sans-serif;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
}

h1, h2, h3, h4 {
    color: var(--dark-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }

a {
    text-decoration: none;
    color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: #0056b3;
}

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

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

/* --- Header & Navigation --- */
.header {
    background: var(--white-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-link {
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    transition: all 0.3s ease-in-out;
}


/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(0, 123, 255, 0.8), rgba(0, 86, 179, 0.8)), url('images/hero.jpeg?text=Driving+Scene') no-repeat center center/cover;
    color: var(--white-color);
    padding: 100px 0;
    text-align: center;
}

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

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* --- Services Section --- */
.services {
    padding: 80px 0;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: var(--white-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 0.5rem;
}

/* --- Affiliate Page Specific Styles --- */
.affiliate-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    background: url('images/hero.jpeg?text=Happy+Driver') no-repeat center center/cover;
    position: relative;
    color: var(--white-color);
    text-align: center;
    padding: 40px 20px;
}

.affiliate-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.affiliate-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.affiliate-hero-content .subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.affiliate-hero-content h1 {
    font-size: 3.8rem;
    margin-bottom: 1rem;
    color: var(--white-color);
}

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

.cta-button {
    font-size: 1.5rem;
    padding: 20px 45px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.reviews-section {
    padding: 80px 0;
    background-color: var(--light-color);
    text-align: center;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.review-card {
    background: var(--white-color);
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.review-card p {
    font-style: italic;
}

.review-card .author {
    font-weight: bold;
    margin-top: 1rem;
    color: var(--dark-color);
}

/* --- Generic Page Styles --- */
.page-header {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 40px 0;
    text-align: center;
}

.page-header h1 {
    color: var(--white-color);
}

.page-content {
    padding: 60px 0;
}

.page-content p, .page-content ul {
    margin-bottom: 1.5rem;
}

.page-content ul {
    list-style-position: inside;
}

/* --- Contact Form --- */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

/* --- Footer --- */
.footer {
    background: var(--dark-color);
    color: #ccc;
    padding: 40px 0;
}

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

.footer-about, .footer-links, .footer-contact {
    flex: 1;
    min-width: 250px;
}

.footer h4 {
    color: var(--white-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
}

.footer p, .footer ul, .footer li {
    margin-bottom: 0.5rem;
}

.footer ul {
    list-style: none;
}

.footer ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

.disclaimer {
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 1rem;
    color: #aaa;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    .hero h1 { font-size: 2.5rem; }
    .affiliate-hero-content h1 { font-size: 2.8rem; }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--white-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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