/* ========================================
   Check Engine Light Explained - Brand Colors
   ======================================== */
:root {
    --primary-yellow: #FFC107;     /* Check engine icon, main accent */
    --primary-cyan: #00B0FF;       /* EXPLAINED text, secondary accent */
    --dark-navy: #1A2332;          /* Background, headers */
    --charcoal: #2C3544;           /* Secondary backgrounds */
    --white: #FFFFFF;              /* Text, cards */
    --light-gray: #F5F7FA;         /* Light backgrounds */
    --text-dark: #333333;          /* Body text */
    --text-light: #666666;         /* Secondary text */
    --border-color: #E0E0E0;
    --success-green: #28A745;
    --warning-orange: #FF9800;
    --error-red: #DC3545;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

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

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

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

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-navy);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.25rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.75rem;
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* ========================================
   Header & Navigation
   ======================================== */
.site-header {
    background: var(--dark-navy);
    color: var(--white);
    padding: 0.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 180px;
    width: auto;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 6px 16px rgba(255, 193, 7, 0.5));
}

.logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 8px 20px rgba(255, 193, 7, 0.7));
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--white);
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-yellow);
}

.header-cta .btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-yellow);
    color: var(--dark-navy);
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.header-cta .btn:hover {
    background: var(--primary-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 176, 255, 0.3);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--dark-navy) 0%, var(--charcoal) 100%);
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 193, 7, 0.03) 10px,
        rgba(255, 193, 7, 0.03) 20px
    );
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero h1 .highlight {
    color: var(--primary-yellow);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   AI Symptom Checker / Chat Interface
   ======================================== */
.search-container {
    background: var(--white);
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.ai-chat-header {
    background: linear-gradient(135deg, var(--primary-cyan), #0288D1);
    color: var(--white);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.ai-chat-header i {
    font-size: 1.5rem;
}

#chat-interface {
    padding: 2rem;
    max-height: 500px;
    overflow-y: auto;
}

.chat-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-yellow), var(--warning-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-cyan), #0288D1);
}

.message-content {
    flex: 1;
    background: var(--light-gray);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary-cyan), #29B6F6);
    color: var(--white);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 4px;
}

.message-content p {
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
}

.user-message .message-content p {
    color: var(--white);
}

.symptom-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.symptom-btn {
    background: var(--white);
    border: 2px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.symptom-btn i {
    font-size: 1.5rem;
    color: var(--primary-yellow);
}

.symptom-btn:hover {
    border-color: var(--primary-cyan);
    background: rgba(0, 176, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chat-input-container {
    padding: 1.5rem;
    border-top: 2px solid var(--border-color);
    background: var(--light-gray);
}

#symptom-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

#symptom-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
}

.diagnosis-result {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-yellow);
    margin-top: 1rem;
}

.diagnosis-result h4 {
    color: var(--dark-navy);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.diagnosis-result ul {
    margin: 0.5rem 0 1rem 1.5rem;
    color: var(--text-dark);
}

.diagnosis-result li {
    margin-bottom: 0.5rem;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary-cyan), #0288D1);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
}

.cta-box h4 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-navy);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group select,
.form-group input {
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary-cyan);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-yellow);
    color: var(--dark-navy);
}

.btn-primary:hover {
    background: #FFD54F;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.3);
}

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

.btn-secondary:hover {
    background: #29B6F6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 176, 255, 0.3);
}

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

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

/* ========================================
   Sections & Containers
   ======================================== */
.section {
    padding: 5rem 2rem;
}

.section-dark {
    background: var(--light-gray);
}

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

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

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark-navy);
    margin-bottom: 1rem;
}

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

/* ========================================
   Card Grid Layouts
   ======================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-yellow);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-yellow), var(--warning-orange));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--white);
    margin: 0 auto 1.5rem auto;
}

.card h3 {
    color: var(--dark-navy);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.card .btn {
    width: 100%;
}

/* ========================================
   Make/Code Cards
   ======================================== */
.make-card, .code-card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid var(--border-color);
}

.make-card:hover, .code-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-cyan);
}

.make-card h3, .code-card h3 {
    color: var(--dark-navy);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.code-badge {
    display: inline-block;
    background: var(--primary-yellow);
    color: var(--dark-navy);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* ========================================
   CTA Sections
   ======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-cyan), #0288D1);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 12px;
    margin: 4rem auto;
    max-width: 900px;
}

