/* HAINBUCH CI – Layout für Docuglobe-HTML-Export
   ersetzt die ursprüngliche layout.css
*/

:root {
    --hb-red: #e2001a;
    --hb-grey-verylight: #ededed;
    --hb-grey-light: #c6c6c6;
    --hb-grey: #9c9c9c;
    --hb-grey-dark: #717171;
    --hb-black: #000000;

}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue LT Com", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: var(--hb-grey-dark);
    background-color: var(--hb-grey-verylight);
}

/* Suchtreffer */

.highlight {
    background-color: #fff59d;
}

/* Header / Logo-Bereich oben */

.header {
    position: relative;
    margin: 16px auto 12px;
    max-width: 1400px;
    /* vorher: padding: 0 31px; */
    padding: 0 16px 0 31px;  /* links 31px für die Flucht, rechts 16px bis ans Quadrat */
    box-sizing: border-box;
}




.navbar-header {
    min-height: 64px;
    width: 100%;
    background-color: #ffffff;
    border-top: 6px solid var(--hb-red);
    border-bottom: 1px solid var(--hb-grey-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    gap: 12px;
    flex-wrap: wrap;
}

/* rotes Eck oben rechts im Header */

.header::after {
    content: "";
    position: absolute;
    top: 0;
    right: 16px;
    width: 22px;
    height: 22px;
    background-color: var(--hb-red);
}

.navbar-brand {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0;
    margin: 0;
}

#logo_header {
    height: 40px;
    width: auto;
    max-width: 100%;
}

/* Burger-Button für kleinere Screens */

.navbar-toggle {
    border: none;
    margin-left: auto;
    margin-right: 0;
    padding: 4px 6px;
    background: transparent;
}

.navbar-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--hb-grey);
    border-radius: 1px;
}

/* Suche-Buttons rechts im Header */

.search_buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    margin-left: auto;
    flex-wrap: wrap;
}

.search_buttons a {
    margin: 0;
    padding: 4px 8px;
    border-radius: 2px;
    border: 1px solid transparent;
    color: var(--hb-grey-dark);
}

.search_buttons a:hover,
.search_buttons a:focus {
    border-color: var(--hb-grey-light);
    background-color: #ffffff;
    text-decoration: none;
}

/* Grundlayout für Navigation + Inhalt */

.container-fluid {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 16px;
    box-sizing: border-box;
}

/* linke Navigation (Bootstrap: col-md-3) */

#navi.col-md-3 {
    background-color: #f7f7f7;
    border-right: 1px solid var(--hb-grey-light);
    padding: 16px 12px 24px;
    box-sizing: border-box;
}

/* rechte Inhaltsfläche (Bootstrap: col-md-9) */

.col-md-9 {
    padding: 0 0 0px 0px;  /* links 15px -> 16 + 15 = 31px, gleiche Flucht wie Header */
}


/* Navigationsbaum links */

.entry {
    background-color: transparent;
    padding: 2px 0;
}

.pair {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    gap: 4px;
}

.entry h3 {
    font-size: 13px;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

.entry.level-1 > .pair h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--hb-red); /* Top-Level immer rot */
}


.entry.level-2 h3,
.entry.level-3 h3 {
    font-size: 13px;
    color: var(--hb-black); /* Unterpunkte schwarz */
}


.entry .collapse {
    padding-left: 8px;
}

.entry .collapse-button {
    font-size: 14px;
    margin-left: 8px;
    color: var(--hb-grey);
}

.entry .glyphicon {
    font-size: 12px;
}

.entry .glyphicon a {
    width: 30px;
}

/* Link-Farben im Menü */
#navi a,
#navi a:visited {
    color: var(--hb-black);      /* Standard: schwarz */
    text-decoration: none;
}

/* Top-Level-Links erben explizit das Rot */
#navi .entry.level-1 > .pair h3 a {
    color: var(--hb-red);
}

/* Hover/Fokus: dezent in Rot */
#navi a:hover,
#navi a:focus {
    color: var(--hb-red);
    text-decoration: underline;
}


/* Inhaltsbereich (fluid, kein A4-Zwang) */

#content {
    position: relative;
    margin: 0 0 24px;
    background-color: #ffffff;
    padding: 20px 18px 28px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

/* rotes Eck im Inhalt */

#content::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background-color: var(--hb-red);
}



/* Bereich für Seitentitel */

