/* ==========================================================================
   Content Page Styles (Datenschutz, Impressum, etc.)
   Scoped via .content-page-layout / .content-body
   ========================================================================== */

/* Two-column layout: TOC + Content */
.content-page-layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

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

/* --- Table of Contents (TOC) --- */
.content-toc {
    position: sticky;
    top: 100px;
    width: 250px;
    min-width: 250px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding: 1.25rem;
    background: #f2f7f4;
    border-radius: 10px;
    border: 1px solid #c8ddd1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.content-toc .toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #c8ddd1;
}



.content-toc .toc-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #2d5f41;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.content-toc .toc-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #2d5f41;
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.content-toc .toc-toggle:hover {
    background: #c8ddd1;
}

.content-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-toc li.toc-main {
    margin-bottom: 0.2rem;
}

.content-toc li.toc-sub {
    margin-bottom: 0.15rem;
    padding-left: 0.75rem;
}

.content-toc a {
    color: #4a7c5f;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.1rem;
}

.content-toc a:hover {
    color: #2d5f41;
    background: #ddeee5;
}

.content-toc a.active {
    color: #2d5f41;
    font-weight: 600;
    background: #ddeee5;
}

/* --- Content Typography --- */
.content-body h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.45rem;
    border-bottom: 2px solid #c8ddd1;
    line-height: 1.3;
}

.content-body h2:first-child {
    margin-top: 0;
}

.content-body h3 {
    font-size: 1.08rem;
    font-weight: 600;
    color: #1e3a2f;
    margin-top: 1.8rem;
    margin-bottom: 0.65rem;
    line-height: 1.3;
}

.content-body .teil-heading {
    font-size: 1.5rem;
    color: #2d5f41;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    padding: 0.6rem 1rem;
    background: #f2f7f4;
    border-left: 4px solid #2d5f41;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.content-body p {
    margin-bottom: 0.85rem;
    line-height: 1.75;
    text-align: left;
    color: #333;
}

.content-body p:empty {
    display: none;
}

.content-body ul,
.content-body ol {
    padding-left: 2.5rem;
    margin-bottom: 1.3rem;
}

.content-body ul {
    list-style: disc;
}

.content-body ol {
    list-style: decimal;
}

.content-body li {
    margin-bottom: 0.65rem;
    padding-left: 0.3rem;
    line-height: 1.65;
    color: #333;
    text-align: left;
}

.content-body li strong {
    color: #0f172a;
}

.content-body a {
    color: #2d5f41;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.content-body a:hover {
    color: #1a3d28;
}

/* Stand-Datum Badge */
.content-body .datenschutz-stand {
    display: inline-block;
    background: #f2f7f4;
    color: #4a7c5f;
    font-size: 0.82rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #c8ddd1;
    margin-bottom: 1.5rem;
}

/* Verantwortlicher Box */
.content-body .verantwortlicher-box {
    background: #f8fafb;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

/* Platzhalter-Markierung */
.content-body .placeholder-hint {
    background: #fef3c7;
    color: #92400e;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    font-weight: 500;
    font-size: 0.88rem;
}

/* --- Responsive / Mobile --- */
@media (max-width: 992px) {
    .content-page-layout {
        flex-direction: column;
        gap: 0;
    }

    .content-toc {
        position: static;
        width: 100%;
        min-width: unset;
        max-height: none;
        margin-bottom: 1.5rem;
        padding: 0.9rem 1rem;
    }

    .content-toc .toc-toggle {
        display: block;
    }

    .content-toc ul.collapsed {
        display: none;
    }

    .content-body h2 {
        font-size: 1.15rem;
        margin-top: 2rem;
    }

    .content-body h3 {
        font-size: 1rem;
        margin-top: 1.5rem;
    }

    .content-body .teil-heading {
        font-size: 1.25rem;
        margin-top: 2.5rem;
    }

    .content-body ul,
    .content-body ol {
        padding-left: 2rem;
    }

    .content-body p,
    .content-body li {
        font-size: 0.95rem;
    }
}