:root {
  color-scheme: light;
  --rot: #8c1d18;
  --rot-tief: #5e1410;
  --rot-hell: #f4e4e2;
  --text: #3b3632;
  --text-leise: #6b625b;
  --papier: #faf8f6;
  --flaeche: #ffffff;
  --linie: #e6ddd7;
  --nacht: #231d1b;
  --kopf: 84px;
  --breite: 1180px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--papier);
  text-rendering: optimizeLegibility;
}

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

a { color: var(--rot); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--rot-tief); }

a:focus-visible,
.nav-knopf:focus-visible,
.nav-toggle:focus-visible + .nav-knopf {
  outline: 2px solid var(--rot);
  outline-offset: 3px;
}

.unsichtbar {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sprunglink {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--nacht);
  color: white;
  padding: 8px 12px;
  z-index: 30;
}

.sprunglink:focus { top: 8px; }

.kopf-innen,
.fuss-innen,
.fuss-land,
.krumen,
.blatt,
.block,
.insta,
.werbung,
.held-innen {
  width: min(var(--breite), calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

/* Kopfzeile */

.kopf {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--rot);
}

.kopf-innen {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: var(--kopf);
}

.marke { display: block; line-height: 0; }
.marke img { display: block; width: auto; height: 50px; }

.kopf-rechts {
  display: flex;
  align-items: center;
  gap: 8px 26px;
}

.nav-toggle,
.nav-knopf { display: none; }

.hauptnav {
  display: flex;
  align-items: center;
  gap: 4px 26px;
}

.navpunkt { position: relative; }

.hauptnav a.haupt,
.insta-nav {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.insta-nav { order: 2; color: var(--text-leise); font-weight: 500; }

.hauptnav a.haupt:hover,
.insta-nav:hover { color: var(--rot); }

.navpunkt.aktiv > a.haupt {
  color: var(--rot);
  border-bottom-color: var(--rot);
}

.unter {
  display: none;
  position: absolute;
  left: -16px;
  top: 100%;
  min-width: 220px;
  padding: 8px 0;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--rot);
  box-shadow: 0 16px 40px rgba(35, 29, 27, 0.1);
  z-index: 12;
}

.unter a {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.unter a:hover,
.unter a.aktiv {
  background: var(--rot-hell);
  color: var(--rot-tief);
}

.navpunkt:hover .unter,
.navpunkt:focus-within .unter { display: block; }

/* Startseite */

.held {
  position: relative;
  height: min(72vh, 680px);
  height: min(72svh, 680px);
  min-height: 320px;
  background: var(--nacht);
  overflow: hidden;
}

.held img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 65%;
}

.held-text {
  position: absolute;
  inset: auto 0 0;
  padding: 64px 0 84px;
  background: linear-gradient(180deg, transparent, rgba(24, 19, 17, 0.78));
  color: white;
}

.inhalt .held-text h1 {
  margin: 0 0 4px;
  color: white;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.inhalt .held-text p {
  margin: 0;
  max-width: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.insta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--linie);
}

.inhalt .insta h2,
.inhalt .block h2 { padding: 0; border: 0; }

.inhalt .insta h2 {
  margin: 0 0 4px;
  color: var(--rot-tief);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.2;
}

.insta p { margin: 0; color: var(--text-leise); }

.glyph { display: block; flex: none; fill: currentColor; }

.insta-kopf { display: flex; align-items: center; gap: 22px; }
.insta-kopf .glyph { width: 44px; height: 44px; color: var(--nacht); }

.insta > a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  color: white;
  background: var(--rot);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
}

.insta > a:hover { background: var(--rot-tief); color: white; }

.block { padding: 48px 0 72px; }

.inhalt .block h2 {
  margin: 0 0 22px;
  color: var(--rot-tief);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.raster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
}

.kachel {
  position: relative;
  display: block;
  overflow: hidden;
  color: white;
  text-decoration: none;
  background: var(--nacht);
  border-radius: 4px;
}

.kachel.gross { grid-column: span 2; grid-row: span 2; }

.kachel img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.kachel:hover img,
.kachel:focus-visible img { transform: scale(1.04); }

.kachel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(24, 19, 17, 0.88));
}

