/* ---------- Blog: Übersicht und Beitragsseiten mit Seitenleiste ---------- */

.blog-page,
.blog-index-page {
    background-color: #fff;

    /* style.css setzt overflow-x: hidden. Damit wird der Body zum
       Scrollbereich — das macht klebende Elemente zickig und laesst das
       Scrollen nachfedern. „clip" schneidet genauso ab, ohne einen zweiten
       Scrollbereich aufzumachen. Browser ohne Unterstuetzung ignorieren die
       Zeile und behalten das bisherige Verhalten. */
    overflow-x: clip;
}

/* ----- Beitragsseite: Leiste links, Text rechts ----- */

/* Die Leiste sitzt am linken Rand, der Text steht mittig im Rest — sonst
   klebt bei breiten Fenstern alles links und rechts bleibt eine leere Haelfte. */
.blog-layout {
    display: flex;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    padding: 100px 0 0 24px;
}

/* Die Huelle klebt, die Liste darin blaettert — nur so koennen die Hinweise
   ueber der Liste stehen bleiben. */
.blog-side {
    position: sticky;
    top: 92px;
    flex: 0 0 280px;
    width: 280px;
    height: calc(100vh - 112px);
}

.blog-sidebar {
    height: 100%;
    overflow-y: auto;

    /* Ohne das springt am Ende der Liste die ganze Seite weiter, sobald man
       ueber der Leiste rollt. */
    overscroll-behavior: contain;
    /* Oben kein Innenabstand: sonst laeuft die Liste in dem Streifen ueber dem
       Kopf durch, der stehen bleibt. Der Abstand steht im Kopf selbst. */
    padding: 0 20px 48px 0;
    border-right: 1px solid #e8e8ed;
}

/* Die Leiste ist Beiwerk: eine schmale Bildlaufleiste, die erst beim Zeigen
   auffaellt. */
.blog-sidebar::-webkit-scrollbar {
    width: 6px;
}

.blog-sidebar::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
}

.blog-sidebar:hover::-webkit-scrollbar-thumb {
    background: #d1d1d6;
}

/* Der Kopf bleibt beim Blättern durch siebzig Links stehen: er sagt, wo man
   ist, und führt zurück zur Übersicht. */
.blog-sidebar-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 10px 12px;
    margin-bottom: 8px;
    border-radius: 0 0 12px 12px;
    background: #fff;
    text-decoration: none;
    color: #1d1d1f;
}

.blog-sidebar-head:hover {
    background: #f5f5f7;
}

.blog-sidebar-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #1d1d1f;
    color: #fff;
    font-size: 14px;
}

.blog-sidebar-head strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
}

.blog-sidebar-head small {
    display: block;
    font-size: 12px;
    color: #86868b;
}

.blog-nav-group {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 20px 0 6px 10px;
}

/* Die Linie ersetzt eine Einrückung: die Beiträge gehören sichtbar zur Gruppe. */
.blog-nav-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 10px;
    padding-left: 12px;
    border-left: 1px solid #e3e3e6;
}

.blog-nav-item {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.35;
    color: #6e6e73;
    text-decoration: none;
}

.blog-nav-item:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}

.blog-nav-item.active {
    background: #f0f0f3;
    color: #1d1d1f;
    font-weight: 500;
}

.blog-main {
    flex: 1 1 auto;
    min-width: 0;
}

.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 820px;
    margin: 0 auto;
    padding: 22px 32px 0;
    font-size: 14px;
    color: #86868b;
}

.blog-breadcrumb a {
    color: #86868b;
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    color: #1d1d1f;
}

.blog-sidebar-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: #f5f5f7;
    border: 1px solid #e3e3e6;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #1d1d1f;
    cursor: pointer;
}

/* Eine Zeilenlaenge, die sich lesen laesst — mittig in der freien Flaeche. */
.blog-article {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 32px 96px;
}

.blog-article h1 {
    font-size: 40px;
    letter-spacing: -0.01em;
}

.blog-article h2 {
    font-size: 27px;
    margin: 52px 0 14px;
    letter-spacing: -0.01em;
}

.blog-article h3 {
    font-size: 18px;
    margin: 28px 0 8px;
}

.blog-article .faq-item h3 {
    margin-top: 0;
}

.blog-article ol {
    margin: 0 0 24px 22px;
}

