/*
    Freiwillige Feuerwehr Neuendorf - Layout & Komponenten
    Nutzt ausschliesslich die Variablen aus theme.css fuer Farben,
    damit das Farbschema zentral austauschbar bleibt.
*/

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-family);
    font-weight: var(--fw-regular);
    font-size: var(--fs-body);
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-wrap: anywhere;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover, a:focus { color: var(--color-accent-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: var(--fw-bold);
    line-height: 1.15;
    margin: 0 0 0.5em;
    color: var(--color-text);
}
h1 { font-size: var(--fs-display); font-weight: var(--fw-bold); line-height: 1.4; }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-bold); line-height: 1.3; }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: 1.3; }
h4 { font-size: var(--fs-body); font-weight: var(--fw-bold); line-height: 1.65; }
p { margin: 0 0 1.6em; }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===================== Skip Link ===================== */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 10000;
    background: var(--color-accent); color: #fff; padding: 12px 20px;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ===================== Header / Navigation =====================
   Werte 1:1 aus dem Prototyp (Astra-Header, Menue "ast-builder-menu-1"):
   Leiste 80px hoch, weiss, ohne Trennlinie; Logo 34px und rechtsbuendig
   in der linken Spalte, Menue zentriert (Grid 1fr auto 1fr), rechte Spalte
   frei (mobil: Burger-Button). Menuelinks: Montserrat 300, 17px,
   rot, je 40px Innenabstand, Hover schwarz + Zoom. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-bg);
}

.site-header__bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    column-gap: 20px;
    align-items: center;
    min-height: var(--header-height);
}

.site-header__brand {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}
.site-header__brand svg { width: 34px; height: 30px; fill: var(--color-accent); }

.main-nav { display: flex; justify-content: center; }
.main-nav__list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}
.main-nav__list > li { position: relative; }
.main-nav__list > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-accent);
    font-size: 17px;
    font-weight: var(--fw-light);
    line-height: var(--header-height);
    padding: 0 40px;
    transition: color var(--transition), transform 300ms ease;
}
.main-nav__list > li > a:hover,
.main-nav__list > li > a:focus-visible,
.main-nav__list > li > a[aria-current],
.main-nav__list > li.is-open > a { color: var(--color-text); }
.main-nav__list > li > a:hover { transform: scale(1.2); }
.main-nav__list a .caret {
    width: 0.65em; height: 0.65em; flex-shrink: 0;
    fill: currentColor;
    transition: transform var(--transition);
}
.main-nav__list li.is-open > a .caret { transform: rotate(180deg); }

