/* =========================================
   HAINBUCH CSS – Docuglobe-HTML
   ========================================= */

/* Grundlayout / Seite */

body {
  background: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #111827;
}

/* Header / Logo / Suche oben */

.header {
  background: transparent;
  border-bottom: none;
  padding-top: 12px;
  padding-bottom: 8px;
}

.navbar-brand img#logo_header {
  max-height: 40px;
}

.search_buttons a {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 6px 10px;
  margin-left: 8px;
  background: rgba(255, 255, 255, 0.9);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.search_buttons a:hover {
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

/* Content-Card */

#content-wrapper {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  padding: 24px 24px 32px;
  margin-top: 16px;
  margin-bottom: 40px;
}

/* -----------------------------
   Überschriften
   ----------------------------- */

.berschrift1 {
  font-size: 24px;
  font-weight: 400;
  color: var(--hb-red, #e2001a);
  margin: 0 0 16px;
}

.berschrift2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--hb-grey-dark, #717171);
  margin: 24px 0 12px;
}

.berschrift3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--hb-grey-dark, #717171);
  margin: 18px 0 8px;
}

.berschrift4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--hb-grey-dark, #717171);
  margin: 16px 0 6px;
}

/* Einzüge aus Word entfernen */
.berschrift1,
.berschrift2,
.berschnitt3,
.berschnitt4 {
  margin-left: 0 !important;
  text-indent: 0 !important;
}

/* Überschrift2 in die Textflucht der Seiteninhalte holen */
#content .berschrift2 {
  margin-left: 6px !important;
}

/* -----------------------------
   Fließtext
   ----------------------------- */

p {
  margin: 0 0 6px;
}

.HText,
.HTextzentriert,
.HTextfett,
.HHinweisfett,
.HTextListeQuadrat,
.HTextListeQuadrat2,
.HTextListeZahl,
.HTextListeBuchstabe {
  font-size: 13px;
  line-height: 1.4;
  color: var(--hb-grey-dark, #717171);
}

.HTextfett,
.HHinweisfett {
  font-weight: 600;
}

.HTextzentriert {
  text-align: center;
}

/* Fließtext: beginnt jetzt wie Warnkästen und Symbole bündig links */
#content > p.HText,
#content > p.HTextfett,
#content > p.HHinweisfett {
  margin-left: 310px;
}

/* -----------------------------
   Marginalien / Kleingedrucktes
   ----------------------------- */

.HMarginalie {
  font-size: 16px;
  font-weight: 700;
  color: var(--hb-grey-dark, #717171);
  padding: 4px 6px;
}

.HBestellhotline {
  font-size: 10px;
  color: var(--hb-grey, #9c9c9c);
}

/* -----------------------------
   Titelseite
   ----------------------------- */

.HBetriebsanleitung,
.HBetriebsanleitungZusatz {
  display: block;
  margin: 0;
  padding: 0;
  background: none;
  color: #ffffff;
}

/* 1. Zeile "Betriebsanleitung" – oberer Balken */
#content .HBetriebsanleitung:first-of-type {
  margin: 40px -18px 0;
  padding: 10px 32px 2px;
  background-color: #b7b7b7;
  font-size: 28px;
  font-weight: 700;
}

/* 2. Zeile im selben Balken */
#content .HBetriebsanleitung:first-of-type + .HBetriebsanleitung,
#content .HBetriebsanleitung:first-of-type + .HBetriebsanleitungZusatz,
#content .HBetriebsanleitungZusatz:first-of-type {
  margin: 0 -18px 0;
  padding: 0 32px 10px;
  background-color: #b7b7b7;
  font-size: 16px;
  font-weight: 400;
}

/* weitere (leere) Titelzeilen neutralisieren */
#content .HBetriebsanleitung:nth-of-type(n + 3),
#content .HBetriebsanleitungZusatz:nth-of-type(n + 2) {
  background: none;
  margin: 0;
  padding: 0;
  color: inherit;
  font-size: 0;
  line-height: 0;
}

/* Produktbezeichnung als weißes Kärtchen */
.HTitelDaten {
  display: inline-block;
  margin: 18px 0 0 32px;
  padding: 6px 18px;
  background: #ffffff;
  color: var(--hb-black, #000000);
  font-size: 28px;
  font-weight: 400;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
}

/* weitere (leere) HTitelDaten neutralisieren */
#content .HTitelDaten:not(:first-of-type) {
  background: none;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

/* Sprachkürzel im Titeltable: erst alles ausblenden */
#content table:first-of-type .HSprachkuerzel {
  display: none;
}

/* nur die Blase in der letzten Tabellenzeile ("DE") anzeigen */
#content table:first-of-type tr:last-of-type .HSprachkuerzel {
  display: inline-block;
  float: right;
  margin-top: 18px;
  margin-right: 32px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid #bfbfbf;
  background: #f5f5f5;
  color: var(--hb-grey-dark, #717171);
  font-size: 12px;
  font-weight: 600;
}

.HSprachkuerzel {
  display: inline-block;
}

/* -----------------------------
   Bilder / Legenden
   ----------------------------- */

#content img {
  max-width: 100%;
  height: auto;
}

.HGrafik {
  margin: 8px 0 12px;
  text-align: center;
}

.HLegendeZahl,
.HLegendeBuchstabe {
  font-size: 11px;
  color: var(--hb-grey, #9c9c9c);
}

/* -----------------------------
   Inhaltsverzeichnis
   ----------------------------- */

.HInhaltsverzeichnisberschrift,
.HIndexverzeichnisberschrift {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--hb-red, #e2001a);
  margin: 18px 0 6px;
}

.Verzeichnis1,
.Verzeichnis2,
.Verzeichnis3,
.Verzeichnis9 {
  margin: 0 0 2px;
}

/* -----------------------------
   Nummerierte Listen – allgemeiner Span
   ----------------------------- */

.numbering-span {
  margin-right: 12px;
}

/* -----------------------------
   Text aus den Word-Formaten
   ----------------------------- */

.dltext,
.dlAbbildung,
.dltextfett,
.dlTitel1,
.dlTitel2 {
  margin-left: 0;
  margin-right: 0;
}

.dllisttext,
.dlsublisttext {
  margin-top: 3pt;
  margin-bottom: 3pt;
  margin-right: 30pt;
}

.dllisttext {
  margin-left: 47pt;
  text-indent: -16pt;
}

.dlsublisttext {
  margin-left: 80pt;
  text-indent: -16pt;
}

.dltablelisttext {
  margin-left: 17pt;
  text-indent: -16pt;
}

/* -----------------------------
   Nummerierte Listen / Aufzählungen – bündig mit HText bei 310px
   (Basis-Variante ohne !important)
   ----------------------------- */

/* Aufzählungen mit Quadrat-Bullets */
#content > p.HTextListeQuadrat,
#content > p.HTextListeQuadrat2,
#content > p.HHinweisListeQuadrat {
  position: relative;
  margin-left: 310px; /* gleiche Textflucht wie HText */
  padding-left: 16px; /* Abstand zwischen Bullet und Text */
}

/* Quadrat-Bullets (rot) */
#content > p.HTextListeQuadrat::before,
#content > p.HTextListeQuadrat2::before,
#content > p.HHinweisListeQuadrat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  margin-top: -4px;
  background-color: var(--hb-red, #e2001a);
}

/* Nummerierte Listen (1., 2., 3. …) und Buchstabenlisten (a), b) …) */
#content > p.HTextListeZahl,
#content > p.HTextListeBuchstabe {
  margin-left: 310px;      /* bündig mit HText */
  padding-left: 2.2em;     /* Platz für Zahl/Buchstabe */
  text-indent: -2.2em;     /* zweite Zeile unter dem Text, nicht unter der Zahl */
}

/* Nummern/Buchstaben optional in fixe Spalte setzen, falls numbering-span vorhanden ist */
#content > p.HTextListeZahl .numbering-span,
#content > p.HTextListeBuchstabe .numbering-span {
  display: inline-block;
  width: 2.2em;
  margin-right: 0;
  text-align: right;
}

