/* =========================================================
   Rethener Bildergeschichten – Stylesheet
   Klar & zeitgemäß, historische Fotos im Mittelpunkt · responsiv · hell/dunkel
   ========================================================= */

/* Schriften – vom eigenen Server (NICHT vom Google-CDN): keine Datenübertragung
   an Dritte, kein Einwilligungsbanner nötig. Variable Fonts: je eine Datei für
   alle Stärken. Lizenz: SIL Open Font License 1.1 (assets/fonts/OFL-*.txt). */
@font-face {
    font-family: 'Fraunces';
    src: url('../fonts/fraunces-latin.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-latin.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Farbidee: Die alten Fotos tragen das Historische – die Oberfläche bleibt
   klar und zeitgemäß. Warmes Ziegelrot als Hauptfarbe (ruhiger als Signalrot),
   Schieferblau als kühler Gegenakzent, dazu Weiß und neutrales Hellgrau. */
:root {
    --paper:      #f6f5f1;   /* Seitengrund: neutrales, leicht warmes Hellgrau */
    --paper-2:    #ecebe5;
    --ink:        #18212b;   /* Schrift: tiefes Blauschwarz */
    --ink-soft:   #4b5563;
    --line:       #dfddd5;
    --brand:      #b3312c;   /* Ziegelrot */
    --brand-2:    #c03a33;
    --on-brand:   #ffffff;   /* Text auf Markenfarbe */
    --accent:     #2f5873;   /* Schieferblau */
    --card:       #ffffff;
    --shadow:     0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .08);
    --shadow-hover: 0 2px 4px rgba(16, 24, 40, .06), 0 18px 40px rgba(16, 24, 40, .14);
    --overlay-oben:  rgba(16, 16, 20, .30);   /* Foto-Abdunklung für helle Schrift */
    --overlay-unten: rgba(16, 16, 20, .86);
    --grad-brand:  linear-gradient(135deg, #b3312c 0%, #8e2622 55%, #5f1b19 100%);
    --grad-akzent: linear-gradient(135deg, #2f5873 0%, #23445a 55%, #172d3d 100%);
    --auf-dunkel:      #f4f6f8;
    --auf-dunkel-soft: rgba(244, 246, 248, .86);
    --radius:     14px;
    --maxw:       1120px;
    --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-sans:  'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

:root { color-scheme: light; }

/* Dunkles Design – nur, wenn es über den Umschalter (☾) gewählt wurde.
   Hell ist Standard (gesetzt per Skript im <head>). */
:root[data-theme="dark"] {
    color-scheme: dark;
    --paper:    #121a23;   /* Schieferblau statt Braun-Grau */
    --paper-2:  #18222d;
    --ink:      #e8edf2;
    --ink-soft: #a9b4c2;
    --line:     #2a3644;
    --brand:    #f0857a;
    --brand-2:  #f5a096;
    --on-brand: #0f151c;
    --accent:   #8fb3cf;
    --card:     #1c2733;
    --shadow:   0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .32);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 44px rgba(0, 0, 0, .45);
}
/* Ohne JavaScript (kein data-theme): Geräteeinstellung folgen. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        color-scheme: dark;
        --paper:    #121a23;
        --paper-2:  #18222d;
        --ink:      #e8edf2;
        --ink-soft: #a9b4c2;
        --line:     #2a3644;
        --brand:    #f0857a;
        --brand-2:  #f5a096;
        --on-brand: #0f151c;
        --accent:   #8fb3cf;
        --card:     #1c2733;
        --shadow:   0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .32);
        --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 44px rgba(0, 0, 0, .45);
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.15; color: var(--ink); }
h1 { font-weight: 900; letter-spacing: -.01em; }
a { color: var(--brand); }
img { max-width: 100%; display: block; }

/* Sichtbarer Fokus für Tastaturnutzung (Maus-Klicks bleiben unberührt). */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
a:focus-visible, .btn:focus-visible, .rubrik-kachel:focus-visible,
.beitrag-karte a:focus-visible, .karte a:focus-visible { outline-offset: 3px; }

/* Dezentes Einblenden beim Scrollen – wird nur per JS aktiviert, damit die
   Inhalte ohne JavaScript sofort sichtbar sind. */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }

.skiplink {
    position: absolute; left: -999px; top: 0; z-index: 100;
    background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skiplink:focus { left: 0; }

/* ---------- Header / Navigation ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }

/* Auf dem Handy darf der Name umbrechen (sonst ist der Kopf breiter als der Bildschirm). */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: 0 1 auto; min-width: 0; }
/* Logo: schwarz auf transparent; im dunklen Design hell umgekehrt */
.brand-logo { height: 54px; width: auto; flex: none; }
:root[data-theme="dark"] .brand-logo { filter: invert(1) brightness(.92); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .brand-logo { filter: invert(1) brightness(.92); }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.1rem; }
.brand-text small { color: var(--ink-soft); font-size: .78rem; letter-spacing: .03em; }
@media (min-width: 561px) {
    .brand { flex: none; }
    .brand-text strong, .brand-text small { white-space: nowrap; }
}

/* Hauptmenü: einzeilig, ruhiger Aktiv-Zustand (getönt statt Vollfläche) */
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
    display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap;
    color: var(--ink-soft); font-weight: 500; font-size: .93rem; transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--paper-2); color: var(--ink); }
.site-nav a[aria-current="page"] {
    background: color-mix(in srgb, var(--brand) 13%, transparent); color: var(--brand); font-weight: 600;
}

/* Rundsymbole rechts: Suche, Hell/Dunkel, Menü */
.header-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn {
    display: grid; place-items: center; width: 40px; height: 40px; padding: 0; flex: none;
    border: 1px solid var(--line); border-radius: 999px; background: var(--card);
    color: var(--ink-soft); cursor: pointer; text-decoration: none; transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn[aria-current="page"] { color: var(--brand); background: color-mix(in srgb, var(--brand) 13%, var(--card)); }
.theme-toggle { display: none; }                       /* ohne JS wirkungslos -> ausblenden */
:root[data-theme] .theme-toggle { display: grid; }
.theme-toggle .ico-sonne, :root[data-theme="dark"] .theme-toggle .ico-mond { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sonne { display: block; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; align-items: center; justify-content: center; }
.nav-toggle span { width: 17px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Schmale Handys: Untertitel weglassen, Abstände straffen */
@media (max-width: 480px) {
    .header-inner { gap: 10px; }
    .brand { gap: 8px; }
    .brand-logo { height: 38px; }
    .brand-text strong { font-size: .95rem; }
    .brand-text small { display: none; }
    .header-tools { gap: 4px; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600;
    text-decoration: none; transition: .18s; border: 1.5px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-2); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--paper-2); }
/* Auf Fotos/dunklen Köpfen: helle Umriss-Schaltfläche (sonst dunkle Schrift auf dunklem Bild) */
.hero .btn-ghost, .doc-hero .btn-ghost, .rubrik-hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn-ghost:hover, .doc-hero .btn-ghost:hover, .rubrik-hero .btn-ghost:hover { background: rgba(255,255,255,.14); }

/* ---------- Hero ---------- */
.hero {
    position: relative; color: var(--auf-dunkel);
    background:
        linear-gradient(180deg, var(--overlay-oben), var(--overlay-unten)),
        var(--hero-bild) center/cover no-repeat;
}
.hero-inner { padding: 86px 16px 72px; max-width: 820px; }
.hero-kicker { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 600; opacity: .9; margin: 0 0 10px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); margin: 0 0 18px; color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.hero-lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); max-width: 60ch; margin: 0 0 28px; color: var(--auf-dunkel-soft); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--paper-2); }
.section-head { max-width: 70ch; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 12px; }
.section-intro { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }

/* ---------- Karten ---------- */
.karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.karte {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}
.karte:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.karte-feature { grid-column: 1 / -1; flex-direction: row; }
.karte-bild { display: block; flex: 1 1 45%; min-height: 220px; overflow: hidden; }
.karte-bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.karte-feature:hover .karte-bild img { transform: scale(1.04); }
.karte-text { padding: 26px; flex: 1 1 55%; }
.karte-label { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 600; color: var(--accent); margin: 0 0 8px; }
.karte-text h3 { font-size: 1.4rem; margin: 0 0 10px; }
.karte-text h3 a { text-decoration: none; color: var(--ink); }
.karte-text h3 a:hover { color: var(--brand); }
.karte-text p { color: var(--ink-soft); margin: 0 0 14px; }
.mehr { font-weight: 600; text-decoration: none; }
.mehr:hover { text-decoration: underline; }
.karte-soon { opacity: .72; }
.karte-soon .karte-label { color: var(--ink-soft); }

/* ---------- Eckpunkte ---------- */
.eckpunkte { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: eck; }
.eckpunkte li {
    display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: baseline;
    background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px;
}
.eck-jahr { font-family: var(--font-serif); font-weight: 600; color: var(--brand); font-size: 1.05rem; }
.eck-text { color: var(--ink); }
.eckpunkte--doc li { background: transparent; border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; }

/* ---------- Dokument-Seite ---------- */
.doc-hero {
    color: var(--auf-dunkel);
    background:
        linear-gradient(180deg, var(--overlay-oben), var(--overlay-unten)),
        var(--hero-bild) center 30%/cover no-repeat;
    padding: 72px 0 56px;
}
.doc-hero h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); color: #fff; margin: 0 0 16px; max-width: 18ch; }
.doc-hero-lead { max-width: 62ch; font-size: 1.12rem; color: var(--auf-dunkel-soft); }

.doc-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 40px; padding-bottom: 72px; max-width: 820px; }
.doc-section { margin-bottom: 56px; scroll-margin-top: 84px; }
.doc-section h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.doc-section h3 { font-size: 1.3rem; margin: 30px 0 10px; color: var(--brand); }
.doc-section p { margin: 0 0 16px; }
.doc-section .lead { color: var(--ink-soft); font-size: 1.08rem; }

/* Inhaltsverzeichnis */
.toc {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px 26px; margin-bottom: 48px; box-shadow: var(--shadow);
}
.toc h2 { font-size: 1.1rem; margin: 0 0 10px; border: none; padding: 0; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }

/* Zitat */
.zitat {
    margin: 24px 0; padding: 18px 24px; border-left: 4px solid var(--accent);
    background: var(--card); border-radius: 0 10px 10px 0; box-shadow: var(--shadow);
    font-family: var(--font-serif); font-style: italic; font-size: 1.12rem; color: var(--ink);
}
.zitat cite { display: block; margin-top: 10px; font-size: .9rem; font-style: normal; color: var(--ink-soft); }

/* ---------- Galerie ---------- */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.galerie-item { margin: 0; }
.galerie-btn {
    position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line);
    border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--card);
}
.galerie-btn img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .35s; }
.galerie-btn:hover img { transform: scale(1.05); }
.galerie-jahr {
    position: absolute; left: 10px; bottom: 10px; background: rgba(15,21,28,.82); color: #fff;
    padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600;
}
.galerie figcaption { font-size: .88rem; color: var(--ink-soft); margin-top: 8px; }
.galerie figcaption strong { display: block; color: var(--ink); font-weight: 600; }

/* ---------- Zeitstrahl ---------- */
.zeitstrahl { margin-top: 20px; }
.zs-epoche { margin-bottom: 34px; }
.zs-epoche-titel {
    font-size: 1.15rem; color: var(--accent); margin: 0 0 14px;
    text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}
.zs-liste { list-style: none; margin: 0; padding: 0; position: relative; }
.zs-liste::before {
    content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line);
}
.zs-eintrag { position: relative; padding: 0 0 22px 36px; }
.zs-punkt {
    position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
    background: var(--brand); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--brand);
}
.zs-jahr { font-family: var(--font-serif); font-weight: 600; color: var(--brand); margin: 0; font-size: .98rem; }
.zs-titel { font-size: 1.08rem; margin: 2px 0 6px; }
.zs-text { margin: 0; color: var(--ink-soft); }

/* ---------- Ein Ort, viele Leben (Querverbindungen) ----------
   Stationen eines Ortes als Kette: breit = waagerechte Leiste (scrollbar),
   schmal = senkrecht. Die Station des aktuellen Beitrags ist ziegelrot. */
.ort {
    margin: 0 0 24px; padding: 20px 20px 14px; background: var(--card);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.doc-section .ort-titel { margin: 0 0 2px; color: var(--ink); font-size: 1.25rem; }
.doc-section .ort-unter { margin: 0 0 16px; color: var(--ink-soft); font-size: .95rem; }
.ort-kette {
    list-style: none; margin: 0; padding: 0 0 8px; display: flex; gap: 12px;
    overflow-x: auto; scroll-snap-type: x proximity;
}
.ort-station { position: relative; flex: 0 0 188px; padding-top: 24px; scroll-snap-align: start; }
.ort-station::before {                       /* Verbindungslinie zur nächsten Station */
    content: ""; position: absolute; top: 8px; left: 16px; right: -12px; height: 2px;
    background: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.ort-station:last-child::before { right: auto; width: 0; }
.ort-station::after {                        /* Punkt */
    content: ""; position: absolute; top: 2px; left: 10px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--card); border: 2px solid var(--accent);
}
.ort-station--hier::after { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.ort-karte {
    display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 14px;
    background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
    color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s;
}
a.ort-karte:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.ort-station--hier .ort-karte { background: color-mix(in srgb, var(--brand) 9%, var(--card)); border-color: var(--brand); }
.ort-jahr { font-family: var(--font-serif); font-weight: 600; color: var(--brand); font-size: .95rem; }
.ort-name { font-size: 1rem; line-height: 1.25; }
.ort-text { color: var(--ink-soft); font-size: .87rem; line-height: 1.45; }
.ort-ziel { margin-top: auto; padding-top: 6px; color: var(--accent); font-size: .8rem; font-weight: 600; }
.ort-marke {
    margin-top: auto; align-self: flex-start; padding: 2px 9px; border-radius: 999px;
    background: var(--brand); color: var(--on-brand); font-size: .74rem; font-weight: 600;
}
@media (max-width: 640px) {
    .ort { padding: 16px 14px 8px; }
    .ort-kette { flex-direction: column; gap: 10px; overflow: visible; }
    .ort-station { flex: none; padding: 0 0 0 30px; }
    .ort-station::before { top: 18px; bottom: -12px; left: 8px; right: auto; width: 2px; height: auto; }
    .ort-station:last-child::before { display: none; }
    .ort-station::after { top: 14px; left: 2px; }
}

/* ---------- Karte ---------- */
.karte-rahmen {
    position: relative; height: min(68vh, 560px); min-height: 360px; border-radius: var(--radius);
    border: 1px solid var(--line); background: var(--paper-2); overflow: hidden; box-shadow: var(--shadow);
}
.karte-zustimmung {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
    max-width: 640px; margin: 0 auto; padding: 24px;
}
.karte-zustimmung h2 { margin: 0 0 10px; }
.karte-zustimmung p { color: var(--ink-soft); }
.karte-zustimmung .btn { align-self: flex-start; }
.karte-flaeche { position: absolute; inset: 0; cursor: grab; touch-action: none; overflow: hidden; outline-offset: -3px; }
.karte-flaeche:active { cursor: grabbing; }
.karte-kacheln img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; user-select: none; pointer-events: none; }
:root[data-theme="dark"] .karte-kacheln img { filter: brightness(.82) contrast(1.05); }
.karte-punkte { position: absolute; inset: 0; pointer-events: none; }
.karte-marker {
    position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; padding: 0; pointer-events: auto;
    border-radius: 50%; border: 3px solid #fff; background: var(--brand); cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .45); transition: width .12s, height .12s, left .12s, top .12s;
}
.karte-marker--ungefaehr { border-style: dashed; background: color-mix(in srgb, var(--brand) 70%, #fff); }
.karte-marker:hover, .karte-marker.ist-aktiv { width: 30px; height: 30px; left: -15px; top: -15px; background: var(--accent); }
.karte-zoom { position: absolute; left: 12px; top: 12px; display: grid; gap: 6px; }
.karte-zoom button {
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
    color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
}
.karte-attribution {
    position: absolute; right: 0; bottom: 0; padding: 2px 8px; font-size: .75rem;
    background: color-mix(in srgb, var(--card) 85%, transparent); border-top-left-radius: 8px; color: var(--ink);
}
.karte-info {
    position: absolute; right: 12px; top: 12px; width: min(320px, calc(100% - 24px)); max-height: calc(100% - 48px);
    overflow: auto; padding: 14px 16px; border-radius: 12px; background: var(--card); color: var(--ink);
    border: 1px solid var(--line); border-top: 3px solid var(--brand); box-shadow: var(--shadow-hover); font-size: .92rem;
}
.karte-info img { width: 100%; max-height: 170px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.karte-info h3 { margin: 0 0 4px; font-size: 1.1rem; }
.karte-info p { margin: 0 0 8px; }
.karte-info a { display: block; margin-top: 4px; font-weight: 600; }
.karte-info-meta { color: var(--ink-soft); font-size: .85rem; }
.karte-info-zu {
    position: absolute; right: 8px; top: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%;
    background: var(--paper-2); color: var(--ink); font-size: 1.2rem; cursor: pointer;
}
@media (max-width: 640px) {
    .karte-info { left: 8px; right: 8px; top: auto; bottom: 24px; width: auto; max-height: 55%; }
}
.karte-fuss { margin: 10px 0 0; font-size: .88rem; color: var(--ink-soft); }
.karte-hinweis { margin: 6px 0 0; font-size: .85rem; color: var(--ink-soft); }
.link-knopf {
    padding: 0; border: 0; background: none; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer;
}
.ortsliste-thema { margin: 26px 0 10px; color: var(--accent); }
.ortsliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.ortseintrag {
    display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; scroll-margin-top: 90px;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.ortseintrag img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
.ortseintrag h4 { margin: 0 0 2px; font-family: var(--font-serif); font-size: 1.05rem; }
.ortseintrag p { margin: 0 0 6px; font-size: .92rem; }
.ort-meta { color: var(--ink-soft); }
.ort-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .88rem; }
.ortseintrag:target { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.karten-hinweis-box { margin: 0 0 40px; font-size: .95rem; }

/* ---------- Mitmachen & Termine ---------- */
.termin-liste { display: grid; gap: 14px; margin: 0 0 20px; }
.termin {
    padding: 16px 18px; background: var(--card); border: 1px solid var(--line);
    border-left: 4px solid var(--brand); border-radius: 12px; box-shadow: var(--shadow);
}
.doc-section .termin h3 { margin: 4px 0 6px; color: var(--ink); font-size: 1.15rem; }
.doc-section .termin p { margin: 0 0 6px; }
.termin-datum { font-family: var(--font-serif); font-weight: 600; color: var(--brand); }
.termin-ort { color: var(--ink-soft); font-size: .95rem; }
.termin-liste--vergangen .termin { border-left-color: var(--line); box-shadow: none; opacity: .85; }
.termin-liste--vergangen .termin-datum { color: var(--ink-soft); }
.kontakt-box {
    margin: 0 0 18px; padding: 16px 18px; border-radius: 12px;
    background: color-mix(in srgb, var(--accent) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
}
.doc-section .kontakt-box p { margin: 0 0 8px; }
.doc-section .kontakt-box p:last-child { margin: 0; }
.termin-band { background: var(--grad-brand); color: #fff; }
.termin-band-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 22px; }
.termin-band-kicker {
    margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18);
    font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
}
.termin-band-text { flex: 1 1 320px; }
.termin-band-plakat img { width: 78px; height: auto; border-radius: 4px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.termin-band h2 { margin: 0 0 4px; color: #fff; font-size: clamp(1.2rem, 2.6vw, 1.6rem); }
.termin-band p { margin: 0; color: rgba(255, 255, 255, .92); }
.termin-band .btn-primary { background: #fff; color: #8e2622; }
.termin-band .btn-primary:hover { background: #fdecea; }
.termin--mit-bild { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; }
.termin-plakat img { width: 120px; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.portraet { margin: 0 0 18px; }
.portraet img { width: 100%; max-height: 360px; object-fit: cover; object-position: 50% 30%; border-radius: 12px; }
.portraet figcaption { margin-top: 6px; font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 480px) { .termin--mit-bild { grid-template-columns: 1fr; } }
.mitmachen-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.mitmachen-band p { margin: 0; max-width: 60ch; color: var(--ink-soft); }

/* ---------- Pastoren ---------- */
.pastoren { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pastoren li {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
.pa-name { font-weight: 600; font-family: var(--font-serif); }
.pa-zeit { color: var(--ink-soft); }

/* Quellen */
.doc-quellen ul { color: var(--ink-soft); }
.doc-quellen .hinweis { font-size: .92rem; color: var(--ink-soft); background: var(--paper-2); padding: 14px 18px; border-radius: 10px; }
.zurueck { margin-top: 24px; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: #111a23; color: #dfe5eb; padding: 48px 0; margin-top: 20px; }
:root[data-theme="dark"] .site-footer { background: #0c1218; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .site-footer { background: #0c1218; } }
.footer-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; }
.footer-title { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; margin: 0 0 4px; color: #fff; }
.footer-sub { margin: 0; color: #9aa7b5; }
.footer-meta p { margin: 0 0 8px; font-size: .9rem; color: #b4bfcb; }
.footer-copy { opacity: .75; }
.site-footer a { color: #fff; text-underline-offset: 3px; }
.site-footer a:hover { color: #f5a096; }
.footer-recht { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: .92rem; }
.footer-recht span { color: #6f7c8b; }
.footer-recht a[aria-current="page"] { text-decoration: none; font-weight: 600; }

/* Rechtstexte (Impressum, Datenschutz): ruhigere Überschriften, engerer Rhythmus */
.rechtstext .doc-section { margin-bottom: 34px; }
.rechtstext .doc-section h2 { font-size: 1.3rem; padding-bottom: 8px; border-bottom-width: 1px; }
.rechtstext ul { padding-left: 1.2em; }
.rechtstext li { margin-bottom: 4px; }

/* ---------- Lightbox / Diashow ---------- */
.lightbox {
    position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
    background: rgba(8,12,16,.985); padding: 72px 20px 32px;
}
.lightbox[hidden] { display: none; }
.lb-bar {
    position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center;
    justify-content: space-between; gap: 12px; padding: 14px 18px;
}
.lb-zaehler { color: #dfe5eb; font-size: .95rem; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.lb-tools { display: flex; gap: 10px; }
.lb-btn {
    border: none; cursor: pointer; background: rgba(255,255,255,.12); color: #fff;
    border-radius: 999px; transition: background .2s;
}
.lb-btn:hover { background: rgba(255,255,255,.28); }
.lb-auto { padding: 9px 16px; font: 600 .9rem/1 var(--font-sans, inherit); }
.lb-auto.laeuft { background: var(--accent); }
.lb-auto.laeuft:hover { background: var(--accent); filter: brightness(1.08); }
.lb-close { width: 44px; height: 44px; font-size: 1.8rem; line-height: 1; border-radius: 50%; }
.lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px;
    border: none; cursor: pointer; background: rgba(255,255,255,.12); color: #fff;
    font-size: 2.3rem; line-height: 1; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; transition: background .2s;
}
.lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-nav[hidden], .lb-btn[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 1000px; max-height: 90vh; display: flex; flex-direction: column; }
.lb-figure img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 6px; }
.lb-figure figcaption { color: #dfe5eb; text-align: center; margin-top: 14px; font-size: .95rem; }

/* ---------- Verweis- und Glossar-Links im Fließtext ---------- */
.doc-body a.verweis {
    color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px;
    text-underline-offset: 2px; font-weight: 500;
}
.doc-body a.verweis:hover { color: var(--accent); }
.doc-body a.glossar {
    color: inherit; text-decoration: none; cursor: help;
    border-bottom: 1px dotted var(--accent);
}
.doc-body a.glossar:hover { color: var(--accent); border-bottom-style: solid; }

/* Glossar-Tooltip (wird per assets/js/main.js eingeblendet) */
.glossar-tip {
    position: absolute; z-index: 80; width: max-content; max-width: min(320px, calc(100vw - 20px));
    padding: 12px 14px 10px; border-radius: 12px;
    background: var(--card); color: var(--ink);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
    border-top: 3px solid var(--accent);
    box-shadow: 0 2px 6px rgba(16, 24, 40, .08), 0 14px 34px rgba(16, 24, 40, .18);
    font-size: .9rem; line-height: 1.45;
    opacity: 0; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease;
    pointer-events: auto;
}
.glossar-tip.ist-sichtbar { opacity: 1; transform: none; }
.glossar-tip--unten { transform: translateY(-4px); }
.glossar-tip::after {                          /* Pfeil zum Begriff */
    content: ""; position: absolute; left: var(--pfeil-x, 50%); bottom: -7px; width: 12px; height: 12px;
    background: var(--card); transform: translateX(-50%) rotate(45deg);
    border-right: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
}
.glossar-tip--unten::after { bottom: auto; top: -8px; border: none; background: var(--accent); }
.gt-titel { display: block; font-family: var(--font-serif); font-size: 1rem; margin-bottom: 3px; color: var(--accent); }
.gt-text { display: block; color: var(--ink); }
.gt-hinweis { display: block; margin-top: 8px; font-size: .76rem; color: var(--ink-soft); letter-spacing: .02em; }
@media (prefers-reduced-motion: reduce) {
    .glossar-tip, .glossar-tip--unten { transition: none; transform: none; }
}

/* ---------- Glossar-Seite ---------- */
.glossar-liste { margin: 0; padding: 0; }
.glossar-eintrag { padding: 20px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.glossar-eintrag:first-child { border-top: none; }
.glossar-eintrag dt { font-family: var(--font-serif, inherit); font-size: 1.2rem; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.glossar-eintrag dd { margin: 0; color: var(--ink-soft); max-width: 60ch; }
.glossar-eintrag:target dt { color: var(--accent); }
.glossar-eintrag:target { background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 8px; padding-left: 14px; padding-right: 14px; }

/* ---------- Responsive ---------- */
/* Navigation: unter 1000 px als ausklappbares Menü (die Leiste braucht ≈ 940 px). */
/* Sechs Menüpunkte + Logo: etwas enger, bevor das Klappmenü greift */
@media (max-width: 1180px) and (min-width: 1081px) {
    .site-nav a { padding: 8px 9px; }
}
@media (max-width: 1080px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute; top: 100%; left: 0; right: 0; background: var(--paper);
        border-bottom: 1px solid var(--line); padding: 10px 16px 18px;
        display: none; box-shadow: var(--shadow); z-index: 90;
    }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; gap: 4px; }
    .site-nav a { padding: 12px 14px; }
}

@media (max-width: 760px) {
    .karte-feature { flex-direction: column; }
    .karte-bild { min-height: 200px; }

    .eckpunkte li { grid-template-columns: 1fr; gap: 2px; }
    .toc ol { columns: 1; }
    .footer-inner { grid-template-columns: 1fr; }

    .lb-figure img { max-height: 70vh; }
    .lb-nav { width: 44px; height: 44px; font-size: 1.9rem; }
    .lb-prev { left: 6px; }
    .lb-next { right: 6px; }
    .lb-auto { padding: 8px 12px; font-size: .82rem; }
    .lb-bar { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}

/* =========================================================
   Archiv-Komponenten (Rubriken, Beitragslisten, Tabellen)
   ========================================================= */

/* ---- Rubriken-Kacheln (Startseite) ---- */
.rubrik-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.rubrik-kachel {
    position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 210px;
    padding: 24px; border-radius: var(--radius); text-decoration: none; overflow: hidden;
    color: var(--auf-dunkel); border: 1px solid transparent; box-shadow: var(--shadow);
    background:
        linear-gradient(180deg, rgba(16,16,20,.15), var(--overlay-unten)),
        var(--kachel-bild) center/cover no-repeat;
    transition: transform .2s, box-shadow .2s;
}
.rubrik-kachel:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.rubrik-kachel--leer { background: var(--grad-brand); }
.rubrik-kachel--leer:nth-child(even) { background: var(--grad-akzent); }
.rk-symbol {
    display: grid; place-items: center; width: 46px; height: 46px;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.26);
    border-radius: 13px; backdrop-filter: blur(3px);
}
.rk-symbol .rk-icon { width: 25px; height: 25px; color: #fff; }
.rk-titel { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; margin-top: auto; }
.rk-kurz { color: var(--auf-dunkel-soft); font-size: .92rem; }
.rk-anzahl {
    margin-top: 10px; align-self: flex-start; background: rgba(255,255,255,.16);
    padding: 3px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600;
}

/* ---- Beitragslisten (Rubrik + Startseite) ---- */
.beitrag-liste { display: grid; gap: 20px; }
.beitrag-karte {
    display: grid; grid-template-columns: 240px 1fr; gap: 0;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.beitrag-karte:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.bk-bild { display: block; overflow: hidden; background: var(--paper-2); }
.bk-bild img { width: 100%; height: 100%; object-fit: cover; min-height: 180px; transition: transform .4s; }
.beitrag-karte:hover .bk-bild img { transform: scale(1.04); }
.bk-bild--leer { display: grid; place-items: center; background: var(--grad-brand); color: var(--auf-dunkel); }
.bk-bild--leer span { font-size: 3rem; opacity: .85; }
.bk-bild--leer .rk-icon { width: 54px; height: 54px; color: var(--auf-dunkel); opacity: .9; }
.bk-text { padding: 24px; }
.bk-zeit { text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; font-weight: 600; color: var(--accent); margin: 0 0 8px; }
.bk-zeit a { color: var(--accent); text-decoration: none; }
.bk-zeit a:hover { text-decoration: underline; }
.bk-text h2 { font-size: 1.4rem; margin: 0 0 10px; }
.bk-text h2 a { text-decoration: none; color: var(--ink); }
.bk-text h2 a:hover { color: var(--brand); }
.bk-teaser { color: var(--ink-soft); margin: 0 0 14px; }
.beitrag-karte--geplant { opacity: .78; }
.badge-geplant {
    display: inline-block; vertical-align: middle; margin-left: 8px; font-family: var(--font-sans);
    font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
    background: var(--paper-2); color: var(--ink-soft); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line);
}

/* ---- Rubrik-Kopf ---- */
.rubrik-hero {
    color: var(--auf-dunkel); padding: 64px 0 48px;
    background: linear-gradient(180deg, var(--overlay-oben), var(--overlay-unten)), var(--hero-bild) center/cover no-repeat;
}
.rubrik-hero--plain, .doc-hero--plain { background: var(--grad-brand); }
.rubrik-hero h1 { color: #fff; font-size: clamp(1.9rem, 5vw, 3rem); margin: 0 0 12px; }

/* ---- Beitrags-Kopf Zusätze ---- */
.doc-hero-unter { color: var(--auf-dunkel-soft); font-size: 1.05rem; margin: 0 0 10px; font-style: italic; }
.doc-hero .hero-kicker a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.5); }

/* ---- Hinweis „geplant" ---- */
.hinweis-geplant {
    background: var(--paper-2); border: 1px dashed var(--brand); color: var(--ink-soft);
    padding: 16px 20px; border-radius: 10px; margin-bottom: 32px;
}

/* ---- Daten-Tabelle (generisch) ---- */
.tabelle-wrap { overflow-x: auto; }
.daten-tabelle { width: 100%; border-collapse: collapse; }
.daten-tabelle th, .daten-tabelle td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.daten-tabelle th { font-family: var(--font-serif); color: var(--brand); font-size: .95rem; }
.daten-tabelle tbody tr:hover { background: var(--paper-2); }
.daten-tabelle td:first-child { font-weight: 500; }

/* ---- Responsive Ergänzungen ---- */
@media (max-width: 680px) {
    .beitrag-karte { grid-template-columns: 1fr; }
    .bk-bild img { min-height: 200px; }
    .bk-bild--leer { min-height: 120px; }
}

/* ---------- Suche ---------- */
.suche-form { display: flex; gap: 10px; max-width: 560px; margin-top: 14px; }
.suche-feld {
    flex: 1; min-width: 0; padding: 12px 18px; border-radius: 999px; font: inherit;
    border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.suche-feld::placeholder { color: var(--ink-soft); }
.suche-feld:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.suche-knopf {
    padding: 12px 22px; border: none; border-radius: 999px; cursor: pointer;
    background: var(--brand); color: var(--on-brand); font: 600 1rem/1 var(--font-sans);
}
.suche-knopf:hover { background: var(--brand-2); }
.such-info { color: var(--ink-soft); margin: 0 0 24px; }
.doc-body .such-liste { display: grid; gap: 2px; margin: 0 0 30px; }
.such-treffer { padding: 18px 0; border-top: 1px solid var(--line); }
.such-treffer:first-child { border-top: none; }
.such-rubrik { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 600; color: var(--accent); margin: 0 0 4px; }
.such-treffer h2 { font-size: 1.2rem; margin: 0 0 6px; }
.such-treffer h2 a { color: var(--ink); text-decoration: none; }
.such-treffer h2 a:hover { color: var(--brand); }
.such-snippet { color: var(--ink-soft); margin: 0; max-width: 72ch; }
mark { background: rgba(255, 200, 70, .38); color: inherit; padding: 0 2px; border-radius: 3px; }