.blog-article ol li {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.blog-article hr {
    display: none; /* der Abschluss steht als eigener Abschnitt unter dem Text */
}

/* ----- Weiterlesen und Blaettern, im Ton der Karten auf /anwesenheitsliste ----- */

.blog-related {
    background: #f5f5f7;
    border: 1px solid #e3e3e6;
    border-radius: 20px;
    padding: 28px 32px 32px;
    margin-top: 64px;
}

.blog-related h2 {
    font-size: 20px;
    margin: 0 0 20px;
}

.blog-related-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.blog-related-links a {
    display: block;
    background: #fff;
    border: 1px solid #e3e3e6;
    border-radius: 14px;
    padding: 16px 18px;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.blog-related-links a:hover {
    border-color: #c9c9ce;
    transform: translateY(-1px);
}

.blog-related-links strong {
    display: block;
    font-size: 16px;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.blog-related-links span {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    color: #6e6e73;
}

.blog-pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

.blog-pager-link {
    flex: 0 1 48%;
    display: block;
    border: 1px solid #e3e3e6;
    border-radius: 14px;
    padding: 14px 18px;
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.blog-pager-link.next {
    text-align: right;
}

.blog-pager-link:hover {
    border-color: #c9c9ce;
}

.blog-pager-link span {
    display: block;
    font-size: 13px;
    color: #86868b;
    margin-bottom: 2px;
}

.blog-pager-link strong {
    display: block;
    font-size: 16px;
    color: #1d1d1f;
}

/* ----- Übersicht ----- */

.blog-hero {
    max-width: 1320px;
    margin: 0 auto;
    padding: 152px 32px 24px;
}

.blog-hero h1 {
    font-size: 44px;
    line-height: 1.15;
    margin-bottom: 24px;
}

.blog-hero .article-lead {
    margin-bottom: 32px;
}

.blog-hero-links .download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 0;
    padding: 14px 24px;
    font-size: 15px;
    color: #fff;
}

.blog-index {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 32px 96px;
}

.blog-index-group {
    margin-bottom: 56px;
}

.blog-index-group h2 {
    font-size: 26px;
    margin-bottom: 20px;
}

.blog-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f5f5f7;
    border: 1px solid #e3e3e6;
    border-radius: 18px;
    padding: 24px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.blog-card h3 {
    font-size: 18px;
    line-height: 1.35;
    color: #1d1d1f;
    margin: 0;
}

.blog-card p {
    font-size: 15px;
    line-height: 1.55;
    color: #6e6e73;
    margin: 0;
}

.blog-card-more {
    margin-top: auto;
    font-size: 14px;
    font-weight: 500;
    color: #4384d1;
}

.blog-card-more i {
    font-size: 12px;
    margin-left: 4px;
}

@media (max-width: 1024px) {
    .blog-layout {
        display: block;
        padding: 92px 20px 0;
    }

    .blog-related,
    .blog-pager {
        margin-top: 40px;
    }

    .blog-pager {
        flex-direction: column;
    }

    .blog-pager-link,
    .blog-pager-link.next {
        flex: 1 1 auto;
        text-align: left;
    }

    /* Auf dem Telefon liegt die Liste ueber dem Text und bleibt eingeklappt:
       neunzig Beitragslinks vor dem ersten Satz liest niemand. */
    .blog-sidebar {
        position: static;
        width: auto;
        max-height: none;
        padding: 0;
        border-right: 0;
        border-bottom: 1px solid #e3e3e6;
        margin-bottom: 8px;
        display: none;
    }

    .blog-sidebar.open {
        display: block;
        padding-bottom: 24px;
    }

    .blog-sidebar-toggle {
        display: inline-flex;
    }

    .blog-breadcrumb {
        max-width: none;
        padding: 8px 0 0;
        flex-wrap: wrap;
    }

    .blog-article {
        max-width: none;
        padding: 16px 0 72px;
    }

    .blog-related {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 120px 20px 16px;
    }

    .blog-hero h1 {
        font-size: 32px;
    }

    .blog-hero .article-lead {
        font-size: 18px;
    }

    .blog-index {
        padding: 16px 20px 60px;
    }

    .blog-index-group h2 {
        font-size: 22px;
    }

    .blog-cards {
        grid-template-columns: 1fr;
    }

    .blog-article h2 {
        font-size: 25px;
    }
}

/* ---------- Hinweise zum Blättern ---------- */

/* Über und unter der Beitragsliste: eine Pille, die zeigt, dass dort noch
   etwas steht — und die auf Klick eine Bildschirmhöhe weiterrückt. */
.blog-scroll-hint {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e3e3e6;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    color: #6e6e73;
    font-size: 12px;
    cursor: pointer;
    z-index: 2;
}

.blog-scroll-hint:hover {
    color: #1d1d1f;
    border-color: #c9c9ce;
}

.blog-scroll-hint[hidden] {
    display: none;
}

.blog-scroll-hint.up {
    top: 72px; /* unter dem Kopf, der stehen bleibt */
}

.blog-scroll-hint.down {
    bottom: 12px;
}

/* Der Weg zurück an den Anfang. Erscheint erst, wenn er gebraucht wird. */
.blog-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: #4384d1;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 12px 30px rgba(67, 132, 209, 0.35);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 900;
}

.blog-top:hover {
    background: #5c94d7;
    transform: translateY(-2px);
}

.blog-top[hidden] {
    display: none;
}

/* ---------- Glossar ---------- */

/* Der Begriff bleibt Fließtext — nur der kleine Pfeil sagt, dass eine
   Erklärung dahinter steht. */
.glossary-term {
    cursor: pointer;
    border-bottom: 1px dotted #b9b9c0;
}

.glossary-term:focus-visible {
    outline: 2px solid #4384d1;
    outline-offset: 2px;
    border-radius: 3px;
}

.glossary-term::after {
    content: "\f08e"; /* arrow-up-right-from-square */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.62em;
    color: #86868b;
    margin-left: 3px;
    vertical-align: sub;
}

.glossary-term:hover {
    border-bottom-color: #4384d1;
}

.glossary-term:hover::after {
    color: #4384d1;
}

.glossary {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.glossary[hidden] {
    display: none;
}

.glossary-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(29, 29, 31, 0.45);
    backdrop-filter: blur(2px);
}

body.glossary-open {
    overflow: hidden;
}

.glossary-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(680px, 100%);
    max-height: min(760px, 100%);
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.glossary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 28px 16px;
}

.glossary-head h2 {
    font-size: 24px;
    margin: 0 0 4px;
}

.glossary-head p {
    font-size: 14px;
    color: #86868b;
    margin: 0;
}

.glossary-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e3e3e6;
    border-radius: 999px;
    background: #fff;
    color: #1d1d1f;
    font-size: 14px;
    cursor: pointer;
}