/* Falls du irgendwo anders .numbering-span verwendest, neutrale Basisregel ohne Einrückungslogik: */
.numbering-span {
  margin-right: 0;
}

/* -----------------------------
   Hinweis-/Warn-Boxen
   ----------------------------- */

.dlwhweiss,
.SicherheitshinweisWeiss {
  color: #ffffff;
}

.dlwhweisskursiv {
  font-style: italic;
  color: #ffffff;
}

.dlwhschwarz,
.dlwhweisskursiv,
.dlwhweiss {
  font-weight: 600;
  margin-bottom: 5px;
  margin-left: 8px;
}

.dlwhschwarz > img,
.dlwhweisskursiv > img,
.dlwhweiss > img {
  vertical-align: baseline;
}

.SicherheitshinweisWeiss,
.SicherheitshinweisSchwarz {
  font-weight: 600;
  margin-left: 10px;
}

.SicherheitshinweisWeiss > img,
.SicherheitshinweisSchwarz > img {
  margin-right: -5px;
}

/* Warn-Tabellen (mit Inline-Margin aus Word) auf Textflucht holen */
#content table[style*="margin-left:-141.75pt"],
#content table[style*="margin-left:-141.70pt"],
#content table[style*="margin-left:-140.00pt"] {
  margin-left: 0 !important;
}

/* -----------------------------
   Tabellen – Basis + maximale Breite
   ----------------------------- */

#content table {
  width: 100% !important;        /* überschreibt width:459.35pt aus dem HTML */
  max-width: 1100px;
  margin: 0 auto !important;     /* zentriert die Tabelle */
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
}

#content table th,
#content table td {
  padding: 4px 6px;
  vertical-align: top;
}

table tr td p.dltext,
table tr td p.dltextfett,
.dlwhbeschreibung,
.dlwhabwendung {
  margin-left: 5pt !important;
}

table tr td p.dltextfett {
  font-weight: 600;
}

.Tabelleberschrift {
  font-weight: 600;
  font-size: 13px;
  margin: 4px 0 2px;
}

.HTabellenende {
  margin: 0 0 8px;
}

/* dlModulbegrenzung-Absätze (u.a. das "e" über der Tabelle) verstecken */
#content p.dlModulbegrenzung0 {
  display: none !important;
}

/* =========================================
   Technische Daten – Kopfzeile & 90°-Drehung
   ========================================= */

/* 1. Word-Export-Höhen global neutralisieren */
#content table tr[style*="height:154.7pt"],
#content table tr[style*="height:36.85pt"] {
  height: auto !important;
}

/* 2. Kopfzeile der Tabellenraster-Tabellen */
#content table.Tabellenraster tr:first-child {
  height: auto !important;
}

/* 3. Kopfzellen im grauen Balken – STANDARD (horizontal) */
/* Standard: Kopfzellen immer linksbündig */
#content table th,
#content table td {
  padding: 4px 6px;
  vertical-align: top;
  text-align: left;        
}

/* Tabellenraster-Kopfzeile – ebenfalls links */
#content table.Tabellenraster tr:first-child {
  height: auto !important;
}

#content table.Tabellenraster tr:first-child td {
  padding: 4px 4px 6px 4px;
  vertical-align: middle;
  background-color: #d9d9d9 !important;
  text-align: left;         /* statt center */
}

/* NUR Technische Daten (mit Klasse .hb-techdata-vertical):
   vertikale, zentrierte Header */
#content table.Tabellenraster.hb-techdata-vertical tr:first-child td {
  vertical-align: bottom;
  text-align: center;       /* hier zentrieren wir wieder */
}

#content table.Tabellenraster.hb-techdata-vertical
  tr:first-child td p.HTabelleKopfzeilezentriert {
  line-height: 1.1;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
}


