/*
 * open-pitlane.info
 *
 * This stylesheet defines a dark, motorsport‑inspired look
 * reminiscent of the Schnelle Schwaben website: dark greys,
 * bright red highlights and plenty of breathing room.
 */

/* CSS variables for easy theming */
:root {
  --primary-color: #c4122f; /* racing red */
  --bg-color: #121212;      /* dark background */
  --card-bg: #1e1e1e;      /* slightly lighter dark for cards */
  --text-color: #f5f5f5;   /* light text */
  --muted-text: #b5b5b5;   /* muted text */
  --border-radius: 6px;
  --transition: 0.3s ease;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Global containers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Navigation bar */
nav {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
}

nav .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

nav .logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--primary-color);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

nav ul li {
  position: relative;
}

nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-weight: 500;
}

nav ul li a:hover,
nav ul li a.active {
  background: var(--primary-color);
  color: #ffffff;
}

/* Hero section */
.hero {
  position: relative;
  width: 100%;
  /* Make the hero section taller to better showcase the background imagery. */
  height: 75vh;
  /* Default background for the hero section.  This will be replaced via
     JavaScript if an admin uploaded a custom image.  Path is relative
     to this CSS file. */
  background-image: url('img/hero.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Use a slightly lighter overlay so the background image remains visible */
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--text-color);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--muted-text);
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  background: var(--primary-color);
  color: white;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn:hover {
  background: #a00d25;
}

/* Cards and event list */
.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.event-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  transition: transform var(--transition);
}

.event-card:hover {
  transform: translateY(-5px);
}

.event-card h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.event-card .meta {
  font-size: 0.9rem;
  color: var(--muted-text);
  margin-bottom: 10px;
}

.event-card p {
  margin-bottom: 15px;
}

/* Additional meta information for event cards (dB limit, session type, vehicles) */
.extra-meta {
  font-size: 0.85rem;
  color: var(--muted-text);
  margin-bottom: 6px;
}

/* Thumbnail for the first event image on the listing page */
.event-card .event-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  margin-bottom: 12px;
}

/* Group buttons inside event cards */
.event-card .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* Price label used in event cards and detail pages */
.price {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* Detail page two-column layout */
.detail-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.detail-images-column {
  flex: 0 0 40%;
}

.detail-images-column img {
  width: 100%;
  border-radius: var(--border-radius);
  margin-bottom: 10px;
  object-fit: cover;
}

.detail-info {
  flex: 1;
}

.detail-info .price {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-top: 10px;
  margin-bottom: 20px;
}

/* Layout for additional event details (dB limit, session type, vehicles, times) on the detail page */
#detail-extra div {
  margin-bottom: 6px;
}
#detail-extra a.btn {
  display: inline-block;
  margin-top: 10px;
}

/*
 * On the event detail page the meta information (Datum, Uhrzeit,
 * Strecke, Eventart und Veranstalter) should stand out as a kind
 * of subheading.  Make it larger and bold so the visitor can
 * quickly see when and wo the event takes place.  This styling is
 * applied only in the detail view via the .detail-info .meta class.
 */
.detail-info .meta {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 10px;
}

@media (max-width: 700px) {
  .detail-wrapper {
    flex-direction: column;
  }
  .detail-images-column {
    flex: 0 0 100%;
  }
}

/* Event detail page image grid */
.detail-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-images img {
  width: calc(50% - 10px);
  border-radius: var(--border-radius);
  object-fit: cover;
}

@media (max-width: 600px) {
  .detail-images img {
    width: 100%;
  }
}

/* Layout for events page with sidebar */
.layout {
  display: flex;
  gap: 20px;
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
}

