/* WTS Maschinenhandel: Gestaltung als reines CSS mit Variablen */

:root {
  --navy: #10263e;
  --navy-deep: #0b2035;
  --blue: #1266a3;
  --amber: #e8a832;
  --amber-light: #f0b54e;
  --text: #1d3043;
  --muted: #5c6f80;
  --line: #dce5ec;
  --field-border: #7f909e;
  --pale: #eff5fa;
  --page: #f6f8fa;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --content-max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
}

a {
  color: var(--blue);
}

/* Inhaltsbreite */
.inhalt {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.nur-lesegeraet {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Der versteckte Zusatz bleibt im Kennzeichen verankert; sonst ragt er aus der wischbaren Reihe
   und macht die ganze Seite breiter als den Bildschirm. */
.aktivkennzeichen {
  position: relative;
}

/* Knöpfe */
.knopf {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.knopf-gelb {
  background: var(--amber);
  color: #13283b;
}

.knopf-gelb:hover {
  background: var(--amber-light);
}

.knopf-dunkel {
  background: var(--navy);
  color: #fff;
}

.knopf-hell {
  background: var(--pale);
  color: var(--navy);
}

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

/* Top-Leiste */
.topleiste {
  background: var(--navy-deep);
  color: #fff;
  font-size: 12px;
  padding: var(--space-2) 0;
}

/* Kopf */
.kopf {
  position: relative;
  background: #fff;
  box-shadow: 0 2px 14px rgba(17, 40, 58, 0.06);
}

.kopf-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.logo {
  font-size: 23px;
  font-weight: 800;
  color: var(--navy);
  text-decoration: none;
}

.logo img,
.fuss h2 img {
  display: block;
  max-width: 100%;
  max-height: 44px;
  width: auto;
  height: auto;
}

.nav {
  margin-left: auto;
}

.nav-liste {
  display: flex;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
}

.nav-liste a {
  color: var(--text);
  text-decoration: none;
}

.nav-liste a:hover {
  color: var(--blue);
}

/* Menüknopf: Checkbox bleibt per Tastatur erreichbar, ist aber unsichtbar */
.menue-schalter {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.menue-knopf {
  display: none;
  padding: 10px; /* 24 px Symbol + 2 × 10 px = 44 px Tippfläche */
  border-radius: var(--radius-sm);
  color: var(--navy);
  cursor: pointer;
}

.menue-schalter:focus-visible + .menue-knopf {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.symbol-schliessen {
  display: none;
}

.menue-schalter:checked + .menue-knopf .symbol-menue {
  display: none;
}

.menue-schalter:checked + .menue-knopf .symbol-schliessen {
  display: block;
}

/* Hero */
.hero {
  background: var(--navy) linear-gradient(100deg, var(--navy-deep), var(--navy) 60%, #173d60);
  color: #fff;
  padding: var(--space-8) 0 var(--space-8);
}

.eyebrow {
  margin: 0;
  color: var(--amber-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: var(--space-4) 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.hero-text {
  max-width: 620px;
  margin: 0;
  color: #d6e2ed;
  font-size: 17px;
  line-height: 1.5;
}

.vertrauen {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
  color: #c9d8e5;
  font-size: 14px;
}

/* Seitenkopf mit Brotkrumen */
.seitenkopf {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: var(--space-5) 0 var(--space-6);
}

.brotkrumen ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.brotkrumen li + li::before {
  content: "›";
  margin-right: var(--space-2);
}

.seitenkopf h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.seiteninhalt {
  padding: var(--space-6) 0 var(--space-8);
}

/* Leerzustand */
.leerzustand {
  margin: 0;
  padding: var(--space-6) var(--space-5);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
}

/* Kategorienliste */
.kategorienliste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.kategorienliste > li {
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow-wrap: anywhere;
}

.kategorienliste h2 {
  margin: 0 0 var(--space-3);
  font-size: 20px;
}

.kategorienliste ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kategorienliste ul li + li {
  margin-top: var(--space-2);
}

.anzahl {
  color: var(--muted);
  font-weight: 400;
}

/* Fußzeile */
.fuss {
  background: var(--navy-deep);
  color: #a8bbcb;
  padding: var(--space-7) 0 var(--space-5);
  font-size: 14px;
}

.fuss h2 {
  margin: 0 0 var(--space-3);
  color: #fff;
  font-size: 16px;
}

.fuss p {
  margin: 0;
}

.fuss ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fuss li + li {
  margin-top: var(--space-2);
}

.fuss a {
  color: #d6e2ed;
}

.fuss-spalten {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.fuss-recht {
  display: flex;
  gap: var(--space-5);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

/* Detailseite einer Maschine: zwei Spalten, darunter (bis 800 px) eine */
.maschine-seite {
  padding-top: var(--space-5);
  padding-bottom: var(--space-8);
}

.maschine-zurueck {
  display: none;
}

.maschine-raster {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.maschine-links {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.maschine-rechts {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: var(--space-4);
  min-width: 0;
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.karte {
  min-width: 0;
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.karte h2,
.maschine-kontakt h2 {
  margin: 0 0 var(--space-4);
  color: var(--navy);
  font-size: 20px;
}

.karte p {
  max-width: 70ch;
  margin: 0 0 var(--space-3);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.karte p:last-child {
  margin-bottom: 0;
}

.merkmalstabelle {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.merkmalstabelle th,
.merkmalstabelle td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.merkmalstabelle th {
  width: 40%;
  color: var(--muted);
  font-weight: 400;
}

.merkmalstabelle td {
  color: var(--navy);
  font-weight: 700;
}

.merkmalstabelle tr:last-child th,
.merkmalstabelle tr:last-child td {
  border-bottom: 0;
}

.maschine-kopf h1 {
  margin: 0;
  color: var(--navy);
  font-size: 28px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.maschine-bezeichnung {
  margin: var(--space-2) 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.maschine-referenz {
  margin: var(--space-3) 0 var(--space-4);
  color: var(--muted);
  font-size: 14px;
}

.maschine-referenz strong {
  color: var(--navy);
}

.maschine-daten {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
  margin: 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.maschine-daten dt {
  color: var(--muted);
  font-size: 12px;
}

.maschine-daten dd {
  margin: 2px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.maschine-preis {
  margin: var(--space-4) 0 var(--space-5);
  padding: var(--space-4);
  background: var(--pale);
  border-radius: var(--radius-sm);
}

.maschine-preis strong {
  display: block;
  color: var(--navy);
  font-size: 28px;
  line-height: 1.15;
  white-space: nowrap;
}

.maschine-preis small {
  color: var(--muted);
  font-size: 14px;
}

.maschine-kontakt {
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.maschine-kontakt h2 {
  font-size: 18px;
  margin-bottom: var(--space-3);
}

.maschine-kontakt p {
  margin: 0 0 var(--space-3);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.maschine-kontakt p:last-child {
  margin-bottom: 0;
}

.maschine-kontakt a {
  font-weight: 700;
}

.maschine-nebentext {
  color: var(--muted);
}

/* Galerie: ohne JavaScript eine Wischreihe mit Einrasten; Vorschaubilder sind Sprunglinks */
.galerie {
  margin-bottom: var(--space-5);
  min-width: 0;
}

.galerie-rahmen {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--pale);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.galerie-reihe {
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.galerie.mit-skript .galerie-reihe {
  scrollbar-width: none;
}

.galerie-bild {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}

.galerie-bild a,
.galerie-bild picture,
.galerie-bild img {
  display: block;
  width: 100%;
  height: 100%;
}

.galerie-bild img {
  object-fit: cover;
}

.galerie-bild a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
}

.kennzeichen {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  padding: var(--space-1) var(--space-3);
  background: var(--amber);
  border-radius: var(--radius-sm);
  color: #13283b;
  font-size: 14px;
  font-weight: 700;
}

.galerie-leer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, var(--pale), var(--line));
  color: var(--muted);
}

.galerie-leer p {
  margin: 0;
  font-weight: 700;
}

/* Pfeile, Zähler und das Blättern ohne Seitensprung gibt es erst mit galerie.js */
.galerie-pfeil,
.galerie-zaehler {
  display: none;
}

.galerie.mit-skript .galerie-pfeil {
  position: absolute;
  top: 50%;
  display: block;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.galerie.mit-skript .galerie-pfeil:hover {
  background: #fff;
}

.galerie.mit-skript .galerie-pfeil:focus-visible {
  outline: 3px solid var(--blue);
}

.galerie-zurueck {
  left: var(--space-3);
}

.galerie-vor {
  right: var(--space-3);
}

.galerie.mit-skript .galerie-zaehler {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  display: block;
  margin: 0;
  padding: var(--space-1) var(--space-3);
  background: rgba(11, 32, 53, 0.82);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.galerie-vorschau {
  position: relative;
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-bottom: var(--space-1);
  overflow-x: auto;
}

.galerie-vorschau a {
  flex: 0 0 auto;
  display: block;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.galerie-vorschau a[aria-current="true"] {
  border-color: var(--blue);
}

.galerie-vorschau a:focus-visible {
  outline: 3px solid var(--blue);
}

.galerie-vorschau img {
  display: block;
  width: 96px;
  height: auto;
}

/* Großansicht (nur mit JavaScript): das ganze Bild, unbeschnitten */
.galerie-gross {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(11, 32, 53, 0.95);
  color: #fff;
}

.galerie-gross[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-3);
}

.galerie-gross figure {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  margin: 0;
}

.galerie-gross picture,
.galerie-gross img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
}

.galerie-gross figcaption {
  margin-top: var(--space-3);
  font-weight: 700;
}

.galerie-gross button {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.galerie-gross button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.galerie-gross .galerie-schliessen {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
}

/* Umbrüche */
@media (max-width: 1239px) {
  .kopf-knopf {
    display: none;
  }
}

@media (max-width: 1000px) {
  .menue-knopf {
    display: block;
  }

  .nav-liste {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(17, 40, 58, 0.12);
    font-size: 16px;
  }

  .menue-schalter:checked ~ .nav-liste {
    display: flex;
  }

  .nav-liste a {
    display: block;
    padding: var(--space-3) var(--space-4);
  }
}

@media (max-width: 800px) {
  .hero {
    padding: var(--space-7) 0;
  }

  .fuss-spalten {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  /* Detailseite: eine Spalte; die Bausteine ordnen sich per order (Titel, Galerie, Preis, Karten, Formular, Kontakt) */
  .maschine-seite {
    padding-top: var(--space-3);
  }

  .maschine-seite .brotkrumen {
    display: none;
  }

  .maschine-zurueck {
    display: inline-block;
    padding: 11px 0;
    margin-bottom: var(--space-1);
  }

  .maschine-raster {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
  }

  .maschine-rechts,
  .maschine-links {
    display: contents;
  }

  .maschine-kopf {
    order: 1;
    padding: var(--space-4);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }

  .galerie {
    order: 2;
    margin-bottom: 0;
  }

  /* Wischreihe: Pfeile und Vorschaubilder entfallen, die Reihe füllt die Breite */
  .galerie-reihe {
    scrollbar-width: none;
    touch-action: pan-x pan-y;
  }

  .galerie-reihe::-webkit-scrollbar {
    display: none;
  }

  .galerie.mit-skript .galerie-pfeil,
  .galerie-vorschau {
    display: none;
  }

  .maschine-preis {
    order: 3;
    margin: 0;
  }

  /* Beschreibung, Merkmale, Video, Dokumente: je eine eigene Zahl (4 bis 7), nach Stellung unter
     den Abschnitten der Spalte (der erste ist die Galerie); sonst stünde das Formular dazwischen */
  .karte {
    order: 4;
    padding: var(--space-4);
  }

  .maschine-links > .karte:nth-of-type(3) {
    order: 5;
  }

  .maschine-links > .karte:nth-of-type(4) {
    order: 6;
  }

  .maschine-links > .karte:nth-of-type(5) {
    order: 7;
  }

  /* Formular 8, Kontakt 9 (das Formular steht in der anderen Spalte, daher eigene Zahlen) */
  .maschine-kontakt {
    order: 9;
    padding: var(--space-4);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }

  .maschine-kopf h1 {
    font-size: 24px;
  }
}

/* Hinweisband der Detailseite (pausiert, verkauft) */
.hinweisband {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: #fdf3dc;
  border: 1px solid var(--amber);
  border-radius: var(--radius-sm);
  color: #4d3605;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Urlaubsstreifen unter dem Kopf, über die volle Breite */
.urlaubsstreifen {
  background: var(--navy);
  color: #fff;
}

.urlaubsstreifen-zeile {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.urlaubsstreifen svg {
  flex: none;
  margin-top: 1px;
}

.urlaubsstreifen p {
  margin: 0;
  min-width: 0;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* Abwesenheitshinweis über dem Anfrageformular und im Kontakt */
.anfrage-urlaub {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--pale);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.maschine-urlaub {
  margin: var(--space-3) 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Ähnliche Angebote (die Karten selbst: Maschinenkarte) */
.aehnliche {
  margin-top: var(--space-7);
}

.aehnliche h2 {
  margin: 0 0 var(--space-4);
  color: var(--navy);
  font-size: 22px;
}

/* Fehlerseiten 404 und 410 */
.fehlerzahl {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.fehlertext p {
  margin: 0 0 var(--space-4);
}

.fehler-suche {
  display: flex;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
}

.fehler-suche .feld {
  flex: 1;
  min-width: 0;
}

.fehler-suche .knopf {
  white-space: nowrap;
}

@media (max-width: 500px) {
  .fehler-suche {
    flex-direction: column;
  }
}

@media (max-width: 800px) {
  .aehnliche {
    margin-top: var(--space-5);
  }
}

/* Videos (Zwei-Klick) und Dokumente der Detailseite */
.video + .video {
  margin-top: var(--space-5);
}

.karte .video h3 {
  margin: 0 0 var(--space-2);
  color: var(--navy);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.video-rahmen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b2035;
  border-radius: var(--radius-sm);
}

.video-abspielen,
.video-rahmen iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-abspielen img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* schneidet die schwarzen Balken des 4:3-Vorschaubilds weg */
}

.video-platzhalter {
  display: block;
  width: 100%;
  height: 100%;
  background: #0b2035;
}

.video-knopf {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -32px 0 0 -32px;
}

.video-abspielen:hover .video-knopf,
.video-abspielen:focus-visible .video-knopf {
  filter: brightness(1.4);
}

.karte .video-hinweis {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: 14px;
}

.dokumente-liste {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dokumente-liste li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.dokumente-liste li:last-child {
  border-bottom: 0;
}

/* Abschnittskopf, Kategorie-Kachel, Maschinenkarte, Seitennavigation (Tickets 09) */
.abschnittskopf {
  margin: 0 0 var(--space-5);
}

.abschnittskopf-folge {
  margin-top: var(--space-7);
}

.abschnittskopf h2 {
  margin: 0;
  color: var(--navy);
  font-size: 30px;
  line-height: 1.2;
}

.kachelliste,
.kartenliste {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.kachelliste {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kartenliste > li {
  min-width: 0;
}

.karten-zwei {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.karten-vier {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kachel {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-4);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--navy);
  text-decoration: none;
}

.kachel:hover {
  box-shadow: 0 10px 25px rgba(17, 40, 58, 0.13);
}

.kachel:focus-visible,
.karte-link:focus-visible,
.seitennavigation a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.kachel-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.kachel-text small {
  color: var(--muted);
  font-size: 14px;
}

.vorschaubild {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--pale);
}

.vorschaubild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vorschaubild-leer {
  background: linear-gradient(135deg, var(--pale), var(--line));
  color: var(--muted);
}

.vorschaubild svg {
  width: 60%;
  height: auto;
}

.kategorie-kopf {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.kategorienliste .kategorie-kopf h2 {
  margin: 0;
}

/* Maschinenkarte */
.maschinenkarte {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.maschinenkarte:hover,
.maschinenkarte:focus-within {
  border-color: var(--blue);
  box-shadow: 0 10px 25px rgba(17, 40, 58, 0.13);
}

.karte-bild {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--pale);
}

.karte-bild img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.karte-bild-leer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, var(--pale), var(--line));
  color: var(--muted);
  font-weight: 700;
}

.karte-bild .kennzeichen {
  font-size: 12px;
}

.karte-bild .kennzeichen-zustand {
  right: auto;
  left: var(--space-3);
  background: #fff;
  color: var(--blue);
}

.karte-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  overflow-wrap: anywhere;
}

.karte-text h3 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.3;
}

.karte-zeile {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.karte-merkmale {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.karte-merkmale li {
  padding: var(--space-1) var(--space-2);
  background: var(--page);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.karte-fuss {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.karte-preis {
  margin: 0;
  color: var(--navy);
}

.karte-preis strong {
  font-size: 17px;
}

.karte-preis small {
  color: var(--muted);
  font-size: 12px;
}

.karte-link {
  font-weight: 700;
}

/* Der einzige Link der Karte deckt die ganze Karte ab */
.karte-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.karten-vier .karte-fuss {
  flex-direction: column;
  align-items: flex-start;
}

.trefferzahl {
  margin: 0 0 var(--space-4);
  color: var(--navy);
  font-size: 18px;
}

.alle-maschinen {
  margin: var(--space-6) 0 0;
  text-align: center;
}

/* Seitennavigation */
.seitennavigation {
  margin-top: var(--space-6);
}

.seitennavigation ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.seitennavigation a,
.seitennavigation .auslassung {
  display: block;
  min-width: 44px;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.seitennavigation .auslassung {
  border-color: transparent;
  background: none;
  color: var(--muted);
}

.seitennavigation a[aria-current="page"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

@media (max-width: 1000px) {
  .karten-vier {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .kachelliste {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .karten-zwei {
    grid-template-columns: minmax(0, 1fr);
  }

  .abschnittskopf h2 {
    font-size: 24px;
  }
}

@media (max-width: 450px) {
  .kachelliste,
  .karten-vier {
    grid-template-columns: minmax(0, 1fr);
  }

  .karten-vier .karte-fuss {
    flex-direction: row;
    align-items: center;
  }
}

/* Eingabe- und Auswahlfeld (Filterspalte, Suchleiste im Hero) */
.feld {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: var(--space-3);
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
}

.feld:focus-visible,
.blatt-schalter:focus-visible ~ .such-leiste .filterknopf,
.blatt-zu:focus-visible,
.aktivkennzeichen:focus-visible,
.filter-zuruecksetzen:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

select.feld:disabled {
  background: var(--page);
  color: var(--muted);
}

/* Suchleiste im Hero */
.suchleiste {
  display: flex;
  gap: var(--space-3);
  max-width: 940px;
  margin-top: var(--space-6);
  padding: var(--space-3);
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 18px 36px rgba(7, 27, 42, 0.31);
}

.suchleiste input.feld {
  flex: 2;
  min-width: 0;
}

.suchleiste select.feld {
  flex: 1;
  min-width: 0;
}

.suchleiste .knopf {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

/* Maschinenübersicht: Filterspalte links (Rechner), Ergebnisse rechts */
.uebersicht {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.filterspalte {
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.blatt-schalter {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Ab 801 px gibt es kein Blatt und keinen Filterknopf: kein unsichtbarer Haltepunkt */
@media (min-width: 801px) {
  .blatt-schalter {
    display: none;
  }
}

.filterfeld {
  min-width: 0;
  margin: var(--space-4) 0 0;
  padding: 0;
  border: 0;
}

.such-leiste .filterfeld {
  margin-top: 0;
}

.feld-label {
  display: block;
  padding: 0;
  margin-bottom: var(--space-2);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.paar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2);
}

.filter-hinweis {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: 12px;
}

.filterknopf,
.blatt-kopf,
.blatt-zuruecksetzen,
.blatt-anzeigen,
.aktivliste {
  display: none;
}

.blatt-fuss {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.blatt-fuss .knopf {
  width: 100%;
  text-align: center;
}

.filter-zuruecksetzen {
  padding: var(--space-2);
  color: var(--blue);
  font-weight: 700;
  text-align: center;
}

/* Mit JavaScript aktualisiert jede Änderung die Ergebnisse; der Knopf ist dann überflüssig */
@media (scripting: enabled) {
  .filter-anwenden {
    display: none;
  }
}

.ergebnis-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.ergebnis-kopf .trefferzahl {
  margin: 0;
}

.sortierung .feld {
  width: auto;
}

@media (max-width: 800px) {
  .uebersicht {
    display: block;
  }

  /* Die Filterspalte wird zur Leiste (Suchfeld, Knopf „Filter (n)“); das Blatt deckt die Seite */
  .filterspalte {
    padding: 0;
    background: none;
    border: 0;
  }

  .such-leiste {
    display: flex;
    gap: var(--space-2);
    align-items: flex-end;
  }

  .such-leiste .filterfeld {
    flex: 1;
  }

  .such-leiste .feld-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .filterknopf {
    display: block;
    flex: none;
    min-height: 44px;
    white-space: nowrap;
    cursor: pointer;
  }

  .filterblatt {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    flex-direction: column;
    background: var(--page);
  }

  .blatt-schalter:checked ~ .filterblatt {
    display: flex;
  }

  body:has(.blatt-schalter:checked) {
    overflow: hidden;
  }

  /* Was das offene Blatt verdeckt, verlässt die Tastaturfolge (das Blatt selbst ist kein
     Nachfahre davon) */
  .blatt-schalter:checked ~ .such-leiste,
  .uebersicht:has(.blatt-schalter:checked) .ergebnisbereich {
    visibility: hidden;
  }

  .blatt-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .blatt-kopf h2 {
    margin: 0;
    color: var(--navy);
    font-size: 18px;
  }

  .blatt-zu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--pale);
    color: var(--navy);
    cursor: pointer;
  }

  .blatt-felder {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 var(--space-4) var(--space-4);
  }

  .blatt-fuss {
    flex-direction: row;
    margin: 0;
    padding: var(--space-3) var(--space-4);
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(17, 40, 58, 0.06);
  }

  .blatt-fuss .knopf {
    width: auto;
    min-height: 48px;
  }

  .filter-anwenden,
  .filter-zuruecksetzen {
    display: none;
  }

  .blatt-zuruecksetzen {
    display: block;
  }

  .blatt-anzeigen {
    display: block;
    flex: 1;
  }

  /* Aktive Filter: eine Reihe, seitlich wischbar; nur sie scrollt, nie die Seite */
  .aktivliste {
    display: flex;
    gap: var(--space-2);
    margin: var(--space-3) calc(var(--space-4) * -1) 0;
    padding: 0 var(--space-4);
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .aktivliste:empty {
    display: none;
  }

  .aktivliste li {
    flex: none;
  }

  .aktivkennzeichen {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 40px;
    padding: 0 var(--space-3);
    background: var(--pale);
    border-radius: var(--radius-pill);
    color: var(--navy);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }

  .ergebnis-kopf {
    margin: var(--space-4) 0 var(--space-3);
  }

  .ergebnis-kopf .trefferzahl {
    font-size: 16px;
  }

  .suchleiste {
    flex-direction: column;
  }
}

/* Anfrageformular der Detailseite */
.anfrage {
  margin: var(--space-5) 0;
  padding: var(--space-4);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  scroll-margin-top: var(--space-4);
}

.anfrage h2 {
  margin: 0 0 var(--space-3);
  font-size: 20px;
}

.anfrage-feld {
  margin-bottom: var(--space-4);
}

.anfrage-pflicht,
.anfrage-bezug {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: 14px;
}

.anfrage-haken {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.anfrage-haken input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
}

.feld-fehler {
  margin: var(--space-2) 0 0;
  color: #a4161a;
  font-weight: 700;
}

.anfrage-senden {
  width: 100%;
  margin-bottom: var(--space-3);
}

.anfrage-bestaetigung {
  margin: 0 0 var(--space-3);
  font-weight: 700;
}

/* Verstecktes Feld des Spamschutzes: für Besucher und Vorlesegeräte nicht da */
.fangfeld {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Knopf im Preisblock und Leiste am unteren Rand: nur am Smartphone */
.anfrage-sprung,
.anfrage-leiste {
  display: none;
}

@media (max-width: 800px) {
  .anfrage {
    order: 8;
    margin: 0;
  }

  .anfrage-sprung {
    display: block;
    margin-top: var(--space-3);
    text-align: center;
  }

  .anfrage-leiste {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 8px rgb(16 38 62 / 15%);
  }

  .anfrage-leiste strong {
    min-width: 0;
    color: var(--navy);
    overflow-wrap: anywhere;
  }

  .anfrage-leiste .knopf {
    flex: none;
  }

  /* Die Leiste verdeckt am Seitenende nichts */
  body:has(.anfrage-leiste) {
    padding-bottom: 76px;
  }
}

/* Inhaltsseiten: Text mit Randspalte */
.seiten-einleitung {
  max-width: 38em;
  margin: var(--space-3) 0 0;
  font-size: 18px;
  line-height: 1.55;
  hyphens: auto;
}

.textraster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--space-8);
  align-items: start;
  padding-top: var(--space-7);
  padding-bottom: var(--space-8);
  hyphens: auto;
  hyphenate-limit-chars: 10 4 4;
  overflow-wrap: break-word;
}

.textspalte {
  min-width: 0;
}

.fliesstext {
  max-width: 38em;
  font-size: 16px;
  line-height: 1.6;
}

.fliesstext h2 {
  margin: var(--space-7) 0 var(--space-3);
  color: var(--navy);
  font-size: 24px;
  line-height: 1.25;
  hyphens: manual;
  scroll-margin-top: var(--space-5);
}

.fliesstext > h2:first-child,
.fliesstext > section:first-child > h2:first-child {
  margin-top: 0;
}

.fliesstext p {
  margin: 0 0 var(--space-4);
}

.fliesstext ul,
.fliesstext > ol {
  margin: 0 0 var(--space-4);
  padding-left: 22px;
}

.fliesstext li {
  margin-bottom: var(--space-1);
}

.fliesstext a {
  overflow-wrap: anywhere;
}

/* Ablauf: gestapelte Karten mit Nummer */
.ablauf {
  margin: var(--space-7) 0 var(--space-5);
}

.fliesstext > .ablauf:first-child {
  margin-top: 0;
}

.ablauf h2 {
  margin-top: 0;
}

.schritte {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.fliesstext .schritte li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin: 0;
  padding: var(--space-4) var(--space-5);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.schritte li > div {
  min-width: 0;
  padding-top: var(--space-2);
}

.schritte .nr {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--amber);
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
}

/* Abschlussband am Ende der Textseiten und Über-uns-Band der Startseite */
.abschlussband,
.ueberuns {
  background: var(--pale);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.abschlussband {
  max-width: 38em;
  margin-top: var(--space-7);
}

.ueberuns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.ueberuns-folge {
  margin-top: var(--space-7);
}

.ueberuns > div {
  min-width: 0;
}

.ueberuns h2 {
  margin: 0 0 var(--space-2);
  color: var(--navy);
  font-size: 24px;
  line-height: 1.25;
}

.ueberuns p {
  max-width: 40em;
  margin: 0;
  color: var(--muted);
}

.ueberuns .knopf {
  flex: none;
}

/* Randspalte */
.randspalte {
  position: sticky;
  top: var(--space-5);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

.randkarte,
.verzeichnis {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.randkarte h2 {
  margin: 0 0 var(--space-2);
  color: var(--navy);
  font-size: 18px;
  line-height: 1.3;
}

.randkarte-name {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: 14px;
}

.randzeile {
  margin: 0;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.randzeile a {
  display: block;
  padding: var(--space-2) 0;
  margin: calc(var(--space-2) * -1) 0;
}

.randzeile-stark a {
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
}

.randkarte-urlaub {
  margin: var(--space-2) 0 0;
  padding: var(--space-2) var(--space-3);
  background: var(--amber);
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.randkarte-knopf {
  display: block;
  margin-top: var(--space-4);
  text-align: center;
}

.weitere-seiten ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.weitere-seiten a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 44px;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.weitere-seiten a:hover {
  color: var(--blue);
}

/* Inhaltsverzeichnis: ein <details>; am Rechner immer ausgeklappt gezeigt */
.verzeichnis {
  padding: 0 var(--space-5);
}

.verzeichnis summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.verzeichnis summary::-webkit-details-marker {
  display: none;
}

.verzeichnis summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
}

.verzeichnis[open] summary::after {
  content: "–";
}

.verzeichnis ul {
  margin: 0;
  padding: 0 0 var(--space-3);
  list-style: none;
}

.verzeichnis li a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
}

.verzeichnis li a:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* Nur wo der Browser ::details-content kennt; ältere behalten ein gewöhnliches, aufklappbares
   Verzeichnis */
@media (min-width: 1001px) {
  @supports selector(::details-content) {
    .verzeichnis::details-content {
      content-visibility: visible;
      display: block;
    }

    .verzeichnis summary {
      cursor: default;
      pointer-events: none;
    }

    .verzeichnis summary::after {
      content: none;
    }
  }
}

/* Menüknopf (oben im Kopf): ab der Breite, bei der der Knopf fehlt, wäre das Kästchen sonst ein unsichtbarer Haltepunkt */
@media (min-width: 1001px) {
  .menue-schalter {
    display: none;
  }
}

/* Bis 1000 px eine Spalte: die Randspalte steht unter dem Text, das Verzeichnis darüber */
@media (max-width: 1000px) {
  .textraster {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .randspalte {
    position: static;
  }

  .textraster-verzeichnis .randspalte {
    display: contents;
  }

  .textraster-verzeichnis .verzeichnis {
    order: -1;
  }

  .textraster-verzeichnis .weitere-seiten {
    order: 2;
  }
}

/* In niedrigen Fenstern läuft die Randspalte nicht mit: ihr unteres Ende wäre abgeschnitten */
@media (max-height: 720px) {
  .randspalte {
    position: static;
  }
}

@media (max-width: 800px) {
  .textraster {
    padding-top: var(--space-5);
    padding-bottom: var(--space-7);
  }

  .seiten-einleitung {
    font-size: 17px;
  }

  .fliesstext .schritte li {
    padding: var(--space-4);
  }

  .abschlussband,
  .ueberuns {
    padding: var(--space-5);
  }

  .abschlussband .knopf,
  .ueberuns .knopf {
    display: block;
    text-align: center;
  }

  .ueberuns {
    flex-direction: column;
    align-items: stretch;
  }
}