.kachel span {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 1;
  font-size: 1.3rem;
  font-weight: 650;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.kachel:hover { color: white; }

/* Mitmachen: Einsatzabteilung und Jugendfeuerwehr */

.werbung {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: -52px;
}

.schild {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 18px 22px;
  color: var(--text);
  background: var(--flaeche);
  text-decoration: none;
  border-top: 4px solid var(--rot);
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(24, 19, 17, 0.18);
  transition: box-shadow 0.2s ease;
}

.schild-kicker {
  margin-bottom: 2px;
  color: var(--rot);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.schild strong { color: var(--rot-tief); font-size: 1.2rem; line-height: 1.3; }
.schild-klein { color: var(--text-leise); font-size: 0.9rem; }
.schild-mehr { margin-top: 8px; color: var(--rot); font-weight: 600; }
.schild:hover { color: var(--text); box-shadow: 0 18px 40px rgba(24, 19, 17, 0.3); }
.schild:hover .schild-mehr { text-decoration: underline; }

/* Inhaltsseiten */

.krumen {
  margin-top: 22px;
  color: var(--text-leise);
  font-size: 0.88rem;
}

.krumen a { color: var(--text-leise); text-decoration: none; }
.krumen a:hover { color: var(--rot); text-decoration: underline; }
.krumen .sep { margin: 0 8px; color: var(--linie); }

.blatt { padding: 8px 0 72px; }

body.start .blatt { padding: 0; width: 100%; }

.inhalt h1,
.inhalt h2,
.inhalt h3,
.inhalt h4 {
  line-height: 1.2;
  text-wrap: balance;
}

.inhalt h1 {
  margin: 10px 0 24px;
  color: var(--rot-tief);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.inhalt h1 ~ h1,
.inhalt .abt-content-table h1,
.inhalt h2 {
  margin: 2.6rem 0 0.8rem;
  padding-top: 1.6rem;
  color: var(--rot-tief);
  font-size: 1.6rem;
  font-weight: 700;
  border-top: 1px solid var(--linie);
}

.inhalt h3 {
  margin: 2rem 0 0.5rem;
  color: var(--rot);
  font-size: 1.2rem;
  font-weight: 650;
}

.inhalt h4 { margin: 1.6rem 0 0.4rem; font-size: 1rem; color: var(--text); }

.inhalt p,
.inhalt ul,
.inhalt ol { max-width: 68ch; }

.inhalt p { margin: 0 0 1.05em; }
.inhalt ul, .inhalt ol { margin: 0 0 1.2em; padding-left: 1.3rem; }
.inhalt li { margin-bottom: 0.35em; }
.inhalt li::marker { color: var(--rot); }
.inhalt strong { color: var(--rot-tief); font-weight: 650; }

li.Aufzaehlung {
  list-style: disc;
  background: none !important;
  padding-left: 0.2rem !important;
}

.inhalt p.jahr {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 12px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--linie);
}

.inhalt p.jahr span { color: var(--rot); font-weight: 700; font-variant-numeric: tabular-nums; }

.inhalt p.unterpunkt {
  margin: 0;
  padding: 4px 0 4px 5rem;
  color: var(--text-leise);
  font-size: 0.96rem;
  border-bottom: 1px dashed var(--linie);
}

.sprung { height: 0; overflow: hidden; scroll-margin-top: calc(var(--kopf) + 16px); }
.inhalt h2[id] { scroll-margin-top: calc(var(--kopf) + 16px); }

.shadow-img,
.inhalt > .openbox { margin: 1.4rem 0 0.4rem; }

.inhalt > .shadow-img { max-width: 68ch; }

.shadow-img img,
.openbox img,
.fullsize-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.cite {
  margin: 0.2rem 0 1.6rem !important;
  color: var(--text-leise);
  font-size: 0.88rem;
}

table.abt-content-table,
table.abt-content-table > tbody,
table.content-tworow:not(.fahrzeuge-table),
table.content-tworow:not(.fahrzeuge-table) > tbody,
table.kontakt-table,
table.kontakt-table > tbody,
table.news-table,
table.news-table > tbody {
  display: block;
  width: 100%;
}

table.abt-content-table > tbody > tr,
table.content-tworow:not(.fahrzeuge-table) > tbody > tr,
table.kontakt-table > tbody > tr,
table.news-table > tbody > tr {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: stretch;
}

table.abt-content-table > tbody > tr { gap: 56px; }

table.content-tworow:not(.fahrzeuge-table) + table.content-tworow:not(.fahrzeuge-table) { margin-top: 22px; }

table.abt-content-table > tbody > tr > td,
table.content-tworow:not(.fahrzeuge-table) > tbody > tr > td,
table.kontakt-table > tbody > tr > td,
table.news-table > tbody > tr > td {
  flex: 1 1 280px;
  min-width: 0;
}

table.abt-content-table > tbody > tr > td:first-child { flex: 0 1 68ch; }

td:has(#hovermenu) { flex: 0 0 220px !important; }

#hovermenu {
  position: sticky;
  top: calc(var(--kopf) + 24px);
  padding-top: 14px;
}

#hovermenu h1,
#hovermenu .menu-titel {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  color: var(--text-leise);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.menu--side { list-style: none; margin: 0 0 20px; padding: 0; }
.menu--side li { margin: 0; }

.menu--side a {
  display: block;
  padding: 8px 0 8px 12px;
  color: var(--text);
  text-decoration: none;
  border-left: 2px solid var(--linie);
}

.menu--side a:hover { color: var(--rot); border-left-color: var(--rot); }

/* Karten */

a.karte {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 0 0 18px;
  background: var(--flaeche);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--linie);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

a.karte:hover,
a.karte:focus-visible {
  color: var(--text);
  border-color: var(--rot);
  box-shadow: 0 10px 30px rgba(35, 29, 27, 0.08);
}

td:has(> a.karte) { display: flex; padding: 0; }

a.karte .shadow-img { margin: 0; }
a.karte img { border-radius: 0; }

a.karte h3 { margin: 12px 18px 0; color: var(--rot-tief); font-size: 1.12rem; }

a.karte p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 18px;
  color: var(--text-leise);
  font-size: 0.95rem;
  line-height: 1.55;
}

a.karte p ~ p { display: none; }

a.karte.ohne-bild::before {
  content: "Foto folgt";
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  color: var(--rot);
  background: var(--rot-hell);
  font-size: 0.9rem;
  font-weight: 600;
}

a.karte .shadow-img img,
a.karte .openbox img.front {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

table.fahrzeugliste > tbody > tr > td { flex: 0 1 calc(50% - 11px) !important; }

.ausgemustert-titel {
  margin-top: 2.4rem !important;
  color: var(--text-leise) !important;
  font-size: 0.8rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

table.ausgemustert > tbody > tr { gap: 12px !important; }
table.ausgemustert > tbody > tr > td { flex: 0 1 200px !important; }
table.ausgemustert a.karte { padding-bottom: 10px; background: transparent; }
table.ausgemustert a.karte img { filter: grayscale(0.7); opacity: 0.9; }
table.ausgemustert a.karte h3 { margin: 8px 12px 0; font-size: 0.92rem; color: var(--text); }
table.ausgemustert a.karte p { display: none; }

.openbox { position: relative; }

.openbox img.back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.openbox:hover img.back,
a.karte:focus-visible .openbox img.back { opacity: 1; }

body.fahrzeug-detail .inhalt > .openbox {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 1rem 0 1.4rem;
}

body.fahrzeug-detail .inhalt > .openbox img.back {
  position: static;
  opacity: 1;
}

body.fahrzeug-detail .inhalt > .openbox img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.entry-floater { display: none; }

a.buttonlink,
.filter-preset-button2 a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  color: var(--rot);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--rot);
  border-radius: 999px;
}

a.buttonlink:hover,
.filter-preset-button2 a:hover { background: var(--rot); color: white; }

#hovermenu .filter-preset-button2 a {
  display: block;
  min-height: 0;
  padding: 10px 14px;
  line-height: 1.35;
  border-radius: 6px;
}

