/* ============================================================
   Freiwillige Feuerwehr Riederau — modernisiertes flat Design
   (unterstützt helles & dunkles Farbmodus-Theme)
   ============================================================ */

:root {
    --radius: 4px;

    --red: #d32f2f;
    --red-dark: #b22b2b;

    --header-bg: #151b21;
    --header-link: #d4dae0;
    --header-link-hover-bg: #212b34;
    --header-dim: #8d97a2;

    --text: #2b3440;
    --muted: #6b7482;
    --bg: #f4f5f7;
    --card: #ffffff;
    --line: #e4e7eb;

    --fact-bg: #151b21;
    --fact-label: #aab4bd;
    --fact-value: #ff6b5e;

    --alert-bg: #fdecec;
    --alert-border: #f3c8c8;
    --alert-text: #7a2b2b;

    --footer-bg: #151b21;
    --footer-text: #8d97a2;
    --footer-link: #cfd6dc;
    --footer-dim: #54606b;

    --hero-overlay: rgba(15, 20, 26, 0.85);
    --hero-canvas: #151b21;
}

/* Dunkles Theme (manuell gewählt) */
html[data-theme="dark"] {
    --header-bg: #0f1419;
    --header-link: #b6bfc8;
    --header-link-hover-bg: #1b232b;
    --header-dim: #77818c;

    --text: #d8dee5;
    --muted: #909aa5;
    --bg: #12171c;
    --card: #1b2229;
    --line: #2a323b;

    --fact-bg: #1b2229;
    --fact-label: #909aa5;

    --alert-bg: #2b1b1b;
    --alert-border: #4a2626;
    --alert-text: #e2a7a7;

    --footer-bg: #0f1419;
    --footer-text: #77818c;
    --footer-link: #b6bfc8;
    --footer-dim: #54606b;

    --hero-canvas: #12171c;
}

/* Dunkles Theme (Betriebssystem-Einstellung, sofern nichts manuell gewählt) */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        --header-bg: #0f1419;
        --header-link: #b6bfc8;
        --header-link-hover-bg: #1b232b;
        --header-dim: #77818c;

        --text: #d8dee5;
        --muted: #909aa5;
        --bg: #12171c;
        --card: #1b2229;
        --line: #2a323b;

        --fact-bg: #1b2229;
        --fact-label: #909aa5;

        --alert-bg: #2b1b1b;
        --alert-border: #4a2626;
        --alert-text: #e2a7a7;

        --footer-bg: #0f1419;
        --footer-text: #77818c;
        --footer-link: #b6bfc8;
        --footer-dim: #54606b;

        --hero-canvas: #12171c;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background 0.2s ease, color 0.2s ease;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--red);
    text-decoration: none;
}

a:hover {
    color: var(--red-dark);
    text-decoration: underline;
}

html[data-theme="dark"] a {
    color: #e46b6b;
}

html[data-theme="dark"] a:hover {
    color: #ef8585;
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) a {
        color: #e46b6b;
    }

    html:not([data-theme="light"]) a:hover {
        color: #ef8585;
    }
}

.container {
    width: min(1080px, 100% - 2.5rem);
    margin-inline: auto;
}

/* ---------- Header / Navigation ---------- */

.site-header {
    background: var(--header-bg);
    color: var(--header-link);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--red);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.55rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand:hover {
    color: #fff;
    text-decoration: none;
}

.brand .logo {
    height: 84px;
    width: auto;
    background: #fff;
    border-radius: var(--radius);
    padding: 5px;
}

.brand .name {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    font-size: 1.05rem;
}

.brand .name small {
    font-weight: 400;
    color: var(--header-dim);
    font-size: 1.0rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--header-link);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
    color: #fff;
    background: var(--header-link-hover-bg);
    text-decoration: none;
}

.nav-links a.active {
    color: #fff;
    background: var(--red);
}

.theme-btn {
    background: transparent;
    border: 1px solid var(--header-link-hover-bg);
    color: var(--header-link);
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.theme-btn:hover {
    border-color: var(--header-dim);
    color: #fff;
}

/* ---------- Hero (nur Startseite) ---------- */

.hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    overflow: hidden;
    background: var(--hero-canvas);
}

.hero img.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--hero-overlay) 0%, rgba(15, 20, 26, 0.25) 60%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 4.5rem 0 3.5rem;
    max-width: 640px;
}

.hero-content h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.15;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    font-size: 1.05rem;
    color: #e8ebee;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.hero-content p a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

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

main {
    flex: 1;
}

.page-head {
    padding: 3rem 0 1.5rem;
}

.page-head h1 {
    font-size: clamp(1.7rem, 3.5vw, 2.3rem);
    color: var(--text);
    line-height: 1.2;
}

.page-head .eyebrow {
    display: inline-block;
    background: var(--red);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 0.9rem;
}

.page-head p {
    color: var(--muted);
    max-width: 640px;
    font-size: 1.05rem;
}

.content-section {
    padding: 1.5rem 0 4rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
}

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

.card h2 {
    color: var(--text);
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
}

.card p + p {
    margin-top: 0.75rem;
}

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

.grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 760px) {
    .grid.cols-2,
    .grid.cols-3 {
        grid-template-columns: 1fr;
    }
}

/* ---------- Personenlisten ---------- */

.person-list {
    list-style: none;
}

.person-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px dashed var(--line);
}

.person-list li:last-child {
    border-bottom: none;
}

.person-list .role {
    color: var(--muted);
    font-size: 0.9rem;
}

.person-list .name {
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

/* ---------- Kennzahlen / Fakten ---------- */

.fact {
    background: var(--fact-bg);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.fact .value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--fact-value);
}

.fact .label {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fact-label);
}

/* ---------- Button / CTA ---------- */

.btn {
    display: inline-block;
    background: var(--red);
    color: #fff !important;
    font-weight: 600;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius);
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
    background: var(--red-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.notruf-hinweis {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--alert-bg);
    border: 1px solid var(--alert-border);
    border-radius: var(--radius);
    padding: 1rem 1.4rem;
    margin-top: 1.25rem;
}

.notruf-hinweis .number {
    background: var(--red);
    color: #fff;
    font-weight: 800;
    font-size: 1.3rem;
    border-radius: var(--radius);
    padding: 0.5rem 0.9rem;
    white-space: nowrap;
}

.notruf-hinweis p {
    color: var(--alert-text);
    font-size: 0.95rem;
}

/* ---------- Bild ---------- */

.figure {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    margin-top: 1.25rem;
}

.figure img {
    width: 100%;
    height: auto;
}

/* ---------- Impressum / Rechtstext ---------- */

.legal h2 {
    font-size: 1.25rem;
    color: var(--text);
    margin: 2.2rem 0 0.6rem;
}

.legal h2:first-child {
    margin-top: 0;
}

.legal h3 {
    font-size: 1.05rem;
    color: var(--text);
    margin: 1.6rem 0 0.4rem;
}

.legal p + p,
.legal ul {
    margin-top: 0.75rem;
}

.legal ul {
    padding-left: 1.4rem;
}

.legal li + li {
    margin-top: 0.35rem;
}

.legal address {
    font-style: normal;
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 1.5rem 0;
    margin-top: auto;
    border-top: 3px solid var(--red);
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--footer-link);
}

.footer-links a:hover {
    color: #fff;
}

.footer-links .sep {
    color: var(--footer-dim);
    margin: 0 0.35rem;
}

.site-footer .copyright {
    color: var(--footer-text);
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .footer-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
