/* 
   AutoExpert - Main Stylesheet
   Author: AutoExpert Team
   Version: 1.0
*/

/* =================== Base Styles =================== */
:root {
    --primary-color: #2115cf;
    --primary-hover: #1b10b5;
    --secondary-color: #f8f9fa;
    --text-color: #333333;
    --text-light: #6c757d;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --bg-dark: #292b33;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --white: #ffffff;
    --black: #000000;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 4px;
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 62.5%; /* 10px */
}

body {
    font-family: 'Roboto', sans-serif;
    font-size: 1.6rem;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
}

h1 {
    font-size: 4.2rem;
}

h2 {
    font-size: 3.6rem;
}

h3 {
    font-size: 2.4rem;
}

h4 {
    font-size: 2rem;
}

p {
    margin-bottom: 1.6rem;
}

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

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

ul, ol {
    list-style-position: inside;
    margin-bottom: 1.6rem;
    padding-left: 2rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 8rem 0;
    position: relative;
}

.section:nth-child(even) {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2:after {
    content: "";
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 8rem;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    color: var(--text-light);
    font-size: 1.8rem;
    max-width: 60rem;
    margin: 0 auto;
}

/* =================== Buttons =================== */
.btn {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    border: 2px solid transparent;
}

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

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

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

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

.btn-text {
    background-color: transparent;
    color: var(--primary-color);
    padding: 1.2rem 0;
    border: none;
}

.btn-text:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* =================== Header / Navigation =================== */
.main-header {
    position: sticky;
    top: 0;
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 1.5rem 0;
    z-index: 1000;
}

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

.logo img {
    height: 6rem;
    width: auto;
}

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

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

.nav-list li {
    display: flex;
    align-items: center;
    margin-left: 2.5rem;
}
.nav-list li .btn {
    color: #fff !important;
}

.nav-list a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

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

.nav-list a:after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 3rem;
    height: 2.5rem;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    position: absolute;
    left: 0;
    transition: var(--transition);
}

.mobile-menu-toggle span:nth-child(1) {
    top: 0;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-toggle span:nth-child(3) {
    bottom: 0;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 45%;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 45%;
}

/* =================== Hero Banner =================== */
.hero-banner {
    background-color: var(--bg-dark);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 15rem 0;
    position: relative;
    color: var(--white);
}

.hero-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    max-width: 65rem;
}

.hero-content h1 {
    font-size: 4.8rem;
    margin-bottom: 2rem;
    color: var(--white);
}

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

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