.glossary-close:hover {
    background: #f5f5f7;
}

.glossary-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 28px 14px;
    border-bottom: 1px solid #e8e8ed;
}

.glossary-letters a {
    min-width: 26px;
    padding: 3px 6px;
    border-radius: 7px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #6e6e73;
    text-decoration: none;
}

.glossary-letters a:hover {
    background: #f0f0f3;
    color: #1d1d1f;
}

.glossary-list {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 28px 28px;
}

.glossary-letter h3 {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 12px 0 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #86868b;
}

.glossary-entry {
    border-bottom: 1px solid #f0f0f3;
}

.glossary-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: #1d1d1f;
    text-align: left;
    cursor: pointer;
}

.glossary-entry-head i {
    font-size: 12px;
    color: #86868b;
    transition: transform 0.2s ease;
}

.glossary-entry.open .glossary-entry-head i {
    transform: rotate(180deg);
}

.glossary-entry.open .glossary-entry-head {
    color: #4384d1;
}

.glossary-entry-body {
    padding: 0 0 16px;
}

.glossary-entry-body p {
    font-size: 16px;
    line-height: 1.6;
    color: #1d1d1f;
    margin: 0 0 8px;
}

.glossary-entry-body .glossary-source {
    font-size: 14px;
    color: #86868b;
    margin: 0;
}

/* Ein Begriff in der Erklärung eines anderen führt nicht weiter — sonst
   springt das Fenster im Kreis. */
.glossary-entry-body .glossary-term {
    border-bottom: 0;
    cursor: default;
    pointer-events: none;
}

.glossary-entry-body .glossary-term::after {
    content: none;
}

@media (max-width: 768px) {
    .glossary {
        padding: 0;
        align-items: flex-end;
    }

    .glossary-panel {
        width: 100%;
        max-height: 88vh;
        border-radius: 22px 22px 0 0;
    }

    .glossary-head,
    .glossary-letters,
    .glossary-list {
        padding-left: 20px;
        padding-right: 20px;
    }

    .blog-top {
        right: 18px;
        bottom: 18px;
    }
}
