/* =====================================================================
   Einsatzklar Lahn-Dill – Schule für Erste Hilfe
   Ein Stylesheet für die gesamte Seite. Wird in includes/header.php
   relativ eingebunden (css/eh.css); alle Seiten liegen deshalb flach
   im Hauptverzeichnis.
   ===================================================================== */

/* ------------------------------ Tokens ------------------------------ */

:root {
    /* Markenfarben direkt aus dem Logo: Krapprot #BE0F32 und Grau #555555.
       Die dunklen Flächen greifen das Logo-Grau auf, statt ins Blaue zu gehen. */
    --ink-900: #2b2b2d;
    --ink-800: #3a3a3d;
    --ink-700: #555555;

    --brand: #be0f32;
    --brand-strong: #960a26;
    --brand-soft: #fceaee;

    /* Flächen mit weisser Schrift (Knopf, Ziffern, Sprungmarke) */
    --brand-fill: #be0f32;
    --brand-fill-hover: #960a26;

    --signal: #1f7a4d;
    --signal-soft: #e8f4ed;

    --warn: #8d5a0d;
    --warn-soft: #fbf0e0;

    /* Flächen und Text */
    --bg: #f7f6f6;
    --surface: #ffffff;
    --surface-alt: #eeecec;
    --border: #e0dede;
    --border-strong: #c6c3c3;

    --text: #2f2f31;
    --text-muted: #6b6b6e;
    --text-invert: #ffffff;
    --text-invert-muted: #cbc9c9;

    /* Form */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(43, 43, 45, .06), 0 2px 6px rgba(43, 43, 45, .05);
    --shadow: 0 4px 12px rgba(43, 43, 45, .08), 0 12px 28px rgba(43, 43, 45, .06);
    --shadow-lg: 0 10px 24px rgba(43, 43, 45, .10), 0 28px 60px rgba(43, 43, 45, .10);

    /* Raster */
    --container: 1140px;
    --container-narrow: 760px;
    --gutter: clamp(1rem, 4vw, 2.5rem);

    /* Typografie */
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --step--1: clamp(.86rem, .83rem + .15vw, .94rem);
    --step-0: clamp(1rem, .96rem + .2vw, 1.075rem);
    --step-1: clamp(1.13rem, 1.05rem + .35vw, 1.3rem);
    --step-2: clamp(1.35rem, 1.2rem + .7vw, 1.7rem);
    --step-3: clamp(1.6rem, 1.35rem + 1.2vw, 2.25rem);
    --step-4: clamp(1.95rem, 1.5rem + 2.1vw, 3.1rem);

    --ease: cubic-bezier(.2, .7, .3, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #161617;
        --surface: #1f1f21;
        --surface-alt: #292929;
        --border: #383838;
        --border-strong: #4d4d4d;

        --text: #ededee;
        --text-muted: #adadb0;

        /* Aufgehelltes Krapprot, damit es auf dunklem Grund lesbar bleibt */
        --brand: #e4536b;
        --brand-strong: #f2778a;
        --brand-soft: #3a181f;

        /* Dunkler als die Akzentfarbe, damit Weiss darauf lesbar bleibt */
        --brand-fill: #c3162f;
        --brand-fill-hover: #d6294a;

        --signal: #4fbe8a;
        --signal-soft: #17301f;

        --warn: #d9a250;
        --warn-soft: #33280f;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
        --shadow: 0 6px 18px rgba(0, 0, 0, .40);
        --shadow-lg: 0 18px 46px rgba(0, 0, 0, .48);
    }
}

/* ---------------------------- Grundlagen ---------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--step-0);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    /* Deutsche Wortungetueme wie "Datenschutz-Aufsichtsbehoerde" sprengen auf
       schmalen Displays sonst die Spalte. */
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    margin: 0 0 .6em;
    font-weight: 700;
    letter-spacing: -.01em;
}

h1 {
    font-size: var(--step-4);
}

h2 {
    font-size: var(--step-3);
}

h3 {
    font-size: var(--step-1);
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--brand);
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}

a:hover {
    color: var(--brand-strong);
}

img,
svg {
    max-width: 100%;
}

img {
    height: auto;
}

ul,
ol {
    padding-left: 1.2em;
}

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

