:root {
  --rot: #d7261e;
  --schwarz: #111;
  --weiss: #fff;
  --grau: #f3f3f3;
  --text: #1a1a1a;
  --max: 980px;
  --logo-h: 84px;
  --rand: 20px;
}

@media (max-width: 520px) {
  :root { --logo-h: 64px; --rand: 16px; }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--weiss);
  line-height: 1.55;
  overflow-wrap: break-word;
}

img, iframe { max-width: 100%; height: auto; }
a { color: var(--rot); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--rot); outline-offset: 2px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--rand); }

/* Kopf */
.kopf {
  background: var(--weiss);
  border-bottom: 4px solid var(--rot);
  position: sticky;
  top: 0;
  z-index: 10;
}
.kopf-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--rand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.marke {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--schwarz);
  min-width: 0;
}
.marke img { height: var(--logo-h); width: auto; flex: 0 0 auto; }
.marke span {
  font-weight: 700;
  font-size: calc(var(--logo-h) * 0.3);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.marke small { display: block; font-weight: 700; font-size: inherit; }

.kopf-rechts { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* Sprachumschalter */
.sprache { display: flex; gap: 4px; }
.sprache a {
  display: inline-block;
  padding: 6px 9px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  text-decoration: none;
  color: var(--schwarz);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
}
.sprache a:hover { border-color: var(--rot); }
.sprache a[aria-current="true"] { background: var(--rot); border-color: var(--rot); color: var(--weiss); }

/* Burgermenü (auf allen Bildschirmgrößen) */
.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--schwarz);
  border-radius: 2px;
}
.nav {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: var(--weiss);
  border-bottom: 4px solid var(--rot);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  max-height: calc(100vh - 100%);
  overflow-y: auto;
}
.nav.offen { display: block; }
.nav a {
  display: block;
  padding: 14px var(--rand);
  text-decoration: none;
  color: var(--schwarz);
  border-top: 1px solid #eee;
  font-size: 1.05rem;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--grau); color: var(--rot); }

/* Inhalt */
main { padding: clamp(20px, 4vw, 40px) 0 48px; min-height: 60vh; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); margin: 0 0 16px; color: var(--schwarz); line-height: 1.2; }
h2 { font-size: clamp(1.2rem, 3.5vw, 1.4rem); margin: 32px 0 12px; color: var(--schwarz); border-left: 4px solid var(--rot); padding-left: 12px; }
p { margin: 0 0 14px; }

.status {
  background: var(--grau);
  border-left: 6px solid var(--rot);
  padding: 14px 18px;
  border-radius: 6px;
  margin: 20px 0;
  font-size: clamp(1rem, 2.6vw, 1.1rem);
}
.status strong { display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: #666; margin-bottom: 4px; }

.karten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
  margin-top: 24px;
}
.karte {
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  padding: 18px;
  text-decoration: none;
  color: var(--schwarz);
  background: var(--weiss);
}
.karte:hover { border-color: var(--rot); }
.karte h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--rot); }

/* Tabellen dürfen auf schmalen Bildschirmen seitlich scrollen */
.tabelle { overflow-x: auto; margin: 12px 0 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e6e6e6; vertical-align: top; }
th { background: var(--grau); }

ul.leistungen { padding-left: 20px; }
ul.leistungen li { margin-bottom: 10px; }

.dienstliste { list-style: none; padding: 0; margin: 0; }
.dienstliste li {
  padding: 12px 16px;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  margin-bottom: 10px;
}
.dienstliste li.aktuell { border-color: var(--rot); background: #fdf1f0; }

.karte-rahmen {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 240px;
  max-height: 520px;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 12px 0;
}

.kontakt-liste { list-style: none; padding: 0; }
.kontakt-liste li { margin-bottom: 10px; }

.hinweis { font-size: 0.9rem; color: #555; }

/* Fuß */
.fuss {
  background: var(--schwarz);
  color: var(--weiss);
  padding: 24px 0;
  font-size: 0.95rem;
}
.fuss a { color: var(--weiss); }
.fuss p { margin: 4px 0; }

/* Kleine Bildschirme */
@media (max-width: 520px) {
  .kopf-inner { padding: 10px var(--rand); }
  .sprache a { padding: 5px 7px; font-size: 0.85rem; }
  .burger { padding: 8px; }
}

@media (max-width: 360px) {
  .marke span { font-size: calc(var(--logo-h) * 0.26); }
  .sprache a { padding: 4px 6px; font-size: 0.8rem; }
}

/* Größere Bildschirme: Inhalt etwas breiter, Lesbarkeit bleibt erhalten */
@media (min-width: 900px) {
  h1 { margin-bottom: 20px; }
  .karte-rahmen { min-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
