/* BMW VIN Decoder - Main Stylesheet */

:root {
    /* Default colors - will be overridden by domain config */
    --primary: #21C486;
    --accent: #ED6300;
    --bg: #ffffff;
    --text: #333333;
    --muted: #666666;
    --border: #e0e0e0;
    --success: #4CAF50;
    --error: #f44336;
    --warning: #ff9800;
    --info: #2196F3;
    
    /* Layout */
    --container-width: 1200px;
    --spacing: 1rem;
    --radius: 4px;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Courier New", Courier, monospace;
}

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

/* Base */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: var(--spacing);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing);
}

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

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Layout Components */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

.grid {
    display: grid;
    gap: var(--spacing);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Header */
header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

nav ul {
    list-style: none;
    display: flex;
    gap: calc(var(--spacing) * 2);
}

nav a {
    color: var(--text);
    font-weight: 500;
}

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

nav a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 2px;
}

/* Main Content */
main {
    flex: 1;
    padding: calc(var(--spacing) * 2) 0;
}

/* Footer */
/* =====================================================
   MODERN FOOTER STYLES
   ===================================================== */
footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    position: relative;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--primary);
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

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

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

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section a::before {
    content: '→';
    font-size: 0.75rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary);
    text-decoration: none;
}

.footer-section a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Footer Social Icons */
.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.footer-social a::before {
    display: none;
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.footer-bottom p {
    margin-bottom: 0.25rem;
}

.footer-bottom a {
    color: var(--primary);
}

.footer-bottom a:hover {
    color: #fff;
}

/* Footer Newsletter (optional) */
.footer-newsletter {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 0.5rem;
}

.footer-newsletter h5 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

.footer-newsletter p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 1rem;
}

.footer-newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.footer-newsletter-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.9rem;
}

.footer-newsletter-form input::placeholder {
    color: rgba(255,255,255,0.4);
}

.footer-newsletter-form button {
    padding: 0.6rem 1.25rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.footer-newsletter-form button:hover {
    background: #1aaa70;
    transform: translateY(-2px);
}

/* Footer Brand */
.footer-brand {
    margin-bottom: 1rem;
}

.footer-brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand-name span {
    color: var(--primary);
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Components */

/* Card */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--spacing);
    margin-bottom: var(--spacing);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing);
    color: var(--primary);
}

.card-body {
    color: var(--text);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-secondary { background: var(--muted); }
.badge-success { background: var(--success); }
.badge-error { background: var(--error); }
.badge-warning { background: var(--warning); }
.badge-info { background: var(--info); }

/* Button */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

.btn:active {
    transform: translateY(0);
}

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

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* VIN Decoder Form */
.vin-decoder {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: calc(var(--spacing) * 3) 0;
    margin-bottom: calc(var(--spacing) * 2);
    border-radius: var(--radius);
}

.vin-decoder h1 {
    color: white;
    text-align: center;
    margin-bottom: calc(var(--spacing) * 2);
}

.vin-form {
    max-width: 600px;
    margin: 0 auto;
}

.vin-input-group {
    display: flex;
    gap: var(--spacing);
}

.vin-input {
    flex: 1;
    padding: 1rem;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-mono);
}

.vin-submit {
    padding: 1rem 2rem;
    font-size: 1.25rem;
}

/* Decode Results */
.decode-results {
    margin-top: calc(var(--spacing) * 2);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
}

.result-table th,
.result-table td {
    padding: var(--spacing);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

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

.result-table tr:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Alert */
.alert {
    padding: var(--spacing);
    border-radius: var(--radius);
    margin-bottom: var(--spacing);
    border: 1px solid;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    border-color: var(--info);
    color: var(--info);
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing);
}

.table th,
.table td {
    padding: var(--spacing);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--border);
    font-weight: 600;
}

.table-striped tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, rgba(0, 0, 0, 0.1) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 2rem;
    width: 50%;
    margin-bottom: 1rem;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: var(--spacing);
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--muted);
}

.breadcrumb-item:not(:last-child)::after {
    content: "›";
    margin: 0 0.5rem;
}

.breadcrumb-item.active {
    color: var(--text);
    font-weight: 500;
}

/* Table of Contents */
.toc {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--spacing);
    margin-bottom: calc(var(--spacing) * 2);
}

.toc-title {
    font-weight: 600;
    margin-bottom: var(--spacing);
}

.toc-list {
    list-style: none;
}

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-item.level-2 {
    padding-left: 1rem;
}

