/* /unfall-ratgeber/ratgeber.css
 *
 * Eigener Stil fuer die Ratgeber-Sektion.
 *
 * WARUM EIGENSTAENDIG:
 * Die App-Startseite ist ein Launcher: Kacheln, kurze Wege, alles auf
 * Handlung getrimmt. Ein Ratgeber hat die entgegengesetzte Aufgabe, er
 * wird gelesen. Deshalb hier eigene Schriftgroessen, eine Spalte,
 * begrenzte Zeilenlaenge und heller Untergrund statt Farbverlauf.
 *
 * Uebernommen aus der App bleiben nur Schrift und Markenfarbe, damit es
 * nicht wie eine fremde Seite wirkt. --brand-color setzt der Mandant,
 * die Datei greift sie nur auf.
 *
 * KEINE Bibliothek, kein Framework. Die Sektion soll auf einem Handy am
 * Strassenrand laden, nicht auf einem Buerorechner.
 */

:root {
    --rat-navy:      #131E2B;
    --rat-color:     var(--brand-color, #2c5a85);
    --rat-red:       #E63946;
    --rat-green:     #16A34A;
    --rat-amber:     #F4A528;
    --rat-text:      #1B2430;
    --rat-muted:     #5C6B7A;
    --rat-bg:        #FFFFFF;
    --rat-bg-soft:   #F6F8FA;
    --rat-border:    #DFE5EC;
    --rat-radius:    12px;
    --rat-breite:    720px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body.rat {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--rat-bg);
    color: var(--rat-text);
    /* 17px statt 16: der Ratgeber wird auf dem Handy gelesen, oft im
       Stehen und oft in Eile. Kleiner geht hier nicht. */
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.rat-wrap { max-width: var(--rat-breite); margin: 0 auto; padding: 0 20px 80px; }

/* ── Kopfzeile ──────────────────────────────────────────────────── */
.rat-top {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rat-border);
}
.rat-top-in {
    max-width: var(--rat-breite); margin: 0 auto;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px;
}
.rat-top img { height: 30px; width: auto; border-radius: 7px; }
.rat-top-name { font-size: 14px; font-weight: 700; color: var(--rat-navy); }
.rat-top-spacer { margin-left: auto; }
.rat-top a.rat-top-cta {
    font-size: 13px; font-weight: 700; text-decoration: none;
    color: #fff; background: var(--rat-red);
    padding: 8px 14px; border-radius: 999px;
}

/* ── Brotkrumen ─────────────────────────────────────────────────── */
.rat-krumen { font-size: 13px; color: var(--rat-muted); padding: 18px 0 0; }
.rat-krumen a { color: var(--rat-muted); text-decoration: none; }
.rat-krumen a:hover { text-decoration: underline; }

/* ── Titel und Vorspann ─────────────────────────────────────────── */
.rat-gruppe {
    display: inline-block; margin: 22px 0 10px;
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--rat-color); background: #EDF3F9;
    padding: 5px 11px; border-radius: 999px;
}
h1.rat-h1 {
    font-size: 30px; line-height: 1.25; font-weight: 800;
    color: var(--rat-navy); letter-spacing: -.02em;
    /* Polster fuer Unterlaengen, dieselbe Falle wie im BESA-Hero. */
    padding-bottom: .06em;
}
.rat-meta { font-size: 13px; color: var(--rat-muted); margin-top: 12px; }

/* Kurzantwort ganz oben: fuer den, der es eilig hat, und fuer
   Sprachmodelle, die den ersten Absatz als Antwort zitieren. */
.rat-kurz {
    margin: 22px 0 30px; padding: 18px 20px;
    background: var(--rat-bg-soft);
    border-left: 4px solid var(--rat-color);
    border-radius: 0 var(--rat-radius) var(--rat-radius) 0;
    font-size: 17px; line-height: 1.65;
}
.rat-kurz strong { color: var(--rat-navy); }

/* ── Inhaltsverzeichnis ─────────────────────────────────────────
   Nur bei laengeren Artikeln. Auf schmalen Displays zugeklappt, damit
   es zwischen Kurzantwort und erstem Absatz nicht den halben Bildschirm
   belegt. Die Regel dafuer steht unten in der Medienabfrage. */
.rat-toc {
    margin: 0 0 30px; padding: 14px 18px;
    border: 1px solid var(--rat-border); border-radius: var(--rat-radius);
    background: #fff;
}
.rat-toc summary {
    font-size: 14px; font-weight: 700; color: var(--rat-navy);
    cursor: pointer; list-style: none;
}
.rat-toc summary::-webkit-details-marker { display: none; }
.rat-toc summary::after { content: "+"; float: right; color: var(--rat-color); font-weight: 800; }
.rat-toc[open] summary::after { content: "–"; }
.rat-toc ol { margin: 12px 0 0; padding-left: 20px; }
.rat-toc li { margin-bottom: 6px; font-size: 15px; }
.rat-toc a { color: var(--rat-text); text-decoration: none; }
.rat-toc a:hover { color: var(--rat-color); text-decoration: underline; }