/* 4. Text in den Kopfzellen – STANDARD (horizontal) */
#content table.Tabellenraster tr:first-child td p.HTabelleKopfzeilezentriert {
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
  text-indent: 0 !important;
  text-align: center;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  transform: none;
}

/* 5. SPEZIAL: 90°-Header nur für Tabellen mit Klasse .hb-techdata-vertical */
#content table.Tabellenraster.hb-techdata-vertical tr:first-child td {
  vertical-align: bottom;
}

#content table.Tabellenraster.hb-techdata-vertical tr:first-child td p.HTabelleKopfzeilezentriert {
  line-height: 1.1;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
}

/* Allgemeine Typo für Tabellen-Kopfzeilen */
.HTabelleKopfzeilezentriert {
  font-weight: 600;
  color: var(--hb-grey-dark, #717171);
}

/* -----------------------------
   Zwischenräume / Module
   ----------------------------- */

.dlModulbegrenzung0 {
  height: 0;
  margin: 0;
}

.HZwischenraum {
  height: 8px;
}

/* -----------------------------
   Sonstiges
   ----------------------------- */

.entry h3 {
  font-size: 12px;
}

.glyphicon.glyphicon-chevron-down {
  cursor: pointer;
}

/* =========================================
   Navigation / Strukturbaum (linke Spalte)
   ========================================= */

/* =========================================
   Navigation / Strukturbaum (linke Spalte)
   ========================================= */

/* Mobile / Tablet: Navi als normale Karte über die volle Spaltenbreite */
#navi {
  padding: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  margin-top: 16px;
  margin-bottom: 24px;
}

/* Desktop: Karte in der Spalte einrücken, links Abstand zum Inhalt */
@media (min-width: 992px) {
  #navi {
    position: relative;
    padding: 0 0 24px 24px;   /* 24px Abstand links, unten etwas Luft */
    background: transparent;  /* Hintergrund kommt über ::before */
    box-shadow: none;
  }

  #navi::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 24px; /* entspricht padding-left → sichtbarer „Gutter“ */
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    z-index: -1; /* liegt hinter dem eigentlichen Nav-Inhalt */
  }
}

/* optionaler Wrapper für den Baum, falls verwendet */
#navi .toc-nav {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 0.75rem 0.5rem 1.5rem;
  border-right: 1px solid #e0e0e0;
}

#navi .entry {
  margin-bottom: 0.1rem;
}


/* optionaler Wrapper für den Baum, falls verwendet */
#navi .toc-nav {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 0.75rem 0.5rem 1.5rem;
  border-right: 1px solid #e0e0e0;
}

#navi .entry {
  margin-bottom: 0.1rem;
}

/* *** Top-Level: Kapitel (ALLGEMEINES, SICHERHEIT, …) *** */
#navi .entry.level-1 h3,
#navi .entry.level-1 h3 a {
  font-size: 11px !important;
  font-weight: 700;
  text-transform: none !important;
  letter-spacing: 0.02em;
  white-space: nowrap;
  word-break: normal;
}

#navi .entry.level-1 > .pair,
#navi .entry.level-1 > h3 {
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  margin: 0;
}

#navi .entry.level-1 > .pair > h3 > a,
#navi .entry.level-1 > h3 > a {
  color: var(--hb-red, #e2001a);
}

/* 2. Ebene */
#navi .entry.level-2 {
  padding-left: 0.8rem;
  font-size: 12px;
}

/* 3. Ebene */
#navi .entry.level-3 {
  padding-left: 1.4rem;
  font-size: 11px;
}

/* 4. Ebene */
#navi .entry.level-4 {
  padding-left: 2rem;
  font-size: 11px;
}

/* Links im Baum */
#navi h3 a,
#navi .entry a {
  display: inline-block;
  padding: 0.18rem 0.35rem;
  border-radius: 4px;
  color: var(--hb-grey-dark, #717171);
  text-decoration: none;
}

#navi a:focus {
  outline: none;
}

/* Toggle-Zeile mit Icon rechts */
#navi .pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