.toc-item.level-3 {
    padding-left: 2rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: calc(var(--spacing) * 2) 0;
}

.pagination-list {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

.pagination-list a,
.pagination-list span {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all 0.3s;
}

.pagination-list a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-ellipsis {
    border: none;
}

.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Simple Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text);
    margin: 5px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-content {
        justify-content: space-between;
        align-items: center;
    }
    
    #mainNav {
        display: none !important;
    }
    
    #mainNav.show {
        display: block !important;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 2px solid var(--border);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        z-index: 9999;
    }
    
    #mainNav ul {
        flex-direction: column;
        padding: 0;
    }
    
    #mainNav li {
        border-top: 1px solid var(--border);
    }
    
    #mainNav a {
        display: block;
        padding: 15px;
        color: var(--text);
        font-size: 1.1rem;
    }
    
    #mainNav a:hover {
        background: rgba(0,0,0,0.05);
        text-decoration: none;
    }
    
    #mainNav a.active {
        background: var(--primary);
        color: white;
    }
    
    .vin-input-group {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    

}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing); }
.mt-2 { margin-top: calc(var(--spacing) * 2); }
.mb-1 { margin-bottom: var(--spacing); }
.mb-2 { margin-bottom: calc(var(--spacing) * 2); }
.my-1 { margin-top: var(--spacing); margin-bottom: var(--spacing); }
.my-2 { margin-top: calc(var(--spacing) * 2); margin-bottom: calc(var(--spacing) * 2); }

.p-1 { padding: var(--spacing); }
.p-2 { padding: calc(var(--spacing) * 2); }

.hidden { display: none; }
.invisible { visibility: hidden; }

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-muted { color: var(--muted); }

.bg-primary { background-color: var(--primary); }
.bg-accent { background-color: var(--accent); }
.bg-success { background-color: var(--success); }
.bg-error { background-color: var(--error); }

/* Print Styles */
@media print {
    header, footer, nav, .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    a {
        text-decoration: none;
        color: inherit;
    }
}

/* Table of Contents */
.toc-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.toc {
    font-size: 0.95rem;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    padding: 0.25rem 0;
}

.toc-list li.toc-h2 {
    font-weight: 500;
}