.mt-0 {
    margin-top: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--brand-fill);
    color: #fff;
    padding: .7rem 1.1rem;
    border-radius: 0 0 var(--radius-sm) 0;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}

.container--narrow {
    max-width: var(--container-narrow);
}

/* ------------------------------ Topbar ------------------------------ */

.topbar {
    background: var(--ink-900);
    color: var(--text-invert-muted);
    font-size: var(--step--1);
}

.topbar__inner {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    padding-block: .45rem;
}

.topbar__item {
    color: inherit;
    text-decoration: none;
}

a.topbar__item:hover {
    color: #fff;
    text-decoration: underline;
}

.topbar strong {
    color: #f2778a;
    letter-spacing: .04em;
}

.topbar__sep {
    opacity: .5;
}

@media (max-width: 560px) {

    .topbar__item--wide,
    .topbar__sep:last-of-type {
        display: none;
    }
}

/* ---------------------------- Kopfbereich --------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 68px;
}

/* Die Wortmarke bestimmt ihre Breite über die Höhe – Seitenverhältnis 2:1 */
.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex: none;
}

.logo img {
    display: block;
    width: auto;
    height: 46px;
}

@media (max-width: 480px) {
    .logo img {
        height: 38px;
    }
}

.menu {
    display: flex;
    align-items: center;
    gap: .15rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu a {
    display: block;
    position: relative;
    padding: .55rem .2rem;
    margin-inline: .5rem;
    color: var(--text);
    text-decoration: none;
    font-size: .97rem;
    font-weight: 600;
    transition: color .18s var(--ease);
}

/* Reiter-Anzeiger: waechst aus der Mitte, damit nichts springt */
.menu a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--brand);
    transform: scaleX(0);
    transition: transform .18s var(--ease);
}

.menu a:hover {
    color: var(--brand);
}

.menu a:hover::after {
    transform: scaleX(.6);
}

.menu a.active {
    color: var(--brand);
}

.menu a.active::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    position: absolute;
    left: 50%;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: transform .2s var(--ease), opacity .2s var(--ease);
}

.nav-toggle span {
    top: 50%;
    margin-top: -1px;
}

.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    left: 0;
    transform: none;
}

.nav-toggle span::before {
    top: -6px;
}

.nav-toggle span::after {
    top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }

    .menu {
        position: absolute;
        inset: 100% 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: .1rem;
        padding: .8rem var(--gutter) 1.1rem;
        background: var(--surface);
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
    }

    .menu.is-open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .menu a {
        padding: .7rem .6rem;
        margin-inline: 0;
        font-size: 1rem;
        border-radius: var(--radius-sm);
    }

    /* Der Reiter-Anzeiger ergibt im aufgeklappten Menü keinen Sinn */
    .menu a::after {
        display: none;
    }

    .menu a.active {
        background: var(--brand-soft);
    }
}

/* ---------------------------- Schaltflächen -------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .78rem 1.35rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--brand-fill);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}

.btn:hover {
    background: var(--brand-fill-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn--sm {
    padding: .5rem 1rem;
    font-size: .93rem;
}

.btn--ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}

.btn--ghost:hover {
    background: var(--surface-alt);
    color: var(--text);
    border-color: var(--brand);
}

.btn--on-dark {
    background: transparent;
    border-color: rgba(255, 255, 255, .45);
    color: #fff;
}

.btn--on-dark:hover {
    background: rgba(255, 255, 255, .12);
    border-color: #fff;
}

.btn[disabled],
.btn--disabled {
    opacity: .55;
    pointer-events: none;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin-top: 1.4rem;
}

/* ----------------------------- Abschnitte ---------------------------- */

.section {
    padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section--tight {
    padding-block: clamp(2.2rem, 5vw, 3.6rem);
}

.section--alt {
    background: var(--surface-alt);
}

.section-head {
    max-width: 640px;
    margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}

.section-head p {
    color: var(--text-muted);
    font-size: var(--step-1);
    margin-bottom: 0;
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    margin-bottom: .8rem;
    padding: .28rem .8rem;
    border-radius: var(--radius-pill);
    background: var(--brand-soft);
    color: var(--brand);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.eyebrow--on-dark {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

/* -------------------------- Bühne (Startseite) ----------------------- */

/* Bewusst hell und ruhig: die Farbe kommt aus dem Logo, nicht aus der Fläche. */
.buehne {
    position: relative;
    padding-block: clamp(3.5rem, 9vw, 7rem);
    background:
        radial-gradient(60rem 26rem at 15% -20%, var(--brand-soft), transparent 70%),
        var(--surface);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.buehne::after {
    /* Angedeutetes Kreuz als sehr zurückhaltende Flächengrafik */
    content: "";
    position: absolute;
    right: -4rem;
    top: 50%;
    width: 26rem;
    height: 26rem;
    transform: translateY(-50%);
    background:
        linear-gradient(var(--brand), var(--brand)) center / 100% 32% no-repeat,
        linear-gradient(var(--brand), var(--brand)) center / 32% 100% no-repeat;
    opacity: .05;
    pointer-events: none;
}

.buehne__inner {
    position: relative;
}

.buehne__ort {
    margin-bottom: 1.2rem;
    font-size: var(--step--1);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.buehne__lead {
    max-width: 46ch;
    margin-top: 1.6rem;
    margin-bottom: 0;
    font-size: var(--step-1);
    color: var(--text-muted);
}

/* Wechselndes Schlagwort */
.schlagwort {
    margin: 0;
    font-size: clamp(2.2rem, 1.2rem + 4.6vw, 4.6rem);
    line-height: 1.08;
    letter-spacing: -.02em;
}

.schlagwort__fest {
    display: block;
    color: var(--text);
}

.schlagwort__rotor {
    display: grid;
    color: var(--brand);
}

/* Alle Varianten liegen uebereinander, damit die Hoehe nicht springt */
.schlagwort__wort {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(.25em);
    transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.schlagwort__wort.is-aktiv {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .schlagwort__wort {
        transform: none;
    }
}

/* --------------------- Zwei grosse Boxen (Startseite) ---------------- */

.duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 1.8rem);
}

.duo__box {
    display: flex;
    flex-direction: column;
    padding: clamp(1.6rem, 3.5vw, 2.6rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--brand);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.duo__box h2 {
    font-size: var(--step-3);
    margin-bottom: .4em;
}

.duo__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1.2rem;
    border-radius: 16px;
    background: var(--brand-soft);
    color: var(--brand);
}

.duo__icon svg {
    width: 30px;
    height: 30px;
}

.duo__lead {
    color: var(--text-muted);
    font-size: var(--step-1);
}

.duo .btn-row {
    margin-top: auto;
    padding-top: 1.6rem;
}

@media (max-width: 820px) {
    .duo {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------- Raster ------------------------------ */

.grid {
    display: grid;
    gap: 1.2rem;
}

.grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ------------------------------- Karten ------------------------------ */

.card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}

a.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--brand);
    color: inherit;
}

.card h3 {
    margin-bottom: .45rem;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 0;
}

.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
}

.card__icon svg {
    width: 24px;
    height: 24px;
}

.card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    margin: 1rem 0 0;
    padding-top: .9rem;
    border-top: 1px solid var(--border);
    font-size: var(--step--1);
    color: var(--text-muted);
}

/* -------------------------------- Tags ------------------------------- */

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .9rem;
}

.tag {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: var(--radius-pill);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .76rem;
    font-weight: 600;
}

.tag--brand {
    background: var(--brand-soft);
    border-color: transparent;
    color: var(--brand);
}

.tag--frei {
    background: var(--signal-soft);
    border-color: transparent;
    color: var(--signal);
}

.tag--wenig {
    background: var(--warn-soft);
    border-color: transparent;
    color: var(--warn);
}

.tag--voll {
    background: var(--brand-soft);
    border-color: transparent;
    color: var(--brand);
}

/* ------------------------------ Panels ------------------------------- */