.quick-search {
  background: var(--card-bg);
  padding: 15px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

.quick-search h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.quick-search input[type="text"],
.quick-search input[type="date"],
.quick-search select {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  background: #1a1a1a;
  color: var(--text-color);
  border: 1px solid #333;
  border-radius: var(--border-radius);
  box-sizing: border-box;
}

.ads img {
  width: 100%;
  margin-bottom: 10px;
  border-radius: var(--border-radius);
  object-fit: cover;
}

.events-container {
  flex: 1;
}


/* Calendar styles */
.calendar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.year-header {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 10px;
  color: var(--primary-color);
}
.month {
  background: var(--card-bg);
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}
.month h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
}
.calendar-table {
  width: 100%;
  border-collapse: collapse;
}
.calendar-table th,
.calendar-table td {
  border: 1px solid #333;
  padding: 6px;
  vertical-align: top;
  font-size: 0.8rem;
}
.calendar-table thead th {
  background: #222;
  color: var(--text-color);
}
.calendar-table td.weekend {
  background: rgba(200, 200, 200, 0.1);
}
.calendar-table td.empty {
  background: transparent;
}
.calendar-table .day-number {
  font-weight: bold;
  margin-bottom: 4px;
}
.event-label a {
  display: block;
  font-size: 0.75rem;
  color: var(--primary-color);
  text-decoration: none;
  margin-bottom: 2px;
}
.event-label a:hover {
  text-decoration: underline;
}

/* Form elements */
.form-group {
  margin-bottom: 15px;
}
.form-row {
  display: flex;
  gap: 15px;
}
.form-row .form-group {
  flex: 1;
}
.form-control {
  width: 100%;
  padding: 8px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: var(--border-radius);
  color: var(--text-color);
  box-sizing: border-box;
}
.form-control-file {
  display: block;
  margin-top: 6px;
  color: var(--text-color);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Table styling */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  color: var(--text-color);
}
.table th,
.table td {
  padding: 8px;
  border: 1px solid #333;
}
.table-dark th {
  background-color: #222;
}
.table-striped tbody tr:nth-child(odd) {
  background-color: #1a1a1a;
}

/* Button sizes and variants */
.btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}
.btn-success {
  background: #28a745;
  color: #fff;
}
.btn-success:hover {
  background: #218838;
}
.btn-danger {
  background: #dc3545;
  color: #fff;
}
.btn-danger:hover {
  background: #c82333;
}
.btn-info {
  background: #17a2b8;
  color: #fff;
}
.btn-info:hover {
  background: #138496;
}
.btn-secondary {
  background: #6c757d;
  color: #fff;
}
.btn-secondary:hover {
  background: #5a6268;
}

/* Meta row on detail page, large and bold */
.meta-large {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 15px;
}

/* Layout wrappers for detail page */
.event-detail {
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}
.event-detail h2 {
  margin-top: 0;
  color: var(--primary-color);
}
.detail-body {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
}
.detail-images {
  flex: 0 0 40%;
}
.detail-images img {
  width: 100%;
  border-radius: var(--border-radius);
  margin-bottom: 10px;
  object-fit: cover;
}
.detail-info {
  flex: 1;
}
.detail-info p {
  margin-bottom: 12px;
}
.detail-info .btn {
  margin-right: 10px;
}

@media (max-width: 700px) {
  .detail-body {
    flex-direction: column;
  }
  .detail-images {
    flex: 0 0 100%;
  }
}

/* Form elements */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
}

