/* FixOBDCode.com Custom Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
    --primary-color: #0073e6;
    --secondary-color: #2a5298;
    --accent-color: #ff6b35;
    --text-dark: #333;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --section-bg: #fafafa;
    --section-border: #e0e0e0;
    --h2-bg: #f0f8ff;
}

body {
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    font-size: 16px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Search Form */
.search-form .form-control {
    border-radius: 50px 0 0 50px;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

.search-form .btn {
    border-radius: 0 50px 50px 0;
    padding: 1rem 2rem;
    font-weight: 600;
}

/* Advanced Search */
.advanced-search-container {
    max-width: 1200px;
    margin: 0 auto;
}

.advanced-search-container .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.advanced-search-container .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 115, 230, 0.25);
}

.advanced-search-container .btn {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.advanced-search-container .card {
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.advanced-search-container .form-label {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.search-examples a {
    color: rgba(255,255,255,0.8);
    margin: 0 0.5rem;
}

.search-examples a:hover {
    color: white;
    text-decoration: underline !important;
}

/* Cards */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
    box-shadow: var(--shadow);
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Vehicle Category Cards */
.category-card {
    transition: all 0.3s ease-in-out;
    border: 1px solid #e9ecef;
}

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

.category-card .category-icon {
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-card .card-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.category-card .card-text {
    font-size: 0.85rem;
}

.category-card .badge {
    font-size: 0.7rem;
    font-weight: 500;
}

/* Brand Logo Styling */
.brand-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.3s ease;
}

.category-card:hover .brand-logo {
    filter: brightness(1.2) contrast(1.2) saturate(1.1);
}

/* Trademark Disclaimer */
.trademark-disclaimer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.trademark-disclaimer .disclaimer-text {
    margin-bottom: 0;
}

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

.trademark-disclaimer a:hover {
    text-decoration: underline;
}

/* Ad Placeholders */
.ad-placeholder {
    background: var(--bg-light);
    border: 2px dashed #dee2e6;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Removed diagnostic images */

/* Content Sections */
.content-section {
    padding: 3rem 0;
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 0.5rem 0;
}

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

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* FAQ Section */
.accordion-button {
    font-weight: 600;
    color: var(--text-dark);
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

/* Stats Section */
.stat-item {
    padding: 2rem;
}

.stat-item h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand i {
    color: var(--accent-color);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1a3565, #245089);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

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

/* Footer */
footer {
    margin-top: auto;
}

footer h5, footer h6 {
    color: white;
    margin-bottom: 1rem;
}

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

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color) !important;
}

/* Vehicle Info Badges */
.vehicle-info .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        min-height: 40vh;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .search-form .input-group {
        flex-direction: column;
    }
    
    .search-form .input-group-lg .form-control,
    .search-form .input-group-lg .btn {
        width: 100%;
        border-radius: 8px !important;
        margin-bottom: 0.75rem;
    }
    
    .search-form .form-control,
    .search-form .btn {
        border-radius: 8px;
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .ad-placeholder {
        padding: 1rem;
        min-height: 80px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Full width input on mobile */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .navbar,
    .ad-placeholder,
    footer,
    .btn {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: var(--text-dark) !important;
        padding: 1rem 0;
    }
    
    .container {
        max-width: 100% !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--text-dark);
    }
    
    .ad-placeholder {
        border-color: var(--text-dark);
    }
}

/* Article Content Styles */
.content-container {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.article-content h2 {
    font-size: 22px;
    font-weight: 600;
    background-color: var(--h2-bg);
    padding: 8px 12px;
    border-left: 4px solid var(--primary-color);
    margin-top: 30px;
    margin-bottom: 20px;
}

.article-content p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.section-box {
    background-color: var(--section-bg);
    border: 1px solid var(--section-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.section-divider {
    margin: 30px 0;
    border: none;
    border-top: 1px solid #eee;
}

/* Custom Bullet Lists */
.article-content ul {
    list-style: none;
    padding-left: 0;
}

.article-content ul li {
    margin-bottom: 8px;
}

.article-content ul li::before {
    content: "✔";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 10px;
}

/* Enhanced Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 20px;
}

.article-content th, 
.article-content td {
    border: 1px solid #ccc;
    padding: 12px;
    text-align: left;
}

.article-content tr:nth-child(even) {
    background-color: #f9f9f9;
}

.article-content th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.article-content tr:hover {
    background-color: #f5f5f5;
}

/* FAQ Accordion Styles */
.faq-container {
    margin-top: 40px;
}

.faq-item {
    border-bottom: 1px solid #ddd;
    padding: 12px 0;
}

.faq-question {
    font-weight: 600;
    cursor: pointer;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #e9ecef;
}

.faq-question::after {
    content: "+";
    float: right;
    font-weight: bold;
    color: var(--primary-color);
}

.faq-item.active .faq-question::after {
    content: "−";
}

.faq-answer {
    display: none;
    margin-top: 8px;
    color: #444;
    padding: 12px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .content-container {
        padding: 16px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-content h2 {
        font-size: 20px;
        padding: 6px 10px;
    }
    
    .section-box {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .article-content table {
        font-size: 14px;
    }
    
    .article-content th, 
    .article-content td {
        padding: 8px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hover-card:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