.cta-section h2 {
    color: var(--white);
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   App Download Section
   ======================================== */
.app-download {
    background: linear-gradient(135deg, var(--dark-navy), var(--charcoal));
    color: var(--white);
    padding: 5rem 2rem;
    text-align: center;
}

.app-download h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.app-download .highlight {
    color: var(--primary-yellow);
}

.app-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.app-feature {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.app-feature i {
    font-size: 2.5rem;
    color: var(--primary-yellow);
    margin-bottom: 1rem;
}

.app-feature h3 {
    color: var(--white);
    margin-bottom: 0.75rem;
}

.app-feature p {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background: var(--dark-navy);
    color: var(--white);
    padding: 3rem 2rem 1.5rem;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-yellow);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-yellow);
}

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

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-navy);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .main-nav.active {
        display: block;
    }

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

    .main-nav li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav a {
        display: block;
        padding: 1rem 2rem;
    }

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

    .header-cta .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.25rem;
    }

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

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 4rem 1.5rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    article {
        padding: 0 1rem;
    }

    .content-wrapper {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .search-container {
        padding: 1.5rem;
    }

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

    .btn {
        width: 100%;
    }
}

/* ========================================
   Accordion FAQ Styles
   ======================================== */
.faq-accordion {
    max-width: 900px;
    margin: 3rem auto;
}

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

.faq-section-header h2 {
    color: var(--dark-navy);
    margin-bottom: 0.5rem;
}

.faq-section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.accordion-item {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    box-shadow: 0 4px 12px rgba(0, 176, 255, 0.15);
    border-color: var(--primary-cyan);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: linear-gradient(135deg, var(--light-gray), var(--white));
    transition: all 0.3s ease;
    user-select: none;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #e8ecf1, var(--light-gray));
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--dark-navy);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.accordion-header i.fa-question-circle {
    color: var(--primary-cyan);
    font-size: 1.3rem;
}

.accordion-icon {
    font-size: 1.3rem;
    color: var(--primary-yellow);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-item.active .accordion-header {
    background: linear-gradient(135deg, var(--primary-cyan), #0288D1);
}

.accordion-item.active .accordion-header h3,
.accordion-item.active .accordion-header i.fa-question-circle {
    color: var(--white);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.5rem;
    background: var(--white);
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
    padding: 1.5rem;
    border-top: 2px solid rgba(0, 176, 255, 0.2);
}

.accordion-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.accordion-content p:last-child {
    margin-bottom: 0;
}

.accordion-content ul {
    margin: 1rem 0 1rem 1.5rem;
}

.accordion-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.accordion-content strong {
    color: var(--dark-navy);
}

/* Mobile accordion adjustments */
@media (max-width: 768px) {
    .accordion-header h3 {
        font-size: 1rem;
    }

    .accordion-header {
        padding: 1rem 1.25rem;
    }

    .accordion-item.active .accordion-content {
        padding: 1.25rem;
    }

    .accordion-header i.fa-question-circle {
        font-size: 1.1rem;
    }

    .accordion-icon {
        font-size: 1.1rem;
    }
}

/* Link visibility in blue/cyan gradient sections */
.app-download a,
.cta-box a,
[style*="gradient"][style*="cyan"] a,
[style*="primary-cyan"] a {
    color: var(--primary-yellow) !important;
    text-decoration: underline;
    font-weight: 600;
}

.app-download a:hover,
.cta-box a:hover,
[style*="gradient"][style*="cyan"] a:hover,
[style*="primary-cyan"] a:hover {
    color: var(--white) !important;
    text-decoration: underline;
}

/* Exception for buttons */
.app-download .btn,
.cta-box .btn,
[style*="gradient"][style*="cyan"] .btn {
    text-decoration: none !important;
}

/* Responsive table styles */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table thead {
    background: linear-gradient(135deg, var(--dark-navy), var(--charcoal));
    color: var(--white);
}

.comparison-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tbody tr:hover {
    background: var(--light-gray);
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* Mobile responsive tables */
@media (max-width: 768px) {
    .comparison-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 2rem -1rem;
        width: calc(100% + 2rem);
        border-radius: 0;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
        font-size: 0.9rem;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
        font-size: 0.85rem;
        min-width: 100px;
    }
}

/* Prevent horizontal overflow on mobile */
@media (max-width: 768px) {
    * {
        max-width: 100%;
    }

    img, video, iframe {
        height: auto;
    }

    .card, .cta-box, .highlight-box {
        margin-left: 0;
        margin-right: 0;
    }
}
