:root {
    --primary-color: #005A9C;
    --secondary-color: #FDB813;
    --dark-color: #1a1a1a;
    --light-color: #f4f4f4;
    --text-color: #333;
    --light-text-color: #f4f4f4;
    --background-color: #fff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition-speed: 0.3s;
    --font-family: 'Helvetica Neue', Arial, sans-serif;
}

[data-theme="dark"] {
    --primary-color: #007bff;
    --secondary-color: #FDB813;
    --dark-color: #f4f4f4;
    --light-color: #121212;
    --text-color: #f4f4f4;
    --light-text-color: #1a1a1a;
    --background-color: #1e1e1e;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

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

html,
body {
    height: 100%;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed) ease;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout & Sections --- */
header {
    background-color: #111;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    color: #fff;
    margin-bottom: 0.25rem;
}

header p {
    color: var(--secondary-color);
    margin: 0;
    font-size: 1.1rem;
}

main {
    flex: 1 0 auto;
}

section {
    padding: 3rem 0;
}

#hero {
    background: var(--dark-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 4rem 2rem;
}

#hero h2 {
    color: var(--light-text-color);
    font-size: 2.8rem;
}

#hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

#events,
#vehicles {
    background-color: var(--light-color);
}

[data-theme="dark"] #events,
[data-theme="dark"] #vehicles {
    background-color: #181818;
}

footer {
    background-color: #111;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

/* --- Grid & Cards --- */
.event-list,
.vehicle-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.card {
    background: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.event-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.event-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.event-card p {
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.9rem;
}

[data-theme="dark"] .event-card p {
    color: #aaa;
}

.event-card .btn-details {
    margin-top: auto;
    align-self: flex-start;
}

.vehicle-card {
    cursor: pointer;
}

.vehicle-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.vehicle-card h4,
.vehicle-card p {
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}

.vehicle-card h4 {
    margin-top: 1rem;
    font-size: 1.2rem;
}

.vehicle-card p {
    color: #666;
    padding-bottom: 1rem;
    margin-bottom: 0;
    font-size: 0.9rem;
}

[data-theme="dark"] .vehicle-card p {
    color: #bbb;
}

/* --- UI Components --- */
.event-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    max-width: 800px;
    margin: 0 auto;
}

.event-filter input {
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    flex: 1;
    min-width: 200px;
}

.btn,
.event-filter button {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    display: inline-block;
}

.btn:hover,
.event-filter button:hover {
    background: var(--secondary-color);
    color: #111;
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-details {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: normal;
    padding: 8px 16px;
}

.btn-details:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: none;
}

.verified-badge,
.unverified-badge {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: bold;
    vertical-align: middle;
    margin-left: 8px;
}

.verified-badge {
    background-color: #e9f7ec;
    color: var(--success-color);
}

.unverified-badge {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

[data-theme="dark"] .verified-badge {
    background-color: rgba(40, 167, 69, 0.2);
}

[data-theme="dark"] .unverified-badge {
    background-color: #343a40;
    border-color: #495057;
}

/* --- Modal --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    transform: scale(0.95);
    animation: scaleIn 0.3s forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-speed);
}

.modal-close-btn:hover {
    color: var(--danger-color);
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0 2rem;
}

.modal-gallery img {
    border-radius: var(--border-radius);
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.modal-details p {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* --- Accessibility --- */
:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

.vehicle-card:focus-visible {
    box-shadow: 0 0 0 3px var(--secondary-color);
}

/* --- Responsive Design --- */
@media (min-width: 768px) {
    .event-list,
    .vehicle-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .event-list,
    .vehicle-showcase {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    h2 {
        font-size: 2rem;
    }
    #hero h2 {
        font-size: 2.2rem;
    }
    .event-filter {
        flex-direction: column;
    }
    .event-filter input,
    .event-filter button {
        width: 100%;
    }
}