/* === Bauerschmidt Rich Text ===
   Wrapper-Layout (max-width / Padding) kommt aus widget-content-width.css
   — gleiche Abstände und Inhaltsbreite wie alle anderen Bauerschmidt-
   Widgets, damit der Text bündig fluchtet. */

.bs-rt {
  font-family: "Funnel Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0D1B2E;
}

/* ── Optionale Top-Heading des Widgets ── */
.bs-rt__heading {
  margin: 0 0 24px 0;
  color: #0077C8;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* ── WYSIWYG-Content-Bereich ── */
.bs-rt__content {
  font-size: 16px;
  line-height: 1.7;
  color: #3A4A5E;
}

.bs-rt__content > *:first-child { margin-top: 0; }
.bs-rt__content > *:last-child  { margin-bottom: 0; }

.bs-rt__content p {
  margin: 0 0 1.1em;
}

/* ── Headings im WYSIWYG-Inhalt — klare Hierarchie + Farbe ── */
.bs-rt__content h1,
.bs-rt__content h2,
.bs-rt__content h3,
.bs-rt__content h4,
.bs-rt__content h5,
.bs-rt__content h6 {
  margin: 1.8em 0 0.6em;
  color: #0077C8;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.bs-rt__content h1 { font-size: 36px; font-weight: 700; }
.bs-rt__content h2 { font-size: 28px; }
.bs-rt__content h3 { font-size: 22px; }
.bs-rt__content h4 { font-size: 18px; }
.bs-rt__content h5 { font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }
.bs-rt__content h6 { font-size: 14px; color: #5A6A7E; text-transform: uppercase; letter-spacing: .06em; }

/* Erste Heading nach dem Top — kein extra Top-Margin */
.bs-rt__content > h1:first-child,
.bs-rt__content > h2:first-child,
.bs-rt__content > h3:first-child,
.bs-rt__content > h4:first-child,
.bs-rt__content > h5:first-child,
.bs-rt__content > h6:first-child {
  margin-top: 0;
}

/* ── Listen ── */
.bs-rt__content ul,
.bs-rt__content ol {
  margin: 0 0 1.1em;
  padding-left: 1.5em;
}
.bs-rt__content li {
  margin: 0 0 0.45em;
}
.bs-rt__content li > ul,
.bs-rt__content li > ol {
  margin-top: 0.45em;
}

/* ── Links: Farbe immer, Unterstrich nur beim Hover ── */
.bs-rt__content a {
  color: #0077C8;
  text-decoration: none;
  transition: color .15s ease;
}
.bs-rt__content a:hover,
.bs-rt__content a:focus {
  color: #00497C;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  outline: none;
}

/* ── Inline-Format ── */
.bs-rt__content strong { font-weight: 700; color: #0D1B2E; }
.bs-rt__content em     { font-style: italic; }
.bs-rt__content small  { font-size: 0.85em; color: #5A6A7E; }
.bs-rt__content mark   { background: #FFF4B0; padding: 0 0.2em; }

/* ── Blockquote ── */
.bs-rt__content blockquote {
  margin: 1.5em 0;
  padding: 0.4em 0 0.4em 1.25em;
  border-left: 3px solid #0077C8;
  font-style: italic;
  color: #3A4A5E;
}

/* ── Horizontal Rule ── */
.bs-rt__content hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid #E4EAF1;
}

/* ── Code ── */
.bs-rt__content code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.15em 0.4em;
  background: #F4F7FA;
  border-radius: 4px;
}
.bs-rt__content pre {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 1em;
  background: #F4F7FA;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0 0 1.1em;
}
.bs-rt__content pre code {
  padding: 0;
  background: transparent;
}

/* ── Tabellen ── */
.bs-rt__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
}
.bs-rt__content th,
.bs-rt__content td {
  padding: 0.6em 0.8em;
  border-bottom: 1px solid #E4EAF1;
  text-align: left;
}
.bs-rt__content th {
  font-weight: 600;
  color: #0D1B2E;
}

/* ── Bilder ── */
.bs-rt__content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ── Mobile-Anpassungen ── */
@media (max-width: 767px) {
  .bs-rt__content    { font-size: 15px; line-height: 1.65; }
  .bs-rt__content h1 { font-size: 28px; }
  .bs-rt__content h2 { font-size: 22px; }
  .bs-rt__content h3 { font-size: 19px; }
  .bs-rt__content h4 { font-size: 17px; }
}
