html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Site-specific additions */
/* Hero adjustments for comfortable spacing */
.hero { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.hero .card { border: 0; }
.hero .card .card-body { padding: 1.25rem; }
.avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.15); box-shadow: 0 6px 18px rgba(16,32,64,0.08); }
.card .card-title { margin-bottom: .5rem; }
.site-header .brand { font-weight: 600; }
.tools .card { transition: transform .12s ease, box-shadow .12s ease; }
.tools .card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(20,40,80,0.08); }

/* Section and typography spacing */
section.py-5, .section { padding-top: 3rem; padding-bottom: 3rem; }
h1.display-4 { line-height: 1.05; margin-bottom: .5rem; }
h2 { margin-top: 1rem; margin-bottom: 1rem; }
.lead { margin-bottom: 1rem; }

/* Feature card spacing tweaks */
.feature-card { padding: 1.5rem; }
.feature-card .display-6 { margin-bottom: .5rem; }
.feature-card p { min-height: 3.6rem; }
/* Feature card styles for homepage */
.feature-card { background: #fff; border-radius: 12px; border: 1px solid rgba(20,40,80,0.04); box-shadow: 0 6px 18px rgba(16,32,64,0.04); }
.feature-card h5 { font-weight: 600; }
.feature-card .display-6 { font-size: 2.1rem; }
.feature-card p { min-height: 3.2rem; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.material-symbols-outlined {
    flex: 0 0 1.5rem;
    width: 1.5rem;
}

.knowledge-base-navigation {
    min-width: 220px;
    max-width: 320px;
}

.kb-copy-wrap {
    position: relative;
}

.kb-copy {
    position: absolute;
    top: .5rem;
    right: .5rem;
}

.kb-copy-wrap pre {
    padding-right: 7rem;
    white-space: pre-wrap;
}

@media print {
    .kb-copy {
        display: none;
    }
}

/* Abschnitte voneinander absetzen */
.section {
    border-top: 1px solid var(--bs-border-color);
}

.section-alt {
    background-color: var(--bs-light);
}

/* Akzentstrich unter Überschriften */
.section-title {
    margin-bottom: 1.25rem;
}

    .section-title::after {
        content: "";
        display: block;
        width: 48px;
        height: 3px;
        margin-top: .5rem;
        border-radius: 2px;
        background-color: var(--bs-primary);
    }

/* Karten etwas lebendiger */
.card.tool-card,
.feature-card {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    background-color: #fff;
    transition: transform .15s ease, box-shadow .15s ease;
}

    .card.tool-card:hover,
    .feature-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .08);
    }

.kb-tree {
    font-size: 0.925rem;
}

.kb-tree-node {
    position: relative;
}

.kb-tree-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 2.1rem;
    padding: 0.15rem 0.4rem;

    border-bottom: 1px solid transparent;
}

    .kb-tree-row:hover {
        background-color: var(--bs-tertiary-bg);
        border-bottom-color: currentColor;
    }
        .kb-tree-row:hover:not(:has(.kb-tree-link)) {
            border-bottom-color: transparent;
        }

    .kb-tree-row.active {
        background-color: var(--bs-primary-bg-subtle);
        color: var(--bs-primary-text-emphasis);
    }

        .kb-tree-row.active .kb-tree-link {
            color: var(--bs-primary);
            font-weight: 700;
        }

.kb-tree-toggle,
.kb-tree-toggle-placeholder {
    display: inline-flex;
    flex: 0 0 1.25rem;
    width: 1.25rem;
    height: 1.5rem;
    align-items: center;
    justify-content: center;
}

.kb-tree-toggle {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.kb-tree-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.15s ease;
}

.kb-tree-toggle[aria-expanded="true"] .kb-tree-chevron {
    transform: rotate(90deg);
}

.kb-tree-link {
    flex: 1;
    color: var(--bs-body-color);
    font-weight: 600;
    text-decoration: none;
}

.kb-tree-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.2rem 0;

}

.kb-tree-link {
    flex: 1;
    color: inherit;
    text-decoration: none;
}

/*.kb-tree-row:hover .kb-tree-link,
.kb-tree-row:hover .kb-tree-label {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}*/

    .kb-tree-link span,
    .kb-tree-label span {
        overflow-wrap: anywhere;
    }

.kb-tree-children {
    margin-left: 0.85rem;
    padding-left: 0.65rem;
    border-left: 1px solid var(--bs-border-color);
}

.kb-card .card {
    border-radius: 1rem;
    transition: transform .2s ease, box-shadow .2s ease;
}

.kb-card:hover .card,
.kb-card:focus-visible .card {
    transform: translateY(-4px);
    box-shadow: 0 .75rem 1.5rem rgba(var(--bs-body-color-rgb), .12) !important;
}

.kb-card:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 3px;
    border-radius: 1rem;
}

/* Icon-Badge */
.kb-card__icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .875rem;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .1);
    transition: background .2s ease, color .2s ease;
}

    .kb-card__icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }

.kb-card:hover .kb-card__icon {
    background: var(--bs-primary);
    color: #fff;
}

/* Beschreibung auf 3 Zeilen begrenzen */
.kb-card__text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pfeil rutscht beim Hover nach rechts */
.kb-card__more {
    color: var(--bs-primary);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

    .kb-card__more svg {
        transition: transform .2s ease;
    }

.kb-card:hover .kb-card__more svg {
    transform: translateX(4px);
}

/* Suche */
.kb-search__icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary-color);
    pointer-events: none;
}


.kb-tree-search .form-control {
    border-radius: 2rem;
}

@media (min-width: 576px) {
    .kb-search {
        max-width: 24rem;
    }
}

.kb-search .form-control {
    border-radius: 2rem;
}

/* Listenansicht */
#kbGrid.kb-view-list > .kb-item {
    width: 100% !important;
    flex: 0 0 100%;
}

#kbGrid.kb-view-list .card-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem !important;
}

#kbGrid.kb-view-list .kb-card__icon {
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

#kbGrid.kb-view-list .kb-card__text {
    -webkit-line-clamp: 2;
}

#kbGrid.kb-view-list .kb-card:hover .card {
    transform: translateX(4px);
}

.kb-tree-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .25rem .4rem;
}

    .kb-tree-tool .material-symbols-outlined {
        font-size: 1.1rem;
        line-height: 1;
    }

.kb-tree-search {
    position: relative;
    flex-wrap: nowrap;
}

/* Lupe als Overlay im Input */
.kb-tree-search__icon {
    position: absolute;
    left: .5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: flex;
    color: var(--bs-secondary-color);
    pointer-events: none;
}

/* Buttons optisch an das Input angleichen */
.kb-tree-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .25rem .45rem;
    border-color: var(--bs-border-color);
    color: var(--bs-secondary-color);
}

    .kb-tree-tool:hover {
        background: var(--bs-tertiary-bg);
        border-color: var(--bs-border-color);
        color: var(--bs-body-color);
    }

    .kb-tree-tool .material-symbols-outlined {
        font-size: 1.1rem;
        line-height: 1;
    }

    /* Trenner zwischen den beiden Buttons weicher */
    .kb-tree-tool + .kb-tree-tool {
        margin-left: 0;
    }

/* Fokus: Rahmen ueber die ganze Gruppe sichtbar halten */
.kb-tree-search .form-control:focus {
    z-index: 4;
}

.kb-overview {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
}

    .kb-overview.kb-view-grid {
        grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    }

/* Ueberschriften ueber die volle Breite */
.kb-overview-heading {
    grid-column: 1 / -1;
    margin-top: 1rem;
}

    .kb-overview-heading[data-level="0"] {
        margin-top: 2rem;
        padding-bottom: .5rem;
        border-bottom: 1px solid var(--bs-border-color);
    }

    .kb-overview-heading:first-child {
        margin-top: 0;
    }

.kb-overview .list-group-item {
    border-radius: .5rem;
    margin: 0;
    height: 100%;
}

.kb-overview.kb-view-grid .kb-overview-item__text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kb-overview-search {
    max-width: 28rem;
}

.kb-overview-search__icon {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    display: flex;
    color: var(--bs-secondary-color);
    pointer-events: none;
}

.kb-overview-search .form-control {
    padding-left: 2.25rem;
}

    .kb-overview-search .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: .25rem .45rem;
    }

    .kb-overview-search .material-symbols-outlined {
        font-size: 1.1rem;
        line-height: 1;
    }

.ulb {
    background: linear-gradient(90deg, #4f46e5, #7c3aed 55%, #c026d3);
    color: #fff;
    box-shadow: 0 4px 18px rgba(79, 70, 229, .35);
    position: relative;
    z-index: 1030;
}

    .ulb.d-flex {
        display: block !important; /* Wrapper bleibt Block, das Layout steckt im Inner */
    }

.ulb-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.ulb-icon {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ulb-aa {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.ulb-globe {
    position: absolute;
    right: -6px;
    bottom: -6px;
    padding: 2px;
    border-radius: 50%;
    background: #fff;
    color: #4f46e5;
    box-sizing: content-box;
}

.ulb-body {
    flex: 1 1 auto;
    min-width: 0;
}

.ulb-text {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
}

.ulb-cta {
    flex: 0 0 auto;
    background: #fff;
    color: #4f46e5;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .12s, box-shadow .12s;
}

    .ulb-cta:hover {
        color: #4338ca;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    }

.ulb-close {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 26px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
}

    .ulb-close:hover {
        color: #fff;
    }

@media (max-width: 640px) {
    .ulb-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .ulb-body {
        flex: 1 1 calc(100% - 110px);
    }

    .ulb-cta {
        order: 3;
        margin-left: 60px;
    }

    .ulb-close {
        position: absolute;
        top: 6px;
        right: 8px;
    }
}