/* ===========================================================================
   News — Beitragsseiten und Übersicht

   Ergänzt das Sandbox-Theme. Farben und Abstände folgen der Webmodule-
   und Portal-Seite, damit der Nachrichtenbereich nicht wie ein Fremdkörper
   wirkt.
   =========================================================================== */

/* ---------- Zeile unter der Überschrift: Datum und Kategorien ---------- */
.beitrag-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .8rem;
  font-size: .8rem;
  color: #64748b;
}

.beitrag-marke {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: .72rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.beitrag-marke:hover {
  border-color: #fdba74;
  color: #1e293b;
  text-decoration: none;
}

/* ---------- Beitrag als Karte ----------
   Der Text stand zuvor ohne Begrenzung auf weissem Grund und wirkte
   dadurch haltlos. Die Karte gibt ihm einen Rahmen. */
.beitrag-karte-gross {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 2.6rem 2.8rem 3rem;
  box-shadow: 0 2px 14px rgba(30, 41, 59, .05);
}

@media (max-width: 767.98px) {
  .beitrag-karte-gross { padding: 1.8rem 1.5rem 2rem; border-radius: 10px; }
}
@media (max-width: 575.98px) {
  .beitrag-karte-gross { padding: 1.4rem 1.2rem 1.6rem; }
}

/* ---------- Beitragstext ---------- */
.beitrag {
  font-size: .85rem;
  line-height: 1.75;
  color: #475569;
}
.beitrag > p { margin-bottom: 1.2rem; max-width: 32rem; }
.beitrag > *:first-child { margin-top: 0; }
.beitrag > *:last-child { margin-bottom: 0; }
.beitrag > ul,
.beitrag > ol { margin-bottom: 1.4rem; max-width: 32rem; }
.beitrag li { margin-bottom: .4rem; }

.beitrag h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin: 2.4rem 0 .9rem;
}
.beitrag h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 2rem 0 .7rem;
}
.beitrag h2:first-child,
.beitrag h3:first-child { margin-top: 0; }

.beitrag a { color: #e55b13; }

.beitrag figure { margin: 1.8rem 0; }

/* Viele Aufnahmen stammen aus dem Hochformat eines Telefons. Ohne
   Hoehenbegrenzung fuellt ein einzelnes Bild mehr als einen Bildschirm. */
.beitrag img {
  max-width: 100%;
  max-height: 520px;
  width: auto;
  height: auto;
  border-radius: 10px;
}

/* Mehrere Aufnahmen zu einem Beitrag stehen nebeneinander statt
   untereinander — sonst wird der Beitrag zur Bildstrecke. */
.beitrag-bilder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.8rem 0;
}
.beitrag-bilder figure { margin: 0; }
.beitrag-bilder img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  object-position: center top;
}
.beitrag figcaption {
  font-size: .75rem;
  color: #64748b;
  padding-top: .6rem;
}

.beitrag blockquote {
  margin: 1.8rem 0;
  padding: 0 0 0 1.3rem;
  border-left: 3px solid #fdba74;
  color: #1e293b;
  font-style: normal;
}

/* ---------- Karten in Übersicht und Fußbereich ---------- */
.beitrag-karte {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.beitrag-karte:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(30, 41, 59, .09);
  text-decoration: none;
}

.beitrag-karte-bild {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  padding: 14px;
  background: #ffffff;
  overflow: hidden;
}
/* Viele Vorschaubilder sind Logos oder Grafiken. Mit "cover" wuerden sie
   angeschnitten — sie sollen vollstaendig zu sehen sein. */
.beitrag-karte-bild img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.beitrag-karte-text {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.1rem 1.2rem 1.3rem;
  flex: 1 1 auto;
}
.beitrag-karte-datum {
  font-size: .7rem;
  color: #94a3b8;
}
.beitrag-karte-titel {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  color: #1e293b;
}
.beitrag-karte-auszug {
  font-size: .78rem;
  line-height: 1.6;
  color: #64748b;
}
.beitrag-karte-marken {
  margin-top: auto;
  padding-top: .6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}
.beitrag-karte-marke {
  font-size: .66rem;
  font-weight: 600;
  color: #94a3b8;
  background: #f6f7f9;
  border-radius: 20px;
  padding: .15rem .55rem;
}

/* ---------- Filterleiste der Übersicht ---------- */
.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 2.6rem;
  padding: 0;
  list-style: none;
}
.news-filter a {
  display: inline-block;
  padding: .4rem .9rem;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.news-filter a:hover {
  border-color: #cbd5e1;
  color: #1e293b;
  text-decoration: none;
}
.news-filter a.aktiv {
  background: #fff7ed;
  border-color: #fdba74;
  color: #1e293b;
}
.news-filter .anzahl {
  color: #94a3b8;
  font-weight: 400;
  margin-left: .25rem;
}

@media (max-width: 575.98px) {
  .beitrag > p,
  .beitrag > ul,
  .beitrag > ol { max-width: none; }
  .beitrag-karte-bild { height: 170px; }
}

/* ---------------------------------------------------------------------------
   Bilder im Beitrag lassen sich vergroessern
   ---------------------------------------------------------------------------
   Die Klasse setzt js/mymuell.js auf jedes Bild, das dafuer in Frage kommt.
   Ohne Skript bleibt sie aus — dann ist auch nichts zu vergroessern, und der
   Zeiger verspricht nichts, was nicht kommt.
   --------------------------------------------------------------------------- */
.beitrag .bild-vergroesserbar,
.beitrag .bild-vergroesserbar img {
  cursor: zoom-in;
}

.beitrag .bild-vergroesserbar {
  display: inline-block;
  max-width: 100%;
  transition: opacity .15s ease;
}

.beitrag .bild-vergroesserbar:hover {
  opacity: .88;
}

/* Der Rahmen fuer die Tastatur muss sichtbar bleiben — Bilder ohne Verweis
   bekommen ihn erst durch das nachgetragene tabindex. */
.beitrag .bild-vergroesserbar:focus-visible {
  outline: 2px solid #e55b13;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .beitrag .bild-vergroesserbar { transition: none; }
}
