/********************************************************************/
/* Banner data */
/********************************************************************/
.blog-header-banner {
  height: 60vh;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.blog-header-banner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 20%;
  width: 100%;
  background: linear-gradient(to bottom, transparent, var(--ui-bg));
  z-index: 5;
  pointer-events: none;
}

.blog-header-banner img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  filter: brightness(65%);
}

.blog-header-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 100%;
  text-align: center;
}

.blog-header-overlay h1 {
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 3rem);
  letter-spacing: 1px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  color: var(--ui-text);
}

.blog-header-overlay p {
  font-size: 1.25rem;
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  text-align: center;
  color: var(--ui-text);
}

/********************************************************************/
/* Sections */
/********************************************************************/
.section-title,
.section-content h1,
.quill-editor .ql-editor h1 {
  /* bisherige Styles */
  text-align: center;
  font-size: 1.75rem;
  font-weight: 600;
  margin: 2rem 0;
  color: var(--ui-text);

  /* NEU: Linien + Text ohne Überlappung */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;              /* Abstand Text ↔ Linie */
}

/* Linien links / rechts */
.section-title::before,
.section-title::after,
.section-content h1::before,
.section-content h1::after,
.quill-editor .ql-editor h1::before,
.quill-editor .ql-editor h1::after {
  content: "";
  height: 1px;

  /* wie vorher ~30%, aber flexibel (bei langen Titeln schrumpft’s sauber) */
  flex: 1 1 30%;
  max-width: 30%;
  min-width: 2rem;

  background: linear-gradient(to right, transparent, var(--ui-divider), transparent);
}

.section-title::before,
.section-content h1::before,
.quill-editor .ql-editor h1::before { left: 0; }

.section-title::after,
.section-content h1::after,
.quill-editor .ql-editor h1::after { right: 0; }

/********************************************************************/
/* Delete section button */
/********************************************************************/
.blog-section-block .btn-danger {
  z-index: 10;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  pointer-events: auto;
}

/********************************************************************/
/* Map */
/********************************************************************/
.section-content iframe,
.quill-editor .ql-editor iframe {
  max-width: 100%;
  width: 100%;
  min-height: 300px;
  height: auto;
  border: none;
  aspect-ratio: 16 / 9;
}

/********************************************************************/
/* Table of Contents */
/********************************************************************/
.table-of-contents {
  background: var(--ui-surface);
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--ui-link);
  border-radius: 8px;
  color: var(--ui-text);
  font-size: 0.95rem;
  margin: 2rem 0;
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
}

.table-of-contents h4 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-of-contents ul {
  columns: 2;
  column-gap: 2rem;
  padding-left: 0;
  list-style: none;
}

.table-of-contents li {
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 0.3rem;
  break-inside: avoid;
}

.table-of-contents li::before {
  content: attr(data-number) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ui-link);
  font-weight: bold;
}

.table-of-contents li a {
  color: var(--ui-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-block;
  vertical-align: middle;
}

.table-of-contents li a:hover {
  color: var(--ui-hover);
  text-decoration: underline;
}

.toc-h1 { font-weight: bold; }
.toc-h2 { margin-left: 0.5rem; }
.toc-h3 { margin-left: 1rem; font-size: 0.9em; }
.toc-h4 { margin-left: 1.5rem; }

/* --- TOC Layout --- */
.table-of-contents ul {
  columns: 2;
  column-gap: 2rem;
  padding-left: 0;
  list-style: none;
}

/* Mobile: immer 1 Spalte */
@media (max-width: 768px) {
  .table-of-contents ul {
    columns: 1;
    column-gap: 0;
  }
}

/* Toggle Button */
.toc-toggle-btn {
  border: 1px solid var(--ui-divider);
  background: transparent;
  color: var(--ui-text);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.toc-toggle-btn:hover {
  border-color: var(--ui-hover);
  color: var(--ui-hover);
}

/* Button unterhalb des TOC */
.toc-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

