/* =============================================================================
   Blog – Typografie für Beitragsinhalte aus dem Editor (.blog-content)
   Bewusst eigenes CSS statt Tailwind-Klassen, da der Inhalt aus der Datenbank
   kommt und vom Tailwind-Build nicht erfasst wird.
   ============================================================================= */
.blog-content {
  color: #334155;
  font-size: 1.0625rem;
  line-height: 1.8;
  overflow-wrap: break-word;
}
.blog-content > * + * { margin-top: 1.25em; }
.blog-content h2,
.blog-content h3,
.blog-content h4 {
  color: #0f172a;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 6rem; /* fixe Navigation bei Sprungmarken */
}
.blog-content h2 { font-size: 1.75rem; margin-top: 2.2em; }
.blog-content h3 { font-size: 1.35rem; margin-top: 1.8em; }
.blog-content h4 { font-size: 1.125rem; margin-top: 1.6em; }
.blog-content h2 + *, .blog-content h3 + *, .blog-content h4 + * { margin-top: 0.75em; }
.blog-content a {
  color: #c2410c;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(234, 88, 12, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}
.blog-content a:hover { text-decoration-color: #ea580c; }
.blog-content strong { color: #0f172a; font-weight: 700; }
.blog-content ul, .blog-content ol { padding-left: 1.4em; }
.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }
.blog-content li { margin-top: 0.4em; padding-left: 0.25em; }
.blog-content li::marker { color: #ea580c; }
.blog-content blockquote {
  border-left: 4px solid #ea580c;
  background: #fff7ed;
  padding: 1em 1.25em;
  border-radius: 0 0.75rem 0.75rem 0;
  color: #7c2d12;
  font-style: italic;
}
.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.875rem;
  margin-left: auto;
  margin-right: auto;
}
.blog-content figure { margin: 2em 0; }
.blog-content figcaption { font-size: 0.875rem; color: #64748b; text-align: center; margin-top: 0.6em; }
.blog-content hr { border: 0; border-top: 1px solid #e2e8f0; margin: 2.5em 0; }
.blog-content code {
  background: #f1f5f9;
  border-radius: 0.375rem;
  padding: 0.15em 0.4em;
  font-size: 0.9em;
}
.blog-content pre {
  background: #141c1f;
  color: #e2e8f0;
  border-radius: 0.875rem;
  padding: 1.1em 1.25em;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}
.blog-content pre code { background: none; padding: 0; color: inherit; }
.blog-table-wrap { overflow-x: auto; }
.blog-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.blog-content th, .blog-content td { border: 1px solid #e2e8f0; padding: 0.6em 0.8em; text-align: left; vertical-align: top; }
.blog-content th { background: #f8fafc; color: #0f172a; font-weight: 700; }

/* =============================================================================
   Inhaltsverzeichnis (.blog-toc) – mobil einklappbar, Desktop mitlaufend
   ============================================================================= */
@media (prefers-reduced-motion: no-preference) {
  html:has(.blog-toc) { scroll-behavior: smooth; }
}
.blog-content [id], #top { scroll-margin-top: 6.5rem; }

.blog-toc { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; line-height: 1.4; }
.blog-toc li + li { margin-top: 0.125rem; }
.blog-toc a {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: #334155;
  font-weight: 500;
  transition: background-color .15s, color .15s;
}
.blog-toc a:hover { background: #fff7ed; color: #c2410c; }
.blog-toc-nr {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ea580c;
  padding-top: 0.15em;
}
.blog-toc-sub a { padding-left: 2.4rem; font-size: 0.875rem; font-weight: 400; color: #64748b; }
.blog-toc a[aria-current] { background: #fff7ed; color: #9a3412; font-weight: 600; }

/* Mobil: Pfeil dreht beim Aufklappen, Standard-Marker ausblenden */
.blog-toc-mobile summary { list-style: none; }
.blog-toc-mobile summary::-webkit-details-marker { display: none; }
.blog-toc-mobile[open] .blog-toc-chevron { transform: rotate(180deg); }

/* Desktop-Seitenleiste: schmaler, mit Leitlinie links */
.blog-toc-desktop .blog-toc {
  font-size: 0.875rem;
  border-left: 2px solid #e2e8f0;
  max-height: calc(100vh - 16rem);
  overflow-y: auto;
}
.blog-toc-desktop .blog-toc a {
  border-radius: 0 0.5rem 0.5rem 0;
  margin-left: -2px;
  border-left: 2px solid transparent;
  padding: 0.4rem 0.75rem;
}
.blog-toc-desktop .blog-toc-sub a { padding-left: 2.25rem; font-size: 0.8125rem; }
.blog-toc-desktop .blog-toc a[aria-current] { border-left-color: #ea580c; }
