/* =========================================================
   VetteFacts.com — Site Stylesheet
   Dark theme, Corvette red accent, CSS Grid layout
   ========================================================= */

:root {
    --color-bg:         #1a1a1a;
    --color-surface:    #242424;
    --color-sidebar-bg: #1c1c1c;
    --color-header-bg:  #0d0d0d;
    --color-accent:     #c8102e;   /* Corvette red */
    --color-accent-alt: #e8a000;   /* gold — hover / highlights */
    --color-text:       #e0e0e0;
    --color-text-muted: #888;
    --color-border:     #333;
    --sidebar-width:    220px;
    --header-height:    96px;
    --font-body:        'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    --font-title:       'Orbitron', 'Segoe UI', Arial, sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--color-accent-alt); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Header ────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--color-header-bg);
    border-bottom: 2px solid var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: var(--header-height);
    overflow: hidden;
    gap: 1rem;
}

.site-title {
    font-family: var(--font-title);
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--color-accent);
    text-transform: uppercase;
    line-height: 1;
    text-shadow: 0 0 18px rgba(200, 16, 46, 0.45);
    transition: color 0.15s;
}

.site-title-dot {
    color: #fff;
    font-weight: 700;
}

.site-logo:hover .site-title { color: #e8314a; text-decoration: none; }

.header-ad { flex-shrink: 0; }

/* Hamburger (mobile only) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-text);
    font-size: 1.5rem;
    line-height: 1;
}

/* ── Breadcrumb ────────────────────────────────────────── */
.breadcrumb-bar {
    background: #111;
    border-bottom: 1px solid var(--color-border);
    padding: 0.35rem 1rem;
    font-size: 0.8rem;
}

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.breadcrumb li + li::before {
    content: '›';
    margin-right: 0.25rem;
    color: var(--color-text-muted);
}

.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-accent-alt); text-decoration: none; }
.breadcrumb li:last-child { color: var(--color-text); }

/* ── Body Layout (CSS Grid) ────────────────────────────── */
.site-body {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    flex: 1;
}

/* ── Sidebar / Navigation ──────────────────────────────── */
.site-nav {
    background: var(--color-sidebar-bg);
    border-right: 1px solid var(--color-border);
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
    display: flex;
    flex-direction: column;
}

.gen-nav {
    list-style: none;
    flex: 1;
}

.gen-nav > li {
    border-bottom: 1px solid var(--color-border);
}

/* Home / CorvetteLinks direct links */
.gen-nav > li > a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--color-text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.gen-nav > li > a:hover,
.gen-nav > li > a.active {
    background: rgba(200, 16, 46, 0.12);
    color: var(--color-accent);
    text-decoration: none;
}

/* Generation toggle button */
.gen-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

.gen-toggle-link {
    flex: 1;
    display: block;
    padding: 0.6rem 1rem;
    color: var(--color-text);
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}

.gen-toggle:hover .gen-toggle-link,
.gen-item.open > .gen-toggle .gen-toggle-link {
    color: var(--color-accent);
    background: rgba(200, 16, 46, 0.1);
    text-decoration: none;
}

.gen-chevron {
    padding: 0.6rem 0.75rem;
    color: var(--color-text-muted);
    font-size: 0.7rem;
    transition: transform 0.2s;
    pointer-events: none;
    user-select: none;
}

.gen-item.open .gen-chevron { transform: rotate(90deg); }