.toc-list li.toc-h3 {
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.toc-list a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.toc-list a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Smooth scroll for TOC links */
html {
    scroll-behavior: smooth;
}

/* Target highlight for sections */
:target {
    scroll-margin-top: 80px;
}

:target::before {
    content: "";
    display: block;
    height: 80px;
    margin-top: -80px;
    visibility: hidden;
}

/* Internal link styling */
.content a[href^="/"] {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.content a[href^="/"]:hover {
    text-decoration-style: solid;
    color: var(--accent);
}

/* Schema markup indicator (for debugging) */
.schema-valid::after {
    content: "✓";
    color: #28a745;
    font-size: 0.8rem;
    margin-left: 0.25rem;
    vertical-align: super;
}

/* SEO score indicator */
.seo-score {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.seo-score.excellent {
    background: #d4edda;
    color: #155724;
}

.seo-score.good {
    background: #cce5ff;
    color: #004085;
}

.seo-score.needs-improvement {
    background: #fff3cd;
    color: #856404;
}

.seo-score.poor {
    background: #f8d7da;
    color: #721c24;
}

/* =====================================================
   HERO SECTION - Modern Animated Background
   ===================================================== */

.hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 3rem 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 50px 160px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 90px 40px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.2), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-200px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, #21C486);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* VIN Form Modern */
.vin-form-modern {
    max-width: 650px;
    margin: 0 auto;
}

.vin-input-wrapper {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.vin-input-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 0 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.vin-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.vin-input-modern {
    flex: 1;
    border: none;
    background: transparent;
    padding: 1rem 0;
    font-size: 1.1rem;
    font-family: monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #333;
    outline: none;
}

.vin-input-modern::placeholder {
    text-transform: none;
    letter-spacing: normal;
    color: #999;
}

.vin-counter {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background: #f0f0f0;
    border-radius: 6px;
}

.vin-counter span {
    color: var(--primary);
}

.btn-decode {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    background: linear-gradient(135deg, var(--primary), #1aaa70);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 196, 134, 0.4);
}

.btn-decode:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(33, 196, 134, 0.5);
}

.btn-decode .btn-icon {
    transition: transform 0.3s ease;
}

.btn-decode:hover .btn-icon {
    transform: translateX(4px);
}

.vin-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.vin-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    transition: width 0.2s ease;
}

.vin-hint {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

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

/* =====================================================
   FEATURES SECTION
   ===================================================== */

.main-content {
    padding-bottom: 100px;
}

.section-title {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.section-desc {
    text-align: center;
    color: var(--muted);
    margin-bottom: 2rem;
}

.features-section {
    padding: 3rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--muted);
}

/* =====================================================
   MODELS SECTION
   ===================================================== */

.models-section {
    padding: 3rem 0;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.model-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: white;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    animation: fadeInUp 0.5s ease forwards;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.model-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.model-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.model-card p {
    font-size: 0.8rem;
    color: var(--muted);
}

.model-arrow {
    margin-top: 0.75rem;
    color: var(--primary);
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.model-card:hover .model-arrow {
    transform: translateX(5px);
}

/* =====================================================
   SA CODES SECTION
   ===================================================== */

.sacodes-section {
    padding: 3rem 0;
    background: #f8f9fa;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 20px;
}

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

.sacode-card {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.sacode-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

.sacode-number {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.sacode-title {
    font-size: 0.85rem;
    color: var(--muted);
}

.btn-view-all {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background: #1aaa70;
    transform: translateY(-2px);
}

/* =====================================================
   TESTIMONIALS SECTION
   ===================================================== */

.testimonials-section {
    padding: 3rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.testimonial-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.testimonial-stars {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

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

.author-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.author-car {
    font-size: 0.8rem;
    color: var(--muted);
}

/* =====================================================
   INFO SECTION MODERN
   ===================================================== */

.info-section-modern {
    padding: 2rem 0;
}

.info-card-modern {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
}

.info-card-modern h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.info-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.info-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* =====================================================
   RECENT SEARCHES SECTION
   ===================================================== */

.recent-searches-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.recent-searches-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.recent-vins-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.recent-vin-item {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.recent-vin-item:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* =====================================================
   MOBILE BOTTOM NAVIGATION
   ===================================================== */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    z-index: 1000;
    justify-content: space-around;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--muted);
    padding: 0.5rem;
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
    color: var(--primary);
}

.mobile-bottom-nav .nav-icon {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.mobile-bottom-nav .nav-decode {
    position: relative;
    margin-top: -1.5rem;
}

.mobile-bottom-nav .nav-decode .nav-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), #1aaa70);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(33, 196, 134, 0.4);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    .main-content {
        padding-bottom: 80px;
    }
    
    .hero-section {
        min-height: 450px;
        padding: 2rem 0;
    }
    
    .vin-input-wrapper {
        flex-direction: column;
    }
    
    .btn-decode {
        width: 100%;
        justify-content: center;
    }
    
    .trust-badges {
        gap: 1rem;
    }
    
    .badge-item {
        font-size: 0.8rem;
    }
    
    .info-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    footer {
        padding-bottom: 80px;
    }
}

/* =====================================================
   VIN Decoder Loading Animation with Timer
   ===================================================== */

/* =====================================================
   MODERN LOADING ANIMATION
   ===================================================== */

.decode-loading-modern {
    padding: 2rem;
    margin: 2rem 0;
}

.loading-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.loading-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
}

.car-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    z-index: 2;
    animation: carBounce 1s ease-in-out infinite;
}

@keyframes carBounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    border: 3px solid rgba(33, 196, 134, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-out infinite;
}

.pulse-ring.delay-1 { animation-delay: 0.5s; }
.pulse-ring.delay-2 { animation-delay: 1s; }

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.loading-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #21C486);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-subtitle {
    opacity: 0.8;
    margin-bottom: 2rem;
}

.loading-progress-wrapper {
    max-width: 400px;
    margin: 0 auto 2rem;
}

.loading-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.loading-timer {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.timer-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.timer-text {
    opacity: 0.7;
}

.loading-steps-modern {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.load-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    font-size: 0.85rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.load-step.active {
    opacity: 1;
    background: rgba(33, 196, 134, 0.3);
}

.load-step.active .step-icon {
    color: #21C486;
}

/* =====================================================
   MODERN RESULT CARDS
   ===================================================== */

.decode-results-modern {
    margin: 2rem 0;
    animation: fadeInUp 0.5s ease;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 2rem;
    border-radius: 20px;
    color: white;
    margin-bottom: 1.5rem;
}

.result-icon {
    font-size: 3rem;
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 16px;
}

.result-main-title {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #fff, #21C486);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-vin {
    font-family: monospace;
    opacity: 0.8;
    font-size: 0.95rem;
}

.result-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    animation: fadeInUp 0.5s ease forwards;
}

.card-header {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.card-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.field-value {
    font-weight: 600;
    color: var(--text);
}

/* Result Actions */
.result-actions-modern {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

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

/* Share Panel */
.share-panel {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
}

.share-panel h4 {
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.share-facebook { background: #1877f2; color: white; }
.share-twitter { background: #1da1f2; color: white; }
.share-whatsapp { background: #25d366; color: white; }
.share-link { background: #6c757d; color: white; }

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .decode-loading {
        padding: 2rem 1rem;
    }
    
    .countdown-timer #countdownNumber {
        font-size: 1.5rem;
    }
    
    .loading-steps {
        max-width: 100%;
    }
    
    .result-actions {
        flex-direction: column;
    }
}

/* =====================================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   ===================================================== */

/* Large screens */
@media (max-width: 1200px) {
    .container {
        padding: 0 1rem;
    }
}

/* Tablets and small laptops */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-about {
        grid-column: span 2;
    }
}

/* Tablets */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .container {
        padding: 0 0.75rem;
    }
    
    /* Footer */
    footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-about {
        grid-column: span 1;
        text-align: center;
    }
    
    .footer-brand-name {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-section h4 {
        font-size: 1rem;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }
    
    .footer-section li {
        margin-bottom: 0;
    }
    
    .footer-section a::before {
        display: none;
    }
    
    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Results */
    .result-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Main content padding for bottom nav */
    main {
        padding-bottom: 80px;
    }
}

/* Large phones */
@media (max-width: 600px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    
    .container {
        padding: 0 0.5rem;
    }
    
    /* Hero sections */
    .hero-section,
    .page-hero {
        padding: 1.5rem 0.75rem;
        min-height: auto;
    }
    
    .hero-section h1 {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Stats */
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* VIN Input */
    .vin-form-modern,
    .vin-input-wrapper {
        padding: 0.5rem;
    }
    
    .vin-input-modern {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    
    .btn-decode {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Results */
    .result-cards-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .result-card {
        padding: 1rem;
    }
    
    .result-actions-modern {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .action-btn {
        flex: 1 1 45%;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Footer */
    footer {
        padding: 1.5rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .footer-brand-name {
        font-size: 1.25rem;
    }
    
    .footer-brand p {
        font-size: 0.8rem;
    }
    
    .footer-section h4 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .footer-section a {
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        font-size: 0.75rem;
        text-align: center;
        padding: 1rem 0.5rem 0;
    }
    
    .footer-bottom p {
        margin-bottom: 0.25rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .feature-icon {
        font-size: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 0.9rem;
    }
    
    .feature-card p {
        font-size: 0.8rem;
    }
    
    /* Models grid on home */
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 1.35rem; }
    h2 { font-size: 1.15rem; }
    h3 { font-size: 1rem; }
    
    .container {
        padding: 0 0.5rem;
    }
    
    /* Hero */
    .hero-section h1 {
        font-size: 1.25rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }
    
    .hero-stats {
        gap: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    /* VIN Input */
    .vin-input-container {
        flex-direction: column;
    }
    
    .vin-input-modern {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .btn-decode {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .feature-card {
        padding: 0.75rem;
    }
    
    .feature-icon {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-card h3 {
        font-size: 0.8rem;
    }
    
    .feature-card p {
        font-size: 0.7rem;
        display: none;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .footer-section {
        padding: 0;
    }
    
    .footer-section h4 {
        font-size: 0.85rem;
    }
    
    .footer-section li {
        font-size: 0.75rem;
    }
    
    .footer-bottom {
        font-size: 0.65rem;
    }
    
    /* Info sections */
    .info-section-modern,
    .page-content {
        padding: 1rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }
    
    .container {
        padding: 0 0.4rem;
    }
    
    .hero-section h1 {
        font-size: 1.15rem;
    }
    
    .hero-stats {
        gap: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.1rem;
    }
    
    .features-grid {
        gap: 0.4rem;
    }
    
    .feature-card {
        padding: 0.5rem;
    }
    
    .footer-content {
        gap: 0.5rem;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .model-card:hover,
    .model-card-new:hover,
    .sacode-card:hover,
    .code-card:hover {
        transform: none;
    }
    
    .model-card:active,
    .model-card-new:active,
    .sacode-card:active,
    .code-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}

/* Landscape mobile */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 1.5rem;
    }
    
    .hero-stats {
        margin-top: 1rem;
    }
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
    
    header {
        padding-top: max(var(--spacing), env(safe-area-inset-top));
    }
}
