/* ==================================================
   0) Farbvariablen (Hessen-basiert)
   ================================================== */
:root {
    --bg-main: #f5f5f5;
    /* gebrochenes Weiß */
    --bg-section: #ffffff;
    /* Inhalte */
    --hessen-red: #c8102e;
    /* seriöses Rot */
    --hessen-blue: #003a8f;
    /* Wappen-Blau */
    --hessen-gold: #d4af37;
    /* Akzent */
    --text-main: #222;
    --text-muted: #666;
}

/* ==================================================
   1) Grundlage
   ================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
}

/* ==================================================
   2) Seiten-Grid
   ================================================== */
.page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
}

/* ==================================================
   3) Header
   ================================================== */
header {
    background-color: var(--hessen-red);
    color: #fff;
    padding: 1rem 1.25rem;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

header .subtitle {
    margin: 0.25rem 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* ==================================================
   4) Navigation
   ================================================== */
nav {
    background-color: var(--hessen-blue);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0.5rem 1.25rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease-in-out;
}

nav a:hover {
    color: var(--hessen-gold);
}

nav a.active {
    color: var(--hessen-red);
    font-weight: 600;
}

nav a:focus-visible {
    outline: 2px solid var(--hessen-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ==================================================
   5) MAIN: Content-Bereich
   ================================================== */
.content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    padding: 1rem;
    min-height: 0;
    /* extrem wichtig für Scroll */
}

/* ==================================================
   6) Spalten (PDF + Kommentar)
   ================================================== */
.bericht,
.kommentar {
    background-color: var(--bg-section);
    border-radius: 6px;
    padding: 1rem;
    min-height: 0;
    min-width: 0;
    /* verhindert Überlauf */
    overflow: auto;
    /* eigener Scrollbereich */
}

/* PDF.js / iframe */
.bericht iframe,
.bericht canvas {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ==================================================
   7) Kommentare (optional vorbereitet)
   ================================================== */
.comment {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

.comment.active {
    background-color: #fbeaec;
    border-left: 4px solid var(--hessen-red);
    padding-left: 0.75rem;
}

/* ==================================================
   Einspaltige Seiten: Außenabstand
   ================================================== */
.content-single {
    padding: 1.5rem 1rem;
    /* oben/unten | links/rechts */
}

/* Auf größeren Screens etwas mehr Luft */
@media (min-width: 900px) {
    .content-single {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Der eigentliche Textblock bleibt zentriert */
.single-content {
    background-color: var(--bg-section);
    border-radius: 6px;
    padding: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

/* ==================================================
   8) Footer
   ================================================== */
footer {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    background-color: #eee;
    color: var(--text-muted);
}

/* ==================================================
   9) Mobile
   ================================================== */
@media (max-width: 900px) {
    .content {
        grid-template-columns: 1fr;
    }
}