/* Globale Stile und Farbvariablen */
:root {
    --primary-color: #007bff; /* Ein freundliches, aber professionelles Blau */
    --secondary-color: #343a40; /* Dunkles Grau für Text */
    --background-color: #f8f9fa; /* Sehr heller Grauton für den Hintergrund */
    --surface-color: #ffffff; /* Weiß für Content-Boxen wie Header/Footer */
    --border-color: #e9ecef;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Basis-Setup */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--secondary-color);
    background-color: var(--background-color);
}

.container {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.75rem;
    font-weight: bold;
    margin: 0;
    color: var(--primary-color);
}

.site-logo a {
    text-decoration: none;
    color: inherit;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 15px;
}

nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

nav a:hover,
nav a.active {
    background-color: var(--primary-color);
    color: var(--surface-color);
}


/* Hauptinhalt */
main {
    padding: 2.5rem 0;
}

article h1 { font-size: 2.6rem; color: var(--secondary-color); line-height: 1.2; }
article h2 { font-size: 2.1rem; border-bottom: 3px solid var(--primary-color); padding-bottom: 10px; margin-top: 2.5rem; }
article h3 { font-size: 1.8rem; color: var(--primary-color); margin-top: 2rem; }
article h4 { font-size: 1.5rem; margin-top: 1.5rem; }

/* Inhaltsverzeichnis (TOC) */
.table-of-contents {
    background-color: #eef5ff;
    border-left: 5px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}
.table-of-contents p { margin-top: 0; font-weight: bold; }
.table-of-contents ul { list-style-type: none; padding-left: 0; }
.table-of-contents a { text-decoration: none; color: #0056b3; }
.table-of-contents a:hover { text-decoration: underline; }

/* Bilder */
.content-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 1.5rem 0;
}

/* Spezifische HTML-Tags */
strong, b { font-weight: 600; }
em, i { font-style: italic; }

blockquote {
    border-left: 4px solid var(--border-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #5a6268;
}

cite {
    display: block;
    text-align: right;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

ul, ol { padding-left: 1.5rem; }

details {
    background: #fdfdff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}
details summary { font-weight: bold; cursor: pointer; }

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--border-color);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    font-size: 0.9rem;
}
footer a { color: var(--surface-color); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Mobile Optimierung */
@media (max-width: 820px) {
    header .container { flex-direction: column; gap: 1rem; }
    nav ul { flex-wrap: wrap; justify-content: center; }
    article h1 { font-size: 2.1rem; }
    article h2 { font-size: 1.8rem; }
    article h3 { font-size: 1.5rem; }
    article h4 { font-size: 1.3rem; }
}