/* Grundlegende Variablen */
:root {
    --primary-color: #2c3e50;
    --link-color: #3498db;
    --background-color: #fff;
    --text-color: #333;
    --border-color: #eee;
    --menu-background: rgba(255, 255, 255, 0.98);
    --max-width: 45rem;
    --side-padding: 1rem;
}

/* Reset und Basis-Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    line-height: 1.7;
}

body {
    font-family: Georgia, serif;
    color: var(--text-color);
    background: var(--background-color);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--side-padding);
}

/* Header und Navigation */
.header {
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.nav {
    width: 100%;
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

/* Burger Menu */
.burger-menu {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1000;
}

.burger-menu:hover {
    opacity: 0.8;
}

.burger-line {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--primary-color);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.menu-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--menu-background);
    padding: 5rem 2rem 2rem;
    flex-direction: column;
    align-items: center;
    z-index: 999;
    overflow-y: auto;
}

.menu-container.active {
    display: flex;
}

/* Burger Animation */
.burger-menu.active .burger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Kapitel-spezifisches Styling */
.chapter {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

.chapter h1 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
}

/* Obere Kapitel-Navigation */
.chapter-nav-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 0.5rem 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chapter-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.8rem;
}

.chapter-link:hover {
    text-decoration: underline;
}

.chapter-link-prev {
    text-align: left;
}

.chapter-link-next {
    text-align: right;
}

/* Kapitel-Inhalt */
.chapter-content {
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 2rem 0;
}

.chapter-content p {
    margin-bottom: 1.5rem;
}

.chapter-content p:first-of-type::first-letter {
    float: left;
    font-size: 3.5rem;
    padding: 0.1em 0.1em 0 0;
    line-height: 0.7;
}

/* Untere Kapitel-Navigation */
.chapter-nav-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

.prev-chapter,
.next-chapter {
    font-size: 1rem;
}

.prev-chapter a,
.next-chapter a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.prev-chapter a:hover,
.next-chapter a:hover {
    background-color: var(--border-color);
    text-decoration: none;
}

/* Hauptmenü */
.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.menu-item {
    padding: 0.5rem 0;
    text-align: center;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

.menu-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
}

.menu-item.active a {
    font-weight: bold;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

/* Utility Klassen */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Allgemeine Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

.home-link {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--primary-color);
}

/* Druckversion */
@media print {
    .header, 
    .footer, 
    .chapter-nav-top,
    .chapter-nav-bottom,
    .burger-menu {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .container,
    .chapter {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    a {
        text-decoration: none;
        color: var(--text-color);
    }

    .chapter-content p:first-of-type::first-letter {
        font-size: inherit;
        float: none;
        padding: 0;
        line-height: inherit;
    }
}

.biography {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

.biography h1 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    text-align: center;
}

.biography-image {
    margin: 2rem auto;
    max-width: 400px;
    text-align: center;
}

.biography-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.biography-image figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.biography-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-top: 2rem;
}

.biography-content p {
    margin-bottom: 1.5rem;
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .biography {
        padding: 1rem;
    }
    
    .biography h1 {
        font-size: 1.75rem;
    }
    
    .biography-image {
        max-width: 100%;
    }
}



/* Mobile Anpassungen */
@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .container,
    .chapter {
        padding: 1rem;
    }

    .chapter h1 {
        font-size: 1.75rem;
    }

    .chapter-content {
        font-size: 1.1rem;
    }

    .chapter-nav-bottom {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        text-align: center;
    }
        .biography {
        padding: 0;
    }
    
    .biography-image {
        max-width: 300px;
        margin: 1rem auto;
    }
    
    .biography-image img {
        box-shadow: none;
    }

}