/* Tabellen */

table.fahrzeuge-table,
table.fahrzeuge-table tbody { display: block; max-width: 68ch; }

table.fahrzeuge-table { margin: 1.4rem 0; }

table.fahrzeuge-table tr {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr);
  gap: 4px 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--linie);
}

table.fahrzeuge-table td:first-child { color: var(--text-leise); }
table.fahrzeuge-table td:last-child { color: var(--text); font-weight: 600; }
table.fahrzeuge-table td:last-child:has(ul) { font-weight: 400; }

table.mannschaft-table,
table.einsatztable {
  width: 100%;
  max-width: 68ch;
  border-collapse: collapse;
  margin: 0.6rem 0 0.4rem;
  font-size: 0.95rem;
}

table.mannschaft-table td,
table.einsatztable td {
  padding: 9px 10px 9px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--linie);
}

table.mannschaft-table td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
table.chronik-tabelle td:first-child { width: 9.5rem; color: var(--text-leise); font-weight: 600; font-variant-numeric: tabular-nums; }
table.chronik-tabelle td:last-child { text-align: left; font-weight: 400; }
table.chronik-tabelle td p { margin: 0; }

iframe { width: 100%; min-height: 280px; border: 0; }

/* Kontakt */

.kontakt-kopf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px 32px;
  margin: 20px 0 24px;
  padding: 18px 22px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-left: 4px solid var(--rot);
  border-radius: 4px;
}