#heading {
    margin-bottom: 18px;
}

/* Links / Mini-Inhaltsverzeichnis */

#links {
    margin: 0 0 24px;
}

/* Such- und Indexpanel (Textsuche / Index) – Desktop */

#textSearch,
#indexSearch {
    position: fixed;
    top: 120px;
    right: 24px;
    width: 320px;
    max-height: calc(100% - 140px);
    padding: 16px 18px;
    background-color: #ffffff;
    border: 1px solid var(--hb-grey-light);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    z-index: 1000;
    box-sizing: border-box;
}

#textSearch h2,
#indexSearch h2 {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--hb-grey-dark);
}

.navInputText {
    width: calc(100% - 80px);
    border-radius: 0;
    border: 1px solid var(--hb-grey-light);
    padding: 4px 6px;
    box-sizing: border-box;
}

.navInputButton {
    border-radius: 0;
}

/* =========================================
   Responsive-Anpassungen
   ========================================= */

@media (max-width: 1199px) {
    .header {
        max-width: 100%;
    }

    .container-fluid {
        max-width: 100%;
    }

    #textSearch,
    #indexSearch {
        right: 16px;
        width: 280px;
    }
}

/* bis 991px: Navi oben, Inhalt darunter */

@media (max-width: 991px) {

    .header {
        margin: 12px auto 8px;
        padding: 0 12px;
    }

    .navbar-header {
        padding: 8px 12px;
    }

    .header::after {
        right: 12px;
        width: 18px;
        height: 18px;
    }

    .container-fluid {
        padding: 0 12px;
    }

    #navi.col-md-3 {
        border-right: none;
        border-bottom: 1px solid var(--hb-grey-light);
        margin-bottom: 12px;
        padding: 12px 10px 16px;
    }

    .col-md-9 {
        padding: 12px 0 24px;
    }

    #content {
        padding: 18px 14px 24px;
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
    }

    #content::before {
        width: 16px;
        height: 16px;
    }

    #content::after {
        top: 18px;
        right: 20px;
        width: 130px;
        height: 34px;
    }

    #textSearch,
    #indexSearch {
        position: static;
        width: 100%;
        max-height: none;
        margin-top: 8px;
        margin-bottom: 8px;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }
}

/* bis 767px: Mobile */

@media (max-width: 767px) {

    body {
        font-size: 13px;
    }

    .navbar-header {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .navbar-brand {
        flex: 1 1 auto;
    }

    #logo_header {
        height: 32px;
    }

    .search_buttons {
        font-size: 16px;
        justify-content: flex-end;
        flex: 0 0 auto;
    }

    .container-fluid {
        padding: 0 8px;
    }

    #navi.col-md-3 {
        padding: 10px 8px 14px;
    }

    .entry h3 {
        font-size: 12px;
    }

    #content {
        padding: 16px 10px 20px;
        margin-bottom: 18px;
    }

    #content::before {
        width: 14px;
        height: 14px;
    }

    #content::after {
        top: 14px;
        right: 14px;
        width: 120px;
        height: 30px;
    }

    #links {
        margin-bottom: 16px;
    }

    #textSearch h2,
    #indexSearch h2 {
        font-size: 14px;
    }

    .navInputText {
        width: 100%;
        margin-bottom: 6px;
    }
}

/* sehr kleine Displays */

@media (max-width: 480px) {

    .navbar-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search_buttons {
        width: 100%;
        justify-content: flex-start;
    }

    #logo_header {
        max-width: 70%;
    }

    #content {
        padding: 14px 8px 18px;
    }

    #content::after {
        top: 10px;
        right: 10px;
        width: 110px;
        height: 26px;
    }

    #content::before {
        width: 12px;
        height: 12px;
    }
}


/* Inhaltsverzeichnis komplett ausblenden */
.HInhaltsverzeichnisberschrift,
.Verzeichnis1,
.Verzeichnis2,
.Verzeichnis3,
.Verzeichnis9 {
    display: none !important;
}
/* Mini-Inhaltsverzeichnis unterhalb der Seite ausblenden */
#links {
    display: none !important;
}

/* =========================
   Navigation rechts
   ========================= */
@media (min-width: 992px) {
    /* Navigation rechts statt links */
    .row > #navi.col-md-3 {
        float: right !important;
        border-right: none;
        border-left: 1px solid var(--hb-grey-light);
    }
}