/* =================== About Section =================== */
.about-content {
    display: flex;
    align-items: center;
    gap: 5rem;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    list-style: none;
    padding: 0;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.about-features img {
    width: 3rem;
    height: 3rem;
}

/* =================== Services Section =================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
    gap: 3rem;
}

.service-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    margin-bottom: 2rem;
}

.service-icon img {
    width: 8rem;
    height: 8rem;
    margin: 0 auto;
}

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

/* =================== Why Us Section =================== */
.why-us-content {
    display: flex;
    align-items: center;
    gap: 5rem;
}

.why-us-image {
    flex: 1;
    text-align: center;
}

.why-us-features {
    flex: 1;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.feature-icon {
    flex-shrink: 0;
    margin-right: 2rem;
}

.feature-icon img {
    width: 5rem;
    height: 5rem;
}

.feature-text h3 {
    margin-bottom: 1rem;
}

/* =================== Testimonials Section =================== */
.testimonials-slider {
    position: relative;
    max-width: 80rem;
    margin: 0 auto;
}

.testimonial-item {
    background-color: var(--white);
    padding: 4rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: none;
}

.testimonial-item.active {
    display: block;
}

.testimonial-content p {
    font-size: 1.8rem;
    font-style: italic;
    margin-bottom: 2rem;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
}

.testimonial-prev, .testimonial-next {
    width: 4rem;
    height: 4rem;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

.testimonial-prev:hover, .testimonial-next:hover {
    background-color: var(--primary-hover);
}

.testimonial-prev::before, .testimonial-next::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    border-top: 2px solid var(--white);
    border-right: 2px solid var(--white);
}

.testimonial-prev::before {
    transform: translate(-30%, -50%) rotate(-135deg);
}

.testimonial-next::before {
    transform: translate(-70%, -50%) rotate(45deg);
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 2rem;
}

.dot {
    width: 1.2rem;
    height: 1.2rem;
    background-color: var(--border-color);
    border-radius: 50%;
    margin: 0 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active, .dot:hover {
    background-color: var(--primary-color);
}

/* =================== Blog Section =================== */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.blog-post {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-post:hover {
    transform: translateY(-5px);
}

.blog-image {
    display: block;
    width: 100%;
    height: 20rem;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-post:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 2rem;
}

.blog-date {
    color: var(--text-light);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: block;
}

.blog-content h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.read-more {
    font-weight: 500;
    position: relative;
    display: inline-block;
}

.read-more::after {
    content: "→";
    margin-left: 0.5rem;
    transition: var(--transition);
}

.read-more:hover::after {
    margin-left: 1rem;
}

.blog-button {
    text-align: center;
}

/* =================== Contact Section =================== */
.contact-content {
    display: flex;
    gap: 5rem;
}

.contact-info, .newsletter-form {
    flex: 1;
}

.contact-details {
    list-style: none;
    padding: 0;
    margin-bottom: 3rem;
}

.contact-details li {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.contact-details strong {
    margin-bottom: 0.5rem;
    display: block;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background-color: var(--secondary-color);
    border-radius: 50%;
    color: var(--text-color);
    transition: var(--transition);
}

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

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1.6rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 21, 207, 0.2);
}

.form-group.checkbox {
    display: flex;
    align-items: flex-start;
}

.form-group.checkbox input {
    width: auto;
    margin-right: 1rem;
    margin-top: 0.4rem;
}

.form-group.checkbox label {
    font-weight: normal;
    font-size: 1.4rem;
}

/* =================== Footer =================== */
.main-footer {
    background-color: var(--bg-dark);
    color: var(--white);
    padding: 6rem 0 2rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: space-between;
    margin-bottom: 4rem;
}

.footer-column {
    flex: 1;
    min-width: 20rem;
}

.footer-logo {
    margin-bottom: 2rem;
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    position: relative;
}

.footer-column h4:after {
    content: "";
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 5rem;
    height: 2px;
    background-color: var(--primary-color);
}

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

.footer-column ul li {
    margin-bottom: 1.2rem;
}

.footer-column ul li a {
    color: #bbb;
    transition: var(--transition);
}

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

.footer-column address {
    font-style: normal;
    line-height: 1.8;
}

.footer-column address a {
    color: #bbb;
}

.footer-column address a:hover {
    color: var(--white);
}

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

/* =================== Page Banner =================== */
.page-banner {
    background-color: var(--bg-dark);
    padding: 8rem 0;
    text-align: center;
    color: var(--white);
}

.page-banner h1 {
    color: var(--white);
    margin-bottom: 1rem;
}

.page-banner p {
    font-size: 1.8rem;
    max-width: 60rem;
    margin: 0 auto;
}

/* =================== Blog Page =================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(35rem, 1fr));
    gap: 4rem;
}

.blog-post-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.blog-post-image {
    display: block;
    width: 100%;
    height: 25rem;
    overflow: hidden;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-post-card:hover .blog-post-image img {
    transform: scale(1.05);
}

.blog-post-content {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-post-date {
    color: var(--text-light);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: block;
}

.blog-post-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.blog-post-content p {
    margin-bottom: 2rem;
    flex-grow: 1;
}

/* =================== Newsletter in Blog =================== */
.newsletter-section {
    background-color: var(--bg-dark);
    color: var(--white);
}

.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
}

.newsletter-text {
    flex: 1;
}

.newsletter-text h2 {
    color: var(--white);
}

.newsletter-form-container {
    flex: 1;
}

.newsletter-compact-form .form-group {
    margin-bottom: 1.5rem;
}

.newsletter-compact-form .form-group:first-child {
    display: flex;
}

.newsletter-compact-form input[type="email"] {
    flex-grow: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.newsletter-compact-form .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* =================== Blog Article =================== */
.blog-article {
    padding: 8rem 0;
}

.article-header {
    margin-bottom: 4rem;
}

.article-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.article-date, .article-category {
    color: var(--text-light);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.article-category::before {
    content: "•";
    margin-right: 0.8rem;
}

.article-intro {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    font-weight: 500;
}

.article-featured-image {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.article-content h2, .article-content h3 {
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.article-content p, .article-content ul, .article-content ol {
    margin-bottom: 2rem;
}

.article-quote {
    background-color: var(--bg-light);
    padding: 3rem;
    border-left: 5px solid var(--primary-color);
    margin: 3rem 0;
}

.article-quote blockquote {
    font-size: 1.8rem;
    font-style: italic;
    margin: 0;
    color: var(--text-color);
}

.article-section {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.section-icon {
    flex-shrink: 0;
}

.section-content {
    flex-grow: 1;
}

.section-content h3 {
    margin-top: 0;
}

.article-comparison {
    display: flex;
    gap: 3rem;
    margin: 3rem 0;
}

.comparison-column {
    flex: 1;
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
}

.article-footer {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: var(--bg-light);
    border-radius: 3rem;
    font-size: 1.4rem;
    color: var(--text-light);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.article-share span {
    color: var(--text-light);
}

.article-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    background-color: var(--bg-light);
    border-radius: 50%;
    color: var(--text-color);
    transition: var(--transition);
}

.article-share a:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* =================== Related Articles =================== */
.related-articles {
    background-color: var(--bg-light);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
    gap: 3rem;
}

.article-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-image {
    display: block;
    width: 100%;
    height: 20rem;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-card-content h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.article-card-content p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* =================== Thank You Page =================== */
.thank-you-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thank-you-content {
    text-align: center;
    max-width: 70rem;
    margin: 0 auto;
}

.thank-you-icon {
    margin-bottom: 3rem;
}

.thank-you-icon svg {
    width: 8rem;
    height: 8rem;
    color: var(--primary-color);
    margin: 0 auto;
}

.thank-you-content h1 {
    margin-bottom: 2rem;
}

.thank-you-content p {
    margin-bottom: 3rem;
    font-size: 1.8rem;
}

.thank-you-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

/* =================== Legal Pages =================== */
.legal-section {
    padding: 8rem 0;
}

.legal-header {
    margin-bottom: 4rem;
    text-align: center;
}

.legal-header p {
    color: var(--text-light);
}

.legal-content {
    max-width: 80rem;
    margin: 0 auto;
}

.legal-content h2 {
    margin-top: 4rem;
    margin-bottom: 2rem;
    font-size: 2.4rem;
}

.legal-content h3 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.legal-content p, .legal-content ul, .legal-content ol {
    margin-bottom: 2rem;
}

.legal-content address {
    font-style: normal;
    margin-top: 2rem;
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
}

/* =================== Media Queries =================== */
@media (max-width: 1024px) {
    html {
        font-size: 58%;
    }

    .about-content, .why-us-content, .contact-content, .newsletter-content {
        flex-direction: column;
        gap: 3rem;
    }

    .about-image, .why-us-image {
        order: -1;
    }

    .article-comparison {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 56%;
    }

    .section {
        padding: 6rem 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-list {
        position: fixed;
        top: 8rem;
        left: 0;
        width: 100%;
        height: 0;
        background-color: var(--white);
        flex-direction: column;
        overflow: hidden;
        transition: var(--transition);
        z-index: 999;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        display: none;
    }

    .nav-list.active {
        display: flex;
        height: auto;
        padding: 2rem 1rem;
    }

    .nav-list li {
        margin: 1.5rem 0;
        text-align: center;
        display: inline-block;
        align-items: stretch;

    }

    .nav-list a {
        padding: 1rem 0;
        display: block;
    }

    .hero-banner {
        padding: 10rem 0;
    }

    .hero-content h1 {
        font-size: 3.6rem;
    }

    .services-grid, .blog-posts {
        grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
    }

    .service-card {
        padding: 2rem;
    }

    .footer-content {
        gap: 4rem;
    }

    .footer-column {
        min-width: 100%;
    }

    .blog-grid, .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-footer {
        flex-direction: column;
        gap: 2rem;
    }

    .article-tags {
        justify-content: center;
    }

    .thank-you-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 54%;
    }

    .section-header h2 {
        font-size: 3rem;
    }

    .hero-content h1 {
        font-size: 3.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .testimonial-item {
        padding: 2rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .article-category::before {
        display: none;
    }

    .article-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .section-content h3 {
        margin-top: 1.5rem;
    }
}