.kontakt-kopf strong { display: block; margin-bottom: 2px; }
.kontakt-kopf p { margin: 0; max-width: none; color: var(--text-leise); font-size: 0.96rem; }
.kontakt-kopf p strong { display: inline; color: var(--rot-tief); }

.kontakt-liste {
  margin-top: 20px;
  border-top: 1px solid var(--linie);
}

.kontakt-liste section {
  display: grid;
  grid-template-columns: minmax(12rem, 1.1fr) 1fr 1.4fr;
  gap: 4px 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--linie);
}

.kontakt-liste h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--rot-tief);
  font-size: 1.12rem;
}

.kontakt-liste p { margin: 0; max-width: none; }
.kontakt-liste a { color: var(--text); text-decoration: none; font-weight: 500; }
.kontakt-liste a:hover { color: var(--rot); text-decoration: underline; }

/* Fußzeile */

.fuss {
  background: var(--nacht);
  color: #e9e2dc;
  padding: 52px 0 28px;
  font-size: 0.95rem;
}

.fuss-innen {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr auto;
  gap: 28px;
}

.fuss p { margin: 0 0 10px; color: #cfc6be; }
.fuss a { color: #f4efea; text-decoration: none; }
.fuss a:hover { color: white; text-decoration: underline; }

.fuss-name,
.fuss-label {
  margin: 0 0 10px;
  color: #f1c9c5 !important;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fuss-links { display: flex; flex-direction: column; gap: 8px; }

.fuss-insta { display: inline-flex; align-items: center; gap: 15px; }
.fuss-insta .glyph { width: 29px; height: 29px; color: white; }

.fuss-land {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.fuss-land img { width: auto; height: 44px; opacity: 0.9; }
.fuss-land p { margin: 0; color: #a99f97; font-size: 0.85rem; }

/* Mobil */

@media (max-width: 960px) {
  :root { --kopf: 68px; }

  .kopf-innen,
  .fuss-innen,
  .fuss-land,
  .krumen,
  .blatt,
  .block,
  .insta,
  .werbung,
  .held-innen { width: calc(100% - 28px); }

  .marke img { height: 38px; }

  .insta-nav { display: none; }

  .nav-knopf {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 4px;
    color: var(--text);
    font-weight: 650;
    cursor: pointer;
  }

  .nav-knopf .zu { display: none; }
  .nav-toggle:checked + .nav-knopf .auf { display: none; }
  .nav-toggle:checked + .nav-knopf .zu { display: inline; }

  .hauptnav { display: none; }

  .nav-toggle:checked ~ .hauptnav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--kopf) + 3px);
    max-height: calc(100vh - var(--kopf));
    overflow-y: auto;
    padding: 8px 18px 18px;
    background: var(--flaeche);
    border-bottom: 3px solid var(--rot);
    box-shadow: 0 18px 40px rgba(35, 29, 27, 0.12);
  }

  .unter {
    position: static;
    display: block;
    padding: 0 0 8px 14px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .raster { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .kachel.gross { grid-column: auto; grid-row: auto; }

  .fuss-innen,
  .kontakt-liste section { grid-template-columns: 1fr; }

  table.abt-content-table > tbody > tr { gap: 24px; }
  td:has(#hovermenu) { flex: 1 1 100% !important; order: -1; }
  #hovermenu { position: static; padding-top: 0; }
  #hovermenu .menu--side { display: flex; flex-wrap: wrap; gap: 6px 8px; }
  #hovermenu .menu--side a { padding: 4px 12px; border: 1px solid var(--linie); border-radius: 999px; font-size: 0.9rem; }

  table.fahrzeugliste > tbody > tr > td { flex: 1 1 100% !important; }
  table.ausgemustert > tbody > tr > td { flex: 0 1 calc(50% - 6px) !important; }
  table.fahrzeuge-table tr { grid-template-columns: 1fr; }

  .held-text { padding-bottom: 28px; }
  .werbung { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
}
