:root {
    --bg-primary: #0f1117;
    --bg-secondary: #161922;
    --bg-card: #1e222d;
    --border-color: #2b3140;
    --accent: #2563eb;          /* Racing Blau */
    --accent-hover: #1d4ed8;    /* Dunkleres Blau für Buttons beim Drüberfahren */
    --text-main: #f3f5f8;
    --text-muted: #9aa1ad;
    --status-green: #3fb950;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1120px;
    margin: 0 auto;
}

/* Navigation */
.navbar {
    background-color: rgba(18, 20, 23, 0.96);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.25rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    padding: 5.5rem 0 4.5rem 0;
    background: linear-gradient(180deg, #181d24 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-header-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.35rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.status-open {
    background-color: rgba(63, 185, 80, 0.12);
    border: 1px solid rgba(63, 185, 80, 0.35);
    color: var(--status-green);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
}

.hero h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.4rem;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-dark {
    background-color: var(--bg-secondary);
}

.section-header {
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.text-block {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 6px;
    line-height: 1.8;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

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

/* Cards */
.card {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.card-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Specs Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-top: 1px solid var(--border-color);
}

.specs-table th, .specs-table td {
    padding: 0.6rem 0;
    font-size: 0.9rem;
}

.specs-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    width: 45%;
}

.specs-table td {
    font-weight: 600;
    color: var(--text-main);
}

/* Gastfahrer Details */
.fee-card {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

.fee-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
}

.fee-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin: 0.2rem 0;
}

.fee-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.rule-list li {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.rule-list li strong {
    color: var(--text-main);
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Download Cards */
.download-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 6px;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.doc-icon {
    background-color: rgba(37, 99, 235, 0.15);
    color: var(--accent);
    padding: 0.5rem 0.75rem;
    font-weight: 800;
    font-size: 0.85rem;
    border-radius: 4px;
    border: 1px solid rgba(37, 99, 235, 0.35);
}

.doc-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.doc-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Standort */
.location-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 6px;
}

.location-details h3 {
    margin-bottom: 1rem;
}

.location-details p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.location-details strong {
    color: var(--text-main);
}

.location-details .address {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

/* Footer */
.footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-right {
    display: flex;
    gap: 1.5rem;
}

.footer-right a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-right a:hover {
    color: var(--text-main);
}

.impressum-block {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    line-height: 1.7;
}

.impressum-block h4 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 820px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }
    .hero h1 {
        font-size: 2.1rem;
    }
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* Galerie & Visuelle Erweiterungen */
.visual-card {
    padding: 0;
    overflow: hidden;
}
.card-img-placeholder {
    cursor: pointer;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #2e3440;
}
.track-img { background-image: url("uploads/Off-Road-Track.jpeg"); background-size: cover; background-position: center; }
.crawler-img { background-image: url("uploads/Crawler-Areal.jpeg"); background-size: cover; background-position: center; }
.card-body { padding: 1.5rem; }

.album-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}
.album-thumb {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #1a1e24;
    position: relative;
}
.photo-counter {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
}
.album-card-body { padding: 1.25rem; }
.album-date { font-size: 0.8rem; color: var(--accent); font-weight: 700; }
.album-snippet { font-size: 0.85rem; color: var(--text-muted); margin: 0.5rem 0 1rem 0; }
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.photo-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}
.photo-item img:hover { transform: scale(1.02); }

/* Admin Styling */
.admin-body { background: #0f1115; }
.admin-container { padding: 2rem 0; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; }
.login-card { max-width: 400px; margin: 3rem auto; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-size: 0.9rem; color: var(--text-muted); }
.form-input {
    width: 100%;
    padding: 0.6rem;
    background: #181b22;
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 4px;
}
.admin-album-list { list-style: none; }
.admin-album-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}
.admin-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.admin-photo-card { position: relative; height: 80px; }
.admin-photo-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.delete-photo-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #d92323;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    padding: 0 5px;
    border-radius: 2px;
}
.error-msg { color: #f85149; font-size: 0.9rem; margin-bottom: 1rem; }
/* Lightbox Styles */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    touch-action: pan-y;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-media {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    color: #fff;
    font-size: 2rem;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.video-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 2;
}

.photo-item video {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next {
        display: none; /* Auf Smartphones Fokus rein auf Touch-Wischgesten */
    }
}

/* Dynamische Status-Farben */
.status-indicator.status-closed {
    background-color: rgba(248, 81, 73, 0.15);
    border-color: rgba(248, 81, 73, 0.4);
    color: #f85149;
}
.status-indicator.status-closed .status-dot {
    background-color: #f85149;
    box-shadow: 0 0 8px #f85149;
}

.status-indicator.status-winter {
    background-color: rgba(88, 166, 255, 0.15);
    border-color: rgba(88, 166, 255, 0.4);
    color: #58a6ff;
}
.status-indicator.status-winter .status-dot {
    background-color: #58a6ff;
    box-shadow: 0 0 8px #58a6ff;
}

/* Manueller Strecken-Hinweis Banner */
.status-notice-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-left: 3px solid #58a6ff;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #e6edf3;
    max-width: 650px;
    backdrop-filter: blur(4px);
}
.status-notice-banner .notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #58a6ff;
    color: #0b0f19;
    font-weight: bold;
    font-size: 0.8rem;
    flex-shrink: 0;
}
