/* --- Global Styles & Variables --- */
:root {
    --primary-color: #007BFF; /* Bright Blue */
    --secondary-color: #28a745; /* Vibrant Green */
    --accent-color: #ffc107; /* Bright Yellow */
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --text-color: #343a40;
    --font-family: 'Poppins', sans-serif;
    --header-height: 80px;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

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

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

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

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap; /* Prevents button text from wrapping */
}

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

.btn-primary:hover {
    background-color: #0069d9;
    color: #fff;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: #218838;
    color: #fff;
    transform: translateY(-2px);
}


/* --- Header & Navigation --- */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

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

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

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    align-items: center;
}

.main-nav a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

.main-nav .nav-cta {
    flex-shrink: 0; /* Prevents the button's container from shrinking */
}

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

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}


/* --- Main Content & Sections --- */
main {
    padding-bottom: 60px;
}

.hero {
    background: linear-gradient(rgba(0, 123, 255, 0.1), rgba(0, 123, 255, 0)), url('images/heroo.jpeg?text=Find+Your+Perfect+Car+Insurance') no-repeat center center/cover;
    color: var(--dark-color);
    text-align: center;
    padding: 120px 20px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

/* --- Page Hero Banner (About, Contact, etc.) --- */
.page-hero {
    padding: 80px 20px;
    text-align: center;
    background-size: cover;
    background-position: center center;
    color: #fff;
    margin-bottom: 40px; /* Adds space between banner and content */
}

.page-hero h1 {
    font-size: 3rem;
    color: #fff;
}

.page-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.about-hero {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/hero.jpeg?text=Our+Company');
}
.contact-hero {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/hero.jpeg?text=Contact+Us');
}
.privacy-hero {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/hero.jpeg?text=Privacy+Policy');
}
.terms-hero {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/hero.jpeg?text=Terms+of+Service');
}


.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
}


/* Services Grid (Home Page) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--light-color);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

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

.service-card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}


/* Affiliate Page */
.affiliate-hero {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2)), url('images/hero.jpeg?text=Hero+Image') no-repeat center center/cover;
    min-height: 70vh;
    display: flex;
    align-items: center;
    color: #fff;
    padding: 60px 0;
}

.affiliate-hero-content {
    max-width: 800px;
}

.affiliate-hero h1 {
    font-size: 3.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.affiliate-hero p {
    font-size: 1.3rem;
    margin: 1.5rem 0 2.5rem 0;
    color: #f8f9fa;
}

.cta-button-large {
    padding: 20px 45px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 5px;
    text-transform: uppercase;
    background-color: var(--accent-color);
    color: var(--dark-color);
}

.cta-button-large:hover {
    background-color: #ffca2c;
    color: var(--dark-color);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

/* User Reviews */
.reviews-section {
    background-color: var(--light-color);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    border-left: 5px solid var(--secondary-color);
}

.review-card p {
    font-style: italic;
    margin-bottom: 1rem;
}

.review-card .author {
    font-weight: 600;
    color: var(--dark-color);
}

.review-card .stars {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}


/* --- Contact Page --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-family: var(--font-family);
    font-size: 1rem;
}

.contact-info p {
    font-size: 1.1rem;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

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

.footer-col p, .footer-col a {
    color: #adb5bd;
    line-height: 1.8;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
}

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

.affiliate-disclaimer {
    font-style: italic;
    font-size: 0.85rem;
    color: #6c757d;
    max-width: 800px;
    margin: 10px auto 0 auto;
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        align-items: stretch;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .main-nav.active {
       max-height: 400px; /* Adjust as needed */
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        align-items: initial;
    }

    .main-nav li {
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }

    .main-nav a {
        display: block;
        padding: 20px;
    }
    
    .main-nav .btn {
      border-radius: 4px;
      margin: 15px;
      padding: 15px;
    }


    .main-nav a::after {
        display: none;
    }

    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero h1, .affiliate-hero h1, .page-hero h1 {
        font-size: 2.5rem;
    }

    .affiliate-hero {
        height: auto;
        text-align: center;
    }

    .affiliate-hero-content {
        padding: 0 20px;
    }
}}