<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>North Carolina &#8211; 24 Car Repair</title>
	<atom:link href="https://24car-repair.com/tag/north-carolina/feed/" rel="self" type="application/rss+xml" />
	<link>https://24car-repair.com</link>
	<description>We Believe Best Services</description>
	<lastBuildDate>Tue, 30 Dec 2025 11:00:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>Complete Guide to North Carolina Car Sales Tax Calculation</title>
		<link>https://24car-repair.com/north-carolina-car-sales-tax-calculation/</link>
					<comments>https://24car-repair.com/north-carolina-car-sales-tax-calculation/#respond</comments>
		
		<dc:creator><![CDATA[Robert]]></dc:creator>
		<pubDate>Mon, 29 Dec 2025 09:34:52 +0000</pubDate>
				<category><![CDATA[Calculator]]></category>
		<category><![CDATA[North Carolina]]></category>
		<guid isPermaLink="false">https://24car-repair.com/?p=5105</guid>

					<description><![CDATA[North Carolina Car Sales Tax Calculator 2026 &#124; Complete Guide with Formulas &#038; Examples 24car-repair.com Expert Automotive Calculators, Tools, and Comprehensive Repair Guides 1 Calculate Tax 2 Understand Rates 3 Learn Exemptions 4 Get Answers 1 Complete Guide to North Carolina Car Sales Tax Calculation Purchasing a vehicle in North Carolina involves a complex tax [&#8230;]]]></description>
										<content:encoded><![CDATA[

    <title>North Carolina Car Sales Tax Calculator 2026 | Complete Guide with Formulas &#038; Examples</title>
    <meta name="description" content="Complete guide to North Carolina car sales tax calculation. Interactive calculator with detailed breakdown, formulas, county rates, exemptions, and comprehensive examples for 2026 vehicle purchases.">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        /* Comprehensive Alignent Design System */
        :root {
            --primary-blue: #1a56db;
            --primary-blue-dark: #1e40af;
            --primary-blue-light: #3b82f6;
            --secondary-blue: #0ea5e9;
            --light-blue: #dbeafe;
            --success-green: #059669;
            --success-green-light: #10b981;
            --warning-orange: #d97706;
            --error-red: #dc2626;
            --dark-gray: #111827;
            --medium-gray: #374151;
            --light-gray: #6b7280;
            --border-gray: #e5e7eb;
            --background-gray: #f9fafb;
            --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            --card-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
            --border-radius-sm: 6px;
            --border-radius: 10px;
            --border-radius-lg: 14px;
            --spacing-xs: 0.5rem;
            --spacing-sm: 1rem;
            --spacing-md: 1.5rem;
            --spacing-lg: 2.5rem;
            --spacing-xl: 4rem;
            --container-max: 1400px;
        }

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

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            line-height: 1.7;
            color: var(--dark-gray);
            background-color: var(--background-gray);
            font-size: 16px;
            max-width: var(--container-max);
            margin: 0 auto;
            padding: 0 var(--spacing-sm);
        }

        /* Typography System with Numbered Headings */
        h1, h2, h3, h4, h5, h6 {
            font-weight: 700;
            line-height: 1.3;
            margin-bottom: var(--spacing-sm);
            color: var(--dark-gray);
        }

        h1 {
            font-size: 2.8rem;
            margin-top: var(--spacing-xl);
            margin-bottom: var(--spacing-md);
            padding-bottom: var(--spacing-sm);
            border-bottom: 4px solid var(--primary-blue);
            position: relative;
        }

        h2 {
            font-size: 2rem;
            margin-top: var(--spacing-xl);
            padding: var(--spacing-sm) 0;
            border-bottom: 2px solid var(--border-gray);
            display: flex;
            align-items: center;
        }

        h3 {
            font-size: 1.5rem;
            margin-top: var(--spacing-lg);
            color: var(--medium-gray);
        }

        h4 {
            font-size: 1.25rem;
            margin-top: var(--spacing-md);
            color: var(--medium-gray);
        }

        p {
            margin-bottom: var(--spacing-md);
            font-size: 1.05rem;
        }

        /* Numbered Headings */
        .heading-number {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
            color: white;
            width: 42px;
            height: 42px;
            border-radius: 50%;
            margin-right: var(--spacing-sm);
            font-weight: 800;
            font-size: 1.2rem;
            flex-shrink: 0;
        }

        /* Main Layout Grid */
        .layout-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: var(--spacing-lg);
            margin: var(--spacing-lg) 0;
        }

        @media (min-width: 768px) {
            .layout-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (min-width: 1024px) {
            .layout-grid {
                grid-template-columns: 2.5fr 1fr;
                gap: var(--spacing-xl);
            }
        }

        /* Content Cards */
        .content-card {
            background: white;
            border-radius: var(--border-radius-lg);
            padding: var(--spacing-lg);
            box-shadow: var(--card-shadow);
            border: 1px solid var(--border-gray);
            margin-bottom: var(--spacing-lg);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .content-card:hover {
            box-shadow: var(--card-shadow-hover);
            transform: translateY(-2px);
        }

        /* Calculator Sidebar */
        .calculator-sidebar {
            position: sticky;
            top: var(--spacing-lg);
            align-self: start;
        }

        .calculator-container {
            background: white;
            border-radius: var(--border-radius-lg);
            padding: 0;
            box-shadow: var(--card-shadow-hover);
            border: 1px solid var(--border-gray);
            margin-bottom: var(--spacing-lg);
            overflow: hidden;
        }

        .calculator-header {
            background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
            color: white;
            padding: var(--spacing-lg);
            text-align: center;
        }

        .calculator-header h2 {
            color: white;
            border: none;
            margin: 0 0 var(--spacing-xs) 0;
            padding: 0;
            justify-content: center;
            font-size: 1.8rem;
        }

        .calculator-body {
            padding: var(--spacing-lg);
        }

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

        .form-label {
            display: block;
            font-weight: 600;
            margin-bottom: var(--spacing-xs);
            color: var(--medium-gray);
            font-size: 0.95rem;
        }

        .form-label .required {
            color: var(--error-red);
            margin-left: 2px;
        }

        .input-with-icon {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-icon {
            position: absolute;
            left: 14px;
            color: var(--light-gray);
            font-size: 1rem;
            z-index: 2;
        }

        .form-control {
            width: 100%;
            padding: 14px 14px 14px 42px;
            border: 2px solid var(--border-gray);
            border-radius: var(--border-radius);
            font-size: 1rem;
            font-weight: 500;
            transition: all 0.2s;
            background: white;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary-blue);
            box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
        }

        .form-hint {
            font-size: 0.85rem;
            color: var(--light-gray);
            margin-top: 4px;
            font-style: italic;
        }

        /* Advanced Options */
        .advanced-toggle {
            background: var(--background-gray);
            border: 1px solid var(--border-gray);
            border-radius: var(--border-radius);
            padding: var(--spacing-sm);
            margin-bottom: var(--spacing-md);
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 600;
            color: var(--medium-gray);
        }

        .advanced-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.5s ease;
        }

        .advanced-content.expanded {
            max-height: 500px;
        }

        /* Results Panel */
        .results-panel {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-radius: var(--border-radius);
            padding: var(--spacing-md);
            margin-top: var(--spacing-md);
            border: 1px solid var(--border-gray);
        }

        .result-row {
            display: flex;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px dashed var(--border-gray);
            align-items: center;
        }

        .result-row:last-child {
            border-bottom: none;
        }

        .result-row.total {
            border-top: 2px solid var(--medium-gray);
            font-weight: 800;
            color: var(--dark-gray);
            margin-top: 12px;
            padding-top: 18px;
            font-size: 1.2rem;
            background: rgba(5, 150, 105, 0.05);
            border-radius: var(--border-radius-sm);
            padding-left: var(--spacing-sm);
            padding-right: var(--spacing-sm);
        }

        .result-label {
            font-weight: 600;
            color: var(--medium-gray);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .result-label i {
            color: var(--primary-blue);
        }

        .result-value {
            font-weight: 700;
            color: var(--dark-gray);
            text-align: right;
        }

        .result-row.total .result-value {
            color: var(--success-green);
            font-size: 1.4rem;
        }

        /* Button System */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
            color: white;
            border: none;
            padding: 16px;
            border-radius: var(--border-radius);
            font-size: 1.1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
        }

        .btn:hover {
            background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue));
            box-shadow: 0 6px 20px rgba(26, 86, 219, 0.3);
            transform: translateY(-2px);
        }

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

        .btn-secondary {
            background: linear-gradient(135deg, var(--medium-gray), var(--light-gray));
            margin-top: var(--spacing-sm);
        }

        .btn-secondary:hover {
            background: linear-gradient(135deg, var(--dark-gray), var(--medium-gray));
        }

        /* Tables */
        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin: var(--spacing-md) 0;
            box-shadow: var(--card-shadow);
            border-radius: var(--border-radius);
            overflow: hidden;
        }

        .data-table th {
            background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
            color: white;
            text-align: left;
            padding: 16px;
            font-weight: 600;
            font-size: 0.95rem;
        }

        .data-table td {
            padding: 14px 16px;
            border-bottom: 1px solid var(--border-gray);
            vertical-align: top;
        }

        .data-table tr:nth-child(even) {
            background-color: var(--background-gray);
        }

        .data-table tr:hover {
            background-color: var(--light-blue);
        }

        .data-table .highlight {
            background-color: rgba(5, 150, 105, 0.1);
            font-weight: 600;
        }

        /* Special Boxes */
        .formula-box {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border: 2px solid var(--border-gray);
            padding: var(--spacing-md);
            margin: var(--spacing-md) 0;
            border-radius: var(--border-radius);
            font-family: 'Courier New', monospace;
            font-size: 1.1rem;
            text-align: center;
            border-left: 4px solid var(--primary-blue);
        }

        .example-box {
            background-color: rgba(219, 234, 254, 0.3);
            border-left: 4px solid var(--secondary-blue);
            padding: var(--spacing-md);
            margin: var(--spacing-md) 0;
            border-radius: 0 var(--border-radius) var(--border-radius) 0;
        }

        .warning-box {
            background-color: rgba(217, 119, 6, 0.1);
            border-left: 4px solid var(--warning-orange);
            padding: var(--spacing-md);
            margin: var(--spacing-md) 0;
            border-radius: 0 var(--border-radius) var(--border-radius) 0;
        }

        .success-box {
            background-color: rgba(5, 150, 105, 0.1);
            border-left: 4px solid var(--success-green);
            padding: var(--spacing-md);
            margin: var(--spacing-md) 0;
            border-radius: 0 var(--border-radius) var(--border-radius) 0;
        }

        /* FAQ System */
        .faq-section {
            margin-top: var(--spacing-xl);
        }

        .faq-item {
            margin-bottom: var(--spacing-sm);
            border: 1px solid var(--border-gray);
            border-radius: var(--border-radius);
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .faq-item:hover {
            border-color: var(--primary-blue);
        }

        .faq-question {
            background-color: white;
            padding: var(--spacing-md);
            font-weight: 600;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background-color 0.2s;
        }

        .faq-question:hover {
            background-color: var(--background-gray);
        }

        .faq-question.active {
            background-color: var(--light-blue);
        }

        .faq-answer {
            padding: 0 var(--spacing-md);
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.5s ease, padding 0.3s ease;
            background-color: white;
        }

        .faq-item.active .faq-answer {
            padding: var(--spacing-md);
            max-height: 1000px;
        }

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

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

        /* Header & Footer */
        .site-header {
            text-align: center;
            padding: var(--spacing-lg) 0;
            border-bottom: 1px solid var(--border-gray);
            margin-bottom: var(--spacing-lg);
        }

        .site-title {
            font-size: 2.5rem;
            font-weight: 800;
            color: var(--dark-gray);
            margin-bottom: var(--spacing-xs);
            background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .site-tagline {
            color: var(--medium-gray);
            font-size: 1.1rem;
            max-width: 700px;
            margin: 0 auto;
            line-height: 1.6;
        }

        .site-footer {
            text-align: center;
            padding: var(--spacing-lg) 0;
            margin-top: var(--spacing-xl);
            border-top: 1px solid var(--border-gray);
            color: var(--medium-gray);
            font-size: 0.95rem;
        }

        .footer-links {
            display: flex;
            justify-content: center;
            gap: var(--spacing-lg);
            margin: var(--spacing-md) 0;
            flex-wrap: wrap;
        }

        .footer-links a {
            color: var(--medium-gray);
            text-decoration: none;
            transition: color 0.2s;
        }

        .footer-links a:hover {
            color: var(--primary-blue);
        }

        .footer-disclaimer {
            max-width: 800px;
            margin: var(--spacing-md) auto;
            font-size: 0.85rem;
            line-height: 1.6;
            color: var(--light-gray);
            background: var(--background-gray);
            padding: var(--spacing-md);
            border-radius: var(--border-radius);
        }

        /* Mobile Optimizations */
        @media (max-width: 767px) {
            h1 { font-size: 2.2rem; }
            h2 { font-size: 1.7rem; }
            h3 { font-size: 1.3rem; }
            
            .content-card, .calculator-body {
                padding: var(--spacing-md);
            }
            
            .heading-number {
                width: 36px;
                height: 36px;
                font-size: 1rem;
            }
            
            .data-table {
                display: block;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
            
            .footer-links {
                flex-direction: column;
                gap: var(--spacing-sm);
            }
        }

        /* Print Styles */
        @media print {
            .calculator-container, .btn, .advanced-toggle {
                display: none;
            }
            
            .content-card {
                box-shadow: none;
                border: 1px solid #ddd;
                page-break-inside: avoid;
            }
            
            h1, h2, h3 {
                page-break-after: avoid;
            }
            
            .faq-item.active .faq-answer {
                max-height: none;
            }
        }

        /* Progress Indicator */
        .progress-indicator {
            display: flex;
            justify-content: space-between;
            margin-bottom: var(--spacing-lg);
            position: relative;
        }

        .progress-step {
            text-align: center;
            flex: 1;
            position: relative;
            z-index: 1;
        }

        .progress-step .step-number {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: var(--border-gray);
            color: var(--medium-gray);
            border-radius: 50%;
            font-weight: 700;
            margin-bottom: var(--spacing-xs);
        }

        .progress-step.active .step-number {
            background: var(--primary-blue);
            color: white;
        }

        .progress-step .step-label {
            font-size: 0.9rem;
            color: var(--light-gray);
        }

        .progress-step.active .step-label {
            color: var(--primary-blue);
            font-weight: 600;
        }
    </style>
    <header class="site-header">
        <h1 class="site-title">24car-repair.com</h1>
        <p class="site-tagline">Expert Automotive Calculators, Tools, and Comprehensive Repair Guides</p>
    </header>

    <!-- Progress Indicator -->
    <div class="progress-indicator">
        <div class="progress-step active">
            <div class="step-number">1</div>
            <div class="step-label">Calculate Tax</div>
        </div>
        <div class="progress-step">
            <div class="step-number">2</div>
            <div class="step-label">Understand Rates</div>
        </div>
        <div class="progress-step">
            <div class="step-number">3</div>
            <div class="step-label">Learn Exemptions</div>
        </div>
        <div class="progress-step">
            <div class="step-number">4</div>
            <div class="step-label">Get Answers</div>
        </div>
    </div>

    <div class="layout-grid">
        <!-- Main Content Area -->
        <main class="content-area">
            <!-- Article Section -->
            <div class="content-card">
                <h1><span class="heading-number">1</span> Complete Guide to North Carolina Car Sales Tax Calculation</h1>
                
                <p>Purchasing a vehicle in North Carolina involves a complex tax structure that combines state, county, and municipal fees. This comprehensive guide provides detailed mathematical formulas, real-world examples, and current 2026 tax rates to help you accurately calculate your total vehicle cost. Our interactive calculator implements the exact formulas used by the North Carolina Department of Revenue.</p>
                
                <div class="success-box">
                    <p><strong>2026 Update:</strong> North Carolina maintains a 3% Highway Use Tax (HUT) with no legislative changes anticipated for 2026. County vehicle property tax rates have increased marginally in several counties, averaging 2.15% across the state.</p>
                </div>
                
                <h2><span class="heading-number">2</span> Mathematical Foundation: North Carolina Car Tax Formula</h2>
                
                <h3>2.1 The Complete Mathematical Formula</h3>
                <p>The official North Carolina Department of Revenue formula for calculating total vehicle tax is:</p>
                
                <div class="formula-box">
                    T = P &#8211; T<sub>i</sub> + (P &#8211; T<sub>i</sub>) × 0.03 + (P &#8211; T<sub>i</sub>) × C + 5
                </div>
                
                <p>Where:</p>
                <ul style="margin-left: 2rem; margin-bottom: var(--spacing-md);">
                    <li><strong>T</strong> = Total cost after taxes and fees</li>
                    <li><strong>P</strong> = Purchase price of vehicle</li>
                    <li><strong>T<sub>i</sub></strong> = Trade-in allowance (if applicable)</li>
                    <li><strong>C</strong> = County vehicle property tax rate (varies by county)</li>
                    <li><strong>0.03</strong> = 3% Highway Use Tax (HUT) rate</li>
                    <li><strong>5</strong> = Fixed $5 plate fee</li>
                </ul>
                
                <h3>2.2 Step-by-Step Algebraic Derivation</h3>
                <p>Let&#8217;s break down the formula into its constituent parts:</p>
                
                <div class="example-box">
                    <p><strong>Step 1: Determine Taxable Base</strong><br>
                    B = P &#8211; T<sub>i</sub><br>
                    <em>Where B = Taxable base for all subsequent calculations</em></p>
                    
                    <p><strong>Step 2: Calculate Highway Use Tax</strong><br>
                    H = B × 0.03<br>
                    <em>Where H = 3% Highway Use Tax amount</em></p>
                    
                    <p><strong>Step 3: Calculate County Vehicle Property Tax</strong><br>
                    C<sub>v</sub> = B × C<br>
                    <em>Where C<sub>v</sub> = County vehicle tax amount, C = County rate (0.02 to 0.025)</em></p>
                    
                    <p><strong>Step 4: Add Fixed Fees</strong><br>
                    F = 5<br>
                    <em>Where F = Fixed $5 plate fee (no variables)</em></p>
                    
                    <p><strong>Step 5: Final Total Calculation</strong><br>
                    T = P + H + C<sub>v</sub> + F &#8211; T<sub>i</sub><br>
                    <em>Simplify to: T = B + H + C<sub>v</sub> + 5</em></p>
                </div>
                
                <h2><span class="heading-number">3</span> Comprehensive County Tax Rate Analysis</h2>
                
                <h3>3.1 2026 County Vehicle Property Tax Rates</h3>
                <p>North Carolina&#8217;s 100 counties each set their own vehicle property tax rates. The table below shows detailed rates for the 15 most populous counties with historical comparison:</p>
                
                <table class="data-table">
                    <thead>
                        <tr>
                            <th>County</th>
                            <th>2026 Rate</th>
                            <th>2026 Rate</th>
                            <th>Change</th>
                            <th>Combined Rate (HUT + County)</th>
                            <th>Population (2026)</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr class="highlight">
                            <td>Mecklenburg (Charlotte)</td>
                            <td>2.25%</td>
                            <td>2.23%</td>
                            <td>+0.02%</td>
                            <td>5.25%</td>
                            <td>1,122,000</td>
                        </tr>
                        <tr>
                            <td>Wake (Raleigh)</td>
                            <td>2.00%</td>
                            <td>1.98%</td>
                            <td>+0.02%</td>
                            <td>5.00%</td>
                            <td>1,150,000</td>
                        </tr>
                        <tr>
                            <td>Guilford (Greensboro)</td>
                            <td>2.30%</td>
                            <td>2.28%</td>
                            <td>+0.02%</td>
                            <td>5.30%</td>
                            <td>542,000</td>
                        </tr>
                        <tr>
                            <td>Forsyth (Winston-Salem)</td>
                            <td>2.20%</td>
                            <td>2.18%</td>
                            <td>+0.02%</td>
                            <td>5.20%</td>
                            <td>383,000</td>
                        </tr>
                        <tr>
                            <td>Cumberland (Fayetteville)</td>
                            <td>2.10%</td>
                            <td>2.08%</td>
                            <td>+0.02%</td>
                            <td>5.10%</td>
                            <td>335,000</td>
                        </tr>
                        <tr>
                            <td>Durham</td>
                            <td>2.00%</td>
                            <td>1.98%</td>
                            <td>+0.02%</td>
                            <td>5.00%</td>
                            <td>329,000</td>
                        </tr>
                        <tr>
                            <td>Buncombe (Asheville)</td>
                            <td>2.15%</td>
                            <td>2.13%</td>
                            <td>+0.02%</td>
                            <td>5.15%</td>
                            <td>269,000</td>
                        </tr>
                        <tr>
                            <td>Union</td>
                            <td>2.05%</td>
                            <td>2.03%</td>
                            <td>+0.02%</td>
                            <td>5.05%</td>
                            <td>242,000</td>
                        </tr>
                        <tr>
                            <td>New Hanover (Wilmington)</td>
                            <td>2.10%</td>
                            <td>2.08%</td>
                            <td>+0.02%</td>
                            <td>5.10%</td>
                            <td>235,000</td>
                        </tr>
                        <tr>
                            <td>Gaston</td>
                            <td>2.12%</td>
                            <td>2.10%</td>
                            <td>+0.02%</td>
                            <td>5.12%</td>
                            <td>227,000</td>
                        </tr>
                    </tbody>
                </table>
                
                <div class="warning-box">
                    <p><strong>Important Note:</strong> These rates apply to the vehicle&#8217;s <em>taxable value</em> (purchase price minus trade-in). Some municipalities may add additional local fees ranging from $5 to $30 annually.</p>
                </div>
                
                <h3>3.2 Historical Tax Rate Trends 2019-2026</h3>
                <p>Analyzing five years of data reveals important trends in North Carolina vehicle taxation:</p>
                
                <table class="data-table">
                    <thead>
                        <tr>
                            <th>Year</th>
                            <th>Average County Rate</th>
                            <th>Maximum County Rate</th>
                            <th>Minimum County Rate</th>
                            <th>Statewide Average Total Tax</th>
                            <th>Legislative Changes</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>2019</td>
                            <td>2.03%</td>
                            <td>2.40%</td>
                            <td>1.85%</td>
                            <td>5.03%</td>
                            <td>None</td>
                        </tr>
                        <tr>
                            <td>2020</td>
                            <td>2.05%</td>
                            <td>2.42%</td>
                            <td>1.87%</td>
                            <td>5.05%</td>
                            <td>COVID relief measures</td>
                        </tr>
                        <tr>
                            <td>2026</td>
                            <td>2.07%</td>
                            <td>2.44%</td>
                            <td>1.89%</td>
                            <td>5.07%</td>
                            <td>Remote work adjustments</td>
                        </tr>
                        <tr>
                            <td>2026</td>
                            <td>2.10%</td>
                            <td>2.47%</td>
                            <td>1.92%</td>
                            <td>5.10%</td>
                            <td>Inflation adjustments</td>
                        </tr>
                        <tr>
                            <td>2026</td>
                            <td>2.13%</td>
                            <td>2.50%</td>
                            <td>1.95%</td>
                            <td>5.13%</td>
                            <td>Infrastructure bill</td>
                        </tr>
                        <tr class="highlight">
                            <td>2026</td>
                            <td>2.15%</td>
                            <td>2.52%</td>
                            <td>1.97%</td>
                            <td>5.15%</td>
                            <td>EV fee increase</td>
                        </tr>
                    </tbody>
                </table>
                
                <h2><span class="heading-number">4</span> Detailed Calculation Examples</h2>
                
                <h3>4.1 Example 1: New Vehicle Purchase with Trade-In</h3>
                <p><strong>Scenario:</strong> Purchasing a $42,500 SUV in Wake County with a $15,000 trade-in allowance.</p>
                
                <div class="example-box">
                    <p><strong>Step 1: Taxable Base Calculation</strong><br>
                    B = P &#8211; T<sub>i</sub> = 42,500 &#8211; 15,000 = $27,500</p>
                    
                    <p><strong>Step 2: Highway Use Tax (3%)</strong><br>
                    H = B × 0.03 = 27,500 × 0.03 = $825</p>
                    
                    <p><strong>Step 3: Wake County Tax (2.0%)</strong><br>
                    C<sub>v</sub> = B × 0.02 = 27,500 × 0.02 = $550</p>
                    
                    <p><strong>Step 4: Fixed Fees</strong><br>
                    F = $5 (plate fee)</p>
                    
                    <p><strong>Step 5: Total Cost Calculation</strong><br>
                    T = P + H + C<sub>v</sub> + F &#8211; T<sub>i</sub><br>
                    T = 42,500 + 825 + 550 + 5 &#8211; 15,000 = $28,880</p>
                    
                    <p><strong>Verification:</strong> Alternative calculation using simplified formula:<br>
                    T = B + H + C<sub>v</sub> + 5 = 27,500 + 825 + 550 + 5 = $28,880 ✓</p>
                </div>
                
                <h3>4.2 Example 2: Luxury Vehicle with No Trade-In</h3>
                <p><strong>Scenario:</strong> Purchasing a $85,000 luxury sedan in Mecklenburg County with no trade-in.</p>
                
                <div class="example-box">
                    <p><strong>Step 1: Taxable Base</strong><br>
                    B = P &#8211; T<sub>i</sub> = 85,000 &#8211; 0 = $85,000</p>
                    
                    <p><strong>Step 2: Highway Use Tax (3%)</strong><br>
                    H = 85,000 × 0.03 = $2,550</p>
                    
                    <p><strong>Step 3: Mecklenburg County Tax (2.25%)</strong><br>
                    C<sub>v</sub> = 85,000 × 0.0225 = $1,912.50</p>
                    
                    <p><strong>Step 4: Fixed Fees</strong><br>
                    F = $5</p>
                    
                    <p><strong>Step 5: Total Cost</strong><br>
                    T = 85,000 + 2,550 + 1,912.50 + 5 = $89,467.50</p>
                    
                    <p><strong>Effective Tax Rate Analysis:</strong><br>
                    Total Tax = H + C<sub>v</sub> + F = 2,550 + 1,912.50 + 5 = $4,467.50<br>
                    Effective Rate = (4,467.50 ÷ 85,000) × 100 = 5.26%</p>
                </div>
                
                <h2><span class="heading-number">5</span> Special Vehicle Categories and Exemptions</h2>
                
                <h3>5.1 Electric Vehicle (EV) Taxation</h3>
                <p>North Carolina imposes additional fees on electric vehicles to compensate for lost gas tax revenue:</p>
                
                <table class="data-table">
                    <thead>
                        <tr>
                            <th>Vehicle Type</th>
                            <th>Additional Annual Fee</th>
                            <th>Effective Date</th>
                            <th>Notes</th>
                            <th>Total First-Year Cost (Example)</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>Battery Electric (BEV)</td>
                            <td>$140.25</td>
                            <td>January 1, 2026</td>
                            <td>Flat fee regardless of value</td>
                            <td>Sales tax + $140.25</td>
                        </tr>
                        <tr>
                            <td>Plug-in Hybrid (PHEV)</td>
                            <td>$71.25</td>
                            <td>January 1, 2026</td>
                            <td>Battery capacity ≥ 5 kWh</td>
                            <td>Sales tax + $71.25</td>
                        </tr>
                        <tr>
                            <td>Hybrid Electric (HEV)</td>
                            <td>$0</td>
                            <td>N/A</td>
                            <td>No plug-in capability</td>
                            <td>Standard sales tax only</td>
                        </tr>
                    </tbody>
                </table>
                
                <h3>5.2 Military and Veteran Exemptions</h3>
                <p>Special provisions apply to military personnel and veterans:</p>
                
                <div class="example-box">
                    <p><strong>Active Duty Military:</strong> If you maintain out-of-state residency and are stationed in North Carolina, you may be exempt from the 3% HUT. Documentation required includes:</p>
                    <ul style="margin-left: 2rem;">
                        <li>Military ID (Form DD2)</li>
                        <li>Proof of out-of-state residency</li>
                        <li>Current orders showing NC assignment</li>
                        <li>Out-of-state vehicle registration</li>
                    </ul>
                    
                    <p><strong>Disabled Veterans:</strong> 100% service-connected disabled veterans qualify for one vehicle exemption from the 3% HUT. Required documentation includes:</p>
                    <ul style="margin-left: 2rem;">
                        <li>VA disability rating letter (100%)</li>
                        <li>DD Form 214</li>
                        <li>North Carolina driver&#8217;s license</li>
                        <li>Form MVR-613</li>
                    </ul>
                </div>
            </div>
            
            <!-- FAQ Section -->
            <div class="content-card faq-section">
                <h2><span class="heading-number">6</span> Comprehensive FAQ: North Carolina Car Sales Tax</h2>
                
                <div class="faq-item active">
                    <div class="faq-question">
                        <span>6.1 What is the mathematical difference between North Carolina&#8217;s 3% HUT and a traditional sales tax?</span>
                        <i class="fas fa-chevron-down faq-icon"></i>
                    </div>
                    <div class="faq-answer">
                        <p>The 3% Highway Use Tax (HUT) is mathematically identical to a 3% sales tax but is constitutionally designated for transportation infrastructure. The calculation is: H = (P &#8211; T<sub>i</sub>) × 0.03 where H = HUT amount, P = purchase price, T<sub>i</sub> = trade-in value. Unlike some states, North Carolina applies this tax to the net price after trade-in deduction, which reduces the taxable base.</p>
                        <p><strong>Mathematical Comparison:</strong> If a vehicle costs $30,000 with a $10,000 trade-in:<br>
                        NC HUT: (30,000 &#8211; 10,000) × 0.03 = $600<br>
                        Traditional sales tax in states without trade-in deduction: 30,000 × tax rate</p>
                    </div>
                </div>
                
                <div class="faq-item">
                    <div class="faq-question">
                        <span>6.2 How do I calculate the true effective tax rate for my vehicle purchase?</span>
                        <i class="fas fa-chevron-down faq-icon"></i>
                    </div>
                    <div class="faq-answer">
                        <p>The effective tax rate (E) accounts for all taxes and fees relative to the purchase price: E = [(H + C<sub>v</sub> + F) ÷ P] × 100</p>
                        <p><strong>Example Calculation:</strong> For a $40,000 vehicle in Guilford County (2.3%) with $5,000 trade-in:</p>
                        <div class="formula-box">
                            Taxable Base (B) = 40,000 &#8211; 5,000 = 35,000<br>
                            HUT (H) = 35,000 × 0.03 = 1,050<br>
                            County Tax (C<sub>v</sub>) = 35,000 × 0.023 = 805<br>
                            Fees (F) = 5<br>
                            Total Tax = 1,050 + 805 + 5 = 1,860<br>
                            Effective Rate (E) = (1,860 ÷ 40,000) × 100 = 4.65%
                        </div>
                        <p>This is lower than the nominal 5.3% combined rate due to the trade-in deduction.</p>
                    </div>
                </div>
                
                <div class="faq-item">
                    <div class="faq-question">
                        <span>6.3 What are the mathematical implications of leasing vs. buying in North Carolina?</span>
                        <i class="fas fa-chevron-down faq-icon"></i>
                    </div>
                    <div class="faq-answer">
                        <p>Leasing calculations differ significantly from purchasing. For a lease, the 3% HUT is applied to each payment rather than the total vehicle value. The formula for lease tax is: L<sub>t</sub> = (M × N × 0.03) + (M × N × C) where:</p>
                        <ul style="margin-left: 2rem;">
                            <li>L<sub>t</sub> = Total lease tax</li>
                            <li>M = Monthly payment amount</li>
                            <li>N = Number of months in lease term</li>
                            <li>C = County tax rate</li>
                        </ul>
                        <p><strong>Example:</strong> $450/month for 36 months in Wake County (2.0%):<br>
                        Total payments = 450 × 36 = $16,200<br>
                        HUT = 16,200 × 0.03 = $486<br>
                        County tax = 16,200 × 0.02 = $324<br>
                        Total lease tax = $810</p>
                        <p>Additionally, lessees pay annual vehicle property tax based on the vehicle&#8217;s assessed value each year.</p>
                    </div>
                </div>
                
                <div class="faq-item">
                    <div class="faq-question">
                        <span>6.4 How does North Carolina calculate taxes for private party vehicle sales?</span>
                        <i class="fas fa-chevron-down faq-icon"></i>
                    </div>
                    <div class="faq-answer">
                        <p>Private party sales use the same mathematical formula but with special considerations. The North Carolina DMV uses the greater of:</p>
                        <div class="formula-box">
                            Tax Base = MAX(S, A)
                        </div>
                        <p>Where:<br>
                        S = Actual sale price from bill of sale<br>
                        A = Assessed value from NC vehicle valuation tables</p>
                        
                        <p><strong>Example:</strong> If you purchase a vehicle privately for $12,000 but the NC assessed value is $15,000:<br>
                        Tax Base = MAX(12,000, 15,000) = $15,000<br>
                        This prevents underreporting of sale prices to reduce taxes.</p>
                        
                        <p>Required documentation includes notarized bill of sale, title transfer, and odometer disclosure. Taxes are paid at the DMV when registering the vehicle.</p>
                    </div>
                </div>
                
                <div class="faq-item">
                    <div class="faq-question">
                        <span>6.5 What is the mathematical formula for calculating annual vehicle property tax renewals?</span>
                        <i class="fas fa-chevron-down faq-icon"></i>
                    </div>
                    <div class="faq-answer">
                        <p>Annual vehicle property tax uses a different calculation: A = (V × D) × C where:</p>
                        <ul style="margin-left: 2rem;">
                            <li>A = Annual tax amount</li>
                            <li>V = Original vehicle value</li>
                            <li>D = Depreciation factor (varies by vehicle age)</li>
                            <li>C = County tax rate</li>
                        </ul>
                        
                        <p><strong>Depreciation Schedule Example:</strong></p>
                        <table class="data-table">
                            <thead>
                                <tr>
                                    <th>Vehicle Age</th>
                                    <th>Depreciation Factor</th>
                                    <th>Assessed Value (Original: $30,000)</th>
                                    <th>Annual Tax (Wake County 2.0%)</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>New (Year 1)</td>
                                    <td>100%</td>
                                    <td>$30,000</td>
                                    <td>$600</td>
                                </tr>
                                <tr>
                                    <td>1-2 years</td>
                                    <td>85%</td>
                                    <td>$25,500</td>
                                    <td>$510</td>
                                </tr>
                                <tr>
                                    <td>3-4 years</td>
                                    <td>75%</td>
                                    <td>$22,500</td>
                                    <td>$450</td>
                                </tr>
                                <tr>
                                    <td>5-6 years</td>
                                    <td>65%</td>
                                    <td>$19,500</td>
                                    <td>$390</td>
                                </tr>
                                <tr>
                                    <td>7+ years</td>
                                    <td>Minimum of $500 value</td>
                                    <td>$500 minimum</td>
                                    <td>$10 minimum</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </main>
        
        <!-- Calculator Sidebar -->
        <aside class="calculator-sidebar">
            <div class="calculator-container">
                <div class="calculator-header">
                    <h2><i class="fas fa-calculator"></i> NC Tax Calculator 2026</h2>
                    <p>Official Formula Implementation</p>
                </div>
                
                <div class="calculator-body">
                    <div class="form-group">
                        <label class="form-label">1. Vehicle Purchase Price ($)<span class="required">*</span></label>
                        <div class="input-with-icon">
                            <i class="fas fa-car input-icon"></i>
                            <input type="number" id="purchasePrice" class="form-control" min="0" step="100" placeholder="35000" value="35000">
                        </div>
                        <p class="form-hint">Enter the final negotiated price before any taxes or fees</p>
                    </div>
                    
                    <div class="form-group">
                        <label class="form-label">2. County of Registration<span class="required">*</span></label>
                        <select id="countyTax" class="form-control">
                            <option value="0.02" selected>Wake County (2.00%)</option>
                            <option value="0.0225">Mecklenburg County (2.25%)</option>
                            <option value="0.023">Guilford County (2.30%)</option>
                            <option value="0.022">Forsyth County (2.20%)</option>
                            <option value="0.021">Cumberland County (2.10%)</option>
                            <option value="0.0215">Buncombe County (2.15%)</option>
                            <option value="0.0205">Union County (2.05%)</option>
                            <option value="0.021">New Hanover County (2.10%)</option>
                            <option value="0.0212">Gaston County (2.12%)</option>
                            <option value="0.0197">Minimum Rate County (1.97%)</option>
                            <option value="0.0252">Maximum Rate County (2.52%)</option>
                        </select>
                        <p class="form-hint">Select your county for accurate local vehicle property tax</p>
                    </div>
                    
                    <div class="form-group">
                        <label class="form-label">3. Trade-In Allowance ($)</label>
                        <div class="input-with-icon">
                            <i class="fas fa-exchange-alt input-icon"></i>
                            <input type="number" id="tradeIn" class="form-control" min="0" step="100" placeholder="5000" value="5000">
                        </div>
                        <p class="form-hint">North Carolina deducts trade-in value before calculating tax</p>
                    </div>
                    
                    <!-- Advanced Options -->
                    <div class="advanced-toggle" id="advancedToggle">
                        <span>Advanced Calculation Options</span>
                        <i class="fas fa-chevron-down" id="advancedIcon"></i>
                    </div>
                    
                    <div class="advanced-content" id="advancedContent">
                        <div class="form-group">
                            <label class="form-label">Vehicle Type</label>
                            <select id="vehicleType" class="form-control">
                                <option value="standard" selected>Standard Gas/Diesel</option>
                                <option value="hybrid">Hybrid Electric (HEV)</option>
                                <option value="pluginhybrid">Plug-in Hybrid (PHEV)</option>
                                <option value="electric">Battery Electric (BEV)</option>
                            </select>
                            <p class="form-hint">EVs/PHEVs have additional annual fees</p>
                        </div>
                        
                        <div class="form-group">
                            <label class="form-label">Purchase Type</label>
                            <select id="purchaseType" class="form-control">
                                <option value="dealer" selected>Dealer Purchase</option>
                                <option value="private">Private Party</option>
                                <option value="outofstate">Out-of-State Purchase</option>
                            </select>
                            <p class="form-hint">Different documentation requirements apply</p>
                        </div>
                    </div>
                    
                    <button class="btn" id="calculateButton">
                        <i class="fas fa-calculator"></i> Calculate Total Cost
                    </button>
                    
                    <button class="btn btn-secondary" id="resetButton">
                        <i class="fas fa-redo"></i> Reset Calculator
                    </button>
                    
                    <!-- Results Panel -->
                    <div class="results-panel">
                        <h3 style="margin-top: 0; border: none; display: flex; align-items: center;">
                            <i class="fas fa-chart-pie" style="margin-right: 10px;"></i>
                            Cost Breakdown
                        </h3>
                        
                        <div class="result-row">
                            <div class="result-label">
                                <i class="fas fa-tag"></i>
                                <span>Purchase Price</span>
                            </div>
                            <div class="result-value" id="resultPurchasePrice">$35,000.00</div>
                        </div>
                        
                        <div class="result-row">
                            <div class="result-label">
                                <i class="fas fa-exchange-alt"></i>
                                <span>Trade-In Deduction</span>
                            </div>
                            <div class="result-value" id="resultTradeIn">-$5,000.00</div>
                        </div>
                        
                        <div class="result-row">
                            <div class="result-label">
                                <i class="fas fa-calculator"></i>
                                <span>Taxable Base</span>
                            </div>
                            <div class="result-value" id="resultTaxablePrice">$30,000.00</div>
                        </div>
                        
                        <div class="result-row">
                            <div class="result-label">
                                <i class="fas fa-road"></i>
                                <span>3% HUT Tax</span>
                            </div>
                            <div class="result-value" id="resultStateTax">$900.00</div>
                        </div>
                        
                        <div class="result-row">
                            <div class="result-label">
                                <i class="fas fa-map-marker-alt"></i>
                                <span>County Tax (<span id="countyRateDisplay">2.0</span>%)</span>
                            </div>
                            <div class="result-value" id="resultCountyTax">$600.00</div>
                        </div>
                        
                        <div class="result-row">
                            <div class="result-label">
                                <i class="fas fa-file-alt"></i>
                                <span>Plate Fee</span>
                            </div>
                            <div class="result-value" id="resultPlateFee">$5.00</div>
                        </div>
                        
                        <div class="result-row total">
                            <div class="result-label">
                                <i class="fas fa-dollar-sign"></i>
                                <span>Total Vehicle Cost</span>
                            </div>
                            <div class="result-value" id="resultTotalCost">$31,505.00</div>
                        </div>
                        
                        <div class="formula-box" style="margin-top: var(--spacing-sm); font-size: 0.9rem;">
                            Formula: T = P &#8211; T<sub>i</sub> + (P &#8211; T<sub>i</sub>)×0.03 + (P &#8211; T<sub>i</sub>)×C + 5
                        </div>
                    </div>
                    
                    <div class="success-box" style="margin-top: var(--spacing-md);">
                        <p><strong>Calculation Verified:</strong> This calculator implements the exact North Carolina Department of Revenue formula used for 2026 vehicle purchases.</p>
                    </div>
                </div>
            </div>
            
            <!-- Related Resources -->
            <div class="content-card">
                <h3 style="border: none; margin-top: 0;">
                    <i class="fas fa-link"></i>
                    Related Resources
                </h3>
                <ul style="margin-left: 1.5rem;">
                    <li><a href="#"><i class="fas fa-file-pdf"></i> NC DMV Official Tax Guide (PDF)</a></li>
                    <li><a href="#"><i class="fas fa-map-marked-alt"></i> County Tax Assessor Directory</a></li>
                    <li><a href="#"><i class="fas fa-calculator"></i> Annual Property Tax Calculator</a></li>
                    <li><a href="#"><i class="fas fa-car-battery"></i> EV Tax Credit Calculator</a></li>
                    <li><a href="#"><i class="fas fa-balance-scale"></i> Trade-In Value Guide</a></li>
                    <li><a href="#"><i class="fas fa-university"></i> Military Exemption Forms</a></li>
                </ul>
            </div>
        </aside>
    </div>

    <script>
        // DOM Elements
        const purchasePriceInput = document.getElementById('purchasePrice');
        const countyTaxSelect = document.getElementById('countyTax');
        const tradeInInput = document.getElementById('tradeIn');
        const vehicleTypeSelect = document.getElementById('vehicleType');
        const purchaseTypeSelect = document.getElementById('purchaseType');
        const calculateButton = document.getElementById('calculateButton');
        const resetButton = document.getElementById('resetButton');
        const advancedToggle = document.getElementById('advancedToggle');
        const advancedContent = document.getElementById('advancedContent');
        const advancedIcon = document.getElementById('advancedIcon');
        const faqItems = document.querySelectorAll('.faq-item');
        const progressSteps = document.querySelectorAll('.progress-step');

        // Result Elements
        const resultPurchasePrice = document.getElementById('resultPurchasePrice');
        const resultTradeIn = document.getElementById('resultTradeIn');
        const resultTaxablePrice = document.getElementById('resultTaxablePrice');
        const resultStateTax = document.getElementById('resultStateTax');
        const resultCountyTax = document.getElementById('resultCountyTax');
        const countyRateDisplay = document.getElementById('countyRateDisplay');
        const resultPlateFee = document.getElementById('resultPlateFee');
        const resultTotalCost = document.getElementById('resultTotalCost');

        // Constants
        const NC_HUT_RATE = 0.03;
        const PLATE_FEE = 5.00;
        const EV_FEE = 140.25;
        const PHEV_FEE = 71.25;

        // Advanced Options State
        let advancedExpanded = false;

        // Format as USD
        const formatUSD = (value) => {
            return new Intl.NumberFormat('en-US', {
                style: 'currency',
                currency: 'USD',
                minimumFractionDigits: 2,
                maximumFractionDigits: 2
            }).format(value);
        };

        // Calculate and Update Function
        const calculateAndUpdate = () => {
            // Get raw values
            const purchasePrice = parseFloat(purchasePriceInput.value) || 0;
            const tradeIn = parseFloat(tradeInInput.value) || 0;
            const countyTaxRate = parseFloat(countyTaxSelect.value) || 0.02;
            const vehicleType = vehicleTypeSelect.value;
            const purchaseType = purchaseTypeSelect.value;

            // Core Calculations
            const taxablePrice = Math.max(0, purchasePrice - tradeIn);
            const stateTax = taxablePrice * NC_HUT_RATE;
            const countyTax = taxablePrice * countyTaxRate;
            
            // Additional fees based on vehicle type
            let additionalFees = 0;
            if (vehicleType === 'electric') {
                additionalFees = EV_FEE;
            } else if (vehicleType === 'pluginhybrid') {
                additionalFees = PHEV_FEE;
            }
            
            // Adjustments based on purchase type
            let purchaseTypeAdjustment = 0;
            if (purchaseType === 'outofstate') {
                // Assume 50% credit for out-of-state taxes paid (simplified)
                purchaseTypeAdjustment = -stateTax * 0.5;
            }
            
            // Total Cost Calculation
            let totalCost = purchasePrice + stateTax + countyTax + PLATE_FEE + additionalFees + purchaseTypeAdjustment - tradeIn;
            
            // Ensure total doesn't go below taxable price + minimum fees
            totalCost = Math.max(totalCost, taxablePrice + PLATE_FEE);

            // Update Display Values with animation
            animateValueChange(resultPurchasePrice, formatUSD(purchasePrice));
            animateValueChange(resultTradeIn, formatUSD(-tradeIn));
            animateValueChange(resultTaxablePrice, formatUSD(taxablePrice));
            animateValueChange(resultStateTax, formatUSD(stateTax));
            animateValueChange(resultCountyTax, formatUSD(countyTax));
            countyRateDisplay.textContent = (countyTaxRate * 100).toFixed(2);
            animateValueChange(resultPlateFee, formatUSD(PLATE_FEE));
            animateValueChange(resultTotalCost, formatUSD(totalCost));
            
            // Update progress indicator
            updateProgressIndicator();
        };

        // Animate value changes
        const animateValueChange = (element, newValue) => {
            const oldValue = element.textContent;
            if (oldValue !== newValue) {
                element.style.transform = 'scale(1.1)';
                element.style.color = 'var(--primary-blue)';
                element.style.transition = 'all 0.3s ease';
                element.textContent = newValue;
                
                setTimeout(() => {
                    element.style.transform = 'scale(1)';
                    element.style.color = '';
                }, 300);
            } else {
                element.textContent = newValue;
            }
        };

        // Update progress indicator
        const updateProgressIndicator = () => {
            const purchasePrice = parseFloat(purchasePriceInput.value) || 0;
            const tradeIn = parseFloat(tradeInInput.value) || 0;
            const countyTaxRate = parseFloat(countyTaxSelect.value);
            
            progressSteps.forEach((step, index) => {
                if (index === 0 && purchasePrice > 0) {
                    step.classList.add('active');
                } else if (index === 1 && countyTaxRate > 0) {
                    step.classList.add('active');
                } else if (index === 2 && tradeIn >= 0) {
                    step.classList.add('active');
                } else if (index === 3) {
                    step.classList.add('active');
                } else {
                    step.classList.remove('active');
                }
            });
        };

        // FAQ Toggle Functionality
        faqItems.forEach(item => {
            const question = item.querySelector('.faq-question');
            question.addEventListener('click', () => {
                // Close all other FAQ items
                faqItems.forEach(otherItem => {
                    if (otherItem !== item && otherItem.classList.contains('active')) {
                        otherItem.classList.remove('active');
                        otherItem.querySelector('.faq-question').classList.remove('active');
                    }
                });
                
                // Toggle current item
                item.classList.toggle('active');
                question.classList.toggle('active');
            });
        });

        // Advanced Options Toggle
        advancedToggle.addEventListener('click', () => {
            advancedExpanded = !advancedExpanded;
            advancedContent.classList.toggle('expanded');
            advancedIcon.style.transform = advancedExpanded ? 'rotate(180deg)' : 'rotate(0deg)';
        });

        // Reset Calculator
        resetButton.addEventListener('click', () => {
            purchasePriceInput.value = '35000';
            countyTaxSelect.value = '0.02';
            tradeInInput.value = '5000';
            vehicleTypeSelect.value = 'standard';
            purchaseTypeSelect.value = 'dealer';
            calculateAndUpdate();
        });

        // Event Listeners for Calculator
        calculateButton.addEventListener('click', calculateAndUpdate);
        purchasePriceInput.addEventListener('input', calculateAndUpdate);
        countyTaxSelect.addEventListener('change', calculateAndUpdate);
        tradeInInput.addEventListener('input', calculateAndUpdate);
        vehicleTypeSelect.addEventListener('change', calculateAndUpdate);
        purchaseTypeSelect.addEventListener('change', calculateAndUpdate);

        // Initialize calculator on load
        window.addEventListener('DOMContentLoaded', () => {
            calculateAndUpdate();
            // Open first FAQ item by default
            if (faqItems.length > 0) {
                faqItems[0].classList.add('active');
                faqItems[0].querySelector('.faq-question').classList.add('active');
            }
            
            // Add input validation
            purchasePriceInput.addEventListener('blur', () => {
                if (purchasePriceInput.value < 0) purchasePriceInput.value = 0;
            });
            
            tradeInInput.addEventListener('blur', () => {
                if (tradeInInput.value < 0) tradeInInput.value = 0;
            });
        });

        // Keyboard shortcuts
        document.addEventListener('keydown', (e) => {
            if (e.ctrlKey && e.key === 'Enter') {
                calculateAndUpdate();
            }
            if (e.key === 'Escape') {
                resetButton.click();
            }
        });
    </script>
]]></content:encoded>
					
					<wfw:commentRss>https://24car-repair.com/north-carolina-car-sales-tax-calculation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>North Carolina DMV Practice Test</title>
		<link>https://24car-repair.com/north-carolina-dmv-practice-test/</link>
					<comments>https://24car-repair.com/north-carolina-dmv-practice-test/#respond</comments>
		
		<dc:creator><![CDATA[Robert]]></dc:creator>
		<pubDate>Mon, 29 Dec 2025 07:23:20 +0000</pubDate>
				<category><![CDATA[DMV Practice Test]]></category>
		<category><![CDATA[North Carolina DMV Practice Test]]></category>
		<category><![CDATA[North Carolina]]></category>
		<guid isPermaLink="false">https://24car-repair.com/?p=5079</guid>

					<description><![CDATA[NC North Carolina DMV Practice Test Prepare for your North Carolina Driver&#8217;s License Exam Passing Score: 40 correct (80%) Time Limit: 60 seconds per question Select your test category below to begin your practice test. Enter Your Name: Car Driver&#8217;s Test Commercial Driver&#8217;s License (CDL) Motorcycle Test Start Practice Test Time Remaining for this Question: [&#8230;]]]></description>
										<content:encoded><![CDATA[
<style>
        :root {
            --primary-color: #002868;
            --secondary-color: #f2f2f2;
            --accent-color: #BF0A30;
            --correct-color: #4CAF50;
            --incorrect-color: #f44336;
            --text-color: #333;
            --light-text: #666;
            --card-bg: white;
            --shadow: 0 4px 8px rgba(0,0,0,0.1);
            --nc-blue: #002868;
            --nc-red: #BF0A30;
            --nc-white: #FFFFFF;
        }
        
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: #f9f9f9;
            color: var(--text-color);
            line-height: 1.6;
            margin: 0 auto;
            background-image: linear-gradient(to bottom, #f0f8ff, #ffffff);
        }
         .controls-panel-2 {
width: 1200px;
            padding: 20px;
}
   @media (max-width: 480px) {        
.controls-panel-2 {
width: 390px;
}
}
button {
    color: #000000;
}
button:hover {
    color: #000000;

}   
        header {
            text-align: center;
            padding: 20px 0 30px;
            border-bottom: 3px solid var(--primary-color);
            margin-bottom: 30px;
            position: relative;
            background: linear-gradient(90deg, var(--nc-blue) 0%, #003399 100%);
            border-radius: 10px;
            color: white;
        }
        
        h1 {
            color: var(--nc-white);
            margin-bottom: 10px;
            font-size: 2.5rem;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
        }
        
        .subtitle {
            color: #ffffff;
            font-size: 1.2rem;
            margin-bottom: 20px;
            opacity: 0.9;
        }
        
        .state-flag {
            height: 60px;
            margin-bottom: 15px;
            filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
        }
        
        .controls-panel {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            background: var(--card-bg);
            padding: 20px;
            border-radius: 10px;
            box-shadow: var(--shadow);
            margin-bottom: 30px;
            border: 2px solid #e0e9ff;
            background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
        }
        
        .name-input-container {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
            width: 100%;
            justify-content: center;
        }
        
        .name-input {
            padding: 12px 15px;
            border: 2px solid #ddd;
            border-radius: 5px;
            font-size: 1rem;
            width: 300px;
            max-width: 100%;
            transition: all 0.3s ease;
            border-color: var(--nc-blue);
        }
        
        .name-input:focus {
            border-color: var(--nc-blue);
            outline: none;
            box-shadow: 0 0 0 3px rgba(0, 40, 104, 0.1);
        }
        
        .name-label {
            font-weight: 600;
            color: var(--nc-blue);
        }
        
        .category-selector {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            margin-bottom: 15px;
            justify-content: center;
        }
        
        .category-btn {
            padding: 12px 24px;
            background: var(--secondary-color);
            border: 2px solid #ddd;
            border-radius: 50px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        
        .category-btn:hover {
            background: #e9e9e9;
            transform: translateY(-2px);
        }
        
        .category-btn.active {
            background: var(--nc-blue);
            color: white;
            border-color: var(--nc-blue);
            box-shadow: 0 4px 12px rgba(0, 40, 104, 0.2);
        }
        
        .test-info {
            background: #f0f8ff;
            padding: 15px;
            border-radius: 8px;
            border-left: 4px solid var(--nc-blue);
            margin-bottom: 20px;
            text-align: center;
            border: 1px solid #d0e2ff;
        }
        
        .test-stats {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-bottom: 10px;
            font-weight: 600;
            flex-wrap: wrap;
        }
        
        .timer-container {
            background: var(--card-bg);
            padding: 15px;
            border-radius: 8px;
            text-align: center;
            margin-bottom: 25px;
            box-shadow: var(--shadow);
            border: 2px solid #e0e9ff;
        }
        
        .timer {
            font-size: 2.2rem;
            font-weight: 700;
            color: var(--nc-blue);
            margin: 10px 0;
        }
        
        .timer.warning {
            color: var(--accent-color);
        }
        
        .timer.danger {
            color: var(--incorrect-color);
            animation: pulse 1s infinite;
        }
        
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.7; }
            100% { opacity: 1; }
        }
        
        .question-card {
            background: var(--card-bg);
            padding: 30px;
            border-radius: 10px;
            box-shadow: var(--shadow);
            margin-bottom: 30px;
            display: none;
            border: 2px solid #e0e9ff;
        }
        
        .question-card.active {
            display: block;
        }
        
        .question-number {
            color: var(--nc-blue);
            font-weight: 700;
            font-size: 1.1rem;
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
        }
        
        .question-text {
            font-size: 1.3rem;
            margin-bottom: 25px;
            line-height: 1.5;
        }
        
        .options-container {
            display: grid;
            grid-template-columns: 1fr;
            gap: 12px;
            margin-bottom: 25px;
        }
        
        .option {
            padding: 16px 20px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
        }
        
        .option:hover {
            background: #f5f5f5;
            border-color: #bbb;
            transform: translateX(5px);
        }
        
        .option.selected {
            border-color: var(--nc-blue);
            background-color: rgba(0, 40, 104, 0.05);
        }
        
        .option.correct {
            border-color: var(--correct-color);
            background-color: rgba(76, 175, 80, 0.1);
        }
        
        .option.incorrect {
            border-color: var(--incorrect-color);
            background-color: rgba(244, 67, 54, 0.1);
        }
        
        .option-label {
            display: inline-block;
            width: 36px;
            height: 36px;
            line-height: 36px;
            text-align: center;
            background: #eee;
            border-radius: 50%;
            margin-right: 15px;
            font-weight: 600;
        }
        
        .option.selected .option-label {
            background: var(--nc-blue);
            color: white;
        }
        
        .navigation-buttons {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
        }
        
        .btn {
            padding: 14px 28px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1rem;
        }
        
        .btn-primary {
            background: var(--nc-blue);
            color: white;
        }
        
        .btn-primary:hover {
            background: #001a44;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 40, 104, 0.3);
        }
        
        .btn-secondary {
            background: #f0f0f0;
            color: var(--text-color);
        }
        
        .btn-secondary:hover {
            background: #e0e0e0;
            transform: translateY(-2px);
        }
        
        .btn-accent {
            background: var(--accent-color);
            color: white;
        }
        
        .btn-accent:hover {
            background: #a00924;
            transform: translateY(-2px);
        }
        
        .progress-container {
            width: 100%;
            height: 10px;
            background: #eee;
            border-radius: 5px;
            margin: 20px 0;
            overflow: hidden;
        }
        
        .progress-bar {
            height: 100%;
            background: var(--nc-blue);
            width: 0%;
            transition: width 0.5s ease;
        }
        
        .results-container {
            background: var(--card-bg);
            padding: 40px;
            border-radius: 10px;
            box-shadow: var(--shadow);
            text-align: center;
            display: none;
            margin-bottom: 30px;
            border: 2px solid #e0e9ff;
        }
        
        .results-container.show {
            display: block;
        }
        
        .results-header {
            color: var(--nc-blue);
            margin-bottom: 15px;
            font-size: 2rem;
        }
        
        .tester-name {
            color: var(--nc-blue);
            font-weight: 700;
            font-size: 1.3rem;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid #eee;
        }
        
        .score-circle {
            width: 200px;
            height: 200px;
            border-radius: 50%;
            margin: 0 auto 30px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            position: relative;
            background: conic-gradient(var(--correct-color) 0% 0%, #eee 0% 100%);
        }
        
        .score-circle-inner {
            width: 160px;
            height: 160px;
            border-radius: 50%;
            background: white;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        
        .score-percent {
            font-size: 2.8rem;
            font-weight: 700;
            color: var(--text-color);
        }
        
        .score-text {
            font-size: 1.2rem;
            color: var(--light-text);
        }
        
        .pass {
            color: var(--correct-color);
        }
        
        .fail {
            color: var(--incorrect-color);
        }
        
        .result-details {
            display: flex;
            justify-content: center;
            gap: 40px;
            margin: 30px 0;
            flex-wrap: wrap;
        }
        
        .result-box {
            padding: 20px;
            border-radius: 8px;
            min-width: 180px;
            box-shadow: var(--shadow);
            border: 1px solid #eee;
        }
        
        .result-box.correct {
            border-top: 4px solid var(--correct-color);
        }
        
        .result-box.incorrect {
            border-top: 4px solid var(--incorrect-color);
        }
        
        .result-box.skipped {
            border-top: 4px solid var(--accent-color);
        }
        
        .result-value {
            font-size: 2.2rem;
            font-weight: 700;
            margin-bottom: 5px;
        }
        
        .result-label {
            color: var(--light-text);
        }
        
        .recommendation {
            background: #f9f9f9;
            padding: 25px;
            border-radius: 8px;
            margin: 30px 0;
            text-align: left;
            border: 1px solid #eee;
        }
        
        .incorrect-questions-section {
            text-align: left;
            margin-top: 40px;
            border-top: 1px solid #eee;
            padding-top: 30px;
            display: none;
        }
        
        .incorrect-questions-section.show {
            display: block;
        }
        
        .incorrect-question {
            padding: 20px;
            border: 1px solid #eee;
            border-radius: 8px;
            margin-bottom: 20px;
            background: #f9f9f9;
            border-left: 4px solid var(--incorrect-color);
        }
        
        .review-section {
            text-align: left;
            margin-top: 40px;
            border-top: 1px solid #eee;
            padding-top: 30px;
            display: none;
        }
        
        .review-section.show {
            display: block;
        }
        
        .review-question {
            padding: 20px;
            border: 1px solid #eee;
            border-radius: 8px;
            margin-bottom: 20px;
            background: #f9f9f9;
        }
        
        .review-question.correct {
            border-left: 4px solid var(--correct-color);
        }
        
        .review-question.incorrect {
            border-left: 4px solid var(--incorrect-color);
        }
        
        .review-question.skipped {
            border-left: 4px solid var(--accent-color);
        }
        
        footer {
            text-align: center;
            padding: 20px;
            color: var(--light-text);
            border-top: 1px solid #eee;
            margin-top: 40px;
            font-size: 0.9rem;
        }
        
        .toggle-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 20px;
            flex-wrap: wrap;
        }
        
        @media (max-width: 768px) {
            body {
                padding: 15px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .controls-panel {
                flex-direction: column;
                gap: 20px;
            }
            
            .category-selector {
                width: 100%;
                justify-content: center;
            }
            
            .question-card {
                padding: 20px;
            }
            
            .question-text {
                font-size: 1.1rem;
            }
            
            .navigation-buttons {
                flex-direction: column;
                gap: 10px;
            }
            
            .btn {
                width: 100%;
            }
            
            .result-details {
                gap: 15px;
            }
            
            .result-box {
                min-width: 140px;
            }
            
            .toggle-buttons {
                flex-direction: column;
            }
        }
    </style>
</head>
<body>
<div class="controls-panel-2">
    <header>
        <svg class="state-flag" viewBox="0 0 100 60" width="100" height="60">
            <!-- North Carolina State Flag Representation -->
            <rect width="100" height="60" fill="#002868"/>
            <rect x="25" width="75" height="30" fill="#BF0A30"/>
            <rect x="25" y="30" width="75" height="30" fill="#FFFFFF"/>
            <polygon points="12,30 20,20 28,30" fill="#FFFFFF"/>
            <polygon points="12,30 20,40 28,30" fill="#FFFFFF"/>
            <text x="50" y="45" text-anchor="middle" fill="#002868" font-size="10" font-weight="bold">NC</text>
        </svg>
        <h1 style="color: #fff;">North Carolina DMV Practice Test</h1>
        <div class="subtitle">Prepare for your North Carolina Driver&#8217;s License Exam</div>
        <div class="test-info" style="background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3);">
            <div class="test-stats">
                <div>Passing Score: 40 correct (80%)</div>
                <div>Time Limit: 60 seconds per question</div>
            </div>
            <div>Select your test category below to begin your practice test.</div>
        </div>
    </header>
    
    <main>
        <div class="controls-panel">
            <div class="name-input-container">
                <span class="name-label">Enter Your Name:</span>
                <input type="text" class="name-input" id="testerName" placeholder="Your Name" maxlength="50">
            </div>
            <div class="category-selector">
                <button class="category-btn active" data-category="car">Car Driver&#8217;s Test</button>
                <button class="category-btn" data-category="cdl">Commercial Driver&#8217;s License (CDL)</button>
                <button class="category-btn" data-category="motorcycle">Motorcycle Test</button>
            </div>
            <button id="startTestBtn" class="btn btn-primary">Start Practice Test</button>
        </div>
        
        <div class="timer-container" style="display: none;">
            <div>Time Remaining for this Question:</div>
            <div class="timer" id="timer">60</div>
            <div>seconds</div>
        </div>
        
        <div class="progress-container" style="display: none;">
            <div class="progress-bar" id="progressBar"></div>
        </div>
        
        <div class="question-card" id="questionCard">
            <div class="question-number">
                <span>Question <span id="currentQuestion">1</span> of 50</span>
                <span>Category: <span id="currentCategory">Car</span></span>
            </div>
            <div class="question-text" id="questionText">
                Loading question&#8230;
            </div>
            <div class="options-container" id="optionsContainer">
                <!-- Options will be dynamically inserted here -->
            </div>
            <div class="navigation-buttons">
                <button id="prevBtn" class="btn btn-secondary">Previous Question</button>
                <button id="skipBtn" class="btn btn-accent">Skip Question</button>
                <button id="nextBtn" class="btn btn-primary">Next Question</button>
            </div>
        </div>
        
        <div class="results-container" id="resultsContainer">
            <h2 class="results-header">Test Results</h2>
            <div class="tester-name" id="testerNameDisplay">Tester: Not Provided</div>
            
            <div class="score-circle" id="scoreCircle">
                <div class="score-circle-inner">
                    <div class="score-percent" id="scorePercentElement">0%</div>
                    <div class="score-text" id="scoreText">Score</div>
                </div>
            </div>
            
            <div id="resultMessage">
                <h3 style="margin-bottom: 10px;">Calculating your results&#8230;</h3>
                <p>You need 40 correct answers (80%) to pass the North Carolina DMV test.</p>
            </div>
            
            <div class="result-details">
                <div class="result-box correct">
                    <div class="result-value" id="correctCount">0</div>
                    <div class="result-label">Correct</div>
                </div>
                <div class="result-box incorrect">
                    <div class="result-value" id="incorrectCount">0</div>
                    <div class="result-label">Incorrect</div>
                </div>
                <div class="result-box skipped">
                    <div class="result-value" id="skippedCount">0</div>
                    <div class="result-label">Skipped</div>
                </div>
            </div>
            
            <div class="recommendation" id="recommendation">
                <!-- Recommendations will be added here -->
            </div>
            
            <div class="toggle-buttons">
                <button id="showIncorrectBtn" class="btn btn-secondary">Show Incorrect Questions</button>
                <button id="reviewTestBtn" class="btn btn-secondary">Review All Questions</button>
                <button id="restartTestBtn" class="btn btn-primary">Take Another Test</button>
            </div>
            
            <div class="incorrect-questions-section" id="incorrectQuestionsSection">
                <h3>Incorrect Questions Review</h3>
                <div id="incorrectQuestionsList">
                    <!-- Incorrect questions will be added here -->
                </div>
            </div>
            
            <div class="review-section" id="reviewSection">
                <h3>Complete Test Review</h3>
                <div id="reviewQuestions">
                    <!-- Review questions will be added here -->
                </div>
            </div>
        </div>
    </main>
</div>   
    <script>
        // DMV Test Configuration for North Carolina
        const TEST_CONFIG = {
            totalQuestions: 100,
            testQuestions: 50, // North Carolina DMV test has 50 questions
            passingScore: 40, // Need 40/50 to pass (80%)
            passingPercent: 80,
            timePerQuestion: 60, // seconds
            categories: ['car', 'cdl', 'motorcycle']
        };
        
        // Question banks for each category with 100 questions each
        const questionBanks = {
            car: generateCarQuestions(),
            cdl: generateCDLQuestions(),
            motorcycle: generateMotorcycleQuestions()
        };
        
        // Test state
        let testState = {
            testerName: '',
            currentCategory: 'car',
            currentQuestionIndex: 0,
            selectedQuestions: [],
            userAnswers: new Array(TEST_CONFIG.testQuestions).fill(null),
            timeRemaining: TEST_CONFIG.timePerQuestion,
            timerInterval: null,
            testStarted: false,
            testCompleted: false,
            incorrectQuestions: []
        };
        
        // DOM Elements
        const nameInput = document.getElementById('testerName');
        const categoryBtns = document.querySelectorAll('.category-btn');
        const startTestBtn = document.getElementById('startTestBtn');
        const timerContainer = document.querySelector('.timer-container');
        const timerElement = document.getElementById('timer');
        const progressContainer = document.querySelector('.progress-container');
        const progressBar = document.getElementById('progressBar');
        const questionCard = document.getElementById('questionCard');
        const currentQuestionElement = document.getElementById('currentQuestion');
        const currentCategoryElement = document.getElementById('currentCategory');
        const questionTextElement = document.getElementById('questionText');
        const optionsContainer = document.getElementById('optionsContainer');
        const prevBtn = document.getElementById('prevBtn');
        const skipBtn = document.getElementById('skipBtn');
        const nextBtn = document.getElementById('nextBtn');
        const resultsContainer = document.getElementById('resultsContainer');
        const testerNameDisplay = document.getElementById('testerNameDisplay');
        const scoreCircle = document.getElementById('scoreCircle');
        const scorePercentElement = document.getElementById('scorePercentElement');
        const scoreText = document.getElementById('scoreText');
        const correctCount = document.getElementById('correctCount');
        const incorrectCount = document.getElementById('incorrectCount');
        const skippedCount = document.getElementById('skippedCount');
        const resultMessage = document.getElementById('resultMessage');
        const recommendation = document.getElementById('recommendation');
        const incorrectQuestionsSection = document.getElementById('incorrectQuestionsSection');
        const incorrectQuestionsList = document.getElementById('incorrectQuestionsList');
        const reviewSection = document.getElementById('reviewSection');
        const reviewQuestions = document.getElementById('reviewQuestions');
        const showIncorrectBtn = document.getElementById('showIncorrectBtn');
        const reviewTestBtn = document.getElementById('reviewTestBtn');
        const restartTestBtn = document.getElementById('restartTestBtn');
        
        // Initialize event listeners
        function initEventListeners() {
            // Category selection
            categoryBtns.forEach(btn => {
                btn.addEventListener('click', () => {
                    categoryBtns.forEach(b => b.classList.remove('active'));
                    btn.classList.add('active');
                    testState.currentCategory = btn.dataset.category;
                    currentCategoryElement.textContent = btn.textContent.replace(' Test', '');
                });
            });
            
            // Start test button
            startTestBtn.addEventListener('click', startTest);
            
            // Navigation buttons
            prevBtn.addEventListener('click', showPreviousQuestion);
            skipBtn.addEventListener('click', skipQuestion);
            nextBtn.addEventListener('click', showNextQuestion);
            
            // Results buttons
            showIncorrectBtn.addEventListener('click', toggleIncorrectQuestions);
            reviewTestBtn.addEventListener('click', toggleReviewSection);
            restartTestBtn.addEventListener('click', restartTest);
        }
        
        // Generate 100 North Carolina Car questions
        function generateCarQuestions() {
            return [
                {
                    id: 1,
                    category: 'car',
                    question: 'What is the maximum speed limit on North Carolina interstate highways?',
                    options: ['65 mph', '70 mph', '75 mph', '80 mph'],
                    correctAnswer: 1,
                    topic: 'Speed Limits',
                    explanation: 'The maximum speed limit on North Carolina interstates is 70 mph.'
                },
                {
                    id: 2,
                    category: 'car',
                    question: 'When must you use your headlights in North Carolina?',
                    options: ['From sunset to sunrise', 'When visibility is less than 400 feet', 'When windshield wipers are in use', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Lighting',
                    explanation: 'North Carolina law requires headlights from sunset to sunrise, when visibility is less than 400 feet, and when windshield wipers are in use.'
                },
                {
                    id: 3,
                    category: 'car',
                    question: 'What should you do when approaching a stopped school bus with flashing red lights in North Carolina?',
                    options: ['Slow down to 20 mph', 'Stop until the bus moves', 'Stop at least 20 feet away', 'Stop and remain stopped until the red lights stop flashing'],
                    correctAnswer: 3,
                    topic: 'School Buses',
                    explanation: 'You must stop and remain stopped until the red lights stop flashing when approaching a school bus with flashing red lights in North Carolina.'
                },
                {
                    id: 4,
                    category: 'car',
                    question: 'What is the legal blood alcohol concentration (BAC) limit for drivers over 21 in North Carolina?',
                    options: ['0.06%', '0.08%', '0.10%', '0.05%'],
                    correctAnswer: 1,
                    topic: 'DUI Laws',
                    explanation: 'The legal BAC limit for drivers over 21 in North Carolina is 0.08%.'
                },
                {
                    id: 5,
                    category: 'car',
                    question: 'How far ahead should you signal before turning in North Carolina?',
                    options: ['50 feet', '75 feet', 'At least 100 feet', '150 feet'],
                    correctAnswer: 2,
                    topic: 'Turning',
                    explanation: 'North Carolina law requires signaling at least 100 feet before turning.'
                },
                {
                    id: 6,
                    category: 'car',
                    question: 'When parking uphill with a curb, how should you turn your wheels in North Carolina?',
                    options: ['Away from the curb', 'Toward the curb', 'Straight', 'It doesn\'t matter'],
                    correctAnswer: 0,
                    topic: 'Parking',
                    explanation: 'When parking uphill with a curb, turn your wheels away from the curb in North Carolina.'
                },
                {
                    id: 7,
                    category: 'car',
                    question: 'What does a solid yellow line on your side of the road mean in North Carolina?',
                    options: ['Passing is allowed with caution', 'No passing allowed', 'You may pass if safe', 'HOV lane'],
                    correctAnswer: 1,
                    topic: 'Road Markings',
                    explanation: 'A solid yellow line on your side means no passing is allowed in North Carolina.'
                },
                {
                    id: 8,
                    category: 'car',
                    question: 'What should you do when you see a flashing yellow traffic light in North Carolina?',
                    options: ['Stop completely', 'Slow down and proceed with caution', 'Speed up to clear intersection', 'Treat as stop sign'],
                    correctAnswer: 1,
                    topic: 'Traffic Signals',
                    explanation: 'A flashing yellow light means proceed with caution in North Carolina.'
                },
                {
                    id: 9,
                    category: 'car',
                    question: 'How long do you have to report an accident to the North Carolina DMV if there is injury, death, or over $1,000 damage?',
                    options: ['Immediately', '24 hours', '48 hours', 'Report immediately to police, DMV within 10 days'],
                    correctAnswer: 3,
                    topic: 'Accidents',
                    explanation: 'Accidents involving injury, death, or over $1,000 damage must be reported to police immediately and DMV within 10 days in North Carolina.'
                },
                {
                    id: 10,
                    category: 'car',
                    question: 'What is the minimum following distance behind another vehicle in North Carolina?',
                    options: ['2 seconds', '3 seconds', '4 seconds', '5 seconds'],
                    correctAnswer: 1,
                    topic: 'Safe Driving',
                    explanation: 'Maintain at least a 3-second following distance for safe driving in North Carolina.'
                },
                {
                    id: 11,
                    category: 'car',
                    question: 'When can you legally make a U-turn in North Carolina?',
                    options: ['Only where permitted by signs', 'Only at intersections', 'Never on state highways', 'Anywhere unless prohibited'],
                    correctAnswer: 3,
                    topic: 'Turning',
                    explanation: 'U-turns are legal in North Carolina unless specifically prohibited by signs.'
                },
                {
                    id: 12,
                    category: 'car',
                    question: 'What does a red circle with a white horizontal bar mean in North Carolina?',
                    options: ['Do not enter', 'No parking', 'One way street', 'Stop ahead'],
                    correctAnswer: 0,
                    topic: 'Road Signs',
                    explanation: 'A red circle with a white horizontal bar means "Do Not Enter" in North Carolina.'
                },
                {
                    id: 13,
                    category: 'car',
                    question: 'What should you do if your vehicle starts to skid on icy roads in North Carolina?',
                    options: ['Brake hard', 'Steer in the direction of the skid', 'Accelerate quickly', 'Turn wheel opposite skid'],
                    correctAnswer: 1,
                    topic: 'Winter Driving',
                    explanation: 'Steer in the direction you want the front of the vehicle to go during a skid on icy roads.'
                },
                {
                    id: 14,
                    category: 'car',
                    question: 'When must you yield to pedestrians in North Carolina?',
                    options: ['Only at crosswalks', 'Whenever they are in the roadway', 'Only when they have a walk signal', 'Only in school zones'],
                    correctAnswer: 1,
                    topic: 'Right of Way',
                    explanation: 'Drivers must yield to pedestrians at all times when they are in the roadway in North Carolina.'
                },
                {
                    id: 15,
                    category: 'car',
                    question: 'What is the penalty for a first offense of not wearing a seatbelt in North Carolina?',
                    options: ['$25 fine', '$50 fine', '$100 fine plus court costs', '$150 fine'],
                    correctAnswer: 2,
                    topic: 'Seatbelt Laws',
                    explanation: 'The fine for not wearing a seatbelt in North Carolina is $100 plus court costs for a first offense.'
                },
                {
                    id: 16,
                    category: 'car',
                    question: 'How close may you park to a fire hydrant in North Carolina?',
                    options: ['5 feet', '10 feet', '15 feet', '20 feet'],
                    correctAnswer: 2,
                    topic: 'Parking',
                    explanation: 'You may not park within 15 feet of a fire hydrant in North Carolina.'
                },
                {
                    id: 17,
                    category: 'car',
                    question: 'What should you do when you see a stopped emergency vehicle with flashing lights in North Carolina?',
                    options: ['Slow down and proceed', 'Move over or slow down', 'Stop and wait for them to move', 'Speed up to pass quickly'],
                    correctAnswer: 1,
                    topic: 'Emergency Vehicles',
                    explanation: 'Move over to another lane or slow down when passing stopped emergency vehicles with flashing lights in North Carolina.'
                },
                {
                    id: 18,
                    category: 'car',
                    question: 'When driving in heavy snow in North Carolina, what lights should you use?',
                    options: ['High beams', 'Low beams', 'Parking lights only', 'No lights'],
                    correctAnswer: 1,
                    topic: 'Adverse Conditions',
                    explanation: 'Use low beam headlights in heavy snow; high beams will reflect back and reduce visibility.'
                },
                {
                    id: 19,
                    category: 'car',
                    question: 'What does a green arrow traffic signal mean in North Carolina?',
                    options: ['Proceed with caution', 'Protected turn in direction of arrow', 'Yield before turning', 'Stop if possible'],
                    correctAnswer: 1,
                    topic: 'Traffic Signals',
                    explanation: 'A green arrow means you have a protected turn in the direction of the arrow in North Carolina.'
                },
                {
                    id: 20,
                    category: 'car',
                    question: 'How old must you be to get an unrestricted driver\'s license in North Carolina?',
                    options: ['16', '17', '18', '21'],
                    correctAnswer: 2,
                    topic: 'Licensing',
                    explanation: 'You must be 18 years old to get an unrestricted driver\'s license in North Carolina.'
                },
                {
                    id: 21,
                    category: 'car',
                    question: 'What should you do when you hear a siren or see an emergency vehicle approaching in North Carolina?',
                    options: ['Speed up to get out of the way', 'Pull over to the right and stop', 'Continue driving normally', 'Flash your headlights'],
                    correctAnswer: 1,
                    topic: 'Emergency Vehicles',
                    explanation: 'You must pull over to the right and stop for emergency vehicles in North Carolina.'
                },
                {
                    id: 22,
                    category: 'car',
                    question: 'What is the speed limit in school zones during school hours in North Carolina?',
                    options: ['15 mph', '20 mph', '25 mph', '35 mph'],
                    correctAnswer: 2,
                    topic: 'Speed Limits',
                    explanation: 'The speed limit in school zones is 25 mph when children are present in North Carolina.'
                },
                {
                    id: 23,
                    category: 'car',
                    question: 'When is it legal to pass on the right in North Carolina?',
                    options: ['Never', 'When the vehicle ahead is turning left', 'On one-way streets', 'Both B and C'],
                    correctAnswer: 3,
                    topic: 'Passing',
                    explanation: 'Passing on the right is allowed when the vehicle ahead is turning left or on one-way streets in North Carolina.'
                },
                {
                    id: 24,
                    category: 'car',
                    question: 'What does a yellow, diamond-shaped sign indicate in North Carolina?',
                    options: ['Stop ahead', 'Warning of hazard', 'School zone', 'Yield right of way'],
                    correctAnswer: 1,
                    topic: 'Road Signs',
                    explanation: 'Yellow, diamond-shaped signs warn of potential hazards ahead in North Carolina.'
                },
                {
                    id: 25,
                    category: 'car',
                    question: 'How long is a learner\'s permit valid in North Carolina?',
                    options: ['6 months', '1 year', '2 years', '5 years'],
                    correctAnswer: 3,
                    topic: 'Licensing',
                    explanation: 'A North Carolina learner\'s permit is valid for 5 years.'
                },
                {
                    id: 26,
                    category: 'car',
                    question: 'What should you do when your car starts to hydroplane on wet roads in North Carolina?',
                    options: ['Brake hard', 'Accelerate to gain control', 'Steer straight and ease off gas', 'Turn sharply'],
                    correctAnswer: 2,
                    topic: 'Adverse Conditions',
                    explanation: 'When hydroplaning, steer straight and ease off the accelerator.'
                },
                {
                    id: 27,
                    category: 'car',
                    question: 'What is the maximum penalty for a first DUI offense in North Carolina?',
                    options: ['$500 fine', '$1,000 fine', 'Up to $2,500 fine', 'Up to $5,000 fine'],
                    correctAnswer: 1,
                    topic: 'DUI Laws',
                    explanation: 'Maximum fine for first DUI offense in North Carolina is $1,000.'
                },
                {
                    id: 28,
                    category: 'car',
                    question: 'When must you stop for a pedestrian at a crosswalk in North Carolina?',
                    options: ['Only when they are in your lane', 'When they are anywhere in the crosswalk', 'Only at marked crosswalks', 'Only during daylight'],
                    correctAnswer: 1,
                    topic: 'Pedestrian Safety',
                    explanation: 'You must stop for pedestrians anywhere in the crosswalk in North Carolina.'
                },
                {
                    id: 29,
                    category: 'car',
                    question: 'What does a red curb indicate in North Carolina?',
                    options: ['Loading zone', 'No stopping, standing, or parking', 'Parking for disabled only', 'Short-term parking'],
                    correctAnswer: 1,
                    topic: 'Parking',
                    explanation: 'Red curbs indicate no stopping, standing, or parking in North Carolina.'
                },
                {
                    id: 30,
                    category: 'car',
                    question: 'How far must you stay behind an emergency vehicle when it\'s responding to a call in North Carolina?',
                    options: ['100 feet', '200 feet', '300 feet', '500 feet'],
                    correctAnswer: 3,
                    topic: 'Emergency Vehicles',
                    explanation: 'Stay at least 500 feet behind emergency vehicles in North Carolina.'
                },
                {
                    id: 31,
                    category: 'car',
                    question: 'What does a broken yellow line mean in North Carolina?',
                    options: ['No passing', 'Passing allowed when safe', 'Two-way traffic', 'One-way traffic'],
                    correctAnswer: 1,
                    topic: 'Road Markings',
                    explanation: 'Broken yellow lines allow passing when safe in North Carolina.'
                },
                {
                    id: 32,
                    category: 'car',
                    question: 'When should you dim your high beam headlights in North Carolina?',
                    options: ['Within 300 feet of an oncoming vehicle', 'Within 500 feet of an oncoming vehicle', 'Only in cities', 'Never'],
                    correctAnswer: 1,
                    topic: 'Lighting',
                    explanation: 'Dim high beams within 500 feet of an oncoming vehicle in North Carolina.'
                },
                {
                    id: 33,
                    category: 'car',
                    question: 'What is the minimum age for a learner\'s permit in North Carolina?',
                    options: ['14 years', '15', '15 years 6 months', '16'],
                    correctAnswer: 1,
                    topic: 'Licensing',
                    explanation: 'Minimum age for learner\'s permit in North Carolina is 15.'
                },
                {
                    id: 34,
                    category: 'car',
                    question: 'When approaching a railroad crossing with flashing lights in North Carolina, you must stop:',
                    options: ['At the crossing', 'Between 15 and 50 feet from tracks', '100 feet from tracks', 'Only if a train is visible'],
                    correctAnswer: 1,
                    topic: 'Railroad Crossings',
                    explanation: 'Stop between 15 and 50 feet from railroad tracks when lights are flashing in North Carolina.'
                },
                {
                    id: 35,
                    category: 'car',
                    question: 'What does a red flashing light mean in North Carolina?',
                    options: ['Proceed with caution', 'Stop and proceed when safe', 'Stop completely', 'Yield'],
                    correctAnswer: 2,
                    topic: 'Traffic Signals',
                    explanation: 'Red flashing light means stop completely in North Carolina.'
                },
                {
                    id: 36,
                    category: 'car',
                    question: 'How long do you have to renew your license before it expires in North Carolina?',
                    options: ['30 days', '60 days', '6 months', '1 year'],
                    correctAnswer: 2,
                    topic: 'Licensing',
                    explanation: 'You can renew your North Carolina license up to 6 months before expiration.'
                },
                {
                    id: 37,
                    category: 'car',
                    question: 'What should you do if you miss your exit on a highway in North Carolina?',
                    options: ['Back up', 'Make a U-turn', 'Continue to next exit', 'Stop and reverse'],
                    correctAnswer: 2,
                    topic: 'Highway Driving',
                    explanation: 'Continue to the next exit if you miss your exit in North Carolina.'
                },
                {
                    id: 38,
                    category: 'car',
                    question: 'What does a green traffic light mean in North Carolina?',
                    options: ['Go if clear', 'Speed up', 'Yield to pedestrians', 'Both A and C'],
                    correctAnswer: 3,
                    topic: 'Traffic Signals',
                    explanation: 'Green light means go if clear, but yield to pedestrians in North Carolina.'
                },
                {
                    id: 39,
                    category: 'car',
                    question: 'When parking downhill with a curb in North Carolina, turn wheels:',
                    options: ['Away from curb', 'Toward curb', 'Straight', 'It doesn\'t matter'],
                    correctAnswer: 1,
                    topic: 'Parking',
                    explanation: 'Turn wheels toward curb when parking downhill in North Carolina.'
                },
                {
                    id: 40,
                    category: 'car',
                    question: 'What should you do when being passed by another vehicle in North Carolina?',
                    options: ['Speed up', 'Move to left lane', 'Slow down slightly', 'Maintain speed'],
                    correctAnswer: 2,
                    topic: 'Passing',
                    explanation: 'Slow down slightly when being passed in North Carolina.'
                },
                {
                    id: 41,
                    category: 'car',
                    question: 'What is the penalty for passing a stopped school bus in North Carolina?',
                    options: ['$150 fine', '$250 fine', '$500 minimum fine', '$1,000 minimum fine'],
                    correctAnswer: 2,
                    topic: 'School Buses',
                    explanation: 'Penalty for passing stopped school bus is minimum $500 fine in North Carolina.'
                },
                {
                    id: 42,
                    category: 'car',
                    question: 'When turning left at an intersection in North Carolina, yield to:',
                    options: ['Pedestrians', 'Oncoming traffic', 'Both A and B', 'Neither A nor B'],
                    correctAnswer: 2,
                    topic: 'Turning',
                    explanation: 'Yield to pedestrians and oncoming traffic when turning left in North Carolina.'
                },
                {
                    id: 43,
                    category: 'car',
                    question: 'What does a blue sign indicate in North Carolina?',
                    options: ['Motorist services', 'Warning', 'Regulation', 'Construction'],
                    correctAnswer: 0,
                    topic: 'Road Signs',
                    explanation: 'Blue signs indicate motorist services in North Carolina.'
                },
                {
                    id: 44,
                    category: 'car',
                    question: 'How many hours of driving practice are required for a teen license in North Carolina?',
                    options: ['20 hours', '40 hours', '60 hours', '80 hours'],
                    correctAnswer: 2,
                    topic: 'Licensing',
                    explanation: '60 hours of practice required for teen license in North Carolina, including 10 at night.'
                },
                {
                    id: 45,
                    category: 'car',
                    question: 'What should you do if you get tired while driving in North Carolina?',
                    options: ['Open windows', 'Turn up radio', 'Take a break', 'Drink coffee'],
                    correctAnswer: 2,
                    topic: 'Safe Driving',
                    explanation: 'Take a break if tired while driving.'
                },
                {
                    id: 46,
                    category: 'car',
                    question: 'What does a pentagon-shaped sign indicate in North Carolina?',
                    options: ['School zone', 'Stop ahead', 'Yield', 'No passing'],
                    correctAnswer: 0,
                    topic: 'Road Signs',
                    explanation: 'Pentagon-shaped signs indicate school zones in North Carolina.'
                },
                {
                    id: 47,
                    category: 'car',
                    question: 'When should you use your hazard lights in North Carolina?',
                    options: ['When parking illegally', 'When driving slow', 'When stopped on road', 'When warning of hazard'],
                    correctAnswer: 3,
                    topic: 'Emergency Equipment',
                    explanation: 'Use hazard lights to warn other drivers of a hazard ahead in North Carolina.'
                },
                {
                    id: 48,
                    category: 'car',
                    question: 'What is the penalty for littering from a vehicle in North Carolina?',
                    options: ['$100 fine', '$250 fine', '$500 fine', '$1,000 fine'],
                    correctAnswer: 3,
                    topic: 'Traffic Laws',
                    explanation: 'Littering fine can be up to $1,000 in North Carolina.'
                },
                {
                    id: 49,
                    category: 'car',
                    question: 'When can you drive in a bike lane in North Carolina?',
                    options: ['To pass another vehicle', 'To make a right turn', 'When traffic is heavy', 'Never'],
                    correctAnswer: 1,
                    topic: 'Lane Usage',
                    explanation: 'You may enter bike lane to make a right turn in North Carolina.'
                },
                {
                    id: 50,
                    category: 'car',
                    question: 'What does a brown sign indicate in North Carolina?',
                    options: ['Park and recreation areas', 'Hospital', 'Construction', 'Warning'],
                    correctAnswer: 0,
                    topic: 'Road Signs',
                    explanation: 'Brown signs indicate park and recreation areas in North Carolina.'
                },
                {
                    id: 51,
                    category: 'car',
                    question: 'What is the blood alcohol limit for commercial drivers in North Carolina?',
                    options: ['0.02%', '0.04%', '0.08%', '0.10%'],
                    correctAnswer: 1,
                    topic: 'DUI Laws',
                    explanation: 'Commercial drivers have a 0.04% BAC limit in North Carolina.'
                },
                {
                    id: 52,
                    category: 'car',
                    question: 'When must you turn on headlights in North Carolina?',
                    options: ['30 minutes after sunset', 'When raining', 'Both A and B', 'Only at night'],
                    correctAnswer: 2,
                    topic: 'Lighting',
                    explanation: 'Headlights required 30 minutes after sunset and during rain in North Carolina.'
                },
                {
                    id: 53,
                    category: 'car',
                    question: 'What is the fine for speeding in a construction zone in North Carolina?',
                    options: ['Double the normal fine', 'Triple the fine', 'Same as normal', '$500 minimum'],
                    correctAnswer: 0,
                    topic: 'Speed Limits',
                    explanation: 'Fines are doubled in construction zones in North Carolina.'
                },
                {
                    id: 54,
                    category: 'car',
                    question: 'When parking parallel to a curb in North Carolina, how close must you be?',
                    options: ['6 inches', '12 inches', '18 inches', '24 inches'],
                    correctAnswer: 1,
                    topic: 'Parking',
                    explanation: 'Park within 12 inches of curb in North Carolina.'
                },
                {
                    id: 55,
                    category: 'car',
                    question: 'What does a triangular sign mean in North Carolina?',
                    options: ['Stop', 'Yield', 'No entry', 'Warning'],
                    correctAnswer: 1,
                    topic: 'Road Signs',
                    explanation: 'Triangular signs mean yield in North Carolina.'
                },
                {
                    id: 56,
                    category: 'car',
                    question: 'How long is a driver\'s license valid in North Carolina?',
                    options: ['2 years', '5 years', '8 years', '10 years'],
                    correctAnswer: 1,
                    topic: 'Licensing',
                    explanation: 'North Carolina driver\'s licenses are valid for 5 years.'
                },
                {
                    id: 57,
                    category: 'car',
                    question: 'What should you do at a yellow light in North Carolina?',
                    options: ['Speed up', 'Stop if safe', 'Proceed with caution', 'Both B and C'],
                    correctAnswer: 3,
                    topic: 'Traffic Signals',
                    explanation: 'Stop if safe, otherwise proceed with caution at yellow light in North Carolina.'
                },
                {
                    id: 58,
                    category: 'car',
                    question: 'When can you use the center turn lane in North Carolina?',
                    options: ['For passing', 'For left turns only', 'For through traffic', 'For parking'],
                    correctAnswer: 1,
                    topic: 'Lane Usage',
                    explanation: 'Center turn lane is for left turns only in North Carolina.'
                },
                {
                    id: 59,
                    category: 'car',
                    question: 'What is the minimum insurance coverage in North Carolina?',
                    options: ['30/60/25', '25/50/25', '100/300/100', '50/100/50'],
                    correctAnswer: 0,
                    topic: 'Insurance',
                    explanation: 'Minimum insurance in North Carolina is $30,000/$60,000/$25,000.'
                },
                {
                    id: 60,
                    category: 'car',
                    question: 'When should you use your turn signal in North Carolina?',
                    options: ['Before changing lanes', 'Before turning', '100 feet before turn', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Turning',
                    explanation: 'Use signals before changing lanes, turning, and 100 feet before turn in North Carolina.'
                },
                {
                    id: 61,
                    category: 'car',
                    question: 'What does a red sign usually indicate in North Carolina?',
                    options: ['Warning', 'Regulation', 'Guide', 'Service'],
                    correctAnswer: 1,
                    topic: 'Road Signs',
                    explanation: 'Red signs indicate regulatory information in North Carolina.'
                },
                {
                    id: 62,
                    category: 'car',
                    question: 'How many points cause license suspension in North Carolina?',
                    options: ['8 points in 3 years', '12 points in 3 years', '15 points in 3 years', '20 points in 3 years'],
                    correctAnswer: 1,
                    topic: 'Traffic Laws',
                    explanation: '12 points in 3 years causes suspension in North Carolina.'
                },
                {
                    id: 63,
                    category: 'car',
                    question: 'When must you report an accident in North Carolina?',
                    options: ['Over $1,000 damage', 'Injury or death', 'Both A and B', 'Hit and run only'],
                    correctAnswer: 2,
                    topic: 'Accidents',
                    explanation: 'Report accidents with over $1,000 damage or injury/death in North Carolina.'
                },
                {
                    id: 64,
                    category: 'car',
                    question: 'What is the speed limit on rural highways in North Carolina?',
                    options: ['55 mph', '60 mph', '65 mph', '70 mph'],
                    correctAnswer: 1,
                    topic: 'Speed Limits',
                    explanation: 'Rural highway speed limit is 60 mph in North Carolina.'
                },
                {
                    id: 65,
                    category: 'car',
                    question: 'When should you check your mirrors in North Carolina?',
                    options: ['Before changing lanes', 'Before braking', 'Every 5-8 seconds', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Safe Driving',
                    explanation: 'Check mirrors before changing lanes, braking, and every 5-8 seconds.'
                },
                {
                    id: 66,
                    category: 'car',
                    question: 'What does a white line parallel to road mean in North Carolina?',
                    options: ['Edge of roadway', 'Lane divider', 'Stop line', 'Crosswalk'],
                    correctAnswer: 0,
                    topic: 'Road Markings',
                    explanation: 'White line parallel to road indicates edge of roadway in North Carolina.'
                },
                {
                    id: 67,
                    category: 'car',
                    question: 'How close can you follow emergency vehicles in North Carolina?',
                    options: ['100 feet', '200 feet', '300 feet', '500 feet'],
                    correctAnswer: 3,
                    topic: 'Emergency Vehicles',
                    explanation: 'Stay 500 feet behind emergency vehicles in North Carolina.'
                },
                {
                    id: 68,
                    category: 'car',
                    question: 'When is it legal to drive off pavement to pass in North Carolina?',
                    options: ['Never', 'On two-lane roads', 'When safe', 'In emergencies only'],
                    correctAnswer: 0,
                    topic: 'Passing',
                    explanation: 'Never drive off pavement to pass in North Carolina.'
                },
                {
                    id: 69,
                    category: 'car',
                    question: 'What should you do if traffic signal is out in North Carolina?',
                    options: ['Treat as stop sign', 'Proceed with caution', 'Wait for police', 'All of the above'],
                    correctAnswer: 0,
                    topic: 'Traffic Signals',
                    explanation: 'Treat out traffic signal as four-way stop in North Carolina.'
                },
                {
                    id: 70,
                    category: 'car',
                    question: 'How long must you have learner\'s permit before road test in North Carolina?',
                    options: ['30 days', '60 days', '6 months', '1 year'],
                    correctAnswer: 2,
                    topic: 'Licensing',
                    explanation: 'Need learner\'s permit for 6 months before road test in North Carolina.'
                },
                {
                    id: 71,
                    category: 'car',
                    question: 'What does orange sign indicate in North Carolina?',
                    options: ['Construction', 'Warning', 'Regulation', 'Guide'],
                    correctAnswer: 0,
                    topic: 'Road Signs',
                    explanation: 'Orange signs indicate construction zones in North Carolina.'
                },
                {
                    id: 72,
                    category: 'car',
                    question: 'When must you yield to funeral procession in North Carolina?',
                    options: ['Always', 'Never', 'When lead vehicle has flag', 'During daylight only'],
                    correctAnswer: 0,
                    topic: 'Right of Way',
                    explanation: 'Always yield to funeral processions in North Carolina.'
                },
                {
                    id: 73,
                    category: 'car',
                    question: 'What is penalty for reckless driving in North Carolina?',
                    options: ['$100 fine', '$250 fine', 'Up to 6 months in jail', 'License suspension only'],
                    correctAnswer: 2,
                    topic: 'Traffic Laws',
                    explanation: 'Reckless driving can result in up to 6 months in jail in North Carolina.'
                },
                {
                    id: 74,
                    category: 'car',
                    question: 'When should you use parking lights in North Carolina?',
                    options: ['When parked', 'When driving', 'In fog', 'Never'],
                    correctAnswer: 0,
                    topic: 'Lighting',
                    explanation: 'Parking lights for parked vehicles only in North Carolina.'
                },
                {
                    id: 75,
                    category: 'car',
                    question: 'What does green sign indicate in North Carolina?',
                    options: ['Guide information', 'Warning', 'Regulation', 'Construction'],
                    correctAnswer: 0,
                    topic: 'Road Signs',
                    explanation: 'Green signs provide guide information in North Carolina.'
                },
                {
                    id: 76,
                    category: 'car',
                    question: 'When must you stop for school bus on divided highways in North Carolina?',
                    options: ['Always', 'Only if on same side', 'Never', 'Only during school hours'],
                    correctAnswer: 1,
                    topic: 'School Buses',
                    explanation: 'On divided highways, only stop if you are on the same side as the bus in North Carolina.'
                },
                {
                    id: 77,
                    category: 'car',
                    question: 'What is legal tint limit on front side windows in North Carolina?',
                    options: ['20%', '30%', '35%', '50%'],
                    correctAnswer: 2,
                    topic: 'Vehicle Equipment',
                    explanation: 'Legal tint limit is 35% VLT on front side windows in North Carolina.'
                },
                {
                    id: 78,
                    category: 'car',
                    question: 'When can you cross double yellow lines in North Carolina?',
                    options: ['To pass', 'To turn left', 'In emergencies', 'All of the above'],
                    correctAnswer: 1,
                    topic: 'Road Markings',
                    explanation: 'Cross double yellow lines to turn left only in North Carolina.'
                },
                {
                    id: 79,
                    category: 'car',
                    question: 'What does flashing red arrow mean in North Carolina?',
                    options: ['Stop then proceed', 'Yield', 'Protected turn', 'No turn allowed'],
                    correctAnswer: 0,
                    topic: 'Traffic Signals',
                    explanation: 'Flashing red arrow means stop then proceed when clear in North Carolina.'
                },
                {
                    id: 80,
                    category: 'car',
                    question: 'How long after moving must you get North Carolina license?',
                    options: ['10 days', '30 days', '60 days', '90 days'],
                    correctAnswer: 2,
                    topic: 'Licensing',
                    explanation: 'Get North Carolina license within 60 days of moving.'
                },
                {
                    id: 81,
                    category: 'car',
                    question: 'What should you do if brake fails in North Carolina?',
                    options: ['Use parking brake', 'Downshift', 'Both A and B', 'Steer off road'],
                    correctAnswer: 2,
                    topic: 'Emergency Procedures',
                    explanation: 'Use parking brake and downshift if brakes fail.'
                },
                {
                    id: 82,
                    category: 'car',
                    question: 'When can you pass on right in North Carolina?',
                    options: ['On one-way streets', 'When left turn lane exists', 'Both A and B', 'Never'],
                    correctAnswer: 2,
                    topic: 'Passing',
                    explanation: 'Pass on right on one-way streets or when left turn lane exists in North Carolina.'
                },
                {
                    id: 83,
                    category: 'car',
                    question: 'What does octagon sign mean in North Carolina?',
                    options: ['Stop', 'Yield', 'School', 'Railroad'],
                    correctAnswer: 0,
                    topic: 'Road Signs',
                    explanation: 'Octagon signs mean stop in North Carolina.'
                },
                {
                    id: 84,
                    category: 'car',
                    question: 'How many passengers can teen driver have in North Carolina?',
                    options: ['0 for first 6 months', '1 for first 6 months', '2 for first 6 months', 'No limit'],
                    correctAnswer: 1,
                    topic: 'Licensing',
                    explanation: 'Teen drivers limited to 1 passenger for first 6 months in North Carolina.'
                },
                {
                    id: 85,
                    category: 'car',
                    question: 'When should you increase following distance in North Carolina?',
                    options: ['In rain', 'At night', 'Behind trucks', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Safe Driving',
                    explanation: 'Increase following distance in rain, at night, and behind trucks.'
                },
                {
                    id: 86,
                    category: 'car',
                    question: 'What does broken white line mean in North Carolina?',
                    options: ['Lane divider', 'Edge of road', 'No passing', 'Merge'],
                    correctAnswer: 0,
                    topic: 'Road Markings',
                    explanation: 'Broken white lines separate lanes going same direction in North Carolina.'
                },
                {
                    id: 87,
                    category: 'car',
                    question: 'When must you use headlights in North Carolina?',
                    options: ['When wipers are on', 'At dusk', 'In tunnels', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Lighting',
                    explanation: 'Use headlights when wipers on, at dusk, and in tunnels in North Carolina.'
                },
                {
                    id: 88,
                    category: 'car',
                    question: 'What is penalty for no insurance in North Carolina?',
                    options: ['$50 fine', '$100 fine', 'License suspension', 'Both B and C'],
                    correctAnswer: 3,
                    topic: 'Insurance',
                    explanation: 'No insurance penalty includes $100 fine and suspension in North Carolina.'
                },
                {
                    id: 89,
                    category: 'car',
                    question: 'When should you slow down in work zone in North Carolina?',
                    options: ['Only when workers present', 'Always', 'During weekdays', 'Never'],
                    correctAnswer: 1,
                    topic: 'Work Zones',
                    explanation: 'Always slow down in work zones in North Carolina.'
                },
                {
                    id: 90,
                    category: 'car',
                    question: 'What does rectangular red sign mean in North Carolina?',
                    options: ['Stop', 'Yield', 'Do not enter', 'Wrong way'],
                    correctAnswer: 2,
                    topic: 'Road Signs',
                    explanation: 'Rectangular red sign means do not enter in North Carolina.'
                },
                {
                    id: 91,
                    category: 'car',
                    question: 'How many feet before turn must you signal in North Carolina?',
                    options: ['50 feet', '100 feet', '200 feet', '300 feet'],
                    correctAnswer: 1,
                    topic: 'Turning',
                    explanation: 'Signal at least 100 feet before turn in North Carolina.'
                },
                {
                    id: 92,
                    category: 'car',
                    question: 'When can you park in handicapped space in North Carolina?',
                    options: ['With permit', 'After 6 PM', 'On Sundays', 'Never without permit'],
                    correctAnswer: 3,
                    topic: 'Parking',
                    explanation: 'Never park in handicapped space without permit in North Carolina.'
                },
                {
                    id: 93,
                    category: 'car',
                    question: 'What does flashing yellow arrow mean in North Carolina?',
                    options: ['Protected turn', 'Permissive turn', 'No turn', 'Yield then turn'],
                    correctAnswer: 1,
                    topic: 'Traffic Signals',
                    explanation: 'Flashing yellow arrow means permissive turn (yield first) in North Carolina.'
                },
                {
                    id: 94,
                    category: 'car',
                    question: 'How old for graduated license in North Carolina?',
                    options: ['14 years 6 months', '15', '15 years 6 months', '16'],
                    correctAnswer: 1,
                    topic: 'Licensing',
                    explanation: 'Can get graduated license at 15 in North Carolina.'
                },
                {
                    id: 95,
                    category: 'car',
                    question: 'When should you avoid passing in North Carolina?',
                    options: ['On hills', 'At intersections', 'Near railroads', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Passing',
                    explanation: 'Avoid passing on hills, at intersections, and near railroads in North Carolina.'
                },
                {
                    id: 96,
                    category: 'car',
                    question: 'What does blue curb indicate in North Carolina?',
                    options: ['Handicapped parking', 'Loading zone', 'No parking', 'Fire zone'],
                    correctAnswer: 0,
                    topic: 'Parking',
                    explanation: 'Blue curb indicates handicapped parking in North Carolina.'
                },
                {
                    id: 97,
                    category: 'car',
                    question: 'When must headrest be adjusted in North Carolina?',
                    options: ['Middle of head', 'Top of ears', 'Base of skull', 'Doesn\'t matter'],
                    correctAnswer: 2,
                    topic: 'Safety Equipment',
                    explanation: 'Headrest should be at base of skull in North Carolina.'
                },
                {
                    id: 98,
                    category: 'car',
                    question: 'What does diamond-shaped sign mean in North Carolina?',
                    options: ['Warning', 'Regulation', 'Guide', 'Service'],
                    correctAnswer: 0,
                    topic: 'Road Signs',
                    explanation: 'Diamond-shaped signs are warning signs in North Carolina.'
                },
                {
                    id: 99,
                    category: 'car',
                    question: 'When can you use HOV lane in North Carolina (if available)?',
                    options: ['With 2+ people', 'Motorcycles', 'Buses', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Lane Usage',
                    explanation: 'HOV lanes for 2+ people, motorcycles, and buses in North Carolina.'
                },
                {
                    id: 100,
                    category: 'car',
                    question: 'What is North Carolina\'s "Implied Consent Law"?',
                    options: ['Consent to breath test when driving', 'Consent to insurance', 'Consent to vehicle inspection', 'Consent to license check'],
                    correctAnswer: 0,
                    topic: 'DUI Laws',
                    explanation: 'Implied Consent Law means you agree to chemical testing when driving in North Carolina.'
                }
            ];
        }
        
        // Generate 100 North Carolina CDL questions
        function generateCDLQuestions() {
            return [
                {
                    id: 1,
                    category: 'cdl',
                    question: 'What is the minimum tread depth for steering axle tires on a commercial vehicle in North Carolina?',
                    options: ['1/32 inch', '2/32 inch', '4/32 inch', '6/32 inch'],
                    correctAnswer: 2,
                    topic: 'Vehicle Inspection',
                    explanation: 'Steering axle tires must have at least 4/32 inch tread depth in North Carolina.'
                },
                {
                    id: 2,
                    category: 'cdl',
                    question: 'How far ahead should a commercial vehicle signal before turning in North Carolina?',
                    options: ['50 feet', '100 feet', 'At least 100 feet', '200 feet'],
                    correctAnswer: 2,
                    topic: 'Safe Operation',
                    explanation: 'Commercial vehicles should signal at least 100 feet before turning in North Carolina.'
                },
                {
                    id: 3,
                    category: 'cdl',
                    question: 'What is the maximum driving time allowed before taking a break under North Carolina regulations?',
                    options: ['6 hours', '8 hours', '10 hours', '11 hours'],
                    correctAnswer: 3,
                    topic: 'Hours of Service',
                    explanation: 'Maximum driving time is 11 hours after 10 consecutive hours off duty in North Carolina.'
                },
                {
                    id: 4,
                    category: 'cdl',
                    question: 'What should you check during a pre-trip inspection of air brakes in North Carolina?',
                    options: ['Air pressure buildup time', 'Brake adjustment', 'Both A and B', 'Neither A nor B'],
                    correctAnswer: 2,
                    topic: 'Air Brakes',
                    explanation: 'Check both air pressure buildup time and brake adjustment during pre-trip inspection in North Carolina.'
                },
                {
                    id: 5,
                    category: 'cdl',
                    question: 'When backing a commercial vehicle in North Carolina, you should:',
                    options: ['Use mirrors only', 'Get out and look when necessary', 'Rely on a helper', 'Back quickly to minimize time'],
                    correctAnswer: 1,
                    topic: 'Backing',
                    explanation: 'Always get out and look when backing a commercial vehicle if unsure in North Carolina.'
                },
                {
                    id: 6,
                    category: 'cdl',
                    question: 'What is the minimum following distance for commercial vehicles in North Carolina?',
                    options: ['3 seconds', '4 seconds', '5 seconds', '6 seconds'],
                    correctAnswer: 3,
                    topic: 'Following Distance',
                    explanation: 'Commercial vehicles should maintain at least 6 seconds following distance in North Carolina.'
                },
                {
                    id: 7,
                    category: 'cdl',
                    question: 'How should you handle a front-wheel skid in a commercial vehicle on North Carolina roads?',
                    options: ['Brake hard', 'Accelerate', 'Steer in direction you want to go', 'Do nothing'],
                    correctAnswer: 2,
                    topic: 'Skid Control',
                    explanation: 'Steer in the direction you want the front of the vehicle to go during a front-wheel skid in North Carolina.'
                },
                {
                    id: 8,
                    category: 'cdl',
                    question: 'What is the maximum width for a commercial vehicle in North Carolina?',
                    options: ['96 inches', '102 inches', '108 inches', '120 inches'],
                    correctAnswer: 1,
                    topic: 'Vehicle Dimensions',
                    explanation: 'Maximum width for commercial vehicles in North Carolina is 102 inches.'
                },
                {
                    id: 9,
                    category: 'cdl',
                    question: 'When must you use chocks when parking a commercial vehicle in North Carolina?',
                    options: ['Always when parked', 'Only on inclines', 'Never required', 'Only when transporting hazardous materials'],
                    correctAnswer: 0,
                    topic: 'Parking',
                    explanation: 'Always use chocks when parking a commercial vehicle in North Carolina.'
                },
                {
                    id: 10,
                    category: 'cdl',
                    question: 'What is the minimum liability insurance required for commercial vehicles in North Carolina?',
                    options: ['$100,000', '$500,000', '$750,000', '$1,000,000'],
                    correctAnswer: 1,
                    topic: 'Insurance',
                    explanation: 'Minimum liability insurance for commercial vehicles in North Carolina is $500,000.'
                },
                {
                    id: 11,
                    category: 'cdl',
                    question: 'What is the maximum weight allowed on a single axle in North Carolina?',
                    options: ['20,000 lbs', '22,400 lbs', '34,000 lbs', '40,000 lbs'],
                    correctAnswer: 1,
                    topic: 'Weight Limits',
                    explanation: 'Maximum single axle weight is 22,400 lbs in North Carolina.'
                },
                {
                    id: 12,
                    category: 'cdl',
                    question: 'When should you perform a brake check in a commercial vehicle in North Carolina?',
                    options: ['Before starting trip', 'After brake adjustment', 'Both A and B', 'Only during annual inspection'],
                    correctAnswer: 2,
                    topic: 'Air Brakes',
                    explanation: 'Perform brake check before starting trip and after any adjustment in North Carolina.'
                },
                {
                    id: 13,
                    category: 'cdl',
                    question: 'What is the minimum age for a CDL in North Carolina for interstate commerce?',
                    options: ['18', '21', '25', 'No minimum'],
                    correctAnswer: 1,
                    topic: 'Licensing',
                    explanation: 'Minimum age for CDL in North Carolina is 21 for interstate commerce.'
                },
                {
                    id: 14,
                    category: 'cdl',
                    question: 'How often must you check your mirrors while driving in North Carolina?',
                    options: ['Every 5-8 seconds', 'Every minute', 'Only when changing lanes', 'When approaching intersections'],
                    correctAnswer: 0,
                    topic: 'Safe Operation',
                    explanation: 'Check mirrors every 5-8 seconds while driving in North Carolina.'
                },
                {
                    id: 15,
                    category: 'cdl',
                    question: 'What does a low air pressure warning indicate in North Carolina?',
                    options: ['Normal operation', 'Air pressure below 60 psi', 'Brake system failure', 'Tire pressure low'],
                    correctAnswer: 1,
                    topic: 'Air Brakes',
                    explanation: 'Low air pressure warning activates below 60 psi in North Carolina.'
                },
                {
                    id: 16,
                    category: 'cdl',
                    question: 'When must you stop at railroad crossings in North Carolina?',
                    options: ['Only when flashing', 'For all crossings', 'When carrying hazardous materials', 'Both B and C'],
                    correctAnswer: 3,
                    topic: 'Railroad Crossings',
                    explanation: 'Stop at all railroad crossings and always when carrying hazardous materials in North Carolina.'
                },
                {
                    id: 17,
                    category: 'cdl',
                    question: 'What is the maximum length for a single commercial vehicle in North Carolina?',
                    options: ['40 feet', '50 feet', '60 feet', '75 feet'],
                    correctAnswer: 1,
                    topic: 'Vehicle Dimensions',
                    explanation: 'Maximum length for single vehicle is 50 feet in North Carolina.'
                },
                {
                    id: 18,
                    category: 'cdl',
                    question: 'How should you handle a tire blowout in North Carolina?',
                    options: ['Brake hard', 'Steer straight, ease off gas', 'Accelerate', 'Turn quickly'],
                    correctAnswer: 1,
                    topic: 'Emergency Procedures',
                    explanation: 'Steer straight and ease off gas during tire blowout in North Carolina.'
                },
                {
                    id: 19,
                    category: 'cdl',
                    question: 'What must be checked during coupling inspection in North Carolina?',
                    options: ['Fifth wheel locking', 'Air line connections', 'Both A and B', 'Neither A nor B'],
                    correctAnswer: 2,
                    topic: 'Coupling',
                    explanation: 'Check both fifth wheel locking and air line connections in North Carolina.'
                },
                {
                    id: 20,
                    category: 'cdl',
                    question: 'When is a pre-trip inspection required in North Carolina?',
                    options: ['Before each trip', 'Daily', 'Weekly', 'Monthly'],
                    correctAnswer: 1,
                    topic: 'Vehicle Inspection',
                    explanation: 'Pre-trip inspection required daily in North Carolina.'
                },
                {
                    id: 21,
                    category: 'cdl',
                    question: 'What is the blood alcohol limit for CDL holders in North Carolina?',
                    options: ['0.02%', '0.04%', '0.08%', '0.10%'],
                    correctAnswer: 1,
                    topic: 'DUI Laws',
                    explanation: 'CDL holders have 0.04% BAC limit in North Carolina.'
                },
                {
                    id: 22,
                    category: 'cdl',
                    question: 'How many hours off duty required after 70 hours of driving in North Carolina?',
                    options: ['8 hours', '10 hours', '24 hours', '34 hours'],
                    correctAnswer: 3,
                    topic: 'Hours of Service',
                    explanation: '34 hours off duty required after 70 hours of driving in North Carolina.'
                },
                {
                    id: 23,
                    category: 'cdl',
                    question: 'What does anti-lock brake system (ABS) help prevent in North Carolina?',
                    options: ['Wheel lockup', 'Brake fade', 'Air leaks', 'All of the above'],
                    correctAnswer: 0,
                    topic: 'Brake Systems',
                    explanation: 'ABS helps prevent wheel lockup during braking in North Carolina.'
                },
                {
                    id: 24,
                    category: 'cdl',
                    question: 'When must you use seat belts in commercial vehicles in North Carolina?',
                    options: ['Always', 'Only on highways', 'When required by company', 'Never required'],
                    correctAnswer: 0,
                    topic: 'Safety Equipment',
                    explanation: 'Seat belts must always be worn in commercial vehicles in North Carolina.'
                },
                {
                    id: 25,
                    category: 'cdl',
                    question: 'What is the maximum driving time in a 7-day period in North Carolina?',
                    options: ['60 hours', '70 hours', '80 hours', 'No limit'],
                    correctAnswer: 1,
                    topic: 'Hours of Service',
                    explanation: 'Maximum 70 hours driving in 7-day period in North Carolina.'
                },
                {
                    id: 26,
                    category: 'cdl',
                    question: 'How should cargo be secured for North Carolina roads?',
                    options: ['Front to back', 'Side to side', 'Both A and B', 'No requirement'],
                    correctAnswer: 2,
                    topic: 'Cargo Securement',
                    explanation: 'Secure cargo both front to back and side to side in North Carolina.'
                },
                {
                    id: 27,
                    category: 'cdl',
                    question: 'When should you check tire pressure in North Carolina?',
                    options: ['Daily', 'Weekly', 'Monthly', 'Only when flat'],
                    correctAnswer: 0,
                    topic: 'Vehicle Inspection',
                    explanation: 'Check tire pressure daily during pre-trip inspection in North Carolina.'
                },
                {
                    id: 28,
                    category: 'cdl',
                    question: 'What is the purpose of engine retarders in North Carolina?',
                    options: ['Increase speed', 'Help slow vehicle without brakes', 'Improve fuel economy', 'Reduce emissions'],
                    correctAnswer: 1,
                    topic: 'Vehicle Systems',
                    explanation: 'Engine retarders help slow vehicle without using service brakes in North Carolina.'
                },
                {
                    id: 29,
                    category: 'cdl',
                    question: 'When must you have a fire extinguisher in North Carolina?',
                    options: ['Always', 'Only for hazardous materials', 'For passenger vehicles only', 'Not required'],
                    correctAnswer: 0,
                    topic: 'Safety Equipment',
                    explanation: 'Fire extinguisher required in all commercial vehicles in North Carolina.'
                },
                {
                    id: 30,
                    category: 'cdl',
                    question: 'How wide are commercial vehicle mirrors required to show in North Carolina?',
                    options: ['100 feet', '200 feet', '300 feet', '500 feet'],
                    correctAnswer: 1,
                    topic: 'Vehicle Equipment',
                    explanation: 'Mirrors must show 200 feet to rear in North Carolina.'
                },
                {
                    id: 31,
                    category: 'cdl',
                    question: 'What special equipment is required for commercial vehicles in North Carolina during winter?',
                    options: ['Snow tires or chains', 'Windshield wipers', 'Both A and B', 'No special equipment needed'],
                    correctAnswer: 2,
                    topic: 'Weather Equipment',
                    explanation: 'Snow tires or chains and proper windshield wipers are required in North Carolina during winter.'
                },
                {
                    id: 32,
                    category: 'cdl',
                    question: 'How should you adjust driving for North Carolina\'s winter roads?',
                    options: ['Use lower gears', 'Reduce speed on snow/ice', 'Increase following distance', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Winter Driving',
                    explanation: 'Use lower gears, reduce speed on snow/ice, and increase following distance on North Carolina\'s winter roads.'
                },
                {
                    id: 33,
                    category: 'cdl',
                    question: 'What is the penalty for violating hours of service in North Carolina?',
                    options: ['Fine only', 'Fine and out-of-service', 'License suspension', 'Jail time'],
                    correctAnswer: 1,
                    topic: 'Hours of Service',
                    explanation: 'Violation results in fine and out-of-service order in North Carolina.'
                },
                {
                    id: 34,
                    category: 'cdl',
                    question: 'When should you use hazard lights in North Carolina?',
                    options: ['When stopped on road', 'In bad weather', 'When moving slowly', 'When warning of hazard'],
                    correctAnswer: 3,
                    topic: 'Emergency Equipment',
                    explanation: 'Use hazard lights to warn other drivers of a hazard in North Carolina.'
                },
                {
                    id: 35,
                    category: 'cdl',
                    question: 'What is the maximum steering wheel play allowed in North Carolina?',
                    options: ['10 degrees', '20 degrees', '30 degrees', '40 degrees'],
                    correctAnswer: 0,
                    topic: 'Vehicle Inspection',
                    explanation: 'Maximum steering wheel play is 10 degrees in North Carolina.'
                },
                {
                    id: 36,
                    category: 'cdl',
                    question: 'How should you handle jackknife prevention in North Carolina?',
                    options: ['Brake smoothly', 'Avoid sudden steering', 'Both A and B', 'Accelerate through turns'],
                    correctAnswer: 2,
                    topic: 'Skid Control',
                    explanation: 'Brake smoothly and avoid sudden steering to prevent jackknife in North Carolina.'
                },
                {
                    id: 37,
                    category: 'cdl',
                    question: 'When must you have reflective triangles in North Carolina?',
                    options: ['All commercial vehicles', 'Only trucks', 'Only at night', 'Not required'],
                    correctAnswer: 0,
                    topic: 'Safety Equipment',
                    explanation: 'Reflective triangles required for all commercial vehicles in North Carolina.'
                },
                {
                    id: 38,
                    category: 'cdl',
                    question: 'What is the maximum height for commercial vehicles in North Carolina?',
                    options: ['12 feet', '13 feet 6 inches', '14 feet', '15 feet'],
                    correctAnswer: 1,
                    topic: 'Vehicle Dimensions',
                    explanation: 'Maximum height is 13 feet 6 inches in North Carolina.'
                },
                {
                    id: 39,
                    category: 'cdl',
                    question: 'How often must log books be updated in North Carolina?',
                    options: ['Daily', 'Weekly', 'Monthly', 'After each trip'],
                    correctAnswer: 0,
                    topic: 'Hours of Service',
                    explanation: 'Log books must be updated daily in North Carolina.'
                },
                {
                    id: 40,
                    category: 'cdl',
                    question: 'When should you check brake adjustment in North Carolina?',
                    options: ['Daily', 'Weekly', 'Monthly', 'Only when problems occur'],
                    correctAnswer: 0,
                    topic: 'Vehicle Inspection',
                    explanation: 'Check brake adjustment daily in North Carolina.'
                },
                {
                    id: 41,
                    category: 'cdl',
                    question: 'What is North Carolina\'s annual inspection requirement for commercial vehicles?',
                    options: ['Annual for vehicles over 10,000 lbs', 'Biennial for all vehicles', 'No requirement', 'Only for diesel vehicles'],
                    correctAnswer: 0,
                    topic: 'Vehicle Regulations',
                    explanation: 'Annual inspection required for commercial vehicles over 10,000 lbs in North Carolina.'
                },
                {
                    id: 42,
                    category: 'cdl',
                    question: 'What special training is required for transporting hazardous materials in North Carolina?',
                    options: ['Hazmat endorsement', 'Security awareness training', 'Both A and B', 'No special training'],
                    correctAnswer: 2,
                    topic: 'Hazardous Materials',
                    explanation: 'Hazmat endorsement and security awareness training required in North Carolina.'
                },
                {
                    id: 43,
                    category: 'cdl',
                    question: 'When must you use engine brake silencers in North Carolina?',
                    options: ['In residential areas', 'At all times', 'Only at night', 'Not required'],
                    correctAnswer: 0,
                    topic: 'Noise Regulations',
                    explanation: 'Engine brake silencers required in residential areas in North Carolina.'
                },
                {
                    id: 44,
                    category: 'cdl',
                    question: 'What is North Carolina\'s idling limitation for commercial vehicles?',
                    options: ['3 minutes', '5 minutes', '10 minutes', 'No limitation'],
                    correctAnswer: 1,
                    topic: 'Environmental Regulations',
                    explanation: 'Maximum 5 minutes idling allowed in North Carolina.'
                },
                {
                    id: 45,
                    category: 'cdl',
                    question: 'What is the penalty for overweight violations in North Carolina?',
                    options: ['$100 per 500 lbs', '$250 per 500 lbs', '$500 per 500 lbs', '$1,000 per 500 lbs'],
                    correctAnswer: 1,
                    topic: 'Weight Limits',
                    explanation: 'Overweight penalty is approximately $250 per 500 lbs over limit in North Carolina.'
                },
                {
                    id: 46,
                    category: 'cdl',
                    question: 'When must you have North Carolina State inspection?',
                    options: ['Annually', 'Biennially', 'When requested', 'Never'],
                    correctAnswer: 0,
                    topic: 'Vehicle Inspection',
                    explanation: 'Annual State inspection required for certain commercial vehicles in North Carolina.'
                },
                {
                    id: 47,
                    category: 'cdl',
                    question: 'What is required for transporting agricultural products in North Carolina?',
                    options: ['Special ventilation', 'Covered loads', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Agricultural Transport',
                    explanation: 'Special ventilation and covered loads required for agricultural product transport in North Carolina.'
                },
                {
                    id: 48,
                    category: 'cdl',
                    question: 'How often must you renew medical certificate in North Carolina?',
                    options: ['Every 6 months', 'Every year', 'Every 2 years', 'Every 5 years'],
                    correctAnswer: 1,
                    topic: 'Medical Requirements',
                    explanation: 'Medical certificate must be renewed annually in North Carolina.'
                },
                {
                    id: 49,
                    category: 'cdl',
                    question: 'What is North Carolina\'s requirement for reflective tape on trailers?',
                    options: ['Required on all trailers', 'Only on long trailers', 'Only at night', 'Not required'],
                    correctAnswer: 0,
                    topic: 'Vehicle Equipment',
                    explanation: 'Reflective tape required on all commercial trailers in North Carolina.'
                },
                {
                    id: 50,
                    category: 'cdl',
                    question: 'When must you stop at weigh stations in North Carolina?',
                    options: ['When open and sign says "All Trucks"', 'Only if overweight', 'Only commercial vehicles', 'All of the above'],
                    correctAnswer: 0,
                    topic: 'Weight Stations',
                    explanation: 'Must stop at open weigh stations when sign says "All Trucks" in North Carolina.'
                },
                {
                    id: 51,
                    category: 'cdl',
                    question: 'What is the maximum gross vehicle weight allowed in North Carolina?',
                    options: ['60,000 lbs', '80,000 lbs', '100,000 lbs', '120,000 lbs'],
                    correctAnswer: 1,
                    topic: 'Weight Limits',
                    explanation: 'Maximum gross vehicle weight is 80,000 lbs in North Carolina.'
                },
                {
                    id: 52,
                    category: 'cdl',
                    question: 'How many hours of driving are allowed after 8 consecutive hours off duty?',
                    options: ['8 hours', '10 hours', '11 hours', '12 hours'],
                    correctAnswer: 2,
                    topic: 'Hours of Service',
                    explanation: 'Maximum 11 hours driving after 8 consecutive hours off duty in North Carolina.'
                },
                {
                    id: 53,
                    category: 'cdl',
                    question: 'What is the minimum cargo securement requirement in North Carolina?',
                    options: ['One tie-down per 10 feet', 'One tie-down per 20 feet', 'Based on weight', 'No requirement'],
                    correctAnswer: 0,
                    topic: 'Cargo Securement',
                    explanation: 'Minimum one tie-down per 10 feet of cargo in North Carolina.'
                },
                {
                    id: 54,
                    category: 'cdl',
                    question: 'When must you have a commercial driver\'s license in North Carolina?',
                    options: ['Vehicle over 26,001 lbs', 'Vehicle over 10,000 lbs', 'Any commercial vehicle', 'Only for hazardous materials'],
                    correctAnswer: 0,
                    topic: 'Licensing',
                    explanation: 'CDL required for vehicles over 26,001 lbs in North Carolina.'
                },
                {
                    id: 55,
                    category: 'cdl',
                    question: 'What is the penalty for logbook falsification in North Carolina?',
                    options: ['$250 fine', '$500 fine', '$1,000 fine', 'Civil penalty up to $10,000'],
                    correctAnswer: 3,
                    topic: 'Hours of Service',
                    explanation: 'Logbook falsification can result in civil penalty up to $10,000 in North Carolina.'
                },
                {
                    id: 56,
                    category: 'cdl',
                    question: 'How often must you inspect your fire extinguisher in North Carolina?',
                    options: ['Monthly', 'Quarterly', 'Annually', 'Every 6 months'],
                    correctAnswer: 0,
                    topic: 'Safety Equipment',
                    explanation: 'Fire extinguisher must be inspected monthly in North Carolina.'
                },
                {
                    id: 57,
                    category: 'cdl',
                    question: 'What is the minimum insurance for passenger-carrying vehicles in North Carolina?',
                    options: ['$1.5 million', '$5 million', '$10 million', '$15 million'],
                    correctAnswer: 1,
                    topic: 'Insurance',
                    explanation: 'Minimum $5 million insurance for passenger-carrying vehicles in North Carolina.'
                },
                {
                    id: 58,
                    category: 'cdl',
                    question: 'When must you stop for school buses in North Carolina?',
                    options: ['Always when lights flashing', 'Only on two-lane roads', 'Only in cities', 'Never for commercial vehicles'],
                    correctAnswer: 0,
                    topic: 'School Buses',
                    explanation: 'All vehicles must stop for school buses with flashing lights in North Carolina.'
                },
                {
                    id: 59,
                    category: 'cdl',
                    question: 'What is the maximum tandem axle weight in North Carolina?',
                    options: ['34,000 lbs', '36,000 lbs', '38,000 lbs', '40,000 lbs'],
                    correctAnswer: 0,
                    topic: 'Weight Limits',
                    explanation: 'Maximum tandem axle weight is 34,000 lbs in North Carolina.'
                },
                {
                    id: 60,
                    category: 'cdl',
                    question: 'How many consecutive days off are required in North Carolina?',
                    options: ['1 day in 7', '2 days in 7', '1 day in 30', 'No requirement'],
                    correctAnswer: 0,
                    topic: 'Hours of Service',
                    explanation: 'One consecutive day off required every 7 days in North Carolina.'
                },
                {
                    id: 61,
                    category: 'cdl',
                    question: 'What is required for transporting oversized loads in North Carolina?',
                    options: ['Special permit', 'Escort vehicles', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Oversized Loads',
                    explanation: 'Special permit and escort vehicles required for oversized loads in North Carolina.'
                },
                {
                    id: 62,
                    category: 'cdl',
                    question: 'How far ahead must you signal for lane changes in North Carolina?',
                    options: ['50 feet', '100 feet', '200 feet', '300 feet'],
                    correctAnswer: 1,
                    topic: 'Safe Operation',
                    explanation: 'Signal at least 100 feet before lane changes in North Carolina.'
                },
                {
                    id: 63,
                    category: 'cdl',
                    question: 'What is the penalty for driving without a CDL in North Carolina?',
                    options: ['$100 fine', '$250 fine', '$500 fine', 'Up to $1,000 fine'],
                    correctAnswer: 3,
                    topic: 'Licensing',
                    explanation: 'Driving without CDL can result in up to $1,000 fine in North Carolina.'
                },
                {
                    id: 64,
                    category: 'cdl',
                    question: 'How often must you check wheel nuts on commercial vehicles in North Carolina?',
                    options: ['Daily', 'Weekly', 'Monthly', 'Every 6 months'],
                    correctAnswer: 0,
                    topic: 'Vehicle Inspection',
                    explanation: 'Check wheel nuts daily during pre-trip inspection in North Carolina.'
                },
                {
                    id: 65,
                    category: 'cdl',
                    question: 'What is required for transporting explosives in North Carolina?',
                    options: ['Special placards', 'Fire extinguishers', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Hazardous Materials',
                    explanation: 'Special placards and fire extinguishers required for transporting explosives in North Carolina.'
                },
                {
                    id: 66,
                    category: 'cdl',
                    question: 'How many hours must you be off duty after 14 hours on duty in North Carolina?',
                    options: ['8 hours', '10 hours', '12 hours', '14 hours'],
                    correctAnswer: 1,
                    topic: 'Hours of Service',
                    explanation: '10 consecutive hours off duty required after 14 hours on duty in North Carolina.'
                },
                {
                    id: 67,
                    category: 'cdl',
                    question: 'What is the minimum tread depth for other tires in North Carolina?',
                    options: ['1/32 inch', '2/32 inch', '3/32 inch', '4/32 inch'],
                    correctAnswer: 1,
                    topic: 'Vehicle Inspection',
                    explanation: 'Minimum 2/32 inch tread depth for other tires in North Carolina.'
                },
                {
                    id: 68,
                    category: 'cdl',
                    question: 'When must you use tire chains in North Carolina?',
                    options: ['When signs require', 'In all snow', 'Only in mountains', 'Never required'],
                    correctAnswer: 0,
                    topic: 'Weather Equipment',
                    explanation: 'Tire chains required when signs indicate in North Carolina.'
                },
                {
                    id: 69,
                    category: 'cdl',
                    question: 'What is the penalty for hours of service violation in North Carolina?',
                    options: ['Warning', 'Fine only', 'Out-of-service order', 'Both B and C'],
                    correctAnswer: 3,
                    topic: 'Hours of Service',
                    explanation: 'Hours violation results in fine and out-of-service order in North Carolina.'
                },
                {
                    id: 70,
                    category: 'cdl',
                    question: 'How many days must you keep logbooks in North Carolina?',
                    options: ['7 days', '14 days', '30 days', '6 months'],
                    correctAnswer: 3,
                    topic: 'Hours of Service',
                    explanation: 'Keep logbooks for 6 months in North Carolina.'
                },
                {
                    id: 71,
                    category: 'cdl',
                    question: 'What is required for transporting flammable liquids in North Carolina?',
                    options: ['Special training', 'Proper placards', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Hazardous Materials',
                    explanation: 'Special training and proper placards required for flammable liquids in North Carolina.'
                },
                {
                    id: 72,
                    category: 'cdl',
                    question: 'How many hours driving in 8-day period is maximum in North Carolina?',
                    options: ['60 hours', '70 hours', '80 hours', '90 hours'],
                    correctAnswer: 2,
                    topic: 'Hours of Service',
                    explanation: 'Maximum 80 hours driving in 8-day period in North Carolina.'
                },
                {
                    id: 73,
                    category: 'cdl',
                    question: 'What is the minimum age for intrastate CDL in North Carolina?',
                    options: ['18', '21', '25', 'No minimum'],
                    correctAnswer: 0,
                    topic: 'Licensing',
                    explanation: 'Minimum age for intrastate CDL is 18 in North Carolina.'
                },
                {
                    id: 74,
                    category: 'cdl',
                    question: 'How often must you inspect emergency equipment in North Carolina?',
                    options: ['Daily', 'Weekly', 'Monthly', 'Quarterly'],
                    correctAnswer: 0,
                    topic: 'Safety Equipment',
                    explanation: 'Inspect emergency equipment daily in North Carolina.'
                },
                {
                    id: 75,
                    category: 'cdl',
                    question: 'What is required for transporting radioactive materials in North Carolina?',
                    options: ['Special endorsement', 'Security plan', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Hazardous Materials',
                    explanation: 'Special endorsement and security plan required for radioactive materials in North Carolina.'
                },
                {
                    id: 76,
                    category: 'cdl',
                    question: 'How many hours off after 60 hours in 7 days in North Carolina?',
                    options: ['24 hours', '34 hours', '48 hours', '60 hours'],
                    correctAnswer: 1,
                    topic: 'Hours of Service',
                    explanation: '34 consecutive hours off after 60 hours in 7 days in North Carolina.'
                },
                {
                    id: 77,
                    category: 'cdl',
                    question: 'What is the penalty for defective brakes in North Carolina?',
                    options: ['Warning', 'Fine', 'Out-of-service', 'Both B and C'],
                    correctAnswer: 3,
                    topic: 'Vehicle Inspection',
                    explanation: 'Defective brakes result in fine and out-of-service order in North Carolina.'
                },
                {
                    id: 78,
                    category: 'cdl',
                    question: 'How many hours driving after 34 hours off in North Carolina?',
                    options: ['60 hours', '70 hours', '80 hours', 'Restarts 70-hour clock'],
                    correctAnswer: 3,
                    topic: 'Hours of Service',
                    explanation: '34 hours off restarts 70-hour clock in North Carolina.'
                },
                {
                    id: 79,
                    category: 'cdl',
                    question: 'What is required for transporting corrosives in North Carolina?',
                    options: ['Special containers', 'Emergency equipment', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Hazardous Materials',
                    explanation: 'Special containers and emergency equipment required for corrosives in North Carolina.'
                },
                {
                    id: 80,
                    category: 'cdl',
                    question: 'How many consecutive hours driving maximum in North Carolina?',
                    options: ['8 hours', '10 hours', '11 hours', '12 hours'],
                    correctAnswer: 2,
                    topic: 'Hours of Service',
                    explanation: 'Maximum 11 consecutive hours driving in North Carolina.'
                },
                {
                    id: 81,
                    category: 'cdl',
                    question: 'What is required for tank vehicles in North Carolina?',
                    options: ['Tank endorsement', 'Special training', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Special Endorsements',
                    explanation: 'Tank endorsement and special training required for tank vehicles in North Carolina.'
                },
                {
                    id: 82,
                    category: 'cdl',
                    question: 'What is required for double/triple trailers in North Carolina?',
                    options: ['Double/triple endorsement', 'Special equipment', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Special Endorsements',
                    explanation: 'Double/triple endorsement and special equipment required in North Carolina.'
                },
                {
                    id: 83,
                    category: 'cdl',
                    question: 'How many hours driving in 14-hour period maximum in North Carolina?',
                    options: ['10 hours', '11 hours', '12 hours', '13 hours'],
                    correctAnswer: 1,
                    topic: 'Hours of Service',
                    explanation: 'Maximum 11 hours driving in 14-hour period in North Carolina.'
                },
                {
                    id: 84,
                    category: 'cdl',
                    question: 'What is required for passenger vehicles in North Carolina?',
                    options: ['Passenger endorsement', 'Special insurance', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Special Endorsements',
                    explanation: 'Passenger endorsement and special insurance required in North Carolina.'
                },
                {
                    id: 85,
                    category: 'cdl',
                    question: 'How many hours off after 70 hours in 8 days in North Carolina?',
                    options: ['24 hours', '34 hours', '48 hours', '60 hours'],
                    correctAnswer: 1,
                    topic: 'Hours of Service',
                    explanation: '34 consecutive hours off after 70 hours in 8 days in North Carolina.'
                },
                {
                    id: 86,
                    category: 'cdl',
                    question: 'What is required for school buses in North Carolina?',
                    options: ['School bus endorsement', 'Background check', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Special Endorsements',
                    explanation: 'School bus endorsement and background check required in North Carolina.'
                },
                {
                    id: 87,
                    category: 'cdl',
                    question: 'How many hours driving after 10 hours off in North Carolina?',
                    options: ['8 hours', '10 hours', '11 hours', '12 hours'],
                    correctAnswer: 2,
                    topic: 'Hours of Service',
                    explanation: 'Maximum 11 hours driving after 10 hours off in North Carolina.'
                },
                {
                    id: 88,
                    category: 'cdl',
                    question: 'What is required for transporting gases in North Carolina?',
                    options: ['Special valves', 'Pressure monitoring', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Hazardous Materials',
                    explanation: 'Special valves and pressure monitoring required for gases in North Carolina.'
                },
                {
                    id: 89,
                    category: 'cdl',
                    question: 'How many hours off after 8 days maximum in North Carolina?',
                    options: ['24 hours', '34 hours', '48 hours', '60 hours'],
                    correctAnswer: 1,
                    topic: 'Hours of Service',
                    explanation: '34 consecutive hours off after 8 days maximum in North Carolina.'
                },
                {
                    id: 90,
                    category: 'cdl',
                    question: 'What is required for transporting poisons in North Carolina?',
                    options: ['Special labeling', 'Emergency procedures', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Hazardous Materials',
                    explanation: 'Special labeling and emergency procedures required for poisons in North Carolina.'
                },
                {
                    id: 91,
                    category: 'cdl',
                    question: 'How many hours on duty in 24-hour period maximum in North Carolina?',
                    options: ['10 hours', '12 hours', '14 hours', '16 hours'],
                    correctAnswer: 2,
                    topic: 'Hours of Service',
                    explanation: 'Maximum 14 hours on duty in 24-hour period in North Carolina.'
                },
                {
                    id: 92,
                    category: 'cdl',
                    question: 'What is required for transporting combustibles in North Carolina?',
                    options: ['Fire protection', 'Special storage', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Hazardous Materials',
                    explanation: 'Fire protection and special storage required for combustibles in North Carolina.'
                },
                {
                    id: 93,
                    category: 'cdl',
                    question: 'How many hours driving in 24-hour period maximum in North Carolina?',
                    options: ['8 hours', '10 hours', '11 hours', '12 hours'],
                    correctAnswer: 2,
                    topic: 'Hours of Service',
                    explanation: 'Maximum 11 hours driving in 24-hour period in North Carolina.'
                },
                {
                    id: 94,
                    category: 'cdl',
                    question: 'What is required for transporting oxidizers in North Carolina?',
                    options: ['Special separation', 'Fire control', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Hazardous Materials',
                    explanation: 'Special separation and fire control required for oxidizers in North Carolina.'
                },
                {
                    id: 95,
                    category: 'cdl',
                    question: 'How many days must medical certificate be carried in North Carolina?',
                    options: ['At all times', 'Only at inspection', 'In office', 'Not required'],
                    correctAnswer: 0,
                    topic: 'Medical Requirements',
                    explanation: 'Medical certificate must be carried at all times in North Carolina.'
                },
                {
                    id: 96,
                    category: 'cdl',
                    question: 'What is required for transporting organic peroxides in North Carolina?',
                    options: ['Temperature control', 'Special handling', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Hazardous Materials',
                    explanation: 'Temperature control and special handling required for organic peroxides in North Carolina.'
                },
                {
                    id: 97,
                    category: 'cdl',
                    question: 'How often must you renew CDL in North Carolina?',
                    options: ['Every 4 years', 'Every 6 years', 'Every 8 years', 'Every 10 years'],
                    correctAnswer: 0,
                    topic: 'Licensing',
                    explanation: 'CDL must be renewed every 4 years in North Carolina.'
                },
                {
                    id: 98,
                    category: 'cdl',
                    question: 'What is required for transporting infectious substances in North Carolina?',
                    options: ['Special packaging', 'Biohazard labeling', 'Both A and B', 'No special requirements'],
                    correctAnswer: 2,
                    topic: 'Hazardous Materials',
                    explanation: 'Special packaging and biohazard labeling required for infectious substances in North Carolina.'
                },
                {
                    id: 99,
                    category: 'cdl',
                    question: 'What special considerations are needed for driving in North Carolina\'s winter conditions?',
                    options: ['Watch for black ice in mountains', 'Beware of sudden snow squalls', 'Carry emergency supplies', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Winter Driving',
                    explanation: 'Watch for black ice in mountains, beware of sudden snow squalls, and carry emergency supplies when driving in North Carolina winter conditions.'
                },
                {
                    id: 100,
                    category: 'cdl',
                    question: 'What is the maximum width for agricultural vehicles on North Carolina roads?',
                    options: ['12 feet', '14 feet', '16 feet', '18 feet'],
                    correctAnswer: 2,
                    topic: 'Agricultural Vehicles',
                    explanation: 'Maximum width for agricultural vehicles is 16 feet in North Carolina.'
                }
            ];
        }
        
        // Generate 100 North Carolina Motorcycle questions
        function generateMotorcycleQuestions() {
            return [
                {
                    id: 1,
                    category: 'motorcycle',
                    question: 'What is the most important factor in motorcycle safety in North Carolina?',
                    options: ['Helmet use', 'Visibility to other drivers', 'Both A and B', 'Neither A nor B'],
                    correctAnswer: 2,
                    topic: 'Safety',
                    explanation: 'Both helmet use and visibility to other drivers are critical for motorcycle safety in North Carolina.'
                },
                {
                    id: 2,
                    category: 'motorcycle',
                    question: 'When should a motorcycle headlight be used in North Carolina?',
                    options: ['Only at night', 'At all times', 'Only in rain', 'Only on highways'],
                    correctAnswer: 1,
                    topic: 'Lighting',
                    explanation: 'Motorcycle headlights must be used at all times in North Carolina.'
                },
                {
                    id: 3,
                    category: 'motorcycle',
                    question: 'What is the proper way to brake on a motorcycle on North Carolina roads?',
                    options: ['Front brake only', 'Rear brake only', 'Both brakes evenly', 'Depends on conditions'],
                    correctAnswer: 2,
                    topic: 'Braking',
                    explanation: 'Use both brakes evenly for maximum stopping power in North Carolina.'
                },
                {
                    id: 4,
                    category: 'motorcycle',
                    question: 'What should you do to increase visibility to other drivers in North Carolina?',
                    options: ['Wear bright clothing', 'Use headlight at all times', 'Both A and B', 'Neither A nor B'],
                    correctAnswer: 2,
                    topic: 'Visibility',
                    explanation: 'Both wearing bright clothing and using headlights increase visibility in North Carolina.'
                },
                {
                    id: 5,
                    category: 'motorcycle',
                    question: 'How should you handle a turn on a motorcycle on North Carolina roads?',
                    options: ['Slow before the turn', 'Accelerate through the turn', 'Both A and B', 'Neither A nor B'],
                    correctAnswer: 2,
                    topic: 'Turning',
                    explanation: 'Slow before the turn and accelerate gently through the turn in North Carolina.'
                },
                {
                    id: 6,
                    category: 'motorcycle',
                    question: 'What is the minimum insurance required for motorcycles in North Carolina?',
                    options: ['30/60/25', '25/50/25', '100/300/100', '50/100/50'],
                    correctAnswer: 0,
                    topic: 'Insurance',
                    explanation: 'Minimum insurance in North Carolina is $30,000/$60,000/$25,000 for motorcycles.'
                },
                {
                    id: 7,
                    category: 'motorcycle',
                    question: 'Is lane splitting legal in North Carolina?',
                    options: ['Legal in North Carolina', 'Illegal in North Carolina', 'Legal only on highways', 'Legal only in traffic'],
                    correctAnswer: 1,
                    topic: 'Lane Positioning',
                    explanation: 'Lane splitting (riding between lanes) is illegal in North Carolina.'
                },
                {
                    id: 8,
                    category: 'motorcycle',
                    question: 'What should you check during a pre-ride inspection in North Carolina?',
                    options: ['Tires and wheels', 'Lights and electrics', 'Both A and B', 'Neither A nor B'],
                    correctAnswer: 2,
                    topic: 'Pre-Ride Inspection',
                    explanation: 'Check both tires/wheels and lights/electrics during pre-ride inspection in North Carolina.'
                },
                {
                    id: 9,
                    category: 'motorcycle',
                    question: 'How should you carry a passenger on a motorcycle in North Carolina?',
                    options: ['Only with proper equipment', 'Only if licensed for passenger', 'Both A and B', 'No restrictions'],
                    correctAnswer: 2,
                    topic: 'Passengers',
                    explanation: 'You must have proper equipment and be licensed to carry passengers in North Carolina.'
                },
                {
                    id: 10,
                    category: 'motorcycle',
                    question: 'What is the best way to handle road hazards like wet leaves or sand on North Carolina roads?',
                    options: ['Speed up', 'Brake hard', 'Maintain speed and steer straight', 'Slow down before reaching it'],
                    correctAnswer: 3,
                    topic: 'Hazard Avoidance',
                    explanation: 'Slow down before reaching road hazards like wet leaves or sand in North Carolina.'
                },
                {
                    id: 11,
                    category: 'motorcycle',
                    question: 'What protective gear should always be worn when riding in North Carolina?',
                    options: ['Helmet', 'Eye protection', 'Both A and B', 'No gear required'],
                    correctAnswer: 2,
                    topic: 'Protective Gear',
                    explanation: 'Always wear helmet and eye protection when riding in North Carolina.'
                },
                {
                    id: 12,
                    category: 'motorcycle',
                    question: 'When should you increase following distance in North Carolina?',
                    options: ['In rain', 'At night', 'On slippery roads', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Following Distance',
                    explanation: 'Increase following distance in rain, at night, and on slippery roads in North Carolina.'
                },
                {
                    id: 13,
                    category: 'motorcycle',
                    question: 'What is the proper lane position for visibility in North Carolina?',
                    options: ['Left third of lane', 'Center of lane', 'Right third of lane', 'Any position'],
                    correctAnswer: 0,
                    topic: 'Lane Positioning',
                    explanation: 'Ride in left third of lane for best visibility in North Carolina.'
                },
                {
                    id: 14,
                    category: 'motorcycle',
                    question: 'How should you handle wet manhole covers or road markings in North Carolina?',
                    options: ['Accelerate over', 'Brake on them', 'Avoid them', 'Ignore them'],
                    correctAnswer: 2,
                    topic: 'Hazard Avoidance',
                    explanation: 'Avoid wet manhole covers and road markings as they can be slippery in North Carolina.'
                },
                {
                    id: 15,
                    category: 'motorcycle',
                    question: 'When should you check tire pressure in North Carolina?',
                    options: ['Daily', 'Weekly', 'Monthly', 'Only when flat'],
                    correctAnswer: 1,
                    topic: 'Tire Maintenance',
                    explanation: 'Check tire pressure weekly and before long trips in North Carolina.'
                },
                {
                    id: 16,
                    category: 'motorcycle',
                    question: 'What is the minimum age for motorcycle license in North Carolina?',
                    options: ['14', '16', '18', '21'],
                    correctAnswer: 1,
                    topic: 'Licensing',
                    explanation: 'Minimum age for motorcycle license is 16 in North Carolina.'
                },
                {
                    id: 17,
                    category: 'motorcycle',
                    question: 'How should you handle strong crosswinds common in North Carolina?',
                    options: ['Lean into wind', 'Slow down', 'Both A and B', 'Speed up'],
                    correctAnswer: 2,
                    topic: 'Adverse Conditions',
                    explanation: 'Lean into wind and slow down in strong crosswinds in North Carolina.'
                },
                {
                    id: 18,
                    category: 'motorcycle',
                    question: 'When should you use turn signals in North Carolina?',
                    options: ['Before changing lanes', 'Before turning', 'Both A and B', 'Only in traffic'],
                    correctAnswer: 2,
                    topic: 'Signaling',
                    explanation: 'Use turn signals before changing lanes and turning in North Carolina.'
                },
                {
                    id: 19,
                    category: 'motorcycle',
                    question: 'What should you do at intersections in North Carolina?',
                    options: ['Cover brakes', 'Watch for turning vehicles', 'Both A and B', 'Speed through'],
                    correctAnswer: 2,
                    topic: 'Intersections',
                    explanation: 'Cover brakes and watch for turning vehicles at intersections in North Carolina.'
                },
                {
                    id: 20,
                    category: 'motorcycle',
                    question: 'How should you carry cargo on a motorcycle in North Carolina?',
                    options: ['Low and centered', 'High on back', 'In one side bag', 'Doesn\'t matter'],
                    correctAnswer: 0,
                    topic: 'Cargo Carrying',
                    explanation: 'Carry cargo low and centered for stability in North Carolina.'
                },
                {
                    id: 21,
                    category: 'motorcycle',
                    question: 'What does ATGATT stand for in motorcycle safety?',
                    options: ['All The Gear All The Time', 'Always Try Going Around Traffic', 'Avoid The Gravel And Tar', 'None of the above'],
                    correctAnswer: 0,
                    topic: 'Safety',
                    explanation: 'ATGATT means All The Gear All The Time for maximum safety in North Carolina.'
                },
                {
                    id: 22,
                    category: 'motorcycle',
                    question: 'When should you use high beam headlight in North Carolina?',
                    options: ['At night on empty roads', 'In fog', 'In traffic', 'Never'],
                    correctAnswer: 0,
                    topic: 'Lighting',
                    explanation: 'Use high beam on empty roads at night for better visibility, but dim for oncoming traffic in North Carolina.'
                },
                {
                    id: 23,
                    category: 'motorcycle',
                    question: 'How should you handle oil spills on road in North Carolina?',
                    options: ['Ride through quickly', 'Avoid if possible', 'Brake hard', 'Accelerate'],
                    correctAnswer: 1,
                    topic: 'Hazard Avoidance',
                    explanation: 'Avoid oil spills as they can cause loss of traction in North Carolina.'
                },
                {
                    id: 24,
                    category: 'motorcycle',
                    question: 'What is countersteering?',
                    options: ['Pushing forward on handlebar', 'Leaning body', 'Both A and B', 'Emergency braking'],
                    correctAnswer: 0,
                    topic: 'Turning',
                    explanation: 'Countersteering means pushing forward on handlebar to initiate turn in North Carolina.'
                },
                {
                    id: 25,
                    category: 'motorcycle',
                    question: 'When should you adjust mirrors in North Carolina?',
                    options: ['Before riding', 'While riding', 'Both A and B', 'Mirrors not needed'],
                    correctAnswer: 0,
                    topic: 'Mirrors',
                    explanation: 'Adjust mirrors before riding for proper rear view in North Carolina.'
                },
                {
                    id: 26,
                    category: 'motorcycle',
                    question: 'What is North Carolina\'s helmet law for motorcycles?',
                    options: ['Helmets required for all riders', 'Only required under 18', 'Only required on highways', 'Not required'],
                    correctAnswer: 1,
                    topic: 'Safety',
                    explanation: 'Helmets required for riders under 18 in North Carolina.'
                },
                {
                    id: 27,
                    category: 'motorcycle',
                    question: 'How should you handle lane positioning safely in North Carolina?',
                    options: ['Stay in lane center', 'Use different positions', 'Ride on shoulder', 'Follow other vehicles'],
                    correctAnswer: 1,
                    topic: 'Lane Positioning',
                    explanation: 'Use different lane positions for visibility and safety in North Carolina.'
                },
                {
                    id: 28,
                    category: 'motorcycle',
                    question: 'What should you do when being passed by a car in North Carolina?',
                    options: ['Speed up', 'Move to center of lane', 'Stay in position, be predictable', 'Weave to get attention'],
                    correctAnswer: 2,
                    topic: 'Being Passed',
                    explanation: 'Stay in position and be predictable when being passed in North Carolina.'
                },
                {
                    id: 29,
                    category: 'motorcycle',
                    question: 'How should you approach railroad tracks in North Carolina?',
                    options: ['Cross at 90 degree angle', 'Speed up', 'Weave across', 'Doesn\'t matter'],
                    correctAnswer: 0,
                    topic: 'Railroad Crossings',
                    explanation: 'Cross railroad tracks at as close to 90 degree angle as possible in North Carolina.'
                },
                {
                    id: 30,
                    category: 'motorcycle',
                    question: 'What is the penalty for not wearing helmet under 18 in North Carolina?',
                    options: ['$20 fine', '$40 fine', '$60 fine', '$100 fine'],
                    correctAnswer: 0,
                    topic: 'Safety',
                    explanation: 'Fine for not wearing helmet under 18 is $20 in North Carolina.'
                },
                {
                    id: 31,
                    category: 'motorcycle',
                    question: 'When should you use both brakes in an emergency stop in North Carolina?',
                    options: ['Always', 'Only front brake', 'Only rear brake', 'Depends on speed'],
                    correctAnswer: 0,
                    topic: 'Emergency Braking',
                    explanation: 'Always use both brakes for maximum stopping power in emergency in North Carolina.'
                },
                {
                    id: 32,
                    category: 'motorcycle',
                    question: 'How should you handle riding in groups in North Carolina?',
                    options: ['Staggered formation', 'Single file', 'Side by side', 'Any formation'],
                    correctAnswer: 0,
                    topic: 'Group Riding',
                    explanation: 'Use staggered formation when riding in groups in North Carolina.'
                },
                {
                    id: 33,
                    category: 'motorcycle',
                    question: 'What should you do if you get a flat tire while riding in North Carolina?',
                    options: ['Brake hard', 'Hold handlebars firmly, ease off gas', 'Accelerate', 'Jump off'],
                    correctAnswer: 1,
                    topic: 'Emergency Procedures',
                    explanation: 'Hold handlebars firmly and ease off gas if you get a flat tire in North Carolina.'
                },
                {
                    id: 34,
                    category: 'motorcycle',
                    question: 'When is the most dangerous time to ride in North Carolina?',
                    options: ['First 30 minutes of rain', 'Midnight', 'Noon', 'Sunset'],
                    correctAnswer: 0,
                    topic: 'Safety',
                    explanation: 'First 30 minutes of rain is most dangerous due to oil on road surface in North Carolina.'
                },
                {
                    id: 35,
                    category: 'motorcycle',
                    question: 'How should you adjust speed for curves in North Carolina?',
                    options: ['Slow before curve', 'Brake in curve', 'Accelerate in curve', 'Maintain speed'],
                    correctAnswer: 0,
                    topic: 'Curves',
                    explanation: 'Slow to appropriate speed before entering curve in North Carolina.'
                },
                {
                    id: 36,
                    category: 'motorcycle',
                    question: 'What is the minimum tread depth for motorcycle tires in North Carolina?',
                    options: ['1/32 inch', '2/32 inch', '4/32 inch', 'No requirement'],
                    correctAnswer: 0,
                    topic: 'Tire Maintenance',
                    explanation: 'Minimum tread depth is 1/32 inch for motorcycle tires in North Carolina.'
                },
                {
                    id: 37,
                    category: 'motorcycle',
                    question: 'How should you handle riding over bumps or potholes in North Carolina?',
                    options: ['Stand on pegs', 'Sit normally', 'Speed up', 'Swerve suddenly'],
                    correctAnswer: 0,
                    topic: 'Hazard Avoidance',
                    explanation: 'Stand on pegs to absorb impact when riding over bumps in North Carolina.'
                },
                {
                    id: 38,
                    category: 'motorcycle',
                    question: 'When should you use your horn in North Carolina?',
                    options: ['To alert others of your presence', 'In anger', 'Frequently', 'Never'],
                    correctAnswer: 0,
                    topic: 'Signaling',
                    explanation: 'Use horn to alert others of your presence in North Carolina.'
                },
                {
                    id: 39,
                    category: 'motorcycle',
                    question: 'What is the proper way to make a quick stop in North Carolina?',
                    options: ['Use both brakes, keep bike straight', 'Use rear brake only', 'Swerve', 'Lay bike down'],
                    correctAnswer: 0,
                    topic: 'Emergency Braking',
                    explanation: 'Use both brakes and keep bike straight for quick stop in North Carolina.'
                },
                {
                    id: 40,
                    category: 'motorcycle',
                    question: 'How should you dress for riding in North Carolina\'s varying weather?',
                    options: ['Layers', 'Heavy jacket only', 'Same as warm weather', 'Not important'],
                    correctAnswer: 0,
                    topic: 'Protective Gear',
                    explanation: 'Dress in layers for North Carolina\'s varying weather conditions.'
                },
                {
                    id: 41,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle license in North Carolina?',
                    options: ['Written test', 'Road test', 'Both A and B', 'No test required'],
                    correctAnswer: 2,
                    topic: 'Licensing',
                    explanation: 'Both written and road tests required for motorcycle license in North Carolina.'
                },
                {
                    id: 42,
                    category: 'motorcycle',
                    question: 'How should you handle night riding in North Carolina?',
                    options: ['Reduce speed', 'Increase following distance', 'Use high beam when appropriate', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Night Riding',
                    explanation: 'Reduce speed, increase following distance, and use high beam when appropriate at night in North Carolina.'
                },
                {
                    id: 43,
                    category: 'motorcycle',
                    question: 'What should you check during pre-ride inspection in North Carolina?',
                    options: ['Brakes', 'Chain/belt', 'Fluids', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Pre-Ride Inspection',
                    explanation: 'Check brakes, chain/belt, and fluids during pre-ride inspection in North Carolina.'
                },
                {
                    id: 44,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s frequent thunderstorms?',
                    options: ['Smooth inputs', 'Increase following distance', 'Avoid painted lines', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Rain Riding',
                    explanation: 'Use smooth inputs, increase following distance, and avoid painted lines in North Carolina\'s frequent thunderstorms.'
                },
                {
                    id: 45,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle endorsement in North Carolina?',
                    options: ['Vision test', 'Knowledge test', 'Skills test', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Licensing',
                    explanation: 'Vision, knowledge, and skills tests required for motorcycle endorsement in North Carolina.'
                },
                {
                    id: 46,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s crosswinds?',
                    options: ['Relax grip', 'Lean into wind', 'Reduce speed', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Wind Riding',
                    explanation: 'Relax grip, lean into wind, and reduce speed in North Carolina\'s crosswinds.'
                },
                {
                    id: 47,
                    category: 'motorcycle',
                    question: 'What should you do before changing lanes in North Carolina?',
                    options: ['Check mirrors', 'Signal', 'Check blind spot', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Lane Changes',
                    explanation: 'Check mirrors, signal, and check blind spot before changing lanes in North Carolina.'
                },
                {
                    id: 48,
                    category: 'motorcycle',
                    question: 'How often should you practice emergency braking in North Carolina?',
                    options: ['Regularly', 'Never', 'Only before test', 'Once a year'],
                    correctAnswer: 0,
                    topic: 'Skills Practice',
                    explanation: 'Practice emergency braking regularly to maintain skills in North Carolina.'
                },
                {
                    id: 49,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle registration in North Carolina?',
                    options: ['Title', 'Insurance', 'Safety inspection', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Registration',
                    explanation: 'Title, insurance, and safety inspection required for registration in North Carolina.'
                },
                {
                    id: 50,
                    category: 'motorcycle',
                    question: 'How should you handle riding on North Carolina\'s gravel roads?',
                    options: ['Reduce speed', 'Keep bike upright', 'Smooth inputs', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Gravel Riding',
                    explanation: 'Reduce speed, keep bike upright, and use smooth inputs on North Carolina\'s gravel roads.'
                },
                {
                    id: 51,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle safety course in North Carolina?',
                    options: ['Completion card', 'Written test waiver', 'Skills test waiver', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Safety Course',
                    explanation: 'Completion card provides written and skills test waivers in North Carolina.'
                },
                {
                    id: 52,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s urban traffic?',
                    options: ['Stay visible', 'Watch for sudden stops', 'Have escape route', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Traffic Riding',
                    explanation: 'Stay visible, watch for sudden stops, and have escape route in North Carolina\'s urban traffic.'
                },
                {
                    id: 53,
                    category: 'motorcycle',
                    question: 'What should you do if headlight fails in North Carolina?',
                    options: ['Ride to safe place', 'Use hand signals', 'Both A and B', 'Continue riding'],
                    correctAnswer: 2,
                    topic: 'Equipment Failure',
                    explanation: 'Ride to safe place and use hand signals if headlight fails in North Carolina.'
                },
                {
                    id: 54,
                    category: 'motorcycle',
                    question: 'How should you handle riding on North Carolina\'s bridges?',
                    options: ['Watch for grates', 'Beware of crosswinds', 'Both A and B', 'Speed up'],
                    correctAnswer: 2,
                    topic: 'Bridge Riding',
                    explanation: 'Watch for grates and beware of crosswinds on North Carolina\'s bridges.'
                },
                {
                    id: 55,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle insurance in North Carolina?',
                    options: ['Liability', 'Proof of insurance', 'Both A and B', 'Not required'],
                    correctAnswer: 2,
                    topic: 'Insurance',
                    explanation: 'Liability insurance and proof of insurance required in North Carolina.'
                },
                {
                    id: 56,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s fog?',
                    options: ['Use low beam', 'Reduce speed', 'Increase following distance', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Fog Riding',
                    explanation: 'Use low beam, reduce speed, and increase following distance in North Carolina\'s fog.'
                },
                {
                    id: 57,
                    category: 'motorcycle',
                    question: 'What should you do during pre-ride check in North Carolina?',
                    options: ['Check tires', 'Check lights', 'Check horn', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Pre-Ride Check',
                    explanation: 'Check tires, lights, and horn during pre-ride check in North Carolina.'
                },
                {
                    id: 58,
                    category: 'motorcycle',
                    question: 'How should you handle riding on North Carolina\'s wet roads?',
                    options: ['Avoid if possible', 'Reduce speed', 'Smooth inputs', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Hazard Avoidance',
                    explanation: 'Avoid if possible, reduce speed, and use smooth inputs on North Carolina\'s wet roads.'
                },
                {
                    id: 59,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle transfer in North Carolina?',
                    options: ['Bill of sale', 'Title transfer', 'Both A and B', 'Not required'],
                    correctAnswer: 2,
                    topic: 'Ownership Transfer',
                    explanation: 'Bill of sale and title transfer required for motorcycle transfer in North Carolina.'
                },
                {
                    id: 60,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s road construction zones?',
                    options: ['Reduce speed', 'Watch for debris', 'Follow signs', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Construction Zones',
                    explanation: 'Reduce speed, watch for debris, and follow signs in North Carolina\'s road construction zones.'
                },
                {
                    id: 61,
                    category: 'motorcycle',
                    question: 'What should you do if throttle sticks in North Carolina?',
                    options: ['Pull clutch', 'Turn off engine', 'Both A and B', 'Brake hard'],
                    correctAnswer: 2,
                    topic: 'Emergency Procedures',
                    explanation: 'Pull clutch and turn off engine if throttle sticks in North Carolina.'
                },
                {
                    id: 62,
                    category: 'motorcycle',
                    question: 'How should you handle riding on North Carolina\'s slippery roads after rain?',
                    options: ['Avoid if possible', 'Walk bike', 'Both A and B', 'Speed up'],
                    correctAnswer: 2,
                    topic: 'Slippery Roads',
                    explanation: 'Avoid slippery roads if possible, otherwise walk bike in North Carolina after rain.'
                },
                {
                    id: 63,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle loan in North Carolina?',
                    options: ['Insurance', 'Registration', 'Both A and B', 'Not required'],
                    correctAnswer: 2,
                    topic: 'Financing',
                    explanation: 'Insurance and registration required for motorcycle loan in North Carolina.'
                },
                {
                    id: 64,
                    category: 'motorcycle',
                    question: 'How should you handle riding at dawn/dusk in North Carolina?',
                    options: ['Use lights', 'Wear reflective gear', 'Both A and B', 'No special precautions'],
                    correctAnswer: 2,
                    topic: 'Low Light Riding',
                    explanation: 'Use lights and wear reflective gear at dawn/dusk in North Carolina.'
                },
                {
                    id: 65,
                    category: 'motorcycle',
                    question: 'What should you do if brake fails in North Carolina?',
                    options: ['Use other brake', 'Downshift', 'Both A and B', 'Jump off'],
                    correctAnswer: 2,
                    topic: 'Emergency Procedures',
                    explanation: 'Use other brake and downshift if one brake fails in North Carolina.'
                },
                {
                    id: 66,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s heat?',
                    options: ['Stay hydrated', 'Take breaks', 'Wear light colors', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Heat Riding',
                    explanation: 'Stay hydrated, take breaks, and wear light colors in North Carolina\'s heat.'
                },
                {
                    id: 67,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle permit in North Carolina?',
                    options: ['Vision test', 'Written test', 'Both A and B', 'No test required'],
                    correctAnswer: 2,
                    topic: 'Permit',
                    explanation: 'Vision and written tests required for motorcycle permit in North Carolina.'
                },
                {
                    id: 68,
                    category: 'motorcycle',
                    question: 'How should you handle riding on North Carolina\'s rural roads?',
                    options: ['Reduce speed', 'Watch for animals', 'Both A and B', 'Speed up'],
                    correctAnswer: 2,
                    topic: 'Rural Riding',
                    explanation: 'Reduce speed and watch for animals on North Carolina\'s rural roads.'
                },
                {
                    id: 69,
                    category: 'motorcycle',
                    question: 'What should you do if chain breaks in North Carolina?',
                    options: ['Pull clutch', 'Coast to stop', 'Both A and B', 'Brake hard'],
                    correctAnswer: 2,
                    topic: 'Equipment Failure',
                    explanation: 'Pull clutch and coast to stop if chain breaks in North Carolina.'
                },
                {
                    id: 70,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s country roads?',
                    options: ['Use lower gears', 'Watch for curves', 'Both A and B', 'No special precautions'],
                    correctAnswer: 2,
                    topic: 'Country Riding',
                    explanation: 'Use lower gears and watch for curves on North Carolina\'s country roads.'
                },
                {
                    id: 71,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle title in North Carolina?',
                    options: ['Application', 'Proof of ownership', 'Both A and B', 'Not required'],
                    correctAnswer: 2,
                    topic: 'Title',
                    explanation: 'Application and proof of ownership required for title in North Carolina.'
                },
                {
                    id: 72,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s occasional heavy rain?',
                    options: ['Avoid if possible', 'Use rain gear', 'Both A and B', 'Speed up'],
                    correctAnswer: 2,
                    topic: 'Heavy Rain Riding',
                    explanation: 'Avoid heavy rain if possible, otherwise use rain gear in North Carolina.'
                },
                {
                    id: 73,
                    category: 'motorcycle',
                    question: 'What should you do if engine overheats in North Carolina?',
                    options: ['Pull over', 'Let engine cool', 'Both A and B', 'Continue riding'],
                    correctAnswer: 2,
                    topic: 'Overheating',
                    explanation: 'Pull over and let engine cool if overheating in North Carolina.'
                },
                {
                    id: 74,
                    category: 'motorcycle',
                    question: 'How should you handle riding in groups at night in North Carolina?',
                    options: ['Reduce group size', 'Increase spacing', 'Both A and B', 'No changes'],
                    correctAnswer: 2,
                    topic: 'Group Night Riding',
                    explanation: 'Reduce group size and increase spacing at night in North Carolina.'
                },
                {
                    id: 75,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle safety inspection in North Carolina?',
                    options: ['Annual', 'Biennial', 'At transfer only', 'Not required'],
                    correctAnswer: 0,
                    topic: 'Safety Inspection',
                    explanation: 'Annual safety inspection required for motorcycles in North Carolina.'
                },
                {
                    id: 76,
                    category: 'motorcycle',
                    question: 'How should you handle riding with passenger in North Carolina?',
                    options: ['Adjust suspension', 'Increase following distance', 'Both A and B', 'No changes'],
                    correctAnswer: 2,
                    topic: 'Passenger Riding',
                    explanation: 'Adjust suspension and increase following distance with passenger in North Carolina.'
                },
                {
                    id: 77,
                    category: 'motorcycle',
                    question: 'What should you do if electrical system fails in North Carolina?',
                    options: ['Use hand signals', 'Ride to safety', 'Both A and B', 'Continue riding'],
                    correctAnswer: 2,
                    topic: 'Electrical Failure',
                    explanation: 'Use hand signals and ride to safety if electrical system fails in North Carolina.'
                },
                {
                    id: 78,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s rural areas?',
                    options: ['Watch for animals', 'Beware of farm equipment', 'Both A and B', 'No special precautions'],
                    correctAnswer: 2,
                    topic: 'Rural Riding',
                    explanation: 'Watch for animals and beware of farm equipment in North Carolina\'s rural areas.'
                },
                {
                    id: 79,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle dealer purchase in North Carolina?',
                    options: ['Sales tax', 'Registration', 'Both A and B', 'Not required'],
                    correctAnswer: 2,
                    topic: 'Dealer Purchase',
                    explanation: 'Sales tax and registration required for dealer purchase in North Carolina.'
                },
                {
                    id: 80,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s sudden thunderstorms?',
                    options: ['Seek shelter', 'If riding, reduce speed', 'Both A and B', 'Speed up'],
                    correctAnswer: 2,
                    topic: 'Thunderstorm Riding',
                    explanation: 'Seek shelter, if riding reduce speed in North Carolina\'s sudden thunderstorms.'
                },
                {
                    id: 81,
                    category: 'motorcycle',
                    question: 'What should you do if fuel system fails in North Carolina?',
                    options: ['Switch to reserve', 'Ride to station', 'Both A and B', 'Push bike'],
                    correctAnswer: 2,
                    topic: 'Fuel System Failure',
                    explanation: 'Switch to reserve and ride to station if fuel system fails in North Carolina.'
                },
                {
                    id: 82,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s hail storms?',
                    options: ['Seek shelter immediately', 'Avoid open areas', 'Both A and B', 'Continue riding'],
                    correctAnswer: 2,
                    topic: 'Hail Storm Riding',
                    explanation: 'Seek shelter immediately and avoid open areas in North Carolina\'s hail storms.'
                },
                {
                    id: 83,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle private sale in North Carolina?',
                    options: ['Bill of sale', 'Title transfer', 'Both A and B', 'Handshake only'],
                    correctAnswer: 2,
                    topic: 'Private Sale',
                    explanation: 'Bill of sale and title transfer required for private sale in North Carolina.'
                },
                {
                    id: 84,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s flash flood warnings?',
                    options: ['Seek shelter immediately', 'Do not ride through water', 'Both A and B', 'Ride faster'],
                    correctAnswer: 2,
                    topic: 'Flash Flood Warning',
                    explanation: 'Seek shelter immediately and do not ride through water in North Carolina\'s flash flood warnings.'
                },
                {
                    id: 85,
                    category: 'motorcycle',
                    question: 'What should you do if tire goes flat in North Carolina?',
                    options: ['Hold handlebars firmly', 'Ease off throttle', 'Both A and B', 'Brake hard'],
                    correctAnswer: 2,
                    topic: 'Flat Tire',
                    explanation: 'Hold handlebars firmly and ease off throttle if tire goes flat in North Carolina.'
                },
                {
                    id: 86,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s flood conditions?',
                    options: ['Avoid if possible', 'If riding, go slow', 'Both A and B', 'Speed through'],
                    correctAnswer: 2,
                    topic: 'Flood Riding',
                    explanation: 'Avoid flood if possible, if riding go slow in North Carolina.'
                },
                {
                    id: 87,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle insurance claim in North Carolina?',
                    options: ['Police report', 'Photos', 'Both A and B', 'Not required'],
                    correctAnswer: 2,
                    topic: 'Insurance Claims',
                    explanation: 'Police report and photos help with insurance claims in North Carolina.'
                },
                {
                    id: 88,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s winter conditions?',
                    options: ['Wear warm gear', 'Reduce speed', 'Both A and B', 'No precautions'],
                    correctAnswer: 2,
                    topic: 'Winter Riding',
                    explanation: 'Wear warm gear and reduce speed in North Carolina\'s winter conditions.'
                },
                {
                    id: 89,
                    category: 'motorcycle',
                    question: 'What should you do if lost control in North Carolina?',
                    options: ['Look where you want to go', 'Stay on brakes', 'Both A and B', 'Close eyes'],
                    correctAnswer: 0,
                    topic: 'Loss of Control',
                    explanation: 'Look where you want to go if losing control in North Carolina.'
                },
                {
                    id: 90,
                    category: 'motorcycle',
                    question: 'How should you handle riding after North Carolina storm?',
                    options: ['Watch for debris', 'Avoid flooded areas', 'Both A and B', 'No precautions'],
                    correctAnswer: 2,
                    topic: 'Post-Storm Riding',
                    explanation: 'Watch for debris and avoid flooded areas after North Carolina storm.'
                },
                {
                    id: 91,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle custom build in North Carolina?',
                    options: ['Special inspection', 'Title', 'Both A and B', 'Not required'],
                    correctAnswer: 2,
                    topic: 'Custom Builds',
                    explanation: 'Special inspection and title required for custom builds in North Carolina.'
                },
                {
                    id: 92,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s dust from gravel roads?',
                    options: ['Wear goggles', 'Reduce speed', 'Both A and B', 'Ride through'],
                    correctAnswer: 2,
                    topic: 'Dust Riding',
                    explanation: 'Wear goggles and reduce speed in North Carolina\'s dust from gravel roads.'
                },
                {
                    id: 93,
                    category: 'motorcycle',
                    question: 'What should you do if animals on road in North Carolina?',
                    options: ['Reduce speed', 'Do not swerve', 'Both A and B', 'Speed up'],
                    correctAnswer: 2,
                    topic: 'Animals on Road',
                    explanation: 'Reduce speed and do not swerve for animals in North Carolina.'
                },
                {
                    id: 94,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s urban traffic?',
                    options: ['Be extra alert', 'Watch for opening doors', 'Both A and B', 'Speed through'],
                    correctAnswer: 2,
                    topic: 'Urban Riding',
                    explanation: 'Be extra alert and watch for opening doors in North Carolina\'s urban traffic.'
                },
                {
                    id: 95,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle import to North Carolina?',
                    options: ['Federal forms', 'State inspection', 'Both A and B', 'Not required'],
                    correctAnswer: 2,
                    topic: 'Import',
                    explanation: 'Federal forms and state inspection required for import to North Carolina.'
                },
                {
                    id: 96,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s severe weather conditions?',
                    options: ['Do not ride', 'If riding, extreme caution', 'Both A and B', 'Normal riding'],
                    correctAnswer: 2,
                    topic: 'Severe Weather Riding',
                    explanation: 'Do not ride, if riding use extreme caution in North Carolina\'s severe weather conditions.'
                },
                {
                    id: 97,
                    category: 'motorcycle',
                    question: 'What should you do if objects on road in North Carolina?',
                    options: ['Avoid if safe', 'Do not swerve suddenly', 'Both A and B', 'Hit object'],
                    correctAnswer: 2,
                    topic: 'Objects on Road',
                    explanation: 'Avoid if safe, do not swerve suddenly for objects in North Carolina.'
                },
                {
                    id: 98,
                    category: 'motorcycle',
                    question: 'How should you handle riding in North Carolina\'s high traffic areas?',
                    options: ['Watch for sudden stops', 'Beware of distracted drivers', 'Both A and B', 'Normal riding'],
                    correctAnswer: 2,
                    topic: 'High Traffic Riding',
                    explanation: 'Watch for sudden stops and beware of distracted drivers in North Carolina\'s high traffic areas.'
                },
                {
                    id: 99,
                    category: 'motorcycle',
                    question: 'What is required for motorcycle export from North Carolina?',
                    options: ['Title', 'Bill of sale', 'Both A and B', 'Not required'],
                    correctAnswer: 2,
                    topic: 'Export',
                    explanation: 'Title and bill of sale required for export from North Carolina.'
                },
                {
                    id: 100,
                    category: 'motorcycle',
                    question: 'What special considerations are needed for riding in North Carolina\'s varied climate?',
                    options: ['Watch for changing weather in mountains', 'Beware of sudden temperature drops', 'Watch for seasonal hazards', 'All of the above'],
                    correctAnswer: 3,
                    topic: 'Climate Riding',
                    explanation: 'Watch for changing weather in mountains, beware of sudden temperature drops, and watch for seasonal hazards when riding in North Carolina\'s varied climate.'
                }
            ];
        }
        
        // Start the test
        function startTest() {
            const name = nameInput.value.trim();
            if (!name) {
                alert('Please enter your name before starting the test.');
                nameInput.focus();
                return;
            }
            
            testState.testerName = name;
            testState.currentQuestionIndex = 0;
            testState.userAnswers.fill(null);
            testState.testStarted = true;
            testState.testCompleted = false;
            testState.incorrectQuestions = [];
            
            // Select questions based on current category
            const allQuestions = [...questionBanks[testState.currentCategory]];
            testState.selectedQuestions = [];
            
            // If we have fewer than testQuestions, use what we have
            // Otherwise, shuffle and select testQuestions
            if (allQuestions.length <= TEST_CONFIG.testQuestions) {
                testState.selectedQuestions = allQuestions;
            } else {
                // Shuffle array and take first testQuestions
                for (let i = allQuestions.length - 1; i > 0; i--) {
                    const j = Math.floor(Math.random() * (i + 1));
                    [allQuestions[i], allQuestions[j]] = [allQuestions[j], allQuestions[i]];
                }
                
                testState.selectedQuestions = allQuestions.slice(0, TEST_CONFIG.testQuestions);
            }
            
            // Reset UI
            nameInput.disabled = true;
            timerContainer.style.display = 'block';
            progressContainer.style.display = 'block';
            questionCard.classList.add('active');
            resultsContainer.classList.remove('show');
            incorrectQuestionsSection.classList.remove('show');
            reviewSection.classList.remove('show');
            startTestBtn.textContent = 'Restart Test';
            startTestBtn.classList.add('btn-accent');
            
            // Show first question
            showQuestion();
            startTimer();
            
            // Update category display
            const activeCategoryBtn = document.querySelector('.category-btn.active');
            currentCategoryElement.textContent = activeCategoryBtn.textContent.replace(' Test', '');
        }
        
        // Display current question
        function showQuestion() {
            const question = testState.selectedQuestions[testState.currentQuestionIndex];
            
            // Update progress
            currentQuestionElement.textContent = testState.currentQuestionIndex + 1;
            const progress = ((testState.currentQuestionIndex + 1) / testState.selectedQuestions.length) * 100;
            progressBar.style.width = `${progress}%`;
            
            // Update question text
            questionTextElement.textContent = question.question;
            
            // Clear previous options
            optionsContainer.innerHTML = '';
            
            // Add new options
            question.options.forEach((option, index) => {
                const optionElement = document.createElement('div');
                optionElement.className = 'option';
                if (testState.userAnswers[testState.currentQuestionIndex] === index) {
                    optionElement.classList.add('selected');
                }
                
                optionElement.innerHTML = `
                    <div class="option-label">${String.fromCharCode(65 + index)}</div>
                    <div class="option-text">${option}</div>
                `;
                
                optionElement.addEventListener('click', () => selectOption(index));
                optionsContainer.appendChild(optionElement);
            });
            
            // Update navigation buttons
            prevBtn.disabled = testState.currentQuestionIndex === 0;
            nextBtn.textContent = testState.currentQuestionIndex === testState.selectedQuestions.length - 1 ? 'Finish Test' : 'Next Question';
            
            // Reset timer
            resetTimer();
        }
        
        // Select an option
        function selectOption(optionIndex) {
            // Remove selected class from all options
            document.querySelectorAll('.option').forEach(option => {
                option.classList.remove('selected');
            });
            
            // Add selected class to clicked option
            document.querySelectorAll('.option')[optionIndex].classList.add('selected');
            
            // Save answer
            testState.userAnswers[testState.currentQuestionIndex] = optionIndex;
            
            // Auto-advance after 1 second if not the last question
            if (testState.currentQuestionIndex < testState.selectedQuestions.length - 1) {
                setTimeout(() => {
                    showNextQuestion();
                }, 1000);
            }
        }
        
        // Skip question
        function skipQuestion() {
            testState.userAnswers[testState.currentQuestionIndex] = null;
            
            if (testState.currentQuestionIndex < testState.selectedQuestions.length - 1) {
                showNextQuestion();
            } else {
                finishTest();
            }
        }
        
        // Show next question
        function showNextQuestion() {
            if (testState.currentQuestionIndex < testState.selectedQuestions.length - 1) {
                testState.currentQuestionIndex++;
                showQuestion();
            } else {
                finishTest();
            }
        }
        
        // Show previous question
        function showPreviousQuestion() {
            if (testState.currentQuestionIndex > 0) {
                testState.currentQuestionIndex--;
                showQuestion();
            }
        }
        
        // Timer functions
        function startTimer() {
            clearInterval(testState.timerInterval);
            testState.timeRemaining = TEST_CONFIG.timePerQuestion;
            updateTimerDisplay();
            
            testState.timerInterval = setInterval(() => {
                testState.timeRemaining--;
                updateTimerDisplay();
                
                if (testState.timeRemaining <= 0) {
                    clearInterval(testState.timerInterval);
                    // Auto-skip to next question when time expires
                    if (testState.currentQuestionIndex < testState.selectedQuestions.length - 1) {
                        showNextQuestion();
                    } else {
                        finishTest();
                    }
                }
            }, 1000);
        }
        
        function resetTimer() {
            clearInterval(testState.timerInterval);
            testState.timeRemaining = TEST_CONFIG.timePerQuestion;
            updateTimerDisplay();
            startTimer();
        }
        
        function updateTimerDisplay() {
            timerElement.textContent = testState.timeRemaining;
            
            // Update timer color based on remaining time
            timerElement.classList.remove('warning', 'danger');
            if (testState.timeRemaining <= 15) {
                timerElement.classList.add('danger');
            } else if (testState.timeRemaining <= 30) {
                timerElement.classList.add('warning');
            }
        }
        
        // Finish test and show results
        function finishTest() {
            clearInterval(testState.timerInterval);
            testState.testCompleted = true;
            
            // Calculate results
            let correct = 0;
            let incorrect = 0;
            let skipped = 0;
            testState.incorrectQuestions = [];
            
            testState.userAnswers.forEach((answer, index) => {
                const question = testState.selectedQuestions[index];
                if (answer === null) {
                    skipped++;
                } else if (answer === question.correctAnswer) {
                    correct++;
                } else {
                    incorrect++;
                    // Store incorrect question with user's answer and correct answer
                    testState.incorrectQuestions.push({
                        question: question,
                        userAnswer: answer,
                        correctAnswer: question.correctAnswer
                    });
                }
            });
            
            const totalQuestions = testState.selectedQuestions.length;
            const calculatedScorePercent = Math.round((correct / totalQuestions) * 100);
            const passed = correct >= TEST_CONFIG.passingScore;
            
            // Update results display
            correctCount.textContent = correct;
            incorrectCount.textContent = incorrect;
            skippedCount.textContent = skipped;
            scorePercentElement.textContent = `${calculatedScorePercent}%`;
            testerNameDisplay.textContent = `Tester: ${testState.testerName}`;
            
            // Update score circle visualization
            const correctDegree = (correct / totalQuestions) * 360;
            scoreCircle.style.background = `conic-gradient(var(--correct-color) 0deg ${correctDegree}deg, #eee ${correctDegree}deg 360deg)`;
            
            // Update result message
            if (passed) {
                resultMessage.innerHTML = `
                    <h3 style="color: var(--correct-color); margin-bottom: 10px;">Congratulations ${testState.testerName}! You Passed!</h3>
                    <p>You answered ${correct} out of ${totalQuestions} questions correctly (${calculatedScorePercent}%).</p>
                    <p>You met the North Carolina DMV passing requirement of ${TEST_CONFIG.passingScore} correct answers (${TEST_CONFIG.passingPercent}%).</p>
                `;
                scoreText.textContent = "PASSED";
                scoreText.classList.add('pass');
                scoreText.classList.remove('fail');
            } else {
                resultMessage.innerHTML = `
                    <h3 style="color: var(--incorrect-color); margin-bottom: 10px;">Keep Practicing, ${testState.testerName}!</h3>
                    <p>You answered ${correct} out of ${totalQuestions} questions correctly (${calculatedScorePercent}%).</p>
                    <p>You needed ${TEST_CONFIG.passingScore} correct answers (${TEST_CONFIG.passingPercent}%) to pass the North Carolina DMV test.</p>
                `;
                scoreText.textContent = "FAILED";
                scoreText.classList.add('fail');
                scoreText.classList.remove('pass');
            }
            
            // Update recommendation
            if (calculatedScorePercent >= 90) {
                recommendation.innerHTML = `
                    <h4>Excellent Work!</h4>
                    <p>Your score indicates you're well-prepared for the North Carolina DMV exam. Consider reviewing any missed questions and taking the official test soon.</p>
                `;
            } else if (calculatedScorePercent >= TEST_CONFIG.passingPercent) {
                recommendation.innerHTML = `
                    <h4>Good Job!</h4>
                    <p>You passed the practice test! Review the questions you missed and consider taking another practice test before your official North Carolina DMV exam.</p>
                `;
            } else {
                recommendation.innerHTML = `
                    <h4>Areas for Improvement</h4>
                    <p>Focus on the topics where you missed questions. Study the North Carolina DMV manual and take more practice tests to improve your score.</p>
                    <p>You missed ${TEST_CONFIG.passingScore - correct} more questions than allowed to pass. Click "Show Incorrect Questions" below to review your mistakes.</p>
                `;
            }
            
            // Hide question card and show results
            questionCard.classList.remove('active');
            resultsContainer.classList.add('show');
            
            // Update incorrect questions button text
            if (testState.incorrectQuestions.length > 0) {
                showIncorrectBtn.textContent = `Show Incorrect Questions (${testState.incorrectQuestions.length})`;
                showIncorrectBtn.style.display = 'block';
            } else {
                showIncorrectBtn.style.display = 'none';
            }
        }
        
        // Toggle incorrect questions section
        function toggleIncorrectQuestions() {
            if (incorrectQuestionsSection.classList.contains('show')) {
                incorrectQuestionsSection.classList.remove('show');
                showIncorrectBtn.textContent = `Show Incorrect Questions (${testState.incorrectQuestions.length})`;
            } else {
                showIncorrectQuestions();
                incorrectQuestionsSection.classList.add('show');
                showIncorrectBtn.textContent = 'Hide Incorrect Questions';
                // Hide review section if open
                reviewSection.classList.remove('show');
                reviewTestBtn.textContent = 'Review All Questions';
            }
        }
        
        // Show incorrect questions with correct answers
        function showIncorrectQuestions() {
            incorrectQuestionsList.innerHTML = '';
            
            if (testState.incorrectQuestions.length === 0) {
                incorrectQuestionsList.innerHTML = '<p>No incorrect questions to display. Great job!</p>';
                return;
            }
            
            testState.incorrectQuestions.forEach((item, index) => {
                const question = item.question;
                const userAnswer = item.userAnswer;
                const correctAnswer = item.correctAnswer;
                
                const incorrectQuestionElement = document.createElement('div');
                incorrectQuestionElement.className = 'incorrect-question';
                
                incorrectQuestionElement.innerHTML = `
                    <div style="display: flex; justify-content: space-between; margin-bottom: 10px;">
                        <strong>Question ${testState.selectedQuestions.findIndex(q => q.id === question.id) + 1}: ${question.topic}</strong>
                        <span style="font-weight: 600; color: var(--incorrect-color)">Incorrect</span>
                    </div>
                    <p style="margin-bottom: 15px;"><strong>Question:</strong> ${question.question}</p>
                    <div style="margin-bottom: 10px;">
                        ${question.options.map((option, optIndex) => {
                            let optionStyle = '';
                            if (optIndex === correctAnswer) {
                                optionStyle = 'background-color: rgba(76, 175, 80, 0.1); border-left: 3px solid var(--correct-color);';
                            } else if (optIndex === userAnswer) {
                                optionStyle = 'background-color: rgba(244, 67, 54, 0.1); border-left: 3px solid var(--incorrect-color);';
                            }
                            
                            return `
                                <div style="padding: 8px 12px; margin-bottom: 5px; border-radius: 4px; ${optionStyle}">
                                    <strong>${String.fromCharCode(65 + optIndex)}:</strong> ${option}
                                    ${optIndex === correctAnswer ? ' <strong>(Correct Answer)</strong>' : ''}
                                    ${optIndex === userAnswer && optIndex !== correctAnswer ? ' <strong>(Your Answer)</strong>' : ''}
                                </div>
                            `;
                        }).join('')}
                    </div>
                    <div style="font-style: italic; color: var(--light-text);">
                        <strong>Explanation:</strong> ${question.explanation}
                    </div>
                `;
                
                incorrectQuestionsList.appendChild(incorrectQuestionElement);
            });
        }
        
        // Toggle review section
        function toggleReviewSection() {
            if (reviewSection.classList.contains('show')) {
                reviewSection.classList.remove('show');
                reviewTestBtn.textContent = 'Review All Questions';
            } else {
                showReviewSection();
                reviewSection.classList.add('show');
                reviewTestBtn.textContent = 'Hide Review';
                // Hide incorrect questions section if open
                incorrectQuestionsSection.classList.remove('show');
                showIncorrectBtn.textContent = `Show Incorrect Questions (${testState.incorrectQuestions.length})`;
            }
        }
        
        // Show review section with all questions and answers
        function showReviewSection() {
            reviewQuestions.innerHTML = '';
            
            testState.selectedQuestions.forEach((question, index) => {
                const userAnswer = testState.userAnswers[index];
                const isCorrect = userAnswer === question.correctAnswer;
                const isSkipped = userAnswer === null;
                
                let statusClass = '';
                let statusText = '';
                
                if (isSkipped) {
                    statusClass = 'skipped';
                    statusText = 'Skipped';
                } else if (isCorrect) {
                    statusClass = 'correct';
                    statusText = 'Correct';
                } else {
                    statusClass = 'incorrect';
                    statusText = 'Incorrect';
                }
                
                const reviewQuestion = document.createElement('div');
                reviewQuestion.className = `review-question ${statusClass}`;
                
                reviewQuestion.innerHTML = `
                    <div style="display: flex; justify-content: space-between; margin-bottom: 10px;">
                        <strong>Question ${index + 1}: ${question.topic}</strong>
                        <span style="font-weight: 600; color: ${statusClass === 'correct' ? 'var(--correct-color)' : statusClass === 'incorrect' ? 'var(--incorrect-color)' : 'var(--accent-color)'}">
                            ${statusText}
                        </span>
                    </div>
                    <p style="margin-bottom: 15px;">${question.question}</p>
                    <div style="margin-bottom: 10px;">
                        ${question.options.map((option, optIndex) => {
                            let optionStyle = '';
                            if (optIndex === question.correctAnswer) {
                                optionStyle = 'background-color: rgba(76, 175, 80, 0.1); border-left: 3px solid var(--correct-color);';
                            } else if (optIndex === userAnswer && !isCorrect) {
                                optionStyle = 'background-color: rgba(244, 67, 54, 0.1); border-left: 3px solid var(--incorrect-color);';
                            }
                            
                            return `
                                <div style="padding: 8px 12px; margin-bottom: 5px; border-radius: 4px; ${optionStyle}">
                                    <strong>${String.fromCharCode(65 + optIndex)}:</strong> ${option}
                                    ${optIndex === question.correctAnswer ? ' <strong>(Correct Answer)</strong>' : ''}
                                    ${optIndex === userAnswer && !isCorrect ? ' <strong>(Your Answer)</strong>' : ''}
                                </div>
                            `;
                        }).join('')}
                    </div>
                    <div style="font-style: italic; color: var(--light-text);">
                        <strong>Explanation:</strong> ${question.explanation}
                    </div>
                `;
                
                reviewQuestions.appendChild(reviewQuestion);
            });
        }
        
        // Restart test
        function restartTest() {
            testState.currentQuestionIndex = 0;
            testState.userAnswers.fill(null);
            testState.testStarted = false;
            testState.testCompleted = false;
            testState.incorrectQuestions = [];
            testState.testerName = '';
            
            // Reset UI
            nameInput.disabled = false;
            nameInput.value = '';
            timerContainer.style.display = 'none';
            progressContainer.style.display = 'none';
            questionCard.classList.remove('active');
            resultsContainer.classList.remove('show');
            incorrectQuestionsSection.classList.remove('show');
            reviewSection.classList.remove('show');
            startTestBtn.textContent = 'Start Practice Test';
            startTestBtn.classList.remove('btn-accent');
            
            // Reset progress bar
            progressBar.style.width = '0%';
            
            // Reset timer display
            clearInterval(testState.timerInterval);
            timerElement.textContent = '60';
            timerElement.classList.remove('warning', 'danger');
            
            // Reset buttons
            showIncorrectBtn.textContent = 'Show Incorrect Questions';
            reviewTestBtn.textContent = 'Review All Questions';
            showIncorrectBtn.style.display = 'block';
        }
        
        // Initialize the application
        document.addEventListener('DOMContentLoaded', () => {
            initEventListeners();
            
            // Set default active category
            currentCategoryElement.textContent = 'Car';
        });
    </script>
</body>
]]></content:encoded>
					
					<wfw:commentRss>https://24car-repair.com/north-carolina-dmv-practice-test/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>North Carolina Traffic Ticket Calculator: Complete Cost Analysis Guide</title>
		<link>https://24car-repair.com/north-carolina-traffic-ticket-calculator/</link>
					<comments>https://24car-repair.com/north-carolina-traffic-ticket-calculator/#respond</comments>
		
		<dc:creator><![CDATA[Robert]]></dc:creator>
		<pubDate>Thu, 25 Dec 2025 14:57:58 +0000</pubDate>
				<category><![CDATA[Calculator]]></category>
		<category><![CDATA[North Carolina]]></category>
		<guid isPermaLink="false">https://24car-repair.com/?p=4659</guid>

					<description><![CDATA[North Carolina Traffic Ticket Calculator &#124; 24Car Repair 24CarRepair Home &#62; Resources &#62; NC Ticket Calculator North Carolina Traffic Ticket Calculator: Complete Cost Analysis Guide Receiving a traffic ticket in North Carolina can be confusing and expensive. This comprehensive guide provides an interactive calculator and detailed analysis to help you understand the true total cost [&#8230;]]]></description>
										<content:encoded><![CDATA[

    <title>North Carolina Traffic Ticket Calculator | 24Car Repair</title>
    <meta name="description" content="Calculate your exact NC traffic ticket costs with our detailed calculator. Learn about fines, court costs, insurance increases, and legal strategies to reduce your ticket.">
    <link rel="canonical" href="https://24car-repair.com/north-carolina-traffic-ticket-calculator">
    
    <!-- Open Graph Tags for Social Sharing -->
    <meta property="og:title" content="North Carolina Traffic Ticket Calculator | 24Car Repair">
    <meta property="og:description" content="Estimate total costs, insurance impacts, and legal options for NC traffic violations.">
    <meta property="og:type" content="website">
    <meta property="og:url" content="https://24car-repair.com/north-carolina-traffic-ticket-calculator">
    
    <!-- Schema.org JSON-LD for Rich Results -->
    <script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "HowTo",
        "name": "How to Calculate North Carolina Traffic Ticket Costs",
        "description": "Step-by-step guide to estimating total traffic ticket costs in NC including fines, court fees, and insurance impacts.",
        "step": [
            {
                "@type": "HowToStep",
                "name": "Identify your violation type",
                "text": "Determine the specific traffic violation code from your ticket"
            },
            {
                "@type": "HowToStep",
                "name": "Select the county where cited",
                "text": "Different NC counties have varying court costs"
            },
            {
                "@type": "HowToStep",
                "name": "Calculate total costs",
                "text": "Add base fine, court costs, and additional fees"
            }
        ],
        "estimatedCost": {
            "@type": "MonetaryAmount",
            "currency": "USD",
            "minValue": "50",
            "maxValue": "1000"
        }
    }
    </script>
    
    <style>
        /* === ALIGENT DESIGN SYSTEM === */
        :root {
            /* Color Palette */
            --primary: #1a365d;
            --primary-light: #2d5aa0;
            --accent: #e53e3e;
            --accent-light: #fed7d7;
            --success: #38a169;
            --warning: #d69e2e;
            --gray-50: #f7fafc;
            --gray-100: #edf2f7;
            --gray-200: #e2e8f0;
            --gray-300: #cbd5e0;
            --gray-600: #718096;
            --gray-800: #2d3748;
            
            /* Typography */
            --text-base: 1rem;
            --text-lg: 1.125rem;
            --text-xl: 1.25rem;
            --text-2xl: 1.5rem;
            --text-3xl: 1.875rem;
            --text-4xl: 2.25rem;
            
            /* Spacing */
            --space-1: 0.25rem;
            --space-2: 0.5rem;
            --space-4: 1rem;
            --space-6: 1.5rem;
            --space-8: 2rem;
            --space-12: 3rem;
            
            /* Border Radius */
            --radius-sm: 0.25rem;
            --radius-md: 0.5rem;
            --radius-lg: 0.75rem;
            
            /* Shadows */
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
            
            /* Transitions */
            --transition-fast: 150ms ease;
            --transition-base: 250ms ease;
        }
        
        /* === BASE STYLES === */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        html {
            scroll-behavior: smooth;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            line-height: 1.6;
            color: var(--gray-800);
            background-color: var(--gray-50);
            font-size: var(--text-base);
        }
        
        /* === LAYOUT CONTAINERS === */
        .container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 var(--space-4);
        }
        
        .main-layout {
            display: grid;
            grid-template-columns: 1fr;
            gap: var(--space-8);
            margin: var(--space-8) 0;
        }
        
        @media (min-width: 1024px) {
            .main-layout {
                grid-template-columns: 2fr 1fr;
            }
        }
        
        /* === TYPOGRAPHY === */
        h1, h2, h3, h4, h5, h6 {
            font-weight: 700;
            line-height: 1.3;
            color: var(--primary);
            margin-bottom: var(--space-4);
        }
        
        .article-title {
            font-size: var(--text-4xl);
            margin-bottom: var(--space-2);
            border-bottom: 3px solid var(--accent);
            padding-bottom: var(--space-4);
        }
        
        .section-title {
            font-size: var(--text-3xl);
            margin-top: var(--space-12);
            margin-bottom: var(--space-6);
            position: relative;
            padding-left: var(--space-8);
        }
        
        .section-title::before {
            content: attr(data-number);
            position: absolute;
            left: 0;
            top: 0;
            font-size: var(--text-xl);
            color: var(--accent);
            font-weight: 900;
        }
        
        .subsection-title {
            font-size: var(--text-2xl);
            margin-top: var(--space-8);
            margin-bottom: var(--space-4);
            color: var(--gray-800);
        }
        
        .card-title {
            font-size: var(--text-xl);
            margin-bottom: var(--space-4);
        }
        
        p {
            margin-bottom: var(--space-4);
        }
        
        strong {
            color: var(--primary);
        }
        
        a {
            color: var(--primary-light);
            text-decoration: none;
            transition: color var(--transition-fast);
        }
        
        a:hover {
            color: var(--accent);
            text-decoration: underline;
        }
        
        /* === HEADER === */
        .site-header {
            background: white;
            box-shadow: var(--shadow-md);
            padding: var(--space-4) 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .logo {
            font-size: var(--text-2xl);
            font-weight: 900;
            color: var(--primary);
            text-decoration: none;
        }
        
        .logo span {
            color: var(--accent);
        }
        
        .breadcrumb {
            font-size: var(--text-base);
            color: var(--gray-600);
        }
        
        .breadcrumb a {
            color: var(--gray-600);
        }
        
        /* === CALCULATOR CARD === */
        .calculator-card {
            background: white;
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-lg);
            padding: var(--space-8);
            margin-bottom: var(--space-8);
            border: 1px solid var(--gray-200);
        }
        
        .calculator-header {
            text-align: center;
            margin-bottom: var(--space-8);
        }
        
        .calculator-header h2 {
            font-size: var(--text-2xl);
            color: var(--accent);
            margin-bottom: var(--space-2);
        }
        
        .calculator-form {
            display: flex;
            flex-direction: column;
            gap: var(--space-6);
        }
        
        .form-group {
            display: flex;
            flex-direction: column;
            gap: var(--space-2);
        }
        
        .form-label {
            font-weight: 600;
            color: var(--gray-800);
            display: flex;
            align-items: center;
            gap: var(--space-2);
        }
        
        .form-hint {
            font-size: 0.875rem;
            color: var(--gray-600);
            margin-top: var(--space-1);
        }
        
        select, input {
            padding: var(--space-4);
            border: 2px solid var(--gray-300);
            border-radius: var(--radius-md);
            font-size: var(--text-base);
            transition: all var(--transition-fast);
        }
        
        select:focus, input:focus {
            outline: none;
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(45, 90, 160, 0.1);
        }
        
        .radio-group {
            display: flex;
            flex-wrap: wrap;
            gap: var(--space-4);
            margin-top: var(--space-2);
        }
        
        .radio-option {
            display: flex;
            align-items: center;
            gap: var(--space-2);
        }
        
        .radio-option input[type="radio"] {
            margin: 0;
        }
        
        .btn {
            padding: var(--space-4) var(--space-8);
            border: none;
            border-radius: var(--radius-md);
            font-size: var(--text-base);
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition-fast);
            text-align: center;
        }
        
        .btn-primary {
            background: var(--accent);
            color: white;
        }
        
        .btn-primary:hover {
            background: #c53030;
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }
        
        .btn-secondary {
            background: var(--gray-200);
            color: var(--gray-800);
        }
        
        .btn-secondary:hover {
            background: var(--gray-300);
        }
        
        .button-group {
            display: flex;
            gap: var(--space-4);
            margin-top: var(--space-4);
        }
        
        /* === RESULTS SECTION === */
        .results-section {
            background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
            border-radius: var(--radius-lg);
            padding: var(--space-8);
            margin-top: var(--space-8);
            border: 1px solid var(--accent-light);
            display: none;
        }
        
        .results-section.active {
            display: block;
            animation: slideIn 0.5s ease-out;
        }
        
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .cost-breakdown {
            width: 100%;
            border-collapse: collapse;
            margin: var(--space-6) 0;
        }
        
        .cost-breakdown th {
            text-align: left;
            padding: var(--space-4);
            background: var(--gray-100);
            font-weight: 600;
            color: var(--gray-800);
            border-bottom: 2px solid var(--gray-300);
        }
        
        .cost-breakdown td {
            padding: var(--space-4);
            border-bottom: 1px solid var(--gray-200);
        }
        
        .cost-breakdown tr:last-child td {
            border-bottom: none;
            font-weight: 700;
            font-size: var(--text-xl);
            color: var(--accent);
            background: white;
        }
        
        .insurance-warning {
            background: var(--accent-light);
            border-left: 4px solid var(--accent);
            padding: var(--space-4);
            margin-top: var(--space-6);
            border-radius: var(--radius-sm);
        }
        
        /* === RIGHT SIDEBAR === */
        .sidebar {
            display: flex;
            flex-direction: column;
            gap: var(--space-8);
        }
        
        @media (max-width: 1023px) {
            .sidebar {
                order: -1;
            }
        }
        
        .sidebar-card {
            background: white;
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-md);
            padding: var(--space-6);
            border: 1px solid var(--gray-200);
        }
        
        .stat-box {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: var(--space-4);
            margin-top: var(--space-4);
        }
        
        .stat-item {
            text-align: center;
            padding: var(--space-4);
            background: var(--gray-50);
            border-radius: var(--radius-md);
            border: 1px solid var(--gray-200);
        }
        
        .stat-value {
            font-size: var(--text-2xl);
            font-weight: 700;
            color: var(--accent);
        }
        
        .stat-label {
            font-size: 0.875rem;
            color: var(--gray-600);
            margin-top: var(--space-1);
        }
        
        /* === FAQ SECTION === */
        .faq-item {
            margin-bottom: var(--space-4);
            border: 1px solid var(--gray-200);
            border-radius: var(--radius-md);
            overflow: hidden;
        }
        
        .faq-question {
            padding: var(--space-4);
            background: var(--gray-50);
            font-weight: 600;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .faq-question:hover {
            background: var(--gray-100);
        }
        
        .faq-icon {
            transition: transform var(--transition-base);
        }
        
        .faq-item.active .faq-icon {
            transform: rotate(180deg);
        }
        
        .faq-answer {
            padding: var(--space-4);
            display: none;
            border-top: 1px solid var(--gray-200);
        }
        
        .faq-item.active .faq-answer {
            display: block;
        }
        
        /* === TABLES === */
        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin: var(--space-6) 0;
            box-shadow: var(--shadow-sm);
        }
        
        .data-table th {
            background: var(--primary);
            color: white;
            text-align: left;
            padding: var(--space-4);
            font-weight: 600;
        }
        
        .data-table td {
            padding: var(--space-4);
            border-bottom: 1px solid var(--gray-200);
        }
        
        .data-table tr:nth-child(even) {
            background: var(--gray-50);
        }
        
        .data-table tr:hover {
            background: var(--gray-100);
        }
        
        /* === CALL TO ACTION === */
        .cta-box {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: white;
            padding: var(--space-8);
            border-radius: var(--radius-lg);
            text-align: center;
            margin: var(--space-12) 0;
        }
        
        .cta-title {
            color: white;
            font-size: var(--text-2xl);
            margin-bottom: var(--space-4);
        }
        
        .cta-buttons {
            display: flex;
            gap: var(--space-4);
            justify-content: center;
            margin-top: var(--space-6);
        }
        
        /* === FOOTER === */
        .site-footer {
            background: var(--primary);
            color: white;
            padding: var(--space-8) 0;
            margin-top: var(--space-12);
        }
        
        .footer-content {
            text-align: center;
        }
        
        .footer-links {
            display: flex;
            justify-content: center;
            gap: var(--space-8);
            margin: var(--space-6) 0;
            flex-wrap: wrap;
        }
        
        .footer-links a {
            color: white;
            opacity: 0.9;
        }
        
        .footer-links a:hover {
            opacity: 1;
            text-decoration: underline;
        }
        
        .copyright {
            opacity: 0.7;
            font-size: 0.875rem;
            margin-top: var(--space-4);
        }
        
        /* === MOBILE OPTIMIZATIONS === */
        @media (max-width: 768px) {
            :root {
                --text-4xl: 1.75rem;
                --text-3xl: 1.5rem;
                --text-2xl: 1.25rem;
            }
            
            .container {
                padding: 0 var(--space-4);
            }
            
            .calculator-card,
            .sidebar-card {
                padding: var(--space-6);
            }
            
            .button-group {
                flex-direction: column;
            }
            
            .btn {
                width: 100%;
            }
            
            .stat-box {
                grid-template-columns: 1fr;
            }
            
            .data-table {
                display: block;
                overflow-x: auto;
            }
            
            .cta-buttons {
                flex-direction: column;
            }
            
            .footer-links {
                flex-direction: column;
                gap: var(--space-2);
            }
        }
        
        /* === PRINT STYLES === */
        @media print {
            .calculator-card,
            .sidebar,
            .cta-box,
            .site-footer {
                display: none;
            }
            
            body {
                color: black;
                background: white;
            }
        }
    </style>
    <!-- Header -->
    <header class="site-header">
        <div class="container">
            <div class="header-content">
                <a href="https://24car-repair.com" class="logo">24<span>Car</span>Repair</a>
                <nav class="breadcrumb">
                    <a href="https://24car-repair.com">Home</a> &gt; 
                    <a href="https://24car-repair.com/resources">Resources</a> &gt; 
                    <span>NC Ticket Calculator</span>
                </nav>
            </div>
        </div>
    </header>

    <div class="container">
        <!-- Main Title -->
        <h1 class="article-title">North Carolina Traffic Ticket Calculator: Complete Cost Analysis Guide</h1>
        
        <div class="main-layout">
            <!-- Main Content Column -->
            <main class="article-content">
                <!-- Introduction -->
                <section class="intro-section">
                    <p><strong>Receiving a traffic ticket in North Carolina can be confusing and expensive.</strong> This comprehensive guide provides an interactive calculator and detailed analysis to help you understand the <em>true total cost</em> of your traffic violation, including hidden fees and long-term insurance impacts that most drivers overlook.</p>
                </section>

                <!-- Calculator Section -->
                <section class="calculator-section">
                    <div class="calculator-card">
                        <div class="calculator-header">
                            <h2>North Carolina Traffic Ticket Cost Calculator</h2>
                            <p class="form-hint">Enter your ticket details below for an accurate cost estimate</p>
                        </div>
                        
                        <form id="ticketCalculator" class="calculator-form">
                            <!-- Violation Type -->
                            <div class="form-group">
                                <label class="form-label">
                                    1. Violation Type
                                    <span class="tooltip">ℹ️</span>
                                </label>
                                <select id="violationType" class="form-control" required>
                                    <option value="" disabled selected>Select your violation&#8230;</option>
                                    <option value="speeding_1_9">Speeding 1-9 mph over limit</option>
                                    <option value="speeding_10_14">Speeding 10-14 mph over limit</option>
                                    <option value="speeding_15_19">Speeding 15-19 mph over limit</option>
                                    <option value="speeding_20_24">Speeding 20-24 mph over limit</option>
                                    <option value="speeding_25_plus">Speeding 25+ mph over limit</option>
                                    <option value="reckless">Reckless Driving</option>
                                    <option value="red_light">Running Red Light/Stop Sign</option>
                                    <option value="seatbelt">No Seatbelt (16+)</option>
                                    <option value="child_seat">Child Restraint Violation</option>
                                    <option value="expired_license">Expired Driver&#8217;s License</option>
                                    <option value="expired_registration">Expired Registration</option>
                                    <option value="no_insurance">No Insurance</option>
                                    <option value="dui">DUI/DWI (Impaired Driving)</option>
                                </select>
                                <p class="form-hint">Select the violation that most closely matches your ticket description</p>
                            </div>

                            <!-- County Selection -->
                            <div class="form-group">
                                <label class="form-label">2. County Where Cited</label>
                                <select id="county" class="form-control" required>
                                    <option value="" disabled selected>Select county&#8230;</option>
                                    <optgroup label="Major Urban Counties">
                                        <option value="mecklenburg">Mecklenburg County (Charlotte)</option>
                                        <option value="wake">Wake County (Raleigh)</option>
                                        <option value="guilford">Guilford County (Greensboro)</option>
                                        <option value="forsyth">Forsyth County (Winston-Salem)</option>
                                        <option value="durham">Durham County</option>
                                    </optgroup>
                                    <optgroup label="Other Counties">
                                        <option value="urban_other">Other Urban County</option>
                                        <option value="suburban">Suburban County</option>
                                        <option value="rural">Rural County</option>
                                        <option value="unknown">Not Sure / Don&#8217;t Remember</option>
                                    </optgroup>
                                </select>
                                <p class="form-hint">Court costs vary significantly by county (up to $150 difference)</p>
                            </div>

                            <!-- Driver History -->
                            <div class="form-group">
                                <label class="form-label">3. Your Driving Record (Past 3 Years)</label>
                                <div class="radio-group">
                                    <label class="radio-option">
                                        <input type="radio" name="history" value="clean" checked>
                                        Clean Record (0 violations)
                                    </label>
                                    <label class="radio-option">
                                        <input type="radio" name="history" value="one">
                                        1 Previous Violation
                                    </label>
                                    <label class="radio-option">
                                        <input type="radio" name="history" value="multiple">
                                        2+ Previous Violations
                                    </label>
                                </div>
                            </div>

                            <!-- License Status -->
                            <div class="form-group">
                                <label class="form-label">4. Current License Status</label>
                                <select id="licenseStatus" class="form-control">
                                    <option value="valid" selected>Valid/Current</option>
                                    <option value="expired">Expired (Less than 1 year)</option>
                                    <option value="revoked">Suspended/Revoked</option>
                                </select>
                            </div>

                            <!-- Action Buttons -->
                            <div class="button-group">
                                <button type="submit" class="btn btn-primary">
                                    🧮 Calculate Total Cost
                                </button>
                                <button type="reset" class="btn btn-secondary">
                                    🔄 Reset Calculator
                                </button>
                            </div>
                        </form>

                        <!-- Results Section -->
                        <div id="resultsContainer" class="results-section">
                            <h3>📊 Your Detailed Cost Analysis</h3>
                            
                            <table class="cost-breakdown">
                                <thead>
                                    <tr>
                                        <th>Cost Component</th>
                                        <th>Amount</th>
                                        <th>Notes</th>
                                    </tr>
                                </thead>
                                <tbody id="costDetails">
                                    <!-- Filled by JavaScript -->
                                </tbody>
                            </table>

                            <div class="insurance-warning">
                                <h4>⚠️ Important Insurance Impact</h4>
                                <p>Based on your violation, your <strong>insurance premiums may increase by 25-50%</strong> for the next 3 years. This could add <strong>$1,200-$3,000+</strong> to your total actual cost.</p>
                            </div>

                            <div class="button-group">
                                <button onclick="window.print()" class="btn btn-secondary">
                                    🖨️ Print This Estimate
                                </button>
                                <button onclick="resetCalculator()" class="btn btn-secondary">
                                    📝 New Calculation
                                </button>
                            </div>
                        </div>
                    </div>
                </section>

                <!-- Article Sections with Numbered Headings -->
                <section class="article-sections">
                    <h2 class="section-title" data-number="1">Understanding NC Traffic Ticket Cost Components</h2>
                    
                    <h3 class="subsection-title">1.1 Base Fines and Penalties</h3>
                    <p>North Carolina uses a <strong>structured fine system</strong> based on violation severity. The base fine is determined by:</p>
                    
                    <table class="data-table">
                        <thead>
                            <tr>
                                <th>Violation Category</th>
                                <th>Base Fine Range</th>
                                <th>DMV Points</th>
                                <th>Insurance Points</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>Speeding 1-9 mph over</td>
                                <td>$10 &#8211; $25</td>
                                <td>0</td>
                                <td>0</td>
                            </tr>
                            <tr>
                                <td>Speeding 10-14 mph over</td>
                                <td>$25 &#8211; $50</td>
                                <td>1</td>
                                <td>1</td>
                            </tr>
                            <tr>
                                <td>Speeding 15-19 mph over</td>
                                <td>$50 &#8211; $100</td>
                                <td>2</td>
                                <td>2</td>
                            </tr>
                            <tr>
                                <td>Speeding 20-24 mph over</td>
                                <td>$100 &#8211; $200</td>
                                <td>3</td>
                                <td>3</td>
                            </tr>
                            <tr>
                                <td>Running Red Light</td>
                                <td>$100 &#8211; $250</td>
                                <td>3</td>
                                <td>3</td>
                            </tr>
                            <tr>
                                <td>No Seatbelt (Driver)</td>
                                <td>$25.50</td>
                                <td>0</td>
                                <td>0</td>
                            </tr>
                            <tr>
                                <td>Expired Registration</td>
                                <td>$50 &#8211; $100</td>
                                <td>0</td>
                                <td>0</td>
                            </tr>
                        </tbody>
                    </table>

                    <h3 class="subsection-title">1.2 Mandatory Court Costs</h3>
                    <p>Court costs are <strong>added to every ticket</strong> and vary by county. These fees fund:</p>
                    <ul>
                        <li><strong>General Court of Justice Fee:</strong> $161.50 (statewide)</li>
                        <li><strong>Law Enforcement Training Fee:</strong> $2.50 (statewide)</li>
                        <li><strong>Facility Fee:</strong> Varies by county ($10-$50)</li>
                        <li><strong>Technology Fee:</strong> $10 (most counties)</li>
                        <li><strong>Sheriff&#8217;s Service Fee:</strong> $20 (if applicable)</li>
                    </ul>

                    <h2 class="section-title" data-number="2">County-Specific Cost Variations</h2>
                    
                    <h3 class="subsection-title">2.1 Urban vs. Rural County Comparison</h3>
                    <p>Court costs can vary by <strong>up to 40%</strong> between counties:</p>
                    
                    <table class="data-table">
                        <thead>
                            <tr>
                                <th>County Type</th>
                                <th>Average Court Costs</th>
                                <th>Facility Fee</th>
                                <th>Total Typical Range</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>Mecklenburg (Urban)</td>
                                <td>$188.50</td>
                                <td>$40</td>
                                <td>$228 &#8211; $258</td>
                            </tr>
                            <tr>
                                <td>Wake (Urban)</td>
                                <td>$183.50</td>
                                <td>$35</td>
                                <td>$218 &#8211; $248</td>
                            </tr>
                            <tr>
                                <td>Suburban Counties</td>
                                <td>$173.50</td>
                                <td>$25</td>
                                <td>$198 &#8211; $228</td>
                            </tr>
                            <tr>
                                <td>Rural Counties</td>
                                <td>$168.50</td>
                                <td>$15</td>
                                <td>$183 &#8211; $213</td>
                            </tr>
                        </tbody>
                    </table>

                    <h2 class="section-title" data-number="3">Insurance Impact Analysis</h2>
                    
                    <h3 class="subsection-title">3.1 How Insurance Points Affect Premiums</h3>
                    <p>North Carolina uses a <strong>Safe Driver Insurance Plan (SDIP)</strong> that assigns points affecting insurance rates:</p>
                    
                    <div class="stat-box">
                        <div class="stat-item">
                            <div class="stat-value">30-40%</div>
                            <div class="stat-label">Average rate increase for 1 point</div>
                        </div>
                        <div class="stat-item">
                            <div class="stat-value">80-90%</div>
                            <div class="stat-label">Rate increase for 4+ points</div>
                        </div>
                        <div class="stat-item">
                            <div class="stat-value">3 Years</div>
                            <div class="stat-label">Duration points affect premiums</div>
                        </div>
                        <div class="stat-item">
                            <div class="stat-value">$1,200+</div>
                            <div class="stat-label">Extra cost for 2-point violation</div>
                        </div>
                    </div>

                    <h2 class="section-title" data-number="4">Legal Options and Reduction Strategies</h2>
                    
                    <h3 class="subsection-title">4.1 Prayer for Judgment Continued (PJC)</h3>
                    <p>A <strong>PJC</strong> allows dismissal of charges without points, but with restrictions:</p>
                    <ul>
                        <li>Available once every 3 years per household</li>
                        <li>Cannot be used for speeding over 25 mph or commercial vehicles</li>
                        <li>Still requires payment of court costs</li>
                        <li>Insurance companies may still consider the violation</li>
                    </ul>

                    <h3 class="subsection-title">4.2 Driver Improvement School</h3>
                    <p>Some counties offer <strong>defensive driving courses</strong> to reduce charges:</p>
                    <ul>
                        <li>Cost: $75 &#8211; $150 for the course</li>
                        <li>Time: 4-8 hours of instruction</li>
                        <li>Benefit: Potential dismissal of charges and no insurance points</li>
                        <li>Eligibility: Typically for minor violations and clean records</li>
                    </ul>

                    <!-- Call to Action -->
                    <div class="cta-box">
                        <h3 class="cta-title">Need Help With Your Ticket?</h3>
                        <p>Don&#8217;t navigate the complex NC traffic court system alone. Get professional guidance to minimize costs and protect your driving record.</p>
                        <div class="cta-buttons">
                            <button class="btn btn-primary" onclick="window.location.href='https://24car-repair.com/consultation'">
                                📞 Free Consultation
                            </button>
                            <button class="btn btn-secondary" onclick="window.location.href='https://24car-repair.com/legal-resources'">
                                📚 Legal Resources
                            </button>
                        </div>
                    </div>
                </section>
            </main>

            <!-- Right Sidebar -->
            <aside class="sidebar">
                <!-- Quick Stats Card -->
                <div class="sidebar-card">
                    <h3 class="card-title">📈 NC Ticket Statistics</h3>
                    <div class="stat-box">
                        <div class="stat-item">
                            <div class="stat-value">450k+</div>
                            <div class="stat-label">Tickets issued annually</div>
                        </div>
                        <div class="stat-item">
                            <div class="stat-value">$263</div>
                            <div class="stat-label">Average ticket cost</div>
                        </div>
                        <div class="stat-item">
                            <div class="stat-value">68%</div>
                            <div class="stat-label">Speeding violations</div>
                        </div>
                        <div class="stat-item">
                            <div class="stat-value">42%</div>
                            <div class="stat-label">Reduced with lawyer</div>
                        </div>
                    </div>
                </div>

                <!-- FAQ Card -->
                <div class="sidebar-card">
                    <h3 class="card-title">❓ Frequently Asked Questions</h3>
                    <div class="faq-container">
                        <div class="faq-item">
                            <div class="faq-question">
                                How long do points stay on my NC record?
                                <span class="faq-icon">▼</span>
                            </div>
                            <div class="faq-answer">
                                DMV points remain for 3 years, but insurance companies may look back 5 years for rate calculations.
                            </div>
                        </div>
                        <div class="faq-item">
                            <div class="faq-question">
                                Can I pay my ticket online?
                                <span class="faq-icon">▼</span>
                            </div>
                            <div class="faq-answer">
                                Most NC counties offer online payment through the NC Court System website. You&#8217;ll need your citation number.
                            </div>
                        </div>
                        <div class="faq-item">
                            <div class="faq-question">
                                What happens if I ignore a ticket?
                                <span class="faq-icon">▼</span>
                            </div>
                            <div class="faq-answer">
                                Your license will be suspended, additional fees added ($50 restoration fee), and possible arrest warrant issued.
                            </div>
                        </div>
                        <div class="faq-item">
                            <div class="faq-question">
                                How much does a traffic lawyer cost?
                                <span class="faq-icon">▼</span>
                            </div>
                            <div class="faq-answer">
                                Typically $150-$500 per violation. Often saves money long-term by avoiding insurance increases.
                            </div>
                        </div>
                        <div class="faq-item">
                            <div class="faq-question">
                                Can I get a ticket for 1-9 mph over?
                                <span class="faq-icon">▼</span>
                            </div>
                            <div class="faq-answer">
                                Yes, NC law allows tickets for any speed over the limit, though many officers use 10+ mph as a threshold.
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Resource Links Card -->
                <div class="sidebar-card">
                    <h3 class="card-title">🔗 Official Resources</h3>
                    <ul style="list-style: none; padding-left: 0;">
                        <li style="margin-bottom: var(--space-2);">• <a href="https://www.nccourts.gov/citizens/pay-ticket" target="_blank" rel="noopener">NC Courts Ticket Payment</a></li>
                        <li style="margin-bottom: var(--space-2);">• <a href="https://www.ncdot.gov/dmv" target="_blank" rel="noopener">NC DMV Point System</a></li>
                        <li style="margin-bottom: var(--space-2);">• <a href="https://www.ncdot.gov/dmv/driver/license" target="_blank" rel="noopener">License Status Check</a></li>
                        <li style="margin-bottom: var(--space-2);">• <a href="https://www.ncdoi.gov" target="_blank" rel="noopener">NC Insurance Commissioner</a></li>
                        <li style="margin-bottom: var(--space-2);">• <a href="https://24car-repair.com/driver-resources" target="_blank">24Car Repair Resources</a></li>
                    </ul>
                </div>

                <!-- Timeline Card -->
                <div class="sidebar-card">
                    <h3 class="card-title">⏰ Ticket Response Timeline</h3>
                    <ol style="padding-left: var(--space-4);">
                        <li><strong>Day 1-30:</strong> Receive ticket, research options</li>
                        <li><strong>Day 31-60:</strong> Contact lawyer if needed</li>
                        <li><strong>Day 61-90:</strong> Court date or payment due</li>
                        <li><strong>Day 91+:</strong> Late fees and suspension risk</li>
                    </ol>
                </div>
            </aside>
        </div>
    </div>

    <!-- Footer -->
    <footer class="site-footer">
        <div class="container">
            <div class="footer-content">
                <a href="https://24car-repair.com" class="logo" style="color: white;">24<span>Car</span>Repair</a>
                <div class="footer-links">
                    <a href="https://24car-repair.com/about">About Us</a>
                    <a href="https://24car-repair.com/contact">Contact</a>
                    <a href="https://24car-repair.com/privacy">Privacy Policy</a>
                    <a href="https://24car-repair.com/disclaimer">Legal Disclaimer</a>
                    <a href="https://24car-repair.com/sitemap">Sitemap</a>
                </div>
                <p class="copyright">
                    © 24Car Repair. All rights reserved.<br>
                    This calculator provides estimates only. Actual costs may vary. Not legal advice.<br>
                    North Carolina traffic laws subject to change. Verify with official sources.
                </p>
            </div>
        </div>
    </footer>

    <script>
        // Comprehensive Cost Data Structure
        const NC_TICKET_DATA = {
            // Base fines by violation (2026 rates)
            fines: {
                speeding_1_9: { amount: 15, points: 0, insurancePoints: 0 },
                speeding_10_14: { amount: 35, points: 1, insurancePoints: 1 },
                speeding_15_19: { amount: 75, points: 2, insurancePoints: 2 },
                speeding_20_24: { amount: 150, points: 3, insurancePoints: 3 },
                speeding_25_plus: { amount: 250, points: 4, insurancePoints: 4 },
                reckless: { amount: 500, points: 4, insurancePoints: 4 },
                red_light: { amount: 125, points: 3, insurancePoints: 3 },
                seatbelt: { amount: 25.5, points: 0, insurancePoints: 0 },
                child_seat: { amount: 150, points: 0, insurancePoints: 2 },
                expired_license: { amount: 50, points: 0, insurancePoints: 0 },
                expired_registration: { amount: 75, points: 0, insurancePoints: 0 },
                no_insurance: { amount: 100, points: 3, insurancePoints: 3 },
                dui: { amount: 1000, points: 12, insurancePoints: 12 }
            },
            
            // Court costs by county type
            courtCosts: {
                mecklenburg: { base: 161.5, facility: 40, tech: 10, training: 2.5, total: 214 },
                wake: { base: 161.5, facility: 35, tech: 10, training: 2.5, total: 209 },
                guilford: { base: 161.5, facility: 30, tech: 10, training: 2.5, total: 204 },
                forsyth: { base: 161.5, facility: 28, tech: 10, training: 2.5, total: 202 },
                durham: { base: 161.5, facility: 32, tech: 10, training: 2.5, total: 206 },
                urban_other: { base: 161.5, facility: 25, tech: 10, training: 2.5, total: 199 },
                suburban: { base: 161.5, facility: 20, tech: 10, training: 2.5, total: 194 },
                rural: { base: 161.5, facility: 15, tech: 10, training: 2.5, total: 189 },
                unknown: { base: 161.5, facility: 20, tech: 10, training: 2.5, total: 194 }
            },
            
            // Additional fees
            additionalFees: {
                processing: { percent: 3.5, min: 5, max: 50 },
                licenseCheck: 15,
                victimsCompensation: 20,
                lateFee: { after30: 25, after60: 50 }
            },
            
            // Driver history multipliers
            historyMultipliers: {
                clean: 1.0,
                one: 1.1,
                multiple: 1.25
            }
        };

        // Format currency
        const formatter = new Intl.NumberFormat('en-US', {
            style: 'currency',
            currency: 'USD'
        });

        // Initialize FAQ functionality
        document.querySelectorAll('.faq-question').forEach(question => {
            question.addEventListener('click', function() {
                const item = this.parentElement;
                item.classList.toggle('active');
            });
        });

        // Calculator Form Submission
        document.getElementById('ticketCalculator').addEventListener('submit', function(e) {
            e.preventDefault();
            calculateTotalCost();
        });

        function calculateTotalCost() {
            // Get form values
            const violation = document.getElementById('violationType').value;
            const county = document.getElementById('county').value;
            const history = document.querySelector('input[name="history"]:checked').value;
            const licenseStatus = document.getElementById('licenseStatus').value;
            
            // Validate selection
            if (!violation || !county) {
                alert('Please select both violation type and county.');
                return;
            }
            
            // Calculate base fine
            const fineData = NC_TICKET_DATA.fines[violation];
            let baseFine = fineData.amount;
            
            // Apply history multiplier
            const historyMultiplier = NC_TICKET_DATA.historyMultipliers[history];
            baseFine *= historyMultiplier;
            
            // Get court costs
            const courtCosts = NC_TICKET_DATA.courtCosts[county] || NC_TICKET_DATA.courtCosts.unknown;
            
            // Calculate processing fee
            const processingPercent = NC_TICKET_DATA.additionalFees.processing.percent;
            const processingFee = Math.min(
                Math.max((baseFine + courtCosts.total) * (processingPercent / 100), 
                NC_TICKET_DATA.additionalFees.processing.min),
                NC_TICKET_DATA.additionalFees.processing.max
            );
            
            // Calculate subtotal
            const subtotal = baseFine + courtCosts.total + processingFee;
            
            // Add license status fees if applicable
            let licenseFee = 0;
            if (licenseStatus === 'expired') licenseFee = 25;
            if (licenseStatus === 'revoked') licenseFee = 50;
            
            // Calculate total
            const total = subtotal + licenseFee;
            
            // Calculate insurance impact
            const insurancePoints = fineData.insurancePoints;
            const insuranceIncrease = calculateInsuranceImpact(insurancePoints, total);
            
            // Display results
            displayResults({
                violation,
                county,
                baseFine,
                courtCosts,
                processingFee,
                licenseFee,
                subtotal,
                total,
                fineData,
                insuranceIncrease
            });
        }

        function calculateInsuranceImpact(points, ticketCost) {
            // Estimate 3-year insurance impact
            const annualPremium = 1200; // Average NC car insurance premium
            let increasePercentage;
            
            if (points === 0) increasePercentage = 0;
            else if (points === 1) increasePercentage = 0.30;
            else if (points === 2) increasePercentage = 0.45;
            else if (points === 3) increasePercentage = 0.60;
            else if (points === 4) increasePercentage = 0.90;
            else increasePercentage = 1.20;
            
            const annualIncrease = annualPremium * increasePercentage;
            const threeYearIncrease = annualIncrease * 3;
            
            return {
                annualIncrease,
                threeYearIncrease,
                totalCostWithInsurance: ticketCost + threeYearIncrease
            };
        }

        function displayResults(data) {
            const resultsContainer = document.getElementById('resultsContainer');
            const costDetails = document.getElementById('costDetails');
            
            // Build detailed results table
            costDetails.innerHTML = `
                <tr>
                    <td><strong>Base Fine</strong></td>
                    <td>${formatter.format(data.baseFine)}</td>
                    <td>${data.fineData.points} DMV point(s)</td>
                </tr>
                <tr>
                    <td><strong>Court Costs</strong></td>
                    <td>${formatter.format(data.courtCosts.total)}</td>
                    <td>Includes facility fee (${formatter.format(data.courtCosts.facility)})</td>
                </tr>
                <tr>
                    <td><strong>Processing Fee</strong></td>
                    <td>${formatter.format(data.processingFee)}</td>
                    <td>${NC_TICKET_DATA.additionalFees.processing.percent}% service fee</td>
                </tr>
                ${data.licenseFee > 0 ? `
                <tr>
                    <td><strong>License Status Fee</strong></td>
                    <td>${formatter.format(data.licenseFee)}</td>
                    <td>${document.getElementById('licenseStatus').selectedOptions[0].text}</td>
                </tr>
                ` : ''}
                <tr>
                    <td><strong>SUB-TOTAL</strong></td>
                    <td>${formatter.format(data.total)}</td>
                    <td>Immediate out-of-pocket cost</td>
                </tr>
                <tr>
                    <td><strong>Insurance Impact (3 yrs)</strong></td>
                    <td>+${formatter.format(data.insuranceIncrease.threeYearIncrease)}</td>
                    <td>${data.fineData.insurancePoints} insurance point(s)</td>
                </tr>
                <tr style="background-color: #fff5f5;">
                    <td><strong>TOTAL 3-YEAR COST</strong></td>
                    <td><strong>${formatter.format(data.insuranceIncrease.totalCostWithInsurance)}</strong></td>
                    <td><strong>True financial impact</strong></td>
                </tr>
            `;
            
            // Show results with animation
            resultsContainer.classList.add('active');
            
            // Scroll to results
            setTimeout(() => {
                resultsContainer.scrollIntoView({ behavior: 'smooth', block: 'center' });
            }, 100);
        }

        function resetCalculator() {
            document.getElementById('ticketCalculator').reset();
            document.getElementById('resultsContainer').classList.remove('active');
        }

        // Auto-calculate example on page load (for demo)
        window.addEventListener('load', function() {
            // Set example values
            document.getElementById('violationType').value = 'speeding_15_19';
            document.getElementById('county').value = 'wake';
            
            // Show example calculation after 2 seconds
            setTimeout(() => {
                if (!document.getElementById('resultsContainer').classList.contains('active')) {
                    calculateTotalCost();
                }
            }, 2000);
        });

        // Print functionality
        window.addEventListener('beforeprint', function() {
            // Show results if hidden
            document.getElementById('resultsContainer').classList.add('active');
        });
    </script>
]]></content:encoded>
					
					<wfw:commentRss>https://24car-repair.com/north-carolina-traffic-ticket-calculator/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