.panel {
    padding: clamp(1.3rem, 3vw, 2rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.panel + .panel {
    margin-top: 1.25rem;
}

.panel--brand {
    background: var(--brand-soft);
    border-color: transparent;
}

.feature {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    padding: clamp(1.5rem, 4vw, 2.6rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.feature--dark {
    background: linear-gradient(150deg, var(--ink-800), var(--ink-700));
    border-color: transparent;
    color: var(--text-invert);
}

.feature--dark h2 {
    color: #fff;
}

.feature--dark p {
    color: var(--text-invert-muted);
}

.feature--dark .check-list li {
    color: var(--text-invert-muted);
}

.feature--dark .check-list li::before {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

@media (max-width: 860px) {
    .feature {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------- Listen ------------------------------ */

.check-list {
    list-style: none;
    padding: 0;
    margin: 1.1rem 0 0;
    display: grid;
    gap: .6rem;
}

.check-list li {
    position: relative;
    padding-left: 2rem;
    color: var(--text-muted);
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: .1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: .8rem;
    font-weight: 700;
}

.contact-list {
    margin: 0;
    display: grid;
    gap: 1rem;
}

.contact-list dt {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-list dd {
    margin: .15rem 0 0;
}

/* --------------------------- Kursabschnitt --------------------------- */

.kurs {
    display: grid;
    grid-template-columns: 1.35fr .65fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.kurs h2 {
    font-size: var(--step-3);
}

.kurs h3 {
    margin-top: 1.8rem;
}

.kurs__lead {
    font-size: var(--step-1);
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .kurs {
        grid-template-columns: 1fr;
    }
}

/* Sprungmarken innerhalb einer langen Seite */
.sprungliste {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.sprungliste a {
    padding: .45rem 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text);
    font-size: var(--step--1);
    font-weight: 600;
    text-decoration: none;
    transition: border-color .16s var(--ease), color .16s var(--ease);
}

.sprungliste a:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.note--center {
    margin-top: 1.6rem;
    text-align: center;
}

/* ------------------------------ Schritte ----------------------------- */

.steps {
    counter-reset: schritt;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.steps li {
    counter-increment: schritt;
    position: relative;
    padding: 1.4rem 1.3rem 1.3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.steps li::before {
    content: counter(schritt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: .7rem;
    border-radius: 50%;
    background: var(--brand-fill);
    color: #fff;
    font-weight: 700;
}

.steps--eng {
    grid-template-columns: 1fr;
    gap: .7rem;
}

.steps--eng li {
    padding: 1rem 1.1rem;
}

.steps--eng li::before {
    width: 1.7rem;
    height: 1.7rem;
    margin-bottom: .4rem;
    font-size: .9rem;
}

.steps strong {
    display: block;
    margin-bottom: .25rem;
}

.steps p {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--step--1);
}

/* ------------------------------ Termine ------------------------------ */

/* minmax(0, 1fr) statt der Vorgabe "auto": sonst richtet sich die Spalte nach
   dem breitesten Inhalt und die Zeile ragt auf schmalen Displays heraus. */
.termin-liste {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.termin {
    display: grid;
    grid-template-columns: 7.5rem 1fr auto;
    gap: clamp(1rem, 3vw, 2.4rem);
    align-items: center;
    padding: clamp(1.2rem, 2.5vw, 1.8rem) clamp(1.2rem, 3vw, 2rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}

.termin:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.termin--voll {
    border-left-color: var(--border-strong);
}

.termin--voll:hover {
    transform: none;
}

.termin__datum {
    display: grid;
    justify-items: center;
    align-content: center;
    padding: .7rem .4rem;
    background: var(--brand-soft);
    border-radius: var(--radius);
    line-height: 1.05;
}

.termin--voll .termin__datum {
    background: var(--surface-alt);
}

.termin__tag {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--brand);
}

.termin--voll .termin__tag {
    color: var(--text-muted);
}

.termin__monat {
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand);
}

.termin--voll .termin__monat {
    color: var(--text-muted);
}

.termin__jahr {
    margin-top: .15rem;
    font-size: .78rem;
    color: var(--text-muted);
}

/* Ohne min-width: 0 wachsen Rasterfelder nie unter ihren Inhalt –
   auf sehr schmalen Displays ragt die Zeile sonst heraus. */
.termin__info,
.termin__aktion {
    min-width: 0;
}

.termin__titel {
    margin: 0 0 .7rem;
    font-size: var(--step-2);
    overflow-wrap: break-word;
}

/* Beschriftung über dem Wert, damit die Zeile auch schmal lesbar bleibt */
.termin__daten {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem 2.2rem;
    margin: 0;
}

.termin__daten dt {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.termin__daten dd {
    margin: .1rem 0 0;
    font-weight: 600;
}

.termin__aktion {
    display: grid;
    justify-items: end;
    gap: .7rem;
}

.termin__aktion .btn {
    white-space: nowrap;
}

@media (max-width: 860px) {
    .termin {
        grid-template-columns: 5.5rem 1fr;
        gap: 1rem 1.4rem;
    }

    .termin__tag {
        font-size: 2rem;
    }

    .termin__aktion {
        grid-column: 1 / -1;
        grid-auto-flow: column;
        justify-items: stretch;
        align-items: center;
        justify-content: space-between;
    }
}

@media (max-width: 520px) {
    .termin__aktion {
        grid-auto-flow: row;
        justify-items: stretch;
    }

    .termin__aktion .tag {
        justify-self: start;
    }
}

/* Kompakte Terminliste in der Seitenspalte */
.mini-termine {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .6rem;
    font-size: var(--step--1);
}

.mini-termine li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .4rem 1rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--border);
}

.mini-termine li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.mini-termine__voll {
    color: var(--text-muted);
}

/* ------------------------------ Tabelle ------------------------------ */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--step--1);
}

table.data th,
table.data td {
    padding: .8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table.data th {
    background: var(--surface-alt);
    font-size: .78rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

table.data tr:last-child td {
    border-bottom: 0;
}

/* ------------------------------ Formulare ---------------------------- */

.form-grid {
    display: grid;
    gap: 1.1rem;
}

.form-row {
    display: grid;
    gap: 1.1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field {
    display: grid;
    gap: .35rem;
}

.field > span {
    font-size: .88rem;
    font-weight: 600;
}

.field .req {
    color: var(--brand);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: .7rem .85rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}

.field textarea {
    resize: vertical;
    min-height: 8rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
    outline: none;
}

.field small {
    color: var(--text-muted);
    font-size: .8rem;
}

.field--check {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: .6rem;
}

.field--check input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: .25rem;
}

.field--check span {
    font-weight: 400;
    font-size: var(--step--1);
    color: var(--text-muted);
}

.note {
    font-size: var(--step--1);
    color: var(--text-muted);
    margin: 0;
}

/* Spamfalle: für Menschen unsichtbar, aber nicht display:none,
   damit einfache Bots sie trotzdem ausfüllen */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ------------------------------- Hinweis ----------------------------- */

.hinweis {
    display: flex;
    gap: .8rem;
    padding: 1rem 1.2rem;
    border-radius: var(--radius);
    background: var(--warn-soft);
    border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
    color: var(--text);
    font-size: var(--step--1);
}

.hinweis--erfolg {
    background: var(--signal-soft);
    border-color: color-mix(in srgb, var(--signal) 35%, transparent);
}

.hinweis__icon {
    flex: none;
    font-size: 1.2rem;
    line-height: 1.4;
}

/* -------------------------------- Prosa ------------------------------ */

.prose h2 {
    margin-top: 2rem;
    font-size: var(--step-2);
}

.prose h3 {
    margin-top: 1.6rem;
}

.prose > :first-child {
    margin-top: 0;
}

.prose ul {
    color: var(--text-muted);
}

.prose li {
    margin-bottom: .4rem;
}

.prose address {
    font-style: normal;
    color: var(--text-muted);
}

/* ------------------------------- Fußzeile ---------------------------- */

.site-footer {
    margin-top: auto;
    background: var(--ink-900);
    color: var(--text-invert-muted);
    padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1.4fr repeat(3, minmax(150px, 1fr));
}

.site-footer h2 {
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: .9rem;
}

.footer-logo {
    display: block;
    width: auto;
    height: 74px;
    margin-bottom: 1.1rem;
}

.site-footer p {
    font-size: var(--step--1);
    max-width: 40ch;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .5rem;
    font-size: var(--step--1);
}

.site-footer a {
    color: var(--text-invert-muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .8rem;
    margin-top: 2.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: var(--step--1);
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom ul {
    display: flex;
    gap: 1.2rem;
}

@media (max-width: 860px) {
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}
