/* Allgemeine Grundstile */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #eef6ee;
    color: #000000;
    line-height: 1.6;
}

h1, h2, h3 {
    margin: 0 0 15px 0;
}

h1 {
    font-size: 2.2rem;
}
 
h2 {
    color: #2e7d32;
    font-size: 1.5rem;
    position: relative;
}
h3 {
    color: #54a955;
    font-size: 1.7rem;    
}

/* Hero-Bereich */
.hero {
    background: #bafabc;
    color: #2e7d32;
    padding: 60px 20px;
    text-align: center;
}

/* Container für Inhalt */
.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 10px 20px;
}

/* Karten-Layout */
.card {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    overflow: hidden;
}

.flex-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.text-block {
    flex: 3;
}

.img-block {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.side-img {
    width: 100%;
    max-height: 200px;
    border-radius: 10px;
    object-fit: cover;
}

/* Footer */
.footer {
    background: #2e7d32;
    color: white;
    text-align: center;
    padding: 25px;
    margin-top: 40px;
}

/* Inhaltsverzeichnis */
.toc {
    max-width: 1100px;
    margin: 25px auto;
    padding: 0 20px;
}

.toc ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 0;
}

.toc a {
    display: block;
    padding: 12px 16px;
    background: #2e7d32;
    color: white;
    text-decoration: none;
    border-radius: 14px;
    text-align: center;
    font-size: 0.95rem;
    transition: background 0.25s ease, transform 0.2s ease;
}

.toc a:hover {
    background: #1b4f22;
    transform: translateY(-3px);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Media Queries für Smartphones */
@media(max-width: 800px) {
    .flex-row {
        flex-direction: column;
    }
    .img-block {
        width: 100%;
    }
    .side-img {
        max-height: none;
    }
}

@media(max-width: 600px) {
    .toc ul {
        grid-template-columns: 1fr;
    }
    .toc a {
        font-size: 1rem;
        padding: 14px;
    }
}
/* TOC Container */
.toc-container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 20px;
    position: relative;
}

/* Toggle Button */
.toc-button {
    display: inline-block;
    background: #2e7d32;
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    transition: background 0.25s;
}

.toc-button:hover {
    background: #1b4f22;
}

/* Verstecktes Input */
.toc-toggle {
    display: none;
}

/* TOC standardmäßig versteckt */
.toc {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* TOC sichtbar wenn Checkbox aktiviert */
.toc-toggle:checked + .toc-button + .toc {
    max-height: 2000px; /* groß genug für alle Punkte */
    margin-top: 12px;
}

/* TOC Liste */
.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin: 8px 0;
}

.toc a {
    display: block;
    padding: 10px 15px;
    background: #2e7d32;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.25s;
}

.toc a:hover {
    background: #1b4f22;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Optional: auf Desktop TOC immer sichtbar */
@media(min-width: 900px) {
    .toc {
        max-height: none;
    }
    .toc-button {
        display: none;
    }
    .toc ul {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
    }
}

/* Bild im Fließtext (Vorwort) */
.inline-img {
    float: right;
    width: 220px;
    margin: 0 0 15px 20px;
    border-radius: 10px;
}

/* Mobile: Bild über dem Text */
@media (max-width: 800px) {
    .inline-img {
        float: none;
        display: block;
        width: 100%;
        max-width: 320px;
        margin: 0 auto 15px auto;
    }
}

.blocksatz {
  text-align: justify;
  hyphens: auto;
}
