/* diegruender.at - Grundlayout
   Eine Spalte, Inhalt auf voller Rahmenbreite, keine Worttrennung. */

:root {
  --rot: #cf2e2e;
  --rot-dunkel: #a31f1f;
  --rot-blass: #fdf1f1;
  --text: #1a1a1a;
  --text-leise: #5c6066;
  --linie: #e3e5e8;
  --linie-fein: #eef0f2;
  --flaeche: #ffffff;
  --flaeche-leise: #f7f8f9;
  --rahmen: 1040px;
  --luft: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--flaeche);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 19px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* Nie im Wort umbrechen - gilt für jeden Textcontainer. */
body, h1, h2, h3, h4, h5, h6, p, li, td, th, figcaption, a, summary {
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.rahmen {
  width: 100%;
  max-width: var(--rahmen);
  margin-inline: auto;
  padding-inline: var(--luft);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 50;
  background: var(--rot);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
}

a { color: var(--rot-dunkel); }
a:hover { color: var(--rot); }

/* ---------- Kopf ---------- */

.kopf {
  border-bottom: 1px solid var(--linie);
  background: var(--flaeche);
  position: sticky;
  top: 0;
  z-index: 20;
}

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

.marke {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--rot);
  text-decoration: none;
  white-space: nowrap;
}
.marke span { color: var(--text-leise); font-weight: 600; }
.marke:hover { color: var(--rot-dunkel); }

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

.nav a {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover { color: var(--rot); border-bottom-color: var(--linie); }
.nav a[aria-current] { color: var(--rot); border-bottom-color: var(--rot); }

/* ---------- Artikel ---------- */

main { display: block; }

.artikel { padding-block: 34px 8px; }

.brotkrumen {
  font-size: 15px;
  color: var(--text-leise);
  margin-bottom: 14px;
}
.brotkrumen a { color: var(--text-leise); text-decoration: none; }
.brotkrumen a:hover { color: var(--rot); text-decoration: underline; }
.brotkrumen span { margin-inline: 7px; }

.artikel h1 {
  font-size: clamp(32px, 4.4vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.022em;
  font-weight: 800;
  margin: 0 0 14px;
}

.artikel-meta {
  font-size: 15px;
  color: var(--text-leise);
  margin: 0 0 26px;
}
.artikel-meta .trenner { margin-inline: 8px; }

.artikel-bild {
  margin: 0 0 32px;
}
.artikel-bild img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ---------- Fließtext ---------- */

.text > :first-child { margin-top: 0; }
.text > :last-child { margin-bottom: 0; }

.text p { margin: 0 0 1.15em; }

.text h2 {
  font-size: clamp(25px, 2.7vw, 31px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 750;
  margin: 2.1em 0 0.55em;
  padding-top: 0.5em;
  border-top: 1px solid var(--linie-fein);
}
.text h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

.text h3 {
  font-size: clamp(20px, 2vw, 23px);
  line-height: 1.32;
  font-weight: 700;
  margin: 1.8em 0 0.5em;
}

.text h4 {
  font-size: 19px;
  font-weight: 700;
  margin: 1.6em 0 0.45em;
}

.text ul, .text ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.text li { margin-bottom: 0.5em; }
.text li::marker { color: var(--rot); }

.text strong { font-weight: 680; }

.text a { text-underline-offset: 2px; }

.text blockquote {
  margin: 1.6em 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--rot);
  color: var(--text-leise);
  font-style: normal;
}

.text img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.text figure { margin: 1.8em 0; }
.text figure img { display: block; width: 100%; }
.text figcaption { font-size: 15px; color: var(--text-leise); margin-top: 8px; }

/* Hervorhebungen aus dem Bestand: rote Schrift, keine Markerfarbe. */
.text mark {
  background: transparent;
  color: var(--rot);
  font-weight: inherit;
}

.text hr { border: 0; border-top: 1px solid var(--linie); margin: 2.2em 0; }

/* ---------- Tabellen ---------- */

.tabelle {
  overflow-x: auto;
  margin: 1.7em 0;
  border: 1px solid var(--linie);
  border-radius: 10px;
}

.text table {
  border-collapse: collapse;
  width: 100%;
  font-size: 17px;
  line-height: 1.5;
  background: var(--flaeche);
}

.text thead th,
.text table tr:first-child th {
  background: var(--rot);
  color: #fff;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}

.text th, .text td {
  padding: 11px 15px;
  border-bottom: 1px solid var(--linie-fein);
  vertical-align: top;
}

.text tbody tr:nth-child(even) { background: var(--flaeche-leise); }
.text tbody tr:last-child td { border-bottom: 0; }

.text td.zahl, .text th.zahl { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Karten und Listen ---------- */

.karten {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.karte a {
  display: block;
  text-decoration: none;
  color: var(--text);
}
.karte img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--flaeche-leise);
}
.karte-titel {
  display: block;
  font-size: 17px;
  line-height: 1.38;
  font-weight: 650;
}
.karte a:hover .karte-titel { color: var(--rot); }

.weiter {
  margin-top: 56px;
  padding-block: 36px 48px;
  background: var(--flaeche-leise);
  border-top: 1px solid var(--linie);
}
.weiter h2 {
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 22px;
}

/* ---------- Startseite und Rubriken ---------- */

.start-kopf, .liste-kopf {
  padding-block: 40px 26px;
}
.start-kopf h1, .liste-kopf h1 {
  font-size: clamp(31px, 4.2vw, 44px);
  line-height: 1.17;
  letter-spacing: -0.022em;
  font-weight: 800;
  margin: 0 0 12px;
  max-width: 24ch;
}
.liste-kopf h1 { margin-top: 0; }

.vorspann {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-leise);
  margin: 0;
  max-width: 68ch;
}
.anzahl {
  font-size: 15px;
  color: var(--text-leise);
  margin: 18px 0 0;
}

.start-text { padding-bottom: 12px; }

.band {
  margin-top: 46px;
  padding-block: 40px 48px;
  background: var(--flaeche-leise);
  border-block: 1px solid var(--linie);
}
.band h2, .rubriken h2 {
  font-size: 23px;
  font-weight: 700;
  margin: 0 0 24px;
}

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

.karte-rubrik {
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--rot);
  margin-bottom: 5px;
}

.rubriken { padding-block: 48px 56px; }

.kacheln {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.kacheln a {
  display: block;
  height: 100%;
  padding: 20px 22px;
  border: 1px solid var(--linie);
  border-radius: 11px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.kacheln a:hover { border-color: var(--rot); background: var(--rot-blass); }
.kachel-name {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 7px;
}
.kachel-text {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-leise);
}
.kachel-zahl {
  display: block;
  font-size: 14px;
  color: var(--rot);
  font-weight: 600;
  margin-top: 10px;
}

/* Beitragsliste einer Rubrik */

.liste {
  list-style: none;
  margin: 0;
  padding: 0 0 50px;
}
.eintrag {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--linie-fein);
}
.eintrag:first-child { border-top: 0; padding-top: 4px; }

.eintrag-bild img, .eintrag-bild .platzhalter {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: var(--flaeche-leise);
}
.eintrag-bild .platzhalter { border: 1px solid var(--linie-fein); }

.eintrag-text h2 {
  font-size: 21px;
  line-height: 1.33;
  font-weight: 700;
  margin: 0 0 8px;
}
.eintrag-text h2 a { color: var(--text); text-decoration: none; }
.eintrag-text h2 a:hover { color: var(--rot); }

.anriss {
  margin: 0 0 9px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-leise);
}
.eintrag-meta {
  margin: 0;
  font-size: 14px;
  color: var(--text-leise);
}

.legal .text { font-size: 17px; }
.legal h1 { margin-bottom: 26px; }

/* ---------- Fuß ---------- */

.fuss {
  border-top: 1px solid var(--linie);
  padding-block: 32px 40px;
  font-size: 16px;
}
.fuss ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 14px;
  padding: 0;
}
.fuss a { color: var(--text-leise); text-decoration: none; }
.fuss a:hover { color: var(--rot); text-decoration: underline; }
.fuss-zeile { margin: 18px 0 0; color: var(--text-leise); font-size: 15px; }

/* ---------- Schmale Schirme ---------- */

@media (max-width: 860px) {
  .karten { grid-template-columns: repeat(2, 1fr); }
  .kacheln { grid-template-columns: repeat(2, 1fr); }
  .eintrag { grid-template-columns: 190px 1fr; gap: 18px; }
}

/* Unter 900 Pixeln steht die Navigation unter der Marke und scrollt seitlich,
   statt sich in einem Menü zu verstecken: alle sechs Rubriken bleiben sichtbar. */
@media (max-width: 900px) {
  .kopf { position: static; }
  .kopf-innen {
    display: block;
    padding-top: 12px;
    min-height: 0;
  }
  .nav {
    margin-top: 6px;
    margin-inline: calc(var(--luft) * -1);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Weicher Auslauf rechts: zeigt, dass die Leiste weitergeht. */
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav ul {
    gap: 20px;
    padding-inline: var(--luft);
    width: max-content;
  }
  .nav a { padding-bottom: 10px; }
}

@media (max-width: 760px) {
  :root { --luft: 16px; }
  body { font-size: 18px; }

  .marke { font-size: 22px; }
  .nav a { font-size: 15px; }

  .artikel { padding-top: 22px; }
  .text table { font-size: 16px; }
  .text th, .text td { padding: 9px 12px; }
}

@media (max-width: 560px) {
  .karten, .karten-3 { grid-template-columns: 1fr; gap: 20px; }
  .kacheln { grid-template-columns: 1fr; }
  .eintrag {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-block: 20px;
  }
  .eintrag-bild img, .eintrag-bild .platzhalter { max-height: 200px; }
  .vorspann { font-size: 18px; }
}

/* Beiträge ohne Bild: der Text nimmt die ganze Zeile. */
.eintrag-schlicht { grid-template-columns: 1fr; }

/* Mehr als die Hälfte der Beiträge hat kein Bild. Damit das Raster trotzdem
   ruhig läuft, bekommen diese Karten eine Fläche statt einer Lücke. */
.karte-flaeche {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  margin-bottom: 10px;
  background:
    repeating-linear-gradient(135deg,
      var(--flaeche-leise) 0 11px,
      #eceef1 11px 22px);
  border: 1px solid var(--linie-fein);
}

/* ---------- Quellenzeile unter Tabellen ---------- */

.quelle {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-leise);
  margin: -8px 0 1.6em;
}