label {
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
textarea,
select {
  padding: 10px;
  border: 1px solid #444;
  border-radius: var(--border-radius);
  background: #222;
  color: var(--text-color);
  font-size: 1rem;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input[type="submit"],
button {
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

input[type="submit"]:hover,
button:hover {
  background: #a00d25;
}

/* Table for admin */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table th,
table td {
  border: 1px solid #333;
  padding: 10px;
  text-align: left;
}

table th {
  background: var(--primary-color);
  color: #fff;
}

table tr:nth-child(even) {
  background: #1a1a1a;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }
}

/* Gallery section styles */
.gallery {
  margin-top: 40px;
}

.gallery h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.gallery-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}


/* ==================================================================
 * Ergänzungen PHP-Version 2
 * Übernommen aus dem HTML-Prototyp (Logo, Slide-in-Popup, Cookie-
 * Banner) sowie Stile für Meldungen, Admin, Benutzerbereich.
 * ================================================================== */

[hidden] { display: none !important; }

a { color: var(--primary-color); }
a:hover { color: #e8324f; }

/* Logo-Bild in der Navigation (Prototyp) */
.logo-img {
  height: 40px;
  width: auto;
  margin-right: 8px;
  display: block;
}

nav ul { align-items: center; flex-wrap: wrap; }
nav ul li a.active,
nav ul li a:hover { color: #fff; }
nav select { padding: 4px 6px; font-size: 0.9rem; }

/* Zähler für ungelesene Benachrichtigungen */
.badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 2px;
  border-radius: 9px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.75rem;
  line-height: 18px;
  text-align: center;
  vertical-align: top;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  background: none;
  font-size: 1.6rem;
  padding: 4px 10px;
  color: var(--text-color);
}
@media (max-width: 1150px) {
  .nav-toggle { display: block; }
  nav .nav-container { flex-wrap: wrap; }
  nav ul {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-top: 10px;
  }
  nav ul.open { display: flex; }
  nav ul li a { display: block; }
}

/* Slide-in-Popup "Info zum Anbieter" (Prototyp) */
.provider-popup {
  position: fixed;
  top: 0;
  right: 0;
  width: 350px;
  max-width: 90%;
  height: 100%;
  box-sizing: border-box;
  background: var(--primary-color);
  color: #fff;
  padding: 20px;
  overflow-y: auto;
  box-shadow: -2px 0 8px rgba(0,0,0,0.5);
  transform: translateX(100%);
  transition: transform var(--transition);
  z-index: 2000;
}
.provider-popup.open { transform: translateX(0); }
.provider-popup h3 { margin-top: 0; padding-right: 30px; }
.provider-popup a { color: #fff; }
.provider-popup .close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}
.provider-popup .provider-images img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 10px;
  object-fit: cover;
}

.info-btn { background: var(--primary-color); }
.back-btn { margin-bottom: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.detail-info .btn { margin-right: 0; }

/* Cookie-Hinweis (Prototyp) */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  background: var(--card-bg);
  color: var(--text-color);
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  z-index: 3000;
}

/* Meldungen */
.flash-container { padding-bottom: 0; }
.alert {
  padding: 12px 16px;
  border-radius: var(--border-radius);
  margin-bottom: 15px;
  border-left: 4px solid;
  background: var(--card-bg);
}
.alert-success { border-color: #28a745; }
.alert-error   { border-color: var(--primary-color); background: #2a1216; }
.alert-info    { border-color: #17a2b8; }

.muted { color: var(--muted-text); }
.btn-primary { background: var(--primary-color); }
input[type="submit"] { font-size: 1rem; }
button.btn, a.btn { line-height: 1.4; }

/* Schnellabfrage ist jetzt ein echtes Formular */
form.quick-search { max-width: none; gap: 0; }
form.quick-search .btn { width: 100%; }
.reset-link { display: block; margin-top: 8px; font-size: 0.9rem; }

/* Event-Karten */
.event-card { display: flex; flex-direction: column; }
.event-card .btn-group { margin-top: auto; }

@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .ads { display: none; }
}

/* Formulare */
.form-row { flex-wrap: wrap; }
.form-row .form-group { min-width: 140px; display: flex; flex-direction: column; gap: 6px; }
.form-hint { color: var(--muted-text); font-size: 0.9rem; margin: 0; }
label.checkbox { font-weight: normal; display: flex; gap: 8px; align-items: flex-start; }
label.checkbox input { margin-top: 5px; }
input[type="url"],
input[type="number"] {
  padding: 10px;
  border: 1px solid #444;
  border-radius: var(--border-radius);
  background: #222;
  color: var(--text-color);
  font-size: 1rem;
}
input:disabled { opacity: 0.6; }
input[type="file"] { color: var(--text-color); }
.thumb-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.thumb-row img { width: 110px; height: 75px; object-fit: cover; border-radius: 4px; }
.thumb-option { display: flex; flex-direction: column; gap: 4px; font-weight: normal; }
.danger-zone { margin-top: 30px; padding-top: 20px; border-top: 1px solid #333; }

/* Inline-Formulare (Admin-Aktionen) */
form.inline-form {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: none;
  margin: 2px 0;
}
form.inline-form input[type="text"] { padding: 5px 8px; font-size: 0.85rem; }
.add-track-form { margin-bottom: 10px; }

/* Panels, Tabellen, Status */
.panel {
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  margin-bottom: 25px;
}
.panel h3 { margin-top: 0; color: var(--primary-color); }
.table-scroll { overflow-x: auto; }
.table-scroll table { margin-top: 10px; }
td.actions { white-space: nowrap; }
td.changes { font-size: 0.85rem; min-width: 200px; }
tr.inactive td { opacity: 0.55; }

.status { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 0.8rem; background: #333; white-space: nowrap; }
.status-approved { background: #1e5e2c; }
.status-pending,
.status-edited   { background: #6b5310; }
.status-rejected { background: #6b1020; }

.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; position: static; background: none; backdrop-filter: none; }
.admin-tabs a {
  padding: 6px 12px;
  border-radius: var(--border-radius);
  background: var(--card-bg);
  color: var(--text-color);
  text-decoration: none;
}
.admin-tabs a:hover { background: var(--primary-color); color: #fff; }
.admin section { scroll-margin-top: 80px; }

.notification-list { list-style: none; padding: 0; margin: 0; }
.notification-list li { padding: 8px 0; border-bottom: 1px solid #333; }
.notification-list li.unread { font-weight: bold; }

/* Kalender: heutiger Tag */
.calendar-table td.today { outline: 2px solid var(--primary-color); outline-offset: -2px; }
.calendar-table td { width: 14.28%; }
.month { overflow-x: auto; }

/* Rechtstexte & Footer */
.legal { max-width: 800px; }
.legal h3 { color: var(--primary-color); margin-top: 25px; }
.site-footer {
  margin-top: 40px;
  border-top: 1px solid #222;
  color: var(--muted-text);
  font-size: 0.9rem;
  text-align: center;
}
.site-footer a { color: var(--muted-text); }

/* ==================================================================
 * Version 3: Veranstalter-Verzeichnis und Event-Import
 * ================================================================== */
.provider-country h3 { color: var(--primary-color); margin-bottom: 10px; }
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}
.provider-card {
  background: var(--card-bg);
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}
.provider-card h4 { margin: 0 0 6px; }
.provider-card p { margin: 8px 0 0; }
.small-note { font-size: 0.85rem; }
.import-hint { font-size: 0.85rem; color: var(--muted-text); font-style: italic; }
.import-info { margin-bottom: 4px; }
.status.conf-high { background: #1e5e2c; }
.status.conf-medium { background: #6b5310; }
.status.conf-low { background: #6b1020; }
.status.src-ok { background: #1e5e2c; }
.status.src-empty { background: #6b5310; }
.status.src-error, .status.src-blocked { background: #6b1020; }
.sources-table td { vertical-align: top; }
.url-form textarea { min-height: 0; width: 260px; font-size: 0.8rem; padding: 5px; }
pre.import-log {
  max-height: 300px;
  max-width: 700px;
  overflow: auto;
  font-size: 0.75rem;
  background: #111;
  padding: 8px;
  white-space: pre-wrap;
}

/* ==================================================================
 * Hero-Karussell (Startseite)
 * Bildausschnitt je Foto über --pos (breit) und --pos-m (Handy).
 * Text sitzt im oberen Drittel über Himmel/Bäumen, damit die Autos in
 * der unteren Bildhälfte frei bleiben.
 * ================================================================== */
.hero-carousel {
  background: #000 none;
  overflow: hidden;
  align-items: flex-start;
  padding-top: clamp(40px, 11vh, 110px);
  box-sizing: border-box;
  min-height: 420px;
}
.hero-carousel::after {
  z-index: 1;
  backdrop-filter: none;
  /* oben dunkler für die Schrift, Mitte frei für die Autos, unten leicht für die Punkte */
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.70) 0%, rgba(0,0,0,0.40) 30%, rgba(0,0,0,0.05) 55%,
    rgba(0,0,0,0.05) 80%, rgba(0,0,0,0.45) 100%);
}
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-carousel .hero-content { z-index: 2; padding: 0 20px; max-width: 1100px; }
.hero-carousel h1 { font-size: clamp(1.9rem, 2.8vw, 2.8rem); margin: 0 0 0.4rem; text-shadow: 0 2px 12px rgba(0,0,0,0.9); }
.hero-carousel p { max-width: 820px; margin-left: auto; margin-right: auto; }
.hero-carousel p { color: #eaeaea; text-shadow: 0 1px 8px rgba(0,0,0,0.9); }

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 1.8rem;
  line-height: 44px;
  opacity: 0.7;
}
.hero-nav:hover, .hero-nav:focus-visible { background: var(--primary-color); opacity: 1; }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }
.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(0,0,0,0.3);
}
.hero-dot.active { background: var(--primary-color); transform: scale(1.25); }
.hero-dot:hover { background: #fff; }

@media (max-width: 700px) {
  .hero-slide { object-position: var(--pos-m, var(--pos, 50% 50%)); }
  .hero-carousel { height: 70vh; padding-top: 20px; }
  /* kompakter Textblock, damit er oberhalb der Autos bleibt */
  .hero-carousel h1 { font-size: 1.6rem; margin: 0 0 0.3rem; line-height: 1.2; }
  .hero-carousel p { font-size: 0.95rem; margin: 0 0 0.8rem; line-height: 1.4; }
  .hero-carousel .btn { padding: 7px 16px; font-size: 0.95rem; }
  .hero-nav { display: none; } /* auf dem Handy wischen bzw. Punkte */
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}

/* Kalender: Länder-Schnellfilter mit Flaggen */
.country-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  position: static;
  background: none;
  backdrop-filter: none;
}
.country-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid #333;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}
.country-btn:hover { border-color: var(--primary-color); color: #fff; }
.country-btn.active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.country-btn .flag {
  width: 21px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25);
}
.country-btn .count {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  font-size: 0.8rem;
  text-align: center;
}
.country-btn.active .count { background: rgba(0,0,0,0.25); }
@media (max-width: 500px) {
  .country-btn { padding: 6px 10px; font-size: 0.85rem; }
}

/* ==================================================================
 * Navigation: eine Zeile, Sprachauswahl rechts (vorher bei vielen
 * Menüpunkten unter "Start" umgebrochen)
 * ================================================================== */
nav .nav-container { max-width: 1440px; width: 96%; box-sizing: border-box; }
@media (min-width: 1151px) {
  nav ul { flex-wrap: nowrap; gap: 4px; }
  nav ul li a { padding: 8px 10px; white-space: nowrap; }
  nav ul li.lang { margin-left: 14px; padding-left: 14px; border-left: 1px solid #333; }
}
@media (max-width: 1150px) {
  nav ul li.lang { padding: 6px 12px; }
}

/* ==================================================================
 * Galerie "Auf der Strecke" + Großansicht
 * ================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: var(--border-radius);
  aspect-ratio: 3 / 2;
  background: #222;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.05); }
@media (max-width: 500px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none !important; }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 4px; box-shadow: 0 6px 24px rgba(0,0,0,0.6); }
.lightbox figcaption { color: var(--muted-text); margin-top: 10px; font-size: 0.95rem; }
.lightbox button {
  position: absolute;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 2rem;
  line-height: 48px;
}
.lightbox button:hover, .lightbox button:focus-visible { background: var(--primary-color); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; }
}
body.no-scroll { overflow: hidden; }
@media (min-width: 1151px) and (max-width: 1320px) {
  nav ul li a { padding: 8px 7px; font-size: 0.95rem; }
  nav ul li.lang { margin-left: 6px; padding-left: 8px; }
  nav .logo-img { height: 34px; }
}

/* Galerie v2: 4 nebeneinander, 2 Reihen, 200 px hoch (wie die alte Galerie);
   app.js blendet die Bilder laufend über */
.gallery-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.gallery-item {
  position: relative;
  aspect-ratio: auto;
  height: 200px;
}
.gallery-item img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease, transform 0.4s ease;
}
.gallery-item img.current { opacity: 1; }
@media (max-width: 800px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-item { height: 150px; }
  .gallery-item:nth-child(n+5) { display: none; }   /* Handy: 2 × 2 */
}
@media (prefers-reduced-motion: reduce) {
  .gallery-item img { transition: none; }
}

/* Fotonachweis unter der Galerie */
.photo-credit { margin: 8px 0 0; text-align: right; font-size: 0.8rem; color: var(--muted-text); }