/* Sprungziele nicht unter die klebende Kopfzeile schieben. */
.rat-wrap h2[id] { scroll-margin-top: 70px; }

/* ── Fliesstext ─────────────────────────────────────────────────── */
.rat-wrap h2 {
    font-size: 22px; line-height: 1.3; font-weight: 800;
    color: var(--rat-navy); margin: 38px 0 12px; letter-spacing: -.01em;
}
.rat-wrap h3 {
    font-size: 18px; line-height: 1.35; font-weight: 700;
    color: var(--rat-navy); margin: 26px 0 8px;
}
.rat-wrap p { margin-bottom: 16px; }
.rat-wrap a { color: var(--rat-color); text-decoration: underline; text-underline-offset: 2px; }
.rat-wrap ul, .rat-wrap ol { margin: 0 0 16px 0; padding-left: 22px; }
.rat-wrap li { margin-bottom: 7px; }
.rat-wrap strong { font-weight: 700; color: var(--rat-navy); }

/* ── Schrittfolge ───────────────────────────────────────────────── */
.rat-schritte { list-style: none; padding: 0; margin: 22px 0 26px; counter-reset: ratschritt; }
.rat-schritt {
    position: relative; padding: 0 0 20px 46px; margin: 0;
    border-left: 2px solid var(--rat-border); margin-left: 15px;
}
.rat-schritt:last-child { border-left-color: transparent; padding-bottom: 0; }
.rat-schritt::before {
    counter-increment: ratschritt; content: counter(ratschritt);
    position: absolute; left: -16px; top: -2px;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--rat-color); color: #fff;
    font-size: 14px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.rat-schritt b { display: block; font-size: 17px; color: var(--rat-navy); margin-bottom: 4px; }
.rat-schritt p { margin-bottom: 0; font-size: 16px; }

