/* Gutenberg-Inhalt in Beiträgen (Aktuelles, Wissen): Optik der Blöcke.

   Eine Quelle für Seite und Editor. Alle Selektoren beginnen mit .sh-beitrag__inhalt,
   dem Wrapper aus templates/single.html. Im Editor ersetzt inc/editor.php diesen
   Vorsatz durch .editor-styles-wrapper (Body des Editor-Iframes).

   Farben und Schriften stehen als --wp--preset--* (theme.json), weil die Tokens aus
   tokens.css im Editor nicht geladen sind. Die Werte sind dieselben wie in tokens.css.
   Buttons sind nicht hier, sondern in theme.json (styles.elements.button). */

/* Text */
.sh-beitrag__inhalt p,
.sh-beitrag__inhalt li {
  font-size: 1rem;
  line-height: 1.6;
}

.sh-beitrag__inhalt p { margin: 0 0 1em; }

.sh-beitrag__inhalt a:not(.wp-element-button) {
  color: var(--wp--preset--color--orange-text);
  text-decoration: underline;
}

.sh-beitrag__inhalt a:not(.wp-element-button):hover {
  color: var(--wp--preset--color--orange-text-dunkel);
}

/* Überschriften: Ebene 2 wie .sh-headline, Ebene 3 wie .sh-zwischentitel */
.sh-beitrag__inhalt h2,
.sh-beitrag__inhalt h3,
.sh-beitrag__inhalt h4 {
  margin: 1.4em 0 .4em;
  font-family: var(--wp--preset--font-family--kufam);
  font-weight: 500;
}

.sh-beitrag__inhalt h2 { font-size: clamp(30px, 4vw, 50px); line-height: 1.08; letter-spacing: -.02em; }
.sh-beitrag__inhalt h3 { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.2; letter-spacing: -.01em; }
.sh-beitrag__inhalt h4 { font-size: 18px; line-height: 1.25; }

/* Listen */
.sh-beitrag__inhalt ul,
.sh-beitrag__inhalt ol { margin: 0 0 1em; padding-left: 1.4em; }
.sh-beitrag__inhalt ul { list-style: disc; }
.sh-beitrag__inhalt ol { list-style: decimal; }
.sh-beitrag__inhalt li { margin-bottom: .35em; }
.sh-beitrag__inhalt li::marker { color: var(--wp--preset--color--orange-text); }

/* Zitat: wie das Modul "Zitat" (.sh-zitat__text) */
.sh-beitrag__inhalt .wp-block-quote {
  margin: 1.6em 0;
  padding: 0 0 0 18px;
  border: 0;
  border-left: 2px solid var(--wp--preset--color--text-zitat);
  color: var(--wp--preset--color--orange-text);
  font-family: var(--wp--preset--font-family--kufam);
  font-size: clamp(21px, 2.3vw, 28px);
  font-style: italic;
  line-height: 1.3;
}

.sh-beitrag__inhalt .wp-block-quote p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.sh-beitrag__inhalt .wp-block-quote cite {
  display: block;
  margin-top: 12px;
  color: var(--wp--preset--color--text-grau);
  font-family: var(--wp--preset--font-family--work-sans);
  font-size: 14.5px;
  font-style: normal;
  line-height: 1.45;
}

/* Hervorgehobenes Zitat ("Merksatz"): zwischen zwei Linien, ohne Leerraum */
.sh-beitrag__inhalt .wp-block-pullquote {
  margin: 2em 0;
  padding: 22px 0;
  border: 0;
  border-top: 1px solid var(--wp--preset--color--linie);
  border-bottom: 1px solid var(--wp--preset--color--linie);
  text-align: left;
}

.sh-beitrag__inhalt .wp-block-pullquote blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--wp--preset--color--text);
  font-family: var(--wp--preset--font-family--kufam);
  font-size: clamp(22px, 2.4vw, 30px);
  font-style: normal;
  font-weight: 500;
  line-height: 1.25;
}

.sh-beitrag__inhalt .wp-block-pullquote p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.sh-beitrag__inhalt .wp-block-pullquote cite {
  display: block;
  margin-top: 12px;
  color: var(--wp--preset--color--text-grau);
  font-family: var(--wp--preset--font-family--work-sans);
  font-size: 14.5px;
  font-style: normal;
  font-weight: 400;
}

/* Bild, Galerie, Bildunterschrift */
.sh-beitrag__inhalt .wp-block-image,
.sh-beitrag__inhalt .wp-block-gallery { margin: 1.6em 0; }

