:root {
  --brand-red: #e20613; /* fire red - tweak to match ff-eschede */
  --brand-yellow: #ffc400;
  --brand-dark: #111316;
  --brand-gray: #f4f6f8;
  --brand-muted: #6b7280;
  --brand-text: #0b0d0f;
}

/* Dark theme variables */
:root[data-theme="dark"] {
  --brand-gray: #0f1115;
  --brand-text: #e5e7eb;
  --brand-muted: #9ca3af;
}

html,
body {
  height: 100%;
}
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
  color: var(--brand-text);
  background-color: var(--brand-gray);
}

/* Branding helpers */
.bg-brand {
  background-color: var(--brand-red) !important;
}
.text-brand {
  color: var(--brand-red) !important;
}
.badge-brand {
  background: var(--brand-red);
}
.btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand-red);
  --bs-btn-border-color: var(--brand-red);
  --bs-btn-hover-bg: #b90a12;
  --bs-btn-hover-border-color: #b90a12;
}

/* Navbar */
.navbar-brand img {
  height: 32px;
}
.navbar {
  backdrop-filter: blur(10px);
}
.nav-link {
  font-weight: 600;
}

/* Hero */
.hero {
  position: relative;
  min-height: 52vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero picture,
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.75));
}
.hero .hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
  padding: clamp(1rem, 3vw, 2rem);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}
.hero p {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  opacity: 0.95;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* Card grids */
.card img {
  object-fit: cover;
  height: 180px;
}
.card .card-title {
  font-weight: 700;
}
.card .meta {
  font-size: 0.9rem;
  color: var(--brand-muted);
}

/* Section spacing */
.section {
  padding: clamp(2rem, 5vw, 4rem) 0;
}
.section-header {
  margin-bottom: 1rem;
}
.section-header h2 {
  font-weight: 800;
}
.section-header .lead {
  color: var(--brand-muted);
}

/* Fahrzeuge */

.vehicle-list {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 1rem;
  padding-bottom: 0.25rem;
}

/* einzelne Karte im Slider */
.vehicle-list > article {
  flex: 0 0 85%;
  scroll-snap-align: start;
  display: flex;
  min-width: 0; /* verhindert Überlauf-Bugs */
}

@media (min-width: 576px) {
  .vehicle-list > article {
    flex-basis: 70%;
  }
}
@media (min-width: 768px) {
  .vehicle-list > article {
    flex-basis: 60%;
  }
}

/* Karte selbst immer volle Höhe */
.vehicle-list .card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.vehicle-list .card-img-top {
  height: 250px;
  object-fit: cover;
  display: block;
  width: 100%;
}

.vehicle-list .card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto; /* wächst mit, damit Button nach unten kann */
}

/* Text & Titel */
.vehicle-list .card-title {
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.vehicle-list .card-text {
  margin-bottom: 0.5rem;
  flex-grow: 1; /* füllt Platz, drückt Button runter */
}

/* Button immer nach unten */
.vehicle-list .card .btn {
  margin-top: auto;
}

/* Desktop: Grid */
@media (min-width: 992px) {
  .vehicle-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    overflow: visible;
  }
  .vehicle-list > article {
    flex: initial;
    scroll-snap-align: none;
  }
}

/* Scrollbar Styling */
.vehicle-list::-webkit-scrollbar {
  height: 8px;
}
.vehicle-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}
:root[data-theme="dark"] .vehicle-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

/* Footer */

.footer-alt {
  background: #1a2430;
  color: #e5e7eb;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-alt a {
  color: #e5e7eb;
  text-decoration: none;
}
.footer-alt a:hover {
  text-decoration: underline;
}

.footer-alt .footer-title {
  color: var(--brand-red);
  font-weight: 800;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}
.footer-alt .footer-title::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--brand-red);
  margin-top: 0.35rem;
  width: 100%;
}

.footer-alt .footer-col {
  padding-top: 0.25rem;
}
.footer-alt .footer-rule {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 1rem 0;
}
.footer-alt .copy {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #c7cbd1;
  font-size: 0.95rem;
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: #fff;
  color: #000;
  z-index: 10000;
  border-radius: 0.5rem;
}

/* Offcanvas tweak */
.offcanvas {
  --bs-offcanvas-width: 300px;
}

/* Einsätze & News list */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
.grid-3col > * {
  grid-column: span 12;
}
@media (min-width: 768px) {
  .grid-3col > * {
    grid-column: span 6;
  }
}
@media (min-width: 1200px) {
  .grid-3col > * {
    grid-column: span 4;
  }
}

/* Tables in details */
.table thead th {
  background: var(--brand-dark);
  color: #fff;
}

/* Buttons */
.cta {
  background: linear-gradient(135deg, var(--brand-red), #9c0c12);
  color: #fff;
  border: none;
  box-shadow: 0 10px 30px rgba(226, 6, 19, 0.35);
}