/* ── Kaesten ────────────────────────────────────────────────────── */
.rat-box { margin: 24px 0; padding: 16px 18px; border-radius: var(--rat-radius); font-size: 16px; line-height: 1.65; }
.rat-box b { display: block; margin-bottom: 5px; font-size: 16px; }
.rat-box p:last-child { margin-bottom: 0; }
.rat-box--warn  { background: #FEF6E7; border-left: 4px solid var(--rat-amber); color: #5A3E06; }
.rat-box--warn b { color: #8A5A00; }
.rat-box--recht { background: #EDF3F9; border-left: 4px solid var(--rat-color); }
.rat-box--recht b { color: var(--rat-navy); }
.rat-box--stop  { background: #FDECEE; border-left: 4px solid var(--rat-red); color: #6B1620; }
.rat-box--stop b { color: #A11C29; }

/* ── Tabelle ────────────────────────────────────────────────────── */
.rat-tab-wrap { margin: 24px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.rat-tab { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 420px; }
table.rat-tab th {
    text-align: left; font-weight: 700; font-size: 13px;
    text-transform: uppercase; letter-spacing: .04em;
    color: var(--rat-muted); background: var(--rat-bg-soft);
    padding: 10px 12px; border-bottom: 2px solid var(--rat-border);
}
table.rat-tab td { padding: 11px 12px; border-bottom: 1px solid var(--rat-border); vertical-align: top; }
table.rat-tab tr:last-child td { border-bottom: none; }
table.rat-tab .ja   { color: var(--rat-green); font-weight: 700; }
table.rat-tab .nein { color: var(--rat-red);   font-weight: 700; }
.rat-tab-hinweis { font-size: 13px; color: var(--rat-muted); margin-top: 8px; }

/* ── Grafik ─────────────────────────────────────────────────────── */
figure.rat-fig { margin: 26px 0; }
figure.rat-fig img, figure.rat-fig svg {
    width: 100%; height: auto; display: block;
    border: 1px solid var(--rat-border); border-radius: var(--rat-radius);
    background: var(--rat-bg-soft);
}
figure.rat-fig figcaption { font-size: 13px; color: var(--rat-muted); margin-top: 8px; }

/* ── Video und Bildschirmfotos ──────────────────────────────────── */
.rat-video { margin: 26px 0; }
.rat-video video, .rat-video iframe {
    width: 100%; aspect-ratio: 16 / 9; height: auto; display: block;
    border: 1px solid var(--rat-border); border-radius: var(--rat-radius);
    background: #000;
}
.rat-video figcaption { font-size: 13px; color: var(--rat-muted); margin-top: 8px; }

/* Bildschirmfotos vom Telefon: hochkant und schmal, deshalb nebeneinander
   statt untereinander. Auf schmalen Displays waagerecht scrollbar, damit
   drei Aufnahmen nicht drei Bildschirmlaengen belegen. */
.rat-shots { display: flex; gap: 12px; margin: 24px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.rat-shots figure { flex: 0 0 62%; max-width: 260px; margin: 0; }
.rat-shots img {
    width: 100%; height: auto; display: block;
    border: 1px solid var(--rat-border); border-radius: 10px; background: #fff;
}
.rat-shots figcaption { font-size: 12px; color: var(--rat-muted); margin-top: 7px; line-height: 1.45; }

@media (min-width: 700px) {
    .rat-shots { overflow: visible; }
    .rat-shots figure { flex: 1 1 0; max-width: none; }
}

/* ── Handlungsblock: der Punkt, an dem der Artikel in die App fuehrt.
      Genau einer je Artikel, deshalb auffaellig. ──────────────────── */
.rat-tun {
    margin: 32px 0; padding: 22px;
    background: var(--rat-navy); border-radius: var(--rat-radius); color: #fff;
}
.rat-tun b { display: block; font-size: 18px; font-weight: 800; margin-bottom: 6px; color: #fff; }
.rat-tun p { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.75); margin-bottom: 14px; }
.rat-tun a {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--rat-red); color: #fff; text-decoration: none;
    font-size: 16px; font-weight: 700;
    padding: 13px 22px; border-radius: var(--rat-radius);
}

/* ── Einzelner Fliesstextverweis, nur auf der Hauptdomain ───────── */
.rat-verweis {
    margin: 28px 0; padding: 15px 18px;
    border: 1px solid var(--rat-border); border-radius: var(--rat-radius);
    font-size: 15px; color: var(--rat-muted); line-height: 1.6;
}
.rat-verweis a { font-weight: 700; }

/* ── FAQ ────────────────────────────────────────────────────────── */
.rat-faq { margin: 34px 0 0; }
.rat-faq details {
    border: 1px solid var(--rat-border); border-radius: var(--rat-radius);
    padding: 14px 16px; margin-bottom: 10px; background: #fff;
}
.rat-faq summary {
    font-weight: 700; font-size: 16px; color: var(--rat-navy);
    cursor: pointer; list-style: none;
}
.rat-faq summary::-webkit-details-marker { display: none; }
.rat-faq summary::after { content: "+"; float: right; color: var(--rat-color); font-weight: 800; }
.rat-faq details[open] summary::after { content: "–"; }
.rat-faq details p { margin: 10px 0 0; font-size: 16px; }

/* ── Weiter im Ablauf ───────────────────────────────────────────── */
.rat-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 40px 0 0; }
.rat-nav a {
    display: block; padding: 14px 16px; text-decoration: none;
    border: 1px solid var(--rat-border); border-radius: var(--rat-radius);
    background: var(--rat-bg-soft);
}
.rat-nav span { display: block; font-size: 12px; color: var(--rat-muted); margin-bottom: 3px; }
.rat-nav b { font-size: 15px; color: var(--rat-navy); line-height: 1.35; }
.rat-nav a:only-child { grid-column: 1 / -1; }

/* ── Hub ────────────────────────────────────────────────────────── */
.rat-hub-gruppe { margin: 36px 0 0; }
.rat-hub-gruppe > h2 { margin-bottom: 4px; }
.rat-hub-gruppe > p.rat-hub-sub { font-size: 15px; color: var(--rat-muted); margin-bottom: 16px; }
.rat-liste { list-style: none; padding: 0; margin: 0; }
.rat-liste li { margin-bottom: 10px; }
.rat-liste a {
    display: block; padding: 14px 16px; text-decoration: none;
    border: 1px solid var(--rat-border); border-radius: var(--rat-radius);
    transition: border-color .15s, transform .15s;
}
.rat-liste a:hover { border-color: var(--rat-color); transform: translateY(-1px); }
.rat-liste b { display: block; font-size: 16px; color: var(--rat-navy); line-height: 1.35; }
.rat-liste span { display: block; font-size: 14px; color: var(--rat-muted); margin-top: 3px; }

/* ── Fussbereich ────────────────────────────────────────────────── */
.rat-foot {
    border-top: 1px solid var(--rat-border); margin-top: 50px;
    padding: 22px 20px 90px; text-align: center;
    font-size: 13px; color: var(--rat-muted);
}
.rat-foot a { color: var(--rat-muted); }

/* ── Fussleiste, gleiche Anordnung wie in der App ───────────────── */
.rat-tabs {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    display: flex; justify-content: space-around;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--rat-border);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.rat-tabs a {
    flex: 1; text-align: center; text-decoration: none;
    font-size: 11px; font-weight: 600; color: var(--rat-muted);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.rat-tabs a span { font-size: 18px; line-height: 1; }
.rat-tabs a.ist-notfall { color: var(--rat-red); }

@media (min-width: 900px) {
    .rat-tabs { display: none; }
    .rat-foot { padding-bottom: 30px; }
    body.rat { font-size: 18px; }
    h1.rat-h1 { font-size: 38px; }
    .rat-wrap h2 { font-size: 26px; }
}

@media (max-width: 420px) {
    h1.rat-h1 { font-size: 26px; }
    .rat-nav { grid-template-columns: 1fr; }
    .rat-wrap { padding: 0 16px 80px; }
    .rat-top-in { padding: 10px 16px; }
}

@media print {
    .rat-top, .rat-tabs, .rat-tun, .rat-nav { display: none; }
    body.rat { font-size: 12pt; }
}