.sh-beitrag__inhalt .wp-block-image img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.sh-beitrag__inhalt .wp-block-gallery {
  --wp--style--unstable-gallery-gap: 12px;
  gap: 12px;
}

.sh-beitrag__inhalt .wp-block-gallery img { border-radius: 4px; }

.sh-beitrag__inhalt figcaption,
.sh-beitrag__inhalt .wp-element-caption {
  margin-top: 8px;
  color: var(--wp--preset--color--text-grau);
  font-size: 13.5px;
  line-height: 1.45;
  text-align: left;
}

/* Tabelle: feine Linien statt Gitter, Kopfzeile auf Sand */
.sh-beitrag__inhalt .wp-block-table {
  margin: 1.6em 0;
  overflow-x: auto;
}

.sh-beitrag__inhalt .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.45;
}

.sh-beitrag__inhalt .wp-block-table thead,
.sh-beitrag__inhalt .wp-block-table tfoot { border: 0; }

.sh-beitrag__inhalt .wp-block-table th,
.sh-beitrag__inhalt .wp-block-table td {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--wp--preset--color--linie);
  text-align: left;
  vertical-align: top;
}

.sh-beitrag__inhalt .wp-block-table th {
  border-bottom: 2px solid var(--wp--preset--color--blattgruen);
  background: var(--wp--preset--color--sand);
  font-weight: 600;
}

.sh-beitrag__inhalt .wp-block-table.is-style-stripes { border: 0; }

.sh-beitrag__inhalt .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
  background: var(--wp--preset--color--sand);
}

/* Datei: Kasten wie ein Eintrag des Download-Moduls, Button klein */
.sh-beitrag__inhalt .wp-block-file,
.sh-beitrag__inhalt .wp-block-file__content-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
}

.sh-beitrag__inhalt .wp-block-file {
  margin: 1.6em 0;
  padding: 14px 18px;
  border: 1px solid var(--wp--preset--color--linie);
  border-radius: 4px;
  background: var(--wp--preset--color--weiss);
  font-size: 1rem;
}

/* Im Editor liegen Name und Button in .wp-block-file__content-wrapper */
.sh-beitrag__inhalt .wp-block-file__content-wrapper { flex: 1 1 auto; }

.sh-beitrag__inhalt .wp-block-file a:not(.wp-element-button) {
  color: var(--wp--preset--color--text);
  font-weight: 500;
  text-decoration: none;
}

.sh-beitrag__inhalt .wp-block-file a:not(.wp-element-button):hover { color: var(--wp--preset--color--orange-text); }

.sh-beitrag__inhalt .wp-block-file .wp-block-file__button {
  margin: 0;
  padding: 8px 14px;
  font-size: 14px;
}

/* Buttons nebeneinander */
.sh-beitrag__inhalt .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.6em 0;
}

/* Aufklappbereich: Rahmen, Plus und Minus statt Browser-Pfeil */
.sh-beitrag__inhalt .wp-block-details {
  margin: 0 0 8px;
  border: 1px solid var(--wp--preset--color--linie);
  border-radius: 4px;
}

.sh-beitrag__inhalt .wp-block-details summary {
  position: relative;
  padding: 14px 48px 14px 18px;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.sh-beitrag__inhalt .wp-block-details summary::-webkit-details-marker { display: none; }

.sh-beitrag__inhalt .wp-block-details summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: var(--wp--preset--color--orange-text);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.sh-beitrag__inhalt .wp-block-details[open] summary::after { content: "\2013"; }

.sh-beitrag__inhalt .wp-block-details > :not(summary) { margin: 0 18px 14px; }

/* Trennlinie */
.sh-beitrag__inhalt .wp-block-separator {
  width: 100%;
  max-width: none;
  height: 0;
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--wp--preset--color--linie);
  background: none;
  opacity: 1;
}

/* Gruppe, Stil "Hinweis" (registriert in inc/editor.php) */
.sh-beitrag__inhalt .wp-block-group { margin: 1.6em 0; }

.sh-beitrag__inhalt .wp-block-group.is-style-hinweis {
  padding: 18px 22px;
  border-left: 4px solid var(--wp--preset--color--blattgruen);
  border-radius: 0 4px 4px 0;
  background: var(--wp--preset--color--sand);
}

.sh-beitrag__inhalt .wp-block-group.is-style-hinweis > :first-child { margin-top: 0; }
.sh-beitrag__inhalt .wp-block-group.is-style-hinweis > :last-child { margin-bottom: 0; }