/* Toggle-Button für auf-/zuklappbare Unterpunkte */
#navi .collapse-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background: transparent;
  padding: 0;
}

#navi .collapse-button .glyphicon {
  font-size: 10px;
  transition: transform 0.2s ease;
}

#navi .collapse-button.collapsed .glyphicon {
  transform: rotate(-90deg);
}

/* =========================================
   Breadcrumb über dem Inhalt
   ========================================= */

#dg-breadcrumb {
  margin: 15px 0 10px;
}

#dg-breadcrumb .breadcrumb {
  margin-bottom: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
  color: var(--hb-grey, #9c9c9c);
}

#dg-breadcrumb .breadcrumb-item a {
  color: var(--hb-grey-dark, #717171);
  text-decoration: none;
}

#dg-breadcrumb .breadcrumb-item a:hover {
  text-decoration: underline;
  color: var(--hb-red, #e2001a);
}

#dg-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: ">";
  padding: 0 4px;
  color: var(--hb-grey, #9c9c9c);
}

#dg-breadcrumb .breadcrumb-item.active {
  color: var(--hb-red, #e2001a);
  font-weight: 600;
}

/* Content etwas Luft geben */
.col-md-9 #content {
  margin-top: 10px;
}

/* -----------------------------
   Responsive Typografie
   ----------------------------- */

@media (max-width: 991px) {
  .berschrift1 {
    font-size: 28px;
  }

  .berschrift2 {
    font-size: 18px;
  }

  .berschrift3 {
    font-size: 16px;
  }

  .berschrift4 {
    font-size: 14px;
  }

  .HText,
  .HTextzentriert,
  .HTextfett,
  .HHinweisfett,
  .HTextListeQuadrat,
  .HTextListeQuadrat2,
  .HTextListeZahl,
  .HTextListeBuchstabe {
    font-size: 12px;
  }

  #content .HBetriebsanleitung:first-of-type {
    font-size: 24px;
    margin-left: -14px;
    margin-right: -14px;
  }

  #content .HBetriebsanleitung:first-of-type + .HBetriebsanleitung,
  #content .HBetriebsanleitung:first-of-type + .HBetriebsanleitungZusatz,
  #content .HBetriebsanleitungZusatz:first-of-type {
    font-size: 14px;
    margin-left: -14px;
    margin-right: -14px;
  }

  .HTitelDaten {
    font-size: 13px;
    margin-left: 28px;
  }

  #content .HSprachkuerzel:last-of-type {
    font-size: 11px;
    margin-right: 28px;
  }

  .dltext,
  .dlAbbildung,
  .dltextfett,
  .dlTitel1,
  .dlTitel2 {
    margin-left: 20pt;
    margin-right: 20pt;
  }

  .dllisttext,
  .dlsublisttext {
    margin-right: 20pt;
  }

  .dllisttext {
    margin-left: 34pt;
  }

  .dlsublisttext {
    margin-left: 54pt;
  }

  .dltablelisttext {
    margin-left: 16pt;
  }

  #navi .toc-nav {
    max-height: none;
    border-right: none;
    padding-bottom: 1rem;
  }
}