.main-nav__sub {
    list-style: none;
    margin: 0; padding: 0;
    position: absolute;
    top: 100%; left: 0;
    width: 280px;
    background: var(--color-bg);
    border: 1px solid var(--color-bg-soft);
    border-radius: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.main-nav__list li:hover > .main-nav__sub,
.main-nav__list li.is-open > .main-nav__sub {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.main-nav__sub a {
    display: block;
    padding: 0.9em 1em;
    font-size: 17px;
    font-weight: var(--fw-light);
    color: var(--color-accent);
}
.main-nav__sub a:hover,
.main-nav__sub a[aria-current] { color: var(--color-text); }

.site-header__actions { display: flex; align-items: center; justify-content: flex-start; gap: 14px; flex-shrink: 0; }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 40px; height: 40px;
    cursor: pointer;
    color: var(--color-text);
    align-items: center;
    justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: var(--transition);
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ===================== Hero (Startseite) ===================== */
/* Wappen und Titel stehen 98px unter dem Header und ragen 49px in das
   Gruppenfoto hinein (im Prototyp ueber relative Offsets geloest). */
.hero { background: var(--color-bg); padding: 98px 0 48px; }
.hero__top { display: flex; align-items: flex-start; gap: 20px; padding-left: 36px; margin-bottom: -49px; position: relative; z-index: 2; }
.hero__crest { width: 115px; height: auto; flex-shrink: 0; }
.hero h1 { margin: 0; }
.hero__title-short { display: none; }
.hero__media {
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.hero__media img { width: 100%; height: auto; display: block; }
.hero__caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.hero__caption p { max-width: 51%; color: var(--color-text); margin: 0; }

/* "erfahre mehr ueber uns" - roter Text mit grossem roten Pfeil (Prototyp:
   Text 18px/400 in #ff0000, danach 28px Abstand, Pfeil 77px hoch,
   Hover schwarz + leichtes Zusammenziehen wie Elementor "animation-shrink"). */
.cta-link {
    display: inline-flex; align-items: center; gap: 20px;
    color: var(--color-accent);
    font-weight: var(--fw-regular);
    font-size: 18px;
    line-height: 1.65;
    white-space: nowrap;
    margin-right: 45px;
    transition: color var(--transition), transform 300ms ease;
}
.cta-link:hover { color: var(--color-text); transform: scale(0.9); }
.cta-link__arrow { height: 77px; width: auto; fill: currentColor; flex-shrink: 0; }
/* Unterseiten: gleicher Pfeil-Link, rechtsbuendig unter dem Inhalt
   (ersetzt die frueheren Buttons und "Weitere Bilder ->"-Links) */
.cta-row { display: flex; justify-content: flex-end; margin-top: 32px; }
.cta-row--left { justify-content: flex-start; }
.cta-row .cta-link { margin-right: 0; white-space: normal; }
.cta-link--small .cta-link__arrow { height: 44px; }

/* Page hero (Unterseiten) - Seitentitel immer rechtsbuendig in
   Ueberschriftengroesse mit Punkt ("Aktive.", "Einsätze."). Mit Titelbild
   ragt der Titel ins Foto hinein; ohne Bild (page-hero--plain) steht er
   frei ueber dem Inhalt. Der Einleitungstext laeuft bis zum rechten
   Bildrand (gleiche Flucht wie das Foto). */
.page-hero { background: var(--color-bg); padding: 28px 0 var(--space-section); }
.page-hero + .section:not(.section--soft) { padding-top: 0; }
.page-hero__top { display: flex; justify-content: flex-end; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: -48px; position: relative; z-index: 2; }
.page-hero h1 { margin: 0; font-size: var(--fs-h2); line-height: 1.3; text-align: right; }
.page-hero__media { border-radius: 0; overflow: hidden; margin: 18px 0; position: relative; z-index: 1; }
.page-hero__media img { width: 100%; }
.page-hero p.lead { color: var(--color-text); margin-bottom: 0; }
.page-hero--plain { padding-top: 60px; }
.page-hero--plain .page-hero__top { margin-bottom: 0; }
.page-hero--plain p.lead { margin-top: 18px; }

/* ===================== Sections ===================== */
main { display: block; }
.section { padding: 40px 0; }
.section--soft { background: var(--color-bg-soft); }
.section--tight { padding: 24px 0; }
/* Zusaetzlicher Weissraum unter einer Section, z. B. vor einer beigen Flaeche */
.section--space-bottom { padding-bottom: calc(var(--space-section) + var(--space-block)); }
.section__title { margin-bottom: 24px; }
.section__title .kicker {
    display: block; color: var(--color-accent); text-transform: uppercase;
    font-size: 0.78rem; letter-spacing: 1.5px; font-weight: var(--fw-bold); margin-bottom: 6px;
}

/* ===================== Cards ===================== */
.card {
    background: var(--color-bg-soft);
    border-radius: 0;
    padding: 24px 26px;
    margin-bottom: 20px;
}
.card > *:last-child { margin-bottom: 0; }
.card h2 { font-size: var(--fs-h3); }
.card h2 a { color: inherit; }
.card h3 { margin-top: 1.2em; }
.card--muted { background: #ececea; }
.card--plain { background: transparent; padding: 0; }

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

/* "letzte Einsaetze" - Vorschaukarten des ccnRuntime-Widgets (#protocols).
   Das Widget rendert je Einsatz .articlePreview > .articlePreviewDate +
   .articlePreviewHead. Optik aus dem Prototyp: drei gleich breite Karten
   mit 70px Abstand, Flaeche #f6f5f1 ohne Radius, 10px Innenabstand,
   308px hoch; Titel Montserrat 600/35px schwarz oben links, schwarzer
   Pfeil rechts darunter, Datum rot 18px unten rechts. */
.einsatz-grid ccn-dates-preview {
    display: flex;
    align-items: stretch;
    gap: 70px;
}
.einsatz-grid .articlePreview {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--color-bg-soft);
    border: 0;
    border-radius: 0;
    padding: 10px;
    min-height: 308px;
    margin: 0;
    cursor: pointer;
    transition: none;
}
.einsatz-grid .articlePreview:hover { transform: none; }
.einsatz-grid .articlePreviewHead {
    order: -1;
    font-family: var(--font-family);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-h3);
    line-height: 1.3;
    color: var(--color-text);
}
.einsatz-grid .articlePreviewDate {
    position: absolute;
    right: 8px;
    bottom: 8px;
    font-weight: var(--fw-regular);
    font-size: 18px;
    line-height: 1.65;
    color: var(--color-accent);
}
/* Pfeil rechts unter dem Titel (im Prototyp ein Button mit 12px/24px
   Innenabstand und 35px hohem Pfeil-Icon). */
.einsatz-grid .articlePreview::after {
    content: "";
    display: block;
    width: 31px;
    height: 35px;
    margin: 12px 24px 0 auto;
    background: url("../img/icons/arrow-right.svg") no-repeat center / contain;
}

/* Foto-Personenkarten ("das sind WIR") - Werte aus dem Prototyp:
   drei Karten pro Reihe mit 70px Abstand, 330x447px, Foto formatfuellend,
   Name (fett) und Funktion in Weiss unten links direkt auf dem Foto -
   ohne abdunkelnden Verlauf und ohne roten Funktionstext. */
.people-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 70px;
    margin-bottom: 8px;
}
.person-photo,
.person-card {
    flex: 0 0 calc((100% - 140px) / 3);
    min-width: 0;
}
.person-photo {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 330 / 447;
    background: var(--color-bg-soft);
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo__caption {
    position: absolute; left: 5px; right: 5px; bottom: 13px;
    padding: 0;
    background: none;
    color: var(--color-text-on-photo);
}
.person-photo__caption .name { font-weight: var(--fw-bold); font-size: var(--fs-body); line-height: 1.65; }
.person-photo__caption .role { color: var(--color-text-on-photo); font-weight: var(--fw-regular); font-size: var(--fs-body); line-height: 1.65; margin-top: 0; }

/* Kontakt: Portraitfoto wie bei "das sind WIR." (eckig, Name und Funktion
   weiss auf dem Foto), Telefon/E-Mail darunter in Fliesstextgroesse */
.person-contact__lines { margin-top: 14px; }

/* Kontaktzeilen mit schwarzen Icons (Telefon, Brief) - Jugend + Kontakt */
.contact-line { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.contact-line a { color: var(--color-text); overflow-wrap: normal; }
.contact-line a:hover { color: var(--color-accent); }
.contact-line .ico { width: 20px; height: 20px; fill: var(--color-text); flex-shrink: 0; }
.contact-lines { margin: 0 0 1.6em; }

/* Statistik-Kennzahlen ("36 Einsatzkraefte", "166 Vereinsmitglieder", ...)
   Optik aus dem Prototyp (Elementor-Counter-Widget): Zahl Montserrat
   800/108px in Rot, Beschriftung Montserrat 400/50px in Schwarz, ohne
   Abstand direkt aneinander. Die erste Zeile steht links, die zweite
   rechtsbuendig und rueckt leicht nach oben. Die Zahlen zaehlen beim
   Hereinscrollen in 2s von 0 hoch (siehe js/main.js) - ohne JavaScript
   steht der Endwert direkt im Markup. */
.counter-row { margin: var(--space-block) 0; }
.counter-row:last-child { margin-bottom: calc(var(--space-block) - var(--space-section)); }
.counter {
    display: flex;
    align-items: center;
    margin: 0;
}
.counter--left { justify-content: flex-start; }
.counter--right { justify-content: flex-end; }
.counter__num {
    font-size: 108px;
    font-weight: var(--fw-black);
    line-height: 0.9;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
}
.counter__label {
    font-size: 50px;
    font-weight: var(--fw-regular);
    line-height: 1.2;
    color: var(--color-text);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.mission-grid h3 { color: var(--color-accent); font-size: var(--fs-body); line-height: 1.65; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--color-accent);
    color: #fff;
    font-weight: var(--fw-semibold);
    font-size: 0.9rem;
    padding: 12px 22px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn:hover { background: var(--color-accent-dark); color: #fff; }
.btn--outline { background: transparent; color: var(--color-accent); border: 1px solid var(--color-accent); }
.btn--outline:hover { background: var(--color-accent); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 20px; }

/* CTA-Block ("Interesse? werde jetzt Mitglied!") */
/* "Interesse? werde jetzt Mitglied!" - rote Flaeche ohne Radius, die im
   Prototyp 50px in das Foto darueber hineinragt: Ueberschrift 200px hoch
   mit 33px Innenabstand oben und 67px Zeilenhoehe, darunter der
   Download-Pfeil (53px, weiss) auf gleicher roter Flaeche. */
.cta-block {
    position: relative;
    z-index: 5;
    margin-top: -50px;
}
.cta-block h2 {
    height: 200px;
    margin: 0;
    padding: 33px 0 0;
    background: var(--color-accent);
    color: var(--color-text-on-accent);
    text-align: center;
    line-height: 67px;
}
.cta-block a.icon-link {
    display: block;
    margin-top: -32px;
    padding: 12px 12px 30px;
    background: var(--color-accent);
    color: var(--color-text-on-accent);
    text-align: center;
    border: 0;
    border-radius: 0;
}
/* Beim Hovern bleibt die rote Flaeche stehen, nur der Pfeil wechselt
   von Weiss auf Schwarz. */
.cta-block__icon { height: 53px; width: auto; fill: var(--color-text-on-accent); margin: 0 auto; transition: fill var(--transition); }
.cta-block a.icon-link:hover .cta-block__icon,
.cta-block a.icon-link:focus-visible .cta-block__icon { fill: var(--color-text); }

.instagram-follow { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 24px 0 40px; font-weight: var(--fw-semibold); }
.instagram-follow a { display: inline-flex; align-items: center; gap: 8px; color: var(--color-accent); }
.instagram-follow__icon { width: 18px; height: 18px; flex-shrink: 0; }

.section-photo { border-radius: 0; width: 100%; margin-bottom: 0; }
.figure-image { max-width: 800px; width: 100%; border-radius: var(--radius-md); margin: 0 auto 16px; }
.mt-16 { margin-top: 16px; }

/* ===================== Timeline / Geschichte (Akkordeon-Optik) ===================== */
/* Epochen-Titel: zwischen Fliesstext und Unterueberschrift */
.timeline-entry { --fs-timeline: clamp(1.25rem, 2.2vw, 1.5rem); }
.timeline-entry {
    padding: 18px 0;
    border-top: 1px solid var(--color-border);
}
.timeline-entry:last-child { border-bottom: 1px solid var(--color-border); }
.timeline-entry summary {
    display: flex;
    align-items: baseline;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}
.timeline-entry summary::-webkit-details-marker { display: none; }
.timeline-entry summary::after {
    content: "+";
    margin-left: auto;
    color: var(--color-accent);
    font-size: var(--fs-timeline);
    font-weight: var(--fw-bold);
    line-height: 1;
}
.timeline-entry[open] summary::after { content: "\2212"; }
.timeline-entry .year { color: var(--color-accent); font-weight: var(--fw-bold); font-size: var(--fs-timeline); line-height: 1.3; white-space: nowrap; }
.timeline-entry summary h3 { margin: 0; font-size: var(--fs-timeline); }
.timeline-entry p { margin: 10px 0 0; }

/* Zweispaltiger Text-/Bild-Block (Ausruestung: "Kleidung.") -
   im Prototyp Text links, freigestelltes Foto rechts vertikal zentriert. */
.split { display: flex; align-items: center; gap: 60px; }
.split__text { flex: 1 1 0; min-width: 0; }
.split__text > *:last-child { margin-bottom: 0; }
.split__media { flex: 0 0 300px; max-width: 300px; }
.split__media img { width: 100%; height: auto; }

/* Fahrzeugbloecke - Prototyp: freigestelltes Foto links (31% Breite,
   vertikal zentriert), rechts der rote Titel und die Daten als
   Fliesstext mit fetten Bezeichnern, keine Tabellenspalten. */
.vehicle { margin-bottom: 40px; }
.vehicle:last-child { margin-bottom: 0; }
.vehicle__row { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.vehicle__photo { flex: 0 0 31%; max-width: 31%; margin: 0; }
.vehicle__photo img { width: 100%; height: auto; }
.vehicle__info { flex: 1 1 0; min-width: 0; padding-left: 10px; }
.vehicle__info > *:last-child { margin-bottom: 0; }

/* Rote Zwischenueberschriften (Montserrat 700/35px) wie im Prototyp */
.vehicle h3, .subhead {
    color: var(--color-accent);
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    line-height: 1.3;
}
.vehicle__specs { margin-bottom: 1.2em; }
.vehicle__specs strong { font-weight: var(--fw-bold); }

/* Geschichte: Datentabelle links (Bezeichner linksbuendig), freigestelltes
   Fahrzeug rechts daneben */
.vehicle__row > table.vehicle__specs { flex: 1 1 0; min-width: 0; border-collapse: collapse; margin: 0; align-self: flex-start; }
.vehicle__row > table.vehicle__specs + .vehicle__photo { margin-left: 40px; }
.vehicle__specs-wrap { flex: 1 1 0; min-width: 0; align-self: flex-start; }
.vehicle__specs-wrap > table.vehicle__specs { border-collapse: collapse; margin: 0; }
.vehicle__specs-wrap + .vehicle__photo { margin-left: 40px; }
/* Ausruestung: Foto links, Daten rechts */
.vehicle__photo + table.vehicle__specs,
.vehicle__photo + .vehicle__specs-wrap { margin-left: 40px; }
table.vehicle__specs th,
table.vehicle__specs td { text-align: left; vertical-align: top; padding: 2px 0; font-size: var(--fs-body); }
table.vehicle__specs { width: 100%; }
table.vehicle__specs th { font-weight: var(--fw-bold); white-space: nowrap; padding-right: 24px; width: 10.5em; }

/* ===================== Footer ===================== */
.site-footer {
    background: var(--color-bg-soft);
    color: var(--color-text);
    padding: 30px 0;
    text-align: center;
    margin-top: 56px;
}
/* Endet die Seite mit einer beigen Flaeche, laeuft sie ohne weissen
   Streifen direkt in den (ebenfalls beigen) Footer ueber. */
main:has(> .section--soft:last-child) + .site-footer { margin-top: 0; }
.site-footer__links {
    list-style: none;
    display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 0;
    flex-direction: column;
    margin: 0 0 10px; padding: 0;
    font-size: 0.88rem;
    font-weight: var(--fw-medium);
}
.site-footer__links a { color: var(--color-text); }
.site-footer__links a:hover { color: var(--color-accent); }
.site-footer p { margin: 0; font-size: 0.8rem; color: var(--color-text-muted); }

@media (min-width: 600px) {
    .site-footer__links { flex-direction: row; gap: 10px 28px; }
}

.back-to-top {
    position: fixed; right: 22px; bottom: 22px;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    display: none; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
    font-size: 1.3rem;
    z-index: 900;
    border: 0;
    cursor: pointer;
}
.back-to-top.is-visible { display: flex; }
.back-to-top:hover { background: var(--color-accent-dark); }

/* ===================== Forms ===================== */
.form fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.form label { display: block; font-weight: var(--fw-semibold); margin-bottom: 6px; font-size: var(--fs-body); }
.form input, .form select, .form textarea {
    width: 100%; max-width: 480px;
    font-family: inherit; font-size: 1rem;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-text);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.form p { margin-bottom: 16px; }
.form .buttons { display: flex; gap: 12px; }
.form button { font-family: inherit; }
.form button[type="submit"] {
    background: var(--color-accent); color: #fff; border: 0; border-radius: 999px;
    padding: 12px 26px; font-weight: var(--fw-semibold); font-size: 0.9rem; cursor: pointer;
    width: auto; max-width: none;
}
.form button[type="submit"]:hover { background: var(--color-accent-dark); }
.form button[type="reset"] {
    background: transparent; border: 1px solid var(--color-border); border-radius: 999px;
    padding: 12px 26px; cursor: pointer; width: auto; max-width: none;
}

/* ===================== Icon links (Links-Seite etc.) ===================== */
.link-list { display: flex; flex-direction: column; gap: 4px; }
.link-row { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.link-row:last-child { border-bottom: 0; }
.link-row .label { font-weight: var(--fw-regular); }
.link-row > div { min-width: 0; }

.pdf, .phone, .facebook, .homepage, .email, .googlemaps, .bayernatlas, .wikipedia {
    padding-left: 26px;
    display: inline-block;
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 18px;
}
.pdf { background-image: url('../img/icon_pdf.gif'); }
.phone { background-image: url('../img/icon_telefon.png'); }
.facebook { background-image: url('../img/icon_facebook.jpg'); }
.homepage { background-image: url('../img/icon_homepage.gif'); }
.email { background-image: url('../img/icon_mail.png'); }
.googlemaps { background-image: url('../img/icon_googleMaps.png'); }
.bayernatlas { background-image: url('../img/icon_bayernatlas.gif'); }
.wikipedia { background-image: url('../img/icon_wiki.png'); }

.sponsor-row { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.sponsor-row figure { margin: 0; }
.sponsor-row img { max-height: 70px; width: auto; margin: 0 0 8px; }

/* ===================== Karte ===================== */
.map-embed { border-radius: 0; overflow: hidden; margin-top: 12px; }
.address-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.address-row .address-text { flex: 1 1 320px; }
.address-row .map-embed { flex: 1 1 400px; margin: 0; }
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; }
.map-placeholder {
    background: #ececea;
    border-radius: 0;
    padding: 24px;
    text-align: center;
}
.map-placeholder p { font-size: var(--fs-body); color: var(--color-text-muted); }
.map-placeholder button {
    background: var(--color-accent); color: #fff; border: 0; border-radius: 999px;
    padding: 11px 20px; font-weight: var(--fw-semibold); cursor: pointer;
}

/* ===================== ccnRuntime Widget Restyling =====================
   ccnRuntime rendert Termine/Einsaetze/News/Kalender/Wetter/Album eigenstaendig
   in vorgegebene Container. Die folgenden Regeln uebersteuern die
   Default-Optik dieser generierten Elemente auf unser neues Farbschema,
   ohne die Funktionalitaet (JS-Ausgabe) anzufassen. */

.articlePreview {
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-sm);
    background: var(--color-bg-soft);
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform var(--transition);
}
.articlePreview:hover { transform: translateY(-2px); }
.articlePreviewDate { font-weight: var(--fw-bold); color: var(--color-accent); }


/* Einsaetze (ccn-dates-display) und News (ccn-news-display): jeder Eintrag
   ist ein geschlossener Block - Titel, Datum und Text eng zusammen, zum
   naechsten Eintrag deutlich Abstand. Leere Absaetze aus dem Editor
   (<p>&nbsp;</p>) entfernt js/main.js. */
.ccn-dates-display__list,
.ccn-news-display { display: block; }
.ccn-dates-display .article,
.ccn-news-display .article {
    padding: 0;
    margin: 0 0 3.3em;
}
.ccn-dates-display .article:last-child,
.ccn-news-display .article:last-of-type { margin-bottom: 0; }
.ccn-dates-display .article h2,
.ccn-news-display .article h2 {
    font-size: var(--fs-body);
    line-height: 1.65;
    margin: 0;
}
.ccn-dates-display .article p,
.ccn-news-display .article p { margin: 0 0 0.6em; }
.ccn-dates-display .article > * > *:last-child,
.ccn-dates-display .article .ccn-date-text > *:last-child,
.ccn-news-display .ccn-news-display__text > *:last-child { margin-bottom: 0; }
.ccn-dates-display ccn-date-details > p:first-child { margin: 0; }
.ccn-news-display__date { float: none; margin-left: 0.4em; font-size: var(--fs-body); font-weight: var(--fw-regular); color: var(--color-accent); }
.ccn-news-display__text img { margin-top: 0.6em; }
.ccn-toolbar { margin: 0 0 32px; }
.ccn-calendar__toolbar { margin-bottom: 0; }

.ftTbl { border-collapse: collapse; margin: 16px auto; width: 100%; max-width: 100%; }
#vereinsTblParent { overflow-x: auto; }
#vereinsTblParent .ftTbl { min-width: 950px; }
.ftcNONE, .ftcOrange, .ftcNgrey, .ftcFgrey, .ftcRgrey, .ftcNgreen, .ftFgreen, .ftcRgreen,
.ftNblue, .ftFblue, .ftcRblue, .ftcredB, .ftcNyellow, .ftFyellow, .ftcRyellow, .fth {
    padding: 8px 10px;
    font-size: var(--fs-body);
    font-family: var(--font-family);
    text-align: center;
    vertical-align: middle;
    border: 1px solid var(--color-border);
    background-color: #fff;
    color: var(--color-text);
    white-space: nowrap;
}
.fth { background: var(--color-text); color: #fff; font-weight: var(--fw-bold); white-space: nowrap; }
.ftcOrange { font-weight: var(--fw-bold); color: #fff; background-color: #c96a1c; }
.ftcNgrey { text-align: left; background-color: #ececea; }
.ftcFgrey { font-weight: var(--fw-bold); background-color: #ececea; }
.ftcRgrey { text-align: right; background-color: #ececea; }
.ftcNgreen { text-align: left; color: #fff; background-color: #4b7d3c; }
.ftFgreen { color: #fff; font-weight: var(--fw-bold); background-color: #4b7d3c; }
.ftcRgreen { color: #fff; text-align: right; background-color: #4b7d3c; }
.ftNblue { text-align: left; color: #fff; background-color: #3f6fa8; }
.ftFblue { color: #fff; font-weight: var(--fw-bold); background-color: #3f6fa8; }
.ftcRblue { color: #fff; text-align: right; background-color: #3f6fa8; }
.ftcredB { color: #fff; font-weight: var(--fw-bold); background-color: var(--color-accent); text-align: center; }
.ftcNyellow { text-align: left; background-color: #f6e08a; }
.ftFyellow { font-weight: var(--fw-bold); background-color: #f6e08a; }
.ftcRyellow { text-align: right; background-color: #f6e08a; }

.table-scroll { overflow-x: auto; }
.alternatingTable { width: 100%; border-collapse: collapse; }
.alternatingTable tr:nth-child(2n) { background-color: var(--color-bg-soft); }
.alternatingTable th { text-align: left; background-color: var(--color-accent); color: #fff; font-size: var(--fs-body); padding: 8px 10px; }
.alternatingTable td { padding: 6px 10px; }
.alternatingTable th:first-child, .alternatingTable td:first-child { white-space: nowrap; }

/* Termine/Einsaetze/News list-view widgets (ccnDatesDisplay/ccnDatesPreview render
   .article / .articlePreview cards with a title heading inside). Scope down from
   the sitewide h2/h3 page-heading size to a card-title size — do not touch h1/h2/h3. */
#dates .article h2, #dates .article h3, #dates .articlePreview h2, #dates .articlePreview h3,
#calenderAbo .article h2, #calenderAbo .article h3, #calenderAbo .articlePreview h2, #calenderAbo .articlePreview h3,
#protocols .article h2, #protocols .article h3, #protocols .articlePreview h2, #protocols .articlePreview h3,
.article h2, .article h3, .articlePreview h2, .articlePreview h3 {
    font-size: var(--fs-body);
    line-height: 1.65;
    margin: 0;
}

/* Galerie-Uebersicht: gerade, eckige Kacheln ohne Schatten auf Beige,
   linksbuendig im Raster statt schraeg "ausgelegter" Fotos */
.ccn-album__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 40px;
    padding: 0;
}
.ccn-album__item { align-items: stretch; }
.pictureFrame {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: var(--color-bg-soft);
    box-shadow: none;
    transform: none;
    padding: 10px 10px 0;
    transition: none;
}
.pictureFrame:hover, .pictureFrame:focus-visible { transform: none; }
.pictureFrame img { width: 100%; border-radius: 0; aspect-ratio: 3 / 4; object-fit: cover; }
.pictureText { display: block; text-align: left; font-size: var(--fs-body); font-weight: var(--fw-regular); color: var(--color-text); padding: 8px 0 10px; }
.pictureFrame:hover .pictureText { color: var(--color-accent); }
.ccn-album__title { font-size: var(--fs-h3); }

#weather, #weather1 {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 12px;
    overflow: hidden;
}

#album button, #jfalbum button { background-color: rgba(255,255,255,0.85); }

.ui-dialog .ui-widget.ui-widget-content { border: 1px solid var(--color-accent) !important; font-family: var(--font-family); }
.ui-dialog .ui-widget-content { background: #fff !important; }
.ui-dialog .ui-widget-header {
    border: 1px solid var(--color-text) !important;
    background: var(--color-accent) !important;
    color: #fff !important;
    font-weight: var(--fw-bold);
}

.loginControl { position: absolute; left: 8px; top: 8px; padding: 4px; z-index: 999; font-size: 0.8rem; }
.loginControl a { font-weight: var(--fw-semibold); margin-left: 4px; }

.elastic-video { position: relative; overflow: hidden; border-radius: var(--radius-md); margin: 16px 0; max-width: 640px; aspect-ratio: 100 / 54; }
.elastic-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Schlanke Ersatz-Utilities fuer die responsiven Bootstrap-Klassen,
   die von ccnRuntime-Beispielmarkup (Kalender-Ansichten) weiterverwendet werden */
.hidden-xs, .hidden-sm { display: block; }
.visible-xs, .visible-sm { display: none; }
@media (max-width: 900px) {
    .hidden-xs, .hidden-sm { display: none !important; }
    .visible-xs, .visible-sm { display: block !important; }
}

/* ===================== Utility ===================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.small { font-size: var(--fs-small); color: var(--color-text-muted); }

/* ===================== Responsive ===================== */
/* Umbruchpunkt 921px wie im Prototyp (Astra "ast-header-break-point") -
   darunter passt die Navigation mit je 40px Innenabstand nicht mehr
   neben das Logo. */
@media (max-width: 1024px) {
    .einsatz-grid ccn-dates-preview { gap: 24px; }
    .einsatz-grid .articlePreview { min-height: 240px; }

    /* Prototyp: ab Tablet zwei Personenkarten je Reihe, 20px Abstand */
    .people-grid { gap: 20px; }
    .person-photo, .person-card { flex-basis: calc((100% - 20px) / 2); }
}

@media (max-width: 921px) {
    .site-header__bar { grid-template-columns: auto 1fr; }
    .site-header__brand { justify-content: flex-start; }
    .site-header__actions { justify-content: flex-end; }

    .main-nav { display: none; }
    .nav-toggle { display: inline-flex; }

    .site-header.is-open .main-nav {
        display: block;
        position: fixed;
        inset: var(--header-height) 0 0 0;
        background: var(--color-bg);
        overflow-y: auto;
        padding: 12px 0 40px;
    }
    .site-header.is-open .main-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .site-header.is-open .main-nav__list a,
    .site-header.is-open .main-nav__list > li > a {
        padding: 14px 24px;
        font-size: 17px;
        line-height: 1.4;
    }
    .site-header.is-open .main-nav__list > li > a:hover { transform: none; }
    .site-header.is-open .main-nav__sub {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: 0; background: var(--color-bg-soft);
        display: none; border-radius: 0; margin: 0 0 6px; width: auto;
    }
    .site-header.is-open li.is-open .main-nav__sub { display: block; }

    .cta-link__arrow { height: 51px; }
    .cta-link { gap: 20px; margin-right: 23px; }
}

@media (max-width: 767px) {
    /* Prototyp stellt Text/Bild-Bloecke ab hier untereinander */
    .split { flex-direction: column; align-items: stretch; gap: 24px; }
    .split__media { flex-basis: auto; max-width: 300px; margin: 0 auto; }
    .vehicle__row { gap: 16px; }
    .vehicle__photo { flex-basis: 100%; max-width: 100%; }
    .vehicle__info { flex-basis: 100%; padding-left: 0; }
    .vehicle__row > table.vehicle__specs, .vehicle__specs-wrap { flex-basis: 100%; }
    .vehicle__row > table.vehicle__specs + .vehicle__photo, .vehicle__specs-wrap + .vehicle__photo,
    .vehicle__photo + table.vehicle__specs, .vehicle__photo + .vehicle__specs-wrap { margin-left: 0; }
    :root { --space-block: 48px; }

    .person-photo, .person-card { flex-basis: 100%; }
    .person-photo__caption .name,
    .person-photo__caption .role { font-size: 14px; }

    /* Prototyp nutzt auf dem Handy eine kleinere Zaehler-Variante */
    .counter__num { font-size: 45px; font-weight: var(--fw-bold); }
    .counter__label { font-size: 14px; }

    /* Handy: Kacheln bleiben nebeneinander und lassen sich seitlich wischen */
    .einsatz-grid ccn-dates-preview {
        gap: 17px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin: 0 -24px;
        padding: 0 24px 8px;
        scroll-padding: 0 24px;
        scrollbar-width: none;
    }
    .einsatz-grid .articlePreview { flex: 0 0 78%; min-height: 200px; scroll-snap-align: start; }
    .einsatz-grid .articlePreviewHead { font-size: var(--fs-h3); overflow-wrap: normal; }
    .einsatz-grid .articlePreviewDate { font-size: var(--fs-small); }

    .cta-block h2 { height: auto; padding: 33px 0; line-height: 45px; }
    .cta-block a.icon-link { margin-top: -17px; padding: 0 0 17px; }
    .cta-block__icon { height: 40px; }
}

@media (max-width: 600px) {
    .link-row { grid-template-columns: 1fr; }
    .card { padding: 20px; }
    .hero { padding: 24px 0 32px; }
    .hero__top { flex-wrap: wrap; align-items: center; padding-left: 0; margin-bottom: -13px; }
    .hero__crest { width: 59px; }
    .hero__title-full { display: none; }
    .hero__title-short { display: inline; }
    .hero__caption { align-items: flex-start; }
    .hero__caption p { max-width: 100%; }
    .page-hero__top { margin-bottom: -38px; }
}

