/* ============================================
   BESTSIMRIGS GLOBAL STYLESHEET
   Include this in ALL pages for consistency
   ============================================ */

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

/* === CSS VARIABLES === */
:root {
    /* Brand Colors */
    --c-primary: #dc2626;
    --c-primary-dark: #b91c1c;
    --c-accent: #f59e0b;
    
    /* Backgrounds */
    --c-bg-body: #0a0a0b;
    --c-bg-surface: #141416;
    --c-bg-subtle: #1c1c1f;
    --c-bg-elevated: #1c1c1f;
    
    /* Text */
    --c-text-main: #f5f5f5;
    --c-text-muted: #a1a1aa;
    
    /* Borders */
    --c-border: #27272a;
    
    /* Status Colors */
    --c-success-text: #10b981;
    --c-success-bg: rgba(16, 185, 129, 0.1);
    --c-info-text: #60a5fa;
    --c-info-bg: rgba(59, 130, 246, 0.1);
    --c-warn-text: #fbbf24;
    --c-warn-bg: rgba(245, 158, 11, 0.1);
    
    /* Tech/Specs */
    --c-tech-bg: #1e293b;
    --c-tech-text: #e2e8f0;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 999px;
    
    /* Layout */
    --container-width: 1200px;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
body { 
    font-family: var(--font-sans); 
    line-height: 1.6; 
    color: var(--c-text-main); 
    background: var(--c-bg-body); 
    margin: 0; 
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
a { color: var(--c-primary); text-decoration: none; transition: color 0.2s; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; }
img { max-width: 100%; height: auto; }

/* === LAYOUT === */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 var(--space-md); }

/* === UTILITIES === */
.d-flex { display: flex; }
.d-grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--c-text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--c-primary); color: white; }
.btn--primary:hover { background: var(--c-primary-dark); }
.btn--outline { background: transparent; border-color: var(--c-border); color: var(--c-text-main); }
.btn--outline:hover { border-color: var(--c-text-muted); }
.btn--sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn--full { width: 100%; }