@media (max-width: 767px) {
  .berschrift1 {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .berschrift2 {
    font-size: 17px;
    margin: 18px 0 10px;
  }

  .berschrift3 {
    font-size: 15px;
    margin: 14px 0 6px;
  }

  .berschrift4 {
    font-size: 14px;
    margin: 12px 0 6px;
  }

  p {
    margin-bottom: 5px;
  }

  .HText,
  .HTextzentriert,
  .HTextfett,
  .HHinweisfett,
  .HTextListeQuadrat,
  .HTextListeQuadrat2,
  .HTextListeZahl,
  .HTextListeBuchstabe {
    font-size: 12px;
    line-height: 1.5;
  }

  #content .HBetriebsanleitung:first-of-type,
  #content .HBetriebsanleitung:first-of-type + .HBetriebsanleitung,
  #content .HBetriebsanleitung:first-of-type + .HBetriebsanleitungZusatz,
  #content .HBetriebsanleitungZusatz:first-of-type {
    margin-left: 0;
    margin-right: 0;
    padding-left: 16px;
    padding-right: 16px;
  }

  #content .HBetriebsanleitung:first-of-type {
    font-size: 20px;
    padding-top: 8px;
  }

  #content .HBetriebsanleitung:first-of-type + .HBetriebsanleitung,
  #content .HBetriebsanleitung:first-of-type + .HBetriebsanleitungZusatz,
  #content .HBetriebsanleitungZusatz:first-of-type {
    font-size: 13px;
  }

  .HTitelDaten {
    font-size: 12px;
    margin-left: 16px;
    padding: 5px 12px;
  }

  #content .HSprachkuerzel:last-of-type {
    float: none;
    margin: 8px 0 0 16px;
    padding: 3px 10px;
  }

  .dltext,
  .dlAbbildung,
  .dltextfett,
  .dlTitel1,
  .dlTitel2 {
    margin-left: 12pt;
    margin-right: 12pt;
  }

  .dllisttext,
  .dlsublisttext {
    margin-right: 12pt;
  }

  .dllisttext {
    margin-left: 24pt;
  }

  .dlsublisttext {
    margin-left: 40pt;
  }

  .dltablelisttext {
    margin-left: 12pt;
  }

  #content table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
  }

  #navi .toc-nav {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #navi h3 a,
  #navi .entry a {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  #toc-preview {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .berschrift1 {
    font-size: 18px;
  }

  .berschrift2 {
    font-size: 16px;
  }

  .berschrift3 {
    font-size: 14px;
  }

  .berschrift4 {
    font-size: 13px;
  }

  .HLegendeZahl,
  .HLegendeBuchstabe {
    font-size: 10px;
  }

  .HInhaltsverzeichnisberschrift,
  .HIndexverzeichnisberschrift {
    font-size: 12px;
  }
}

/* =========================================
   Nach-oben-Pfeil
   ========================================= */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--hb-red, #e2001a);
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 999;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top::before {
  content: "\25B2";
  font-size: 18px;
  line-height: 1;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 767px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 36px;
    height: 36px;
  }

  .back-to-top::before {
    font-size: 16px;
  }
}

/* Aktiver Menüpunkt in der linken Navigation */
#navi a.is-active {
  font-weight: bold;
  text-decoration: none;
  border-left: 3px solid #e2001a;
  padding-left: 6px;
}

/* Hover-Verbesserung allgemein */
#navi a:hover {
  text-decoration: underline;
}

/* Layout: Inhalt und Navi bündig + Abstand dazwischen */
.layout-main {
  margin-left: 0 !important;
}

.layout-main .manual-content {
  padding-right: 32px; /* Abstand zum Menü */
}

.layout-main .manual-nav {
  padding-left: 24px;          /* Innenabstand Menü */
  border-left: 1px solid #e6e6e6; /* feine Trennlinie */
}

/* =====================================================
   Listen bündig zum Fließtext – inkl. Inline-Styles
   ===================================================== */

/* Aufzählungen mit Quadrat-Bullets */
#content p.HTextListeQuadrat,
#content p.HTextListeQuadrat2,
#content p.HHinweisListeQuadrat {
  position: relative;
  margin-left: 310px !important;   /* gleiche Textflucht wie HText */
  padding-left: 16px !important;   /* Abstand zwischen Bullet und Text */
  text-indent: 0 !important;       /* Word-Textindent aushebeln */
}

/* Quadrat-Bullets (rot) */
#content p.HTextListeQuadrat::before,
#content p.HTextListeQuadrat2::before,
#content p.HHinweisListeQuadrat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  margin-top: -4px;
  background-color: var(--hb-red, #e2001a);
}

/* Nummerierte Listen (1., 2., 3. …) und Buchstabenlisten */
#content p.HTextListeZahl,
#content p.HTextListeBuchstabe {
  margin-left: 310px !important;   /* bündig mit HText */
  padding-left: 2.2em !important;  /* Platz für Nummer/Buchstaben */
  text-indent: -2.2em !important;  /* Folgezeile unter Text, nicht unter Nummer */
}