/* Year list */
.year-list {
    list-style: none;
    background: #141414;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}

.gen-item.open .year-list {
    max-height: 600px;
}

.year-list li a {
    display: block;
    padding: 0.3rem 1rem 0.3rem 1.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    transition: color 0.15s;
}

.year-list li a:hover { color: var(--color-accent-alt); text-decoration: none; }
.year-list li a.active {
    color: var(--color-accent-alt);
    font-weight: 700;
}

/* Nav skyscraper ad */
.nav-ad {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

/* Ad placeholders — visible when AdSense hasn't loaded (e.g. localhost) */
ins.adsbygoogle:not([data-ad-status="filled"]) {
    background: repeating-linear-gradient(
        45deg,
        #1e1e1e,
        #1e1e1e 6px,
        #222 6px,
        #222 12px
    );
    outline: 1px dashed #444;
    display: inline-block !important;
}

/* ── Main Content ──────────────────────────────────────── */
.site-content {
    padding: 1.5rem 2rem;
    background: var(--color-surface);
    min-width: 0;
    max-width: 960px;
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
    background: var(--color-header-bg);
    border-top: 1px solid var(--color-border);
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.site-footer a { color: var(--color-text-muted); }
.site-footer a:hover { color: var(--color-accent-alt); }

/* ── Content Styles (preserved class names from original) ── */

.NormalBoldCenter {
    font-weight: 700;
    text-align: center;
    color: var(--color-accent-alt);
    margin: 0.75rem 0;
}

.NormalBold {
    font-weight: 700;
}

.NormalCenter {
    text-align: center;
    margin: 0.5rem 0;
}

.Normal {
    text-align: left;
}

.justifyRight {
    text-align: right;
}

.BorderImage {
    border: 2px solid var(--color-accent);
    width: 100%;
    max-width: 900px;
    display: block;
    margin: 1rem auto;
    border-radius: 3px;
}

/* ── Stats Tables ──────────────────────────────────────── */
.stats {
    width: 100%;
    max-width: 900px;
    margin: 1rem auto;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.stats th {
    background: var(--color-accent);
    color: #fff;
    padding: 0.45rem 0.6rem;
    text-align: left;
    border: 1px solid #8b0a1e;
    font-weight: 600;
    white-space: nowrap;
}

.stats td {
    padding: 0.35rem 0.6rem;
    border: 1px solid #2e2e2e;
    background: #2a2a2a;
    vertical-align: top;
}

.stats tr:nth-child(even) td {
    background: #222;
}

.stats tr:hover td {
    background: #2f2f2f;
}

/* Center-aligned th variant used in some pages */
.stats .NormalCenter {
    text-align: center;
    margin: 0;
}

/* ── Page Headings in Content ───────────────────────────── */
.site-content h1 {
    font-size: 1.5rem;
    color: var(--color-accent-alt);
    margin-bottom: 0.75rem;
}

.site-content h2 {
    font-size: 1.2rem;
    color: #ccc;
    margin: 1.25rem 0 0.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.3rem;
}

.site-content p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.site-content ul, .site-content ol {
    margin: 0.5rem 0 0.75rem 1.5rem;
}

.site-content li { margin-bottom: 0.25rem; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 800px) {
    .site-body {
        grid-template-columns: 1fr;
    }

    .site-nav {
        position: fixed;
        left: -100%;
        width: 260px;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        z-index: 150;
        transition: left 0.25s ease;
        box-shadow: 4px 0 16px rgba(0,0,0,0.5);
    }

    .site-nav.open { left: 0; }

    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 149;
    }

    .nav-overlay.visible { display: block; }

    .nav-toggle { display: block; }

    .header-ad { display: none; }

    .site-content { padding: 1rem; }
    .site-title { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .site-logo img { height: 40px; }
    .stats { font-size: 0.75rem; }
    .stats th, .stats td { padding: 0.25rem 0.4rem; }
}

/* VIN Decoder */
.vin-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0 1.5rem;
}

.vin-input {
    flex: 1;
    min-width: 220px;
    max-width: 360px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-family: monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.vin-input:focus {
    outline: 2px solid var(--color-accent);
    border-color: var(--color-accent);
}

.vin-btn {
    padding: 0.5rem 1.25rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: bold;
}

.vin-btn:hover {
    background: #a00d25;
}

.vin-error {
    color: var(--color-accent);
    font-weight: bold;
    margin: 0.5rem 0;
}

.vin-summary {
    margin: 0.75rem 0 1rem;
    font-weight: bold;
    color: var(--color-accent-alt);
    font-size: 1.05rem;
}

#vin-result {
    display: none;
}