/* === BADGES === */
.badge {
    display: inline-flex;
    padding: 0.25em 0.75em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--c-bg-subtle);
    color: var(--c-text-muted);
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
}
.badge--active, .badge--verified { background: var(--c-success-bg); color: var(--c-success-text); }
.badge--brand { background: rgba(37, 99, 235, 0.1); color: #60a5fa; }
.badge--gold { background: #fef9c3; color: #854d0e; }
.badge--tech { background: var(--c-tech-bg); color: var(--c-tech-text); }

/* === CONFIDENCE PILLS === */
.conf-pill {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    margin-left: var(--space-sm);
    border: 1px solid transparent;
    display: inline-block;
    vertical-align: middle;
}
.conf-pill--verified { background: rgba(16, 185, 129, 0.15); color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.conf-pill--estimated { background: var(--c-bg-elevated); color: #6b7280; border-color: var(--c-border); }

/* === CARDS === */
.card {
    background: var(--c-bg-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* === HERO BANNER (Standard for all driver pages) === */
.hero-banner {
    background: linear-gradient(135deg, var(--c-primary) 0%, #111827 100%);
    color: white;
    padding: var(--space-xl) var(--space-md);
    text-align: center;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.05) 75%, transparent 75%, transparent);
    background-size: 40px 40px;
    opacity: 0.5;
}
.hero-content { position: relative; z-index: 1; }
.hero-avatar {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border: 3px solid white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: var(--space-md);
}
.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}
.hero-subtitle {
    opacity: 0.9;
    margin: 0.5rem 0;
    font-size: 1.1rem;
    max-width: 600px;
    margin-inline: auto;
    line-height: 1.5;
}
.hero-badges {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin: 1rem 0;
    flex-wrap: wrap;
}
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
}

/* === SOCIAL LINKS === */
.social-links { display: flex; gap: var(--space-md); justify-content: center; margin-top: var(--space-md); flex-wrap: wrap; }
.social-link {
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: white;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
}
.social-link:hover { background: rgba(255,255,255,0.2); text-decoration: none; }

/* === TABLES === */
.rig-table-container {
    overflow-x: auto;
    background: var(--c-bg-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
}
.rig-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rig-table th {
    text-align: left;
    padding: 0.75rem var(--space-md);
    border-bottom: 2px solid var(--c-border);
    color: var(--c-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    background: var(--c-bg-subtle);
}
.rig-table td { padding: 0.75rem var(--space-md); border-bottom: 1px solid var(--c-border); }
.rig-link { font-size: 0.75rem; color: var(--c-primary); display: block; margin-top: 2px; }

/* === SECTION HEADINGS === */
.section-heading {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.category-header {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--c-text-main);
    margin: var(--space-xl) 0 var(--space-md);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--c-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === DETAILS/ACCORDIONS === */
details {
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    background: var(--c-bg-surface);
}
summary {
    padding: var(--space-md);
    background: var(--c-bg-subtle);
    cursor: pointer;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
summary:hover { background: var(--c-bg-elevated); }
summary::-webkit-details-marker { display: none; }

/* Highlighted details variant (e.g., "Secret Weapon" callouts) */
details.details--highlight {
    border-color: #2563eb;
    background-color: #eff6ff;
}
details.details--highlight summary {
    background-color: #dbeafe;
    color: #1e40af;
}

.details-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg);
}
@media (max-width: 600px) { .details-grid { grid-template-columns: 1fr; } }

/* === CONTEXT BOXES === */
.context-box {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid transparent;
    margin-bottom: var(--space-lg);
}
.context-box--info { background: var(--c-info-bg); color: var(--c-info-text); border-color: #60a5fa; }
.context-box--warning { background: var(--c-warn-bg); color: var(--c-warn-text); border-color: #fcd34d; }
.context-box--success { background: var(--c-success-bg); color: var(--c-success-text); border-color: #10b981; }

/* === VERIFICATION ROW === */
.verification-row {
    background: var(--c-success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--c-success-text);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.verification-row a { text-decoration: underline; color: inherit; font-weight: 700; }

/* === TECH BOX === */
.tech-box {
    background: var(--c-bg-elevated);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-md);
    font-size: 0.85rem;
}
.tech-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed var(--c-border);
    padding: 0.25rem 0;
    color: var(--c-text-muted);
}
.tech-row:last-child { border-bottom: none; }
.tech-row span:last-child { color: var(--c-text-main); }

/* === COST SECTION === */
.cost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.cost-card {
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    background: var(--c-bg-surface);
}
.cost-card--featured {
    border: 2px solid var(--c-primary);
    background: linear-gradient(to bottom, var(--c-bg-surface), rgba(220, 38, 38, 0.05));
}
.price-list { margin: var(--space-lg) 0; }
.price-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dotted var(--c-border);
    font-size: 0.9rem;
}
.price-item:last-child { border-bottom: none; }
.price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--c-bg-elevated);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

/* === FAQ === */
.faq-accordion { display: flex; flex-direction: column; gap: var(--space-sm); }
.faq-item {
    background: var(--c-bg-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.faq-item[open] { border-color: var(--c-primary); }
.faq-question {
    padding: var(--space-lg);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
}
.faq-question:hover { background: var(--c-bg-subtle); }
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '+'; font-size: 1.5rem; color: var(--c-primary); font-weight: 300; }
.faq-item[open] .faq-question::after { content: '−'; }
.faq-answer { padding: 0 var(--space-lg) var(--space-lg); color: var(--c-text-muted); line-height: 1.7; }

/* === PAGE METADATA (Below nav, before content) === */
.page-meta {
    margin-bottom: var(--space-lg);
}
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--c-bg-subtle);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-full);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: var(--c-text-muted);
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}
.verified-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--c-success-text);
    border-radius: 50%;
}
.correction-strip {
    background: var(--c-bg-subtle);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.correction-strip span {
    color: var(--c-text-muted);
}
.correction-strip a {
    color: var(--c-primary);
    font-weight: 600;
    text-decoration: none;
}
.correction-strip a:hover {
    text-decoration: underline;
}
.prices-note {
    font-size: 0.75rem;
    color: var(--c-text-muted);
    text-align: center;
    margin-bottom: var(--space-md);
    opacity: 0.6;
}
.sources-box {
    background: var(--c-info-bg);
    border-left: 4px solid #60a5fa;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    font-size: 0.85rem;
    color: var(--c-info-text);
}
.sources-box a {
    color: inherit;
    text-decoration: underline;
}
.sources-box a:hover {
    opacity: 0.8;
}

/* === QUICK NAV === */
.quick-nav-sticky {
    position: sticky;
    top: 60px;
    background: var(--c-bg-surface);
    border-bottom: 1px solid var(--c-border);
    padding: 0.5rem 0;
    z-index: 90;
    margin: 0 calc(-1 * var(--space-md));
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}
.quick-nav-sticky .nav-inner {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.quick-nav-sticky .nav-inner::-webkit-scrollbar { display: none; }
.quick-nav-sticky a {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--c-text-muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.quick-nav-sticky a:hover { color: var(--c-text-main); text-decoration: none; }
.quick-nav-sticky a.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }

/* === BACK TO TOP === */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--c-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.back-to-top.visible { opacity: 1; visibility: visible; }

/* === MOBILE CTA BAR === */
@media (max-width: 768px) {
    .mobile-cta-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--c-primary);
        color: #fff;
        padding: 0.6rem 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.85rem;
        z-index: 1000;
        border-top: 1px solid var(--c-border);
    }
}
@media (min-width: 769px) { .mobile-cta-bar { display: none; } }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero-banner { padding: var(--space-lg) var(--space-md); }
    .hero-avatar { width: 80px; height: 80px; font-size: 2.5rem; }
    h1 { font-size: 1.75rem; }
    .section-heading { font-size: 1.1rem; }
    .cost-grid { grid-template-columns: 1fr; }
}