/* Nummern/Buchstaben in eigene Spalte, falls vorhanden */
#content p.HTextListeZahl .numbering-span,
#content p.HTextListeBuchstabe .numbering-span {
  display: inline-block;
  width: 2.2em;
  margin-right: 8px;
  text-align: right;
}

/* --- Listen in Tabellen NICHT einrücken ---------------- */
#content table p.HTextListeQuadrat,
#content table p.HTextListeQuadrat2,
#content table p.HHinweisListeQuadrat,
#content table p.HTextListeZahl,
#content table p.HTextListeBuchstabe {
  margin-left: 0 !important;
  padding-left: 0 !important;
  text-indent: 0 !important;
}

#content table p.HTextListeQuadrat::before,
#content table p.HTextListeQuadrat2::before,
#content table p.HHinweisListeQuadrat::before {
  content: none;
}

/* Nummerierung in Bullet-Listen (rote Quadrate) ausblenden */
#content > p.HTextListeQuadrat .numbering-span,
#content > p.HTextListeQuadrat2 .numbering-span,
#content > p.HHinweisListeQuadrat .numbering-span {
  display: none !important;
}

/* =========================================
   Vor / Zurück – oberhalb des Menüs
   ========================================= */

.hb-page-nav-left {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 10px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 8px;
}

.hb-page-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--hb-red, #e2001a);
  background: #ffffff;
  color: var(--hb-red, #e2001a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease,
              color 0.2s ease,
              box-shadow 0.2s ease;
}

.hb-page-btn:hover:not(:disabled) {
  background: var(--hb-red, #e2001a);
  color: #ffffff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.hb-page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ============================
   Formelsymbole in der Kurzbezeichnung / Tabellen
   ============================ */

.hb-formel-symbol {
  max-height: 22px;
  width: auto;
  vertical-align: middle;
  display: inline-block;
}

/* Formelsymbole in Tabellen (zentriert in der Zelle) */
.hb-formel-symbol {
  display: block;
  margin: 0 auto;
  max-width: 60px;
  height: auto;
}

.hb-formel-unit {
  white-space: nowrap;
}

/* =========================================
   Hover-Mini-Vorschau neben der Navigation
   ========================================= */

#toc-preview {
  position: fixed;
  left: 340px;
  top: 140px;
  width: 320px;
  max-width: calc(100vw - 380px);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  border-radius: 18px;
  padding: 14px 16px 16px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.8);
  z-index: 9500;
  display: none;
  pointer-events: none;
}

#toc-preview.is-visible {
  display: block;
}

.toc-preview-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #f9fafb;
}

.toc-preview-text {
  font-size: 12px;
  line-height: 1.4;
  color: #e5e7eb;
  max-height: 7em;
  overflow: hidden;
}

.toc-preview-hint {
  font-size: 10px;
  margin-top: 6px;
  color: #9ca3af;
}

/* Vorschau und UI im Druck ausblenden / Layout optimieren */
@media print {
  /* Browser-Hintergrund egal, Seite wird weiß */
  body {
    background: #ffffff !important;
  }

  /* Rahmen / Schatten entfernen, volle Breite nutzen */
  #content-wrapper {
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 0 0 0 !important;
  }

  .container-fluid {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Alles „UI-artige“ ausblenden */
  .header,
  #navi,
  .back-to-top,
  #toc-preview,
  #qr-code-wrapper,
  .hb-page-nav-left,
  .search_buttons,
  #textSearch,
  #indexSearch {
    display: none !important;
  }

  /* Content selbst soll voll durchlaufen */
  #content {
    margin: 0 !important;
  }
}


/* ============================
   Flipbook CI
============================ */

#flipbook {
  background: #f5f5f7;
}

.flip-page {
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  padding: 32px;
}

.flip-page img {
  max-width: 100%;
  height: auto;
}

.turn-page-wrapper {
  background: transparent !important;
}
