/* ==========================================================================
   FF Plenzengreith – Design-System (Frontend)
   --------------------------------------------------------------------------
   Aufbau:
     1. Design-Token
     2. Grundlagen & Typografie
     3. Layout-Bausteine
     4. Kopfbereich & Navigation
     5. Hero & Sektionen
     6. Karten & Listen
     7. Formulare & Schaltflächen
     8. Galerie & Lightbox
     9. Kalender, Chronik, Tabellen
    10. Fußzeile
    11. Animationen
    12. Responsive Anpassungen
   Keine externen Schriften oder Bibliotheken – DSGVO-freundlich und schnell.
   ========================================================================== */

/* ==========================================================================
   1. Design-Token
   ========================================================================== */
:root {
    --red:          #d81324;
    --red-dark:     #9d0a17;
    --red-glow:     rgba(216, 19, 36, .45);
    --accent:       #ffab00;

    --bg:           #0a0c11;
    --bg-alt:       #0e1118;
    --surface:      #141822;
    --surface-2:    #1b2130;
    --line:         #262d3d;
    --line-soft:    rgba(255, 255, 255, .07);

    --text:         #eef1f7;
    --text-soft:    #b6bdcd;
    --muted:        #8b93a7;

    --radius-sm:    8px;
    --radius:       14px;
    --radius-lg:    22px;

    --shadow:       0 18px 44px rgba(0, 0, 0, .45);
    --shadow-lg:    0 30px 80px rgba(0, 0, 0, .6);

    --wrap:         1240px;
    --gap:          clamp(1.2rem, 3vw, 2.2rem);

    --ff-sans:      "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --ff-display:   "Segoe UI Semibold", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

    --ease:         cubic-bezier(.22, .8, .28, 1);
    --dur:          .45s;
}

/* ==========================================================================
   2. Grundlagen & Typografie
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--ff-sans);
    font-size: 1.02rem;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--ff-display);
    line-height: 1.14;
    margin: 0 0 .6em;
    letter-spacing: -.015em;
    font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.08rem; }

p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

strong { color: #fff; }

::selection { background: var(--red); color: #fff; }

.icon {
    width: 1.25em;
    height: 1.25em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Sprungmarke für Tastaturbedienung */
.skip-link {
    position: absolute;
    left: 1rem; top: -100px;
    z-index: 999;
    background: var(--red);
    color: #fff;
    padding: .8rem 1.4rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    transition: top .2s;
}
.skip-link:focus { top: 0; }

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

/* ==========================================================================
   3. Layout-Bausteine
   ========================================================================== */
.wrap {
    width: min(100% - 2.4rem, var(--wrap));
    margin-inline: auto;
}

/* overflow-x: clip verhindert waagrechtes Scrollen durch die
   Startpositionen der Scroll-Animationen (ohne position: sticky zu stören). */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; overflow-x: clip; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--alt   { background: var(--bg-alt); }
.section--surface {
    background:
        radial-gradient(1200px 400px at 10% -10%, rgba(216, 19, 36, .10), transparent 60%),
        var(--bg-alt);
}

.section-head {
    max-width: 720px;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: .9rem;
}
.eyebrow::before {
    content: "";
    width: 34px; height: 2px;
    background: linear-gradient(90deg, var(--red), transparent);
    border-radius: 2px;
}
.section-head--center .eyebrow::before { display: none; }

.lead {
    font-size: clamp(1.02rem, 1.6vw, 1.18rem);
    color: var(--text-soft);
}

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ==========================================================================
   4. Kopfbereich & Navigation
   ========================================================================== */
.topbar {
    background: #05070b;
    border-bottom: 1px solid var(--line-soft);
    font-size: .84rem;
    color: var(--muted);
}
.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 40px;
    flex-wrap: wrap;
}
.topbar a { color: var(--muted); transition: color .2s; }
.topbar a:hover { color: #fff; }
.topbar__emergency {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    color: #fff;
}
.topbar__emergency .icon { color: var(--red); }
.topbar__social { display: flex; gap: .9rem; align-items: center; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(10, 12, 17, .82);
    backdrop-filter: saturate(150%) blur(14px);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: background .3s var(--ease), border-color .3s, box-shadow .3s;
}
.site-header.is-stuck {
    background: rgba(8, 10, 14, .96);
    border-bottom-color: var(--line);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

/* Der Kopfbereich darf breiter sein als der Inhalt, damit Logo, Navigation
   und die Kontakt-Schaltfläche nebeneinander Platz finden. */
.site-header .wrap { width: min(100% - 2.4rem, 1440px); }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 78px;
}

.brand { display: flex; align-items: center; gap: .85rem; flex: 0 0 auto; }
.brand__logo { width: 46px; height: auto; flex: 0 0 auto; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .5)); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: .01em;
    white-space: nowrap;
}
.brand__sub {
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 700;
    white-space: nowrap;
}

/* --- Hauptnavigation --- */
.nav { display: flex; align-items: center; gap: .1rem; flex-wrap: nowrap; }
.nav__item { position: relative; }

.nav__link {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .75rem .95rem;
    border-radius: 10px;
    font-size: .93rem;
    font-weight: 600;
    color: var(--text-soft);
    white-space: nowrap;
    transition: color .2s, background .25s;
}
.nav__link:hover,
.nav__item.is-open > .nav__link { color: #fff; background: rgba(255, 255, 255, .06); }

.nav__link.is-active { color: #fff; }
.nav__link.is-active::after {
    content: "";
    position: absolute;
    left: .95rem; right: .95rem; bottom: .35rem;
    height: 2px;
    background: var(--red);
    border-radius: 2px;
}

.nav__caret { width: .8em; height: .8em; opacity: .6; transition: transform .25s; }
.nav__item.is-open .nav__caret { transform: rotate(180deg); }

.nav__sub {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 236px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .45rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    /* Beim Ausblenden kurz verzögern, damit der Weg zur Maus nicht abreißt */
    transition: opacity .22s var(--ease) .18s,
                transform .22s var(--ease) .18s,
                visibility .22s .18s;
}

/* Unsichtbare Brücke über die Lücke zwischen Menüpunkt und Untermenü.
   Ohne sie verliert der Mauszeiger auf dem Weg nach unten den Hover-Zustand
   und das Untermenü klappt zu, bevor man einen Eintrag anklicken kann. */
.nav__sub::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 16px;
}

.nav__item:hover > .nav__sub,
.nav__item.is-open > .nav__sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

.nav__sub a {
    display: block;
    padding: .62rem .85rem;
    border-radius: 9px;
    font-size: .91rem;
    color: var(--text-soft);
    transition: background .2s, color .2s, padding-left .2s;
}
.nav__sub a:hover { background: rgba(216, 19, 36, .16); color: #fff; padding-left: 1.15rem; }

.header__actions { display: flex; align-items: center; gap: .6rem; flex: 0 0 auto; }

.nav-toggle {
    display: none;
    width: 46px; height: 46px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.nav-toggle__bars { position: relative; width: 20px; height: 14px; }
.nav-toggle__bars span {
    position: absolute; left: 0;
    width: 100%; height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 6px; }
.nav-toggle__bars span:nth-child(3) { top: 12px; }
.nav-toggle.is-active .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-active .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- Mobile Navigation --- */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 95;
    background:
        radial-gradient(700px 380px at 100% 0%, rgba(216, 19, 36, .16), transparent 65%),
        var(--bg);
    padding: 5.5rem 1.4rem 2.5rem;
    /* eigener Scrollbereich: verhindert waagrechtes Überlaufen der Seite */
    overflow: hidden auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; }

.mobile-nav__list { list-style: none; margin: 0; padding: 0; }
.mobile-nav__list > li {
    border-bottom: 1px solid var(--line-soft);
    opacity: 0;
    transform: translateX(24px);
    transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.mobile-nav.is-open .mobile-nav__list > li { opacity: 1; transform: none; }
.mobile-nav.is-open .mobile-nav__list > li:nth-child(1)  { transition-delay: .04s; }
.mobile-nav.is-open .mobile-nav__list > li:nth-child(2)  { transition-delay: .08s; }
.mobile-nav.is-open .mobile-nav__list > li:nth-child(3)  { transition-delay: .12s; }
.mobile-nav.is-open .mobile-nav__list > li:nth-child(4)  { transition-delay: .16s; }
.mobile-nav.is-open .mobile-nav__list > li:nth-child(5)  { transition-delay: .20s; }
.mobile-nav.is-open .mobile-nav__list > li:nth-child(6)  { transition-delay: .24s; }
.mobile-nav.is-open .mobile-nav__list > li:nth-child(7)  { transition-delay: .28s; }
.mobile-nav.is-open .mobile-nav__list > li:nth-child(8)  { transition-delay: .32s; }
.mobile-nav.is-open .mobile-nav__list > li:nth-child(n+9) { transition-delay: .36s; }

.mobile-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: 1.05rem .25rem;
    font-size: 1.08rem;
    font-weight: 600;
    width: 100%;
    background: none;
    border: 0;
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.mobile-nav__link .icon { transition: transform .25s; opacity: .6; }
.mobile-nav__link[aria-expanded="true"] .icon { transform: rotate(180deg); color: var(--red); opacity: 1; }

.mobile-nav__sub {
    list-style: none;
    margin: 0;
    padding: 0 0 .6rem .9rem;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .32s var(--ease);
}
.mobile-nav__sub.is-open { grid-template-rows: 1fr; }
.mobile-nav__sub > div { overflow: hidden; }
.mobile-nav__sub a {
    display: block;
    padding: .6rem 0;
    color: var(--text-soft);
    border-left: 2px solid var(--line);
    padding-left: .9rem;
}
.mobile-nav__sub a:hover { color: #fff; border-left-color: var(--red); }

.mobile-nav__footer {
    margin-top: 2rem;
    display: grid;
    gap: .8rem;
}

/* ==========================================================================
   5. Hero & Sektionen
   ========================================================================== */
.hero {
    position: relative;
    min-height: clamp(560px, 86vh, 860px);
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; animation: heroZoom 22s var(--ease) forwards; }
.hero::after {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(105deg, rgba(6, 8, 12, .96) 8%, rgba(6, 8, 12, .78) 45%, rgba(6, 8, 12, .35) 100%),
        linear-gradient(0deg, var(--bg) 2%, transparent 42%);
}
.hero__glow {
    position: absolute;
    z-index: -1;
    width: 640px; height: 640px;
    right: -140px; top: -180px;
    background: radial-gradient(circle, var(--red-glow), transparent 62%);
    filter: blur(30px);
    opacity: .55;
    animation: pulseGlow 7s ease-in-out infinite;
}

.hero__inner { padding: clamp(4rem, 10vw, 7rem) 0; max-width: 780px; }

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem 1rem .45rem .55rem;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .05);
    border-radius: 100px;
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1.6rem;
    backdrop-filter: blur(6px);
}
.hero__badge .dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 0 var(--red-glow);
    animation: blink 2.4s infinite;
}

.hero h1 { margin-bottom: .5em; }
.hero h1 .accent {
    display: block;
    background: linear-gradient(96deg, var(--red) 10%, #ff5f43 55%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero__text { font-size: clamp(1.05rem, 1.9vw, 1.28rem); color: var(--text-soft); max-width: 610px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }

.hero__scroll {
    position: absolute;
    bottom: 1.8rem; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
    font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
    color: var(--muted);
}
.hero__scroll .bar {
    width: 2px; height: 42px;
    background: linear-gradient(var(--red), transparent);
    border-radius: 2px;
    animation: scrollHint 2.2s var(--ease) infinite;
}

/* Notrufband */
.emergency-strip {
    background: linear-gradient(96deg, var(--red-dark), var(--red) 45%, #ff3b2f 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.emergency-strip::before {
    content: "";
    position: absolute; inset: 0;
    background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .12) 0 18px, transparent 18px 36px);
    opacity: .5;
}
.emergency-strip__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    padding: 1.5rem 0;
}
.emergency-strip__number {
    display: flex; align-items: center; gap: 1rem;
    font-family: var(--ff-display);
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}
.emergency-strip__number .icon { width: 1em; height: 1em; stroke-width: 1.6; }
.emergency-strip__text { max-width: 640px; }
.emergency-strip__text strong { display: block; font-size: 1.06rem; }
.emergency-strip__text p { margin: .2rem 0 0; font-size: .95rem; opacity: .92; }

/* ==========================================================================
   6. Karten & Listen
   ========================================================================== */
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--dur) var(--ease), border-color .3s, box-shadow var(--dur) var(--ease);
}
.card:hover {
    transform: translateY(-6px);
    border-color: rgba(216, 19, 36, .5);
    box-shadow: var(--shadow);
}

.card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-2);
}
.card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .8s var(--ease), filter .5s;
}
.card:hover .card__media img { transform: scale(1.07); }
.card__media::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(10, 12, 17, .85), transparent 55%);
}

.card__body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; gap: .6rem; }
.card__title { font-size: 1.16rem; margin: 0; }
.card__title a { transition: color .2s; }
.card:hover .card__title a { color: #fff; }
.card__text { color: var(--text-soft); font-size: .95rem; margin: 0; }
.card__meta {
    display: flex; flex-wrap: wrap; gap: .35rem 1rem;
    font-size: .85rem; color: var(--muted);
    margin-top: auto; padding-top: .7rem;
}
.card__meta span { display: inline-flex; align-items: center; gap: .35rem; }

/* Klickbare Gesamtfläche */
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* Datums-Badge */
.date-badge {
    position: absolute;
    top: .9rem; left: .9rem;
    z-index: 2;
    background: rgba(8, 10, 14, .85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: .5rem .7rem;
    text-align: center;
    line-height: 1;
    min-width: 58px;
}
.date-badge__day { display: block; font-size: 1.35rem; font-weight: 800; font-family: var(--ff-display); }
.date-badge__month { display: block; font-size: .66rem; letter-spacing: .12em; color: var(--red); font-weight: 700; margin-top: .2rem; }
.date-badge__year { display: block; font-size: .64rem; color: var(--muted); margin-top: .15rem; }

/* Kategorie-Chip */
.chip {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .32rem .72rem;
    border-radius: 100px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--line-soft);
    color: var(--text);
}
.chip--cat { position: absolute; top: .9rem; right: .9rem; z-index: 2; color: #fff; }
.chip .icon { width: .95em; height: .95em; }

/* Filterleiste */
.filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: .8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.filterbar__group { display: flex; flex-wrap: wrap; gap: .45rem; }
.filterbar__spacer { flex: 1; }

.pill {
    padding: .5rem 1rem;
    border-radius: 100px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-soft);
    border: 1px solid transparent;
    transition: background .25s, color .2s, border-color .2s, transform .2s;
}
.pill:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateY(-1px); }
.pill.is-active { background: var(--red); color: #fff; border-color: var(--red); }

/* Statistik-Kacheln */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--surface); padding: 1.8rem 1.3rem; text-align: center; transition: background .3s; }
.fact:hover { background: var(--surface-2); }
.fact .icon { width: 1.7rem; height: 1.7rem; color: var(--red); margin: 0 auto .7rem; }
.fact__value { font-family: var(--ff-display); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; line-height: 1; }
.fact__label { font-size: .86rem; color: var(--muted); margin-top: .5rem; }

/* Mitglieder */
.member {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .4s var(--ease), border-color .3s;
}
.member:hover { transform: translateY(-5px); border-color: rgba(216, 19, 36, .45); }
.member__photo { aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-2); }
.member__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.member:hover .member__photo img { transform: scale(1.06); }
.member__body { padding: 1.1rem 1.15rem 1.3rem; }
.member__rank { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.member__name { font-size: 1.06rem; margin: .25rem 0 .2rem; font-family: var(--ff-display); font-weight: 700; }
.member__function { font-size: .9rem; color: var(--muted); }

/* Fahrzeugkarte */
.vehicle-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color .3s, box-shadow .4s;
}
.vehicle-card:hover { border-color: rgba(216, 19, 36, .45); box-shadow: var(--shadow); }
.vehicle-card:nth-child(even) .vehicle-card__media { order: 2; }
.vehicle-card__media { position: relative; min-height: 280px; overflow: hidden; background: var(--surface-2); }
.vehicle-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.vehicle-card:hover .vehicle-card__media img { transform: scale(1.05); }
.vehicle-card__tag {
    position: absolute; top: 1rem; left: 1rem;
    background: var(--red); color: #fff;
    padding: .4rem .9rem; border-radius: 8px;
    font-weight: 800; font-size: .84rem; letter-spacing: .05em;
}
.vehicle-card__body { padding: clamp(1.4rem, 3vw, 2.2rem); display: flex; flex-direction: column; gap: .9rem; }
.spec-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.spec-list div { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .65rem .8rem; }
.spec-list dt { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.spec-list dd { margin: .2rem 0 0; font-weight: 700; font-size: .96rem; }

/* Prosa-Inhalte aus dem Redaktionssystem */
.prose { color: var(--text-soft); font-size: 1.03rem; }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: 1.9em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.35rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { position: relative; padding-left: 1.7rem; }
.prose ul li::before {
    content: "";
    position: absolute; left: .25rem; top: .68em;
    width: 7px; height: 7px;
    background: var(--red);
    border-radius: 2px;
    transform: rotate(45deg);
}
.prose ol { list-style: decimal; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #fff; }
.prose blockquote {
    margin: 1.6em 0;
    padding: 1rem 1.4rem;
    border-left: 3px solid var(--red);
    background: var(--surface);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.prose th, .prose td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { color: var(--text); font-weight: 700; }

/* Ausstattungsliste */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.check-list li { position: relative; padding-left: 1.9rem; color: var(--text-soft); }
.check-list li::before {
    content: "";
    position: absolute; left: 0; top: .48em;
    width: 12px; height: 7px;
    border-left: 2px solid var(--red);
    border-bottom: 2px solid var(--red);
    transform: rotate(-45deg);
}

/* Info-Kacheln (Bürgerservice) */
.info-tile {
    position: relative;
    display: flex;
    gap: 1.1rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .4s var(--ease), border-color .3s, background .3s;
}
.info-tile:hover { transform: translateY(-5px); border-color: rgba(216, 19, 36, .5); background: var(--surface-2); }
.info-tile__icon {
    flex: 0 0 auto;
    width: 52px; height: 52px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: linear-gradient(140deg, rgba(216, 19, 36, .22), rgba(216, 19, 36, .05));
    border: 1px solid rgba(216, 19, 36, .3);
    color: var(--red);
}
.info-tile__icon .icon { width: 1.5rem; height: 1.5rem; }
.info-tile h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.info-tile p { font-size: .93rem; color: var(--text-soft); margin: 0; }

/* Split-Bereich (Bild + Text) */
.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(1.8rem, 5vw, 4rem);
    align-items: center;
}
.split__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split__media::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(30deg, rgba(216, 19, 36, .3), transparent 55%);
    mix-blend-mode: screen;
}
.split__badge {
    position: absolute;
    left: 1.2rem; bottom: 1.2rem;
    background: rgba(8, 10, 14, .88);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: .9rem 1.2rem;
}
.split__badge strong { display: block; font-size: 1.7rem; font-family: var(--ff-display); }
.split__badge span { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Seitenkopf für Unterseiten */
.page-hero {
    position: relative;
    padding: clamp(4.5rem, 11vw, 7.5rem) 0 clamp(2.5rem, 6vw, 4rem);
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid var(--line);
}
.page-hero::before {
    content: "";
    position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(900px 380px at 12% 0%, rgba(216, 19, 36, .22), transparent 65%),
        linear-gradient(180deg, #10131c, var(--bg));
}
.page-hero__img { position: absolute; inset: 0; z-index: -3; opacity: .25; }
.page-hero__img img { width: 100%; height: 100%; object-fit: cover; }
.page-hero h1 { margin-bottom: .35em; }
.page-hero .lead { max-width: 700px; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .84rem; color: var(--muted); margin-bottom: 1.2rem; }
.breadcrumb a { transition: color .2s; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span[aria-hidden] { opacity: .45; }

/* ==========================================================================
   7. Formulare & Schaltflächen
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .88rem 1.6rem;
    border-radius: 11px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform .25s var(--ease), box-shadow .3s, background .25s, color .2s, border-color .25s;
}
.btn:active { transform: translateY(1px) scale(.995); }

.btn--primary {
    background: linear-gradient(96deg, var(--red), #f0323f);
    color: #fff;
    box-shadow: 0 10px 30px -10px var(--red-glow);
}
.btn--primary:hover { box-shadow: 0 16px 40px -12px var(--red-glow); transform: translateY(-2px); }
.btn--primary::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28), transparent 70%);
    transform: translateX(-120%);
    transition: transform .7s var(--ease);
}
.btn--primary:hover::before { transform: translateX(120%); }

.btn--ghost { background: rgba(255, 255, 255, .05); border-color: var(--line); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); transform: translateY(-2px); }

.btn--light { background: #fff; color: #0b0d12; }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }

.btn--sm { padding: .6rem 1.05rem; font-size: .87rem; }
.btn--block { width: 100%; }

.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; }
.field { display: grid; gap: .45rem; }
.field > label { font-size: .87rem; font-weight: 600; color: var(--text-soft); }
.field .req { color: var(--red); }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="search"], input[type="number"], input[type="date"], input[type="time"],
select, textarea {
    width: 100%;
    padding: .82rem 1rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font: inherit;
    font-size: .96rem;
    transition: border-color .22s, box-shadow .22s, background .22s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(216, 19, 36, .18);
    background: var(--surface);
}
textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b93a7' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; background-size: 1.1rem; padding-right: 2.6rem; }
::placeholder { color: #5d6579; }

.checkbox { display: flex; align-items: flex-start; gap: .7rem; font-size: .92rem; color: var(--text-soft); cursor: pointer; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--red); margin-top: .15rem; flex: 0 0 auto; }

.alert {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid;
    background: var(--surface);
    font-size: .95rem;
}
.alert--success { border-color: #1f9d55; background: rgba(31, 157, 85, .1); }
.alert--error   { border-color: var(--red); background: rgba(216, 19, 36, .1); }
.alert--info    { border-color: #3b82f6; background: rgba(59, 130, 246, .1); }

.hp-field { position: absolute; left: -9999px; opacity: 0; }

/* Kontakt-Infoblock */
.contact-info { display: grid; gap: 1rem; }
.contact-info__item { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .3s; }
.contact-info__item:hover { border-color: rgba(216, 19, 36, .4); }
.contact-info__item .icon { width: 1.35rem; height: 1.35rem; color: var(--red); margin-top: .2rem; }
.contact-info__item strong { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.contact-info__item span, .contact-info__item a { font-size: 1rem; color: var(--text); }

/* ==========================================================================
   8. Galerie & Lightbox
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem; }
.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
    cursor: zoom-in;
    border: 1px solid var(--line);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .3s; }
.gallery-item:hover img { transform: scale(1.09); filter: brightness(1.08); }
.gallery-item::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(216, 19, 36, .35), transparent 60%);
    opacity: 0; transition: opacity .3s;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item__caption {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: .7rem .8rem;
    font-size: .82rem;
    background: linear-gradient(0deg, rgba(6, 8, 12, .9), transparent);
    transform: translateY(100%); opacity: 0;
    transition: transform .3s var(--ease), opacity .3s;
}
.gallery-item:hover .gallery-item__caption { transform: translateY(0); opacity: 1; }

.lightbox {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(4, 5, 8, .96);
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 3rem);
    backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; animation: fadeIn .25s var(--ease); }
.lightbox__img {
    max-width: 100%; max-height: 82vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: zoomIn .32s var(--ease);
}
.lightbox__caption { position: absolute; bottom: 1.4rem; left: 0; right: 0; text-align: center; color: var(--text-soft); font-size: .92rem; padding: 0 1rem; }
.lightbox__btn {
    position: absolute;
    width: 52px; height: 52px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: #fff; cursor: pointer;
    transition: background .25s, transform .2s;
}
.lightbox__btn:hover { background: var(--red); transform: scale(1.06); }
.lightbox__btn--close { top: 1.2rem; right: 1.2rem; }
.lightbox__btn--prev  { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next  { right: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox__btn--prev:hover, .lightbox__btn--next:hover { transform: translateY(-50%) scale(1.06); }
.lightbox__counter { position: absolute; top: 1.6rem; left: 1.6rem; font-size: .88rem; color: var(--muted); }

/* ==========================================================================
   9. Kalender, Chronik, Tabellen
   ========================================================================== */
.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.calendar__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.calendar__title { font-family: var(--ff-display); font-size: 1.2rem; font-weight: 700; }
.calendar__nav { display: flex; gap: .4rem; }
.calendar__nav button {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    background: var(--bg-alt); border: 1px solid var(--line);
    border-radius: 10px; color: var(--text); cursor: pointer;
    transition: background .25s, color .2s, border-color .2s;
}
.calendar__nav button:hover { background: var(--red); border-color: var(--red); color: #fff; }

.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar__dow { padding: .65rem .4rem; text-align: center; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.calendar__day { min-height: 84px; padding: .45rem; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); font-size: .82rem; position: relative; }
.calendar__day:nth-child(7n) { border-right: 0; }
.calendar__day--muted { opacity: .32; }
.calendar__day--today { background: rgba(216, 19, 36, .1); }
.calendar__day--today .calendar__num { color: var(--red); font-weight: 800; }
.calendar__num { display: block; margin-bottom: .25rem; color: var(--text-soft); }
.calendar__event {
    display: block;
    font-size: .74rem;
    line-height: 1.3;
    padding: .2rem .35rem;
    margin-bottom: .18rem;
    border-radius: 5px;
    background: rgba(216, 19, 36, .2);
    border-left: 2px solid var(--red);
    color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: background .2s;
}
.calendar__event:hover { background: var(--red); color: #fff; }

/* Terminliste */
.event-row {
    display: flex; gap: 1.2rem; align-items: center;
    padding: 1.1rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .3s var(--ease), border-color .3s;
}
.event-row:hover { transform: translateX(5px); border-color: rgba(216, 19, 36, .45); }
.event-row__date {
    flex: 0 0 auto;
    width: 66px; text-align: center;
    background: var(--bg-alt); border: 1px solid var(--line);
    border-radius: 12px; padding: .55rem .3rem;
}
.event-row__date b { display: block; font-size: 1.4rem; font-family: var(--ff-display); line-height: 1; }
.event-row__date span { display: block; font-size: .68rem; letter-spacing: .1em; color: var(--red); font-weight: 700; margin-top: .25rem; }
.event-row__body h3 { font-size: 1.05rem; margin: 0 0 .2rem; }
.event-row__meta { font-size: .87rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .3rem 1rem; }

/* Chronik-Zeitstrahl */
.timeline { position: relative; padding-left: 2.6rem; }
.timeline::before {
    content: "";
    position: absolute; left: 10px; top: .5rem; bottom: .5rem;
    width: 2px;
    background: linear-gradient(180deg, var(--red), rgba(216, 19, 36, .18) 70%, transparent);
}
.timeline__item { position: relative; padding-bottom: 2.4rem; }
.timeline__item::before {
    content: "";
    position: absolute; left: -2.6rem; top: .55rem;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--red);
    box-shadow: 0 0 0 5px rgba(216, 19, 36, .12);
    transition: transform .3s var(--ease), box-shadow .3s;
}
.timeline__item:hover::before { transform: scale(1.18); box-shadow: 0 0 0 9px rgba(216, 19, 36, .16); }
.timeline__year {
    display: inline-block;
    font-family: var(--ff-display);
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--red);
    letter-spacing: .04em;
    margin-bottom: .3rem;
}
.timeline__card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.5rem;
    transition: border-color .3s, transform .35s var(--ease);
}
.timeline__item:hover .timeline__card { border-color: rgba(216, 19, 36, .4); transform: translateX(4px); }
.timeline__card h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.timeline__card p { color: var(--text-soft); font-size: .96rem; margin: 0; }

/* Datentabelle */
.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 420px; }
.data-table th, .data-table td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--line-soft); }
.data-table thead th { background: var(--surface-2); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .2s; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.data-table td:first-child { font-weight: 700; }

/* Download-Zeile */
.download-row {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .3s, transform .3s var(--ease);
}
.download-row:hover { border-color: rgba(216, 19, 36, .45); transform: translateY(-2px); }
.download-row__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; background: rgba(216, 19, 36, .14); color: var(--red); flex: 0 0 auto; }
.download-row__body { flex: 1; min-width: 0; }
.download-row__body h3 { font-size: 1rem; margin: 0 0 .15rem; }
.download-row__body p { font-size: .88rem; color: var(--muted); margin: 0; }

/* Blätterung */
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 2.6rem; }
.pagination a, .pagination span {
    min-width: 42px; height: 42px;
    display: grid; place-items: center;
    padding: 0 .7rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    font-size: .92rem; font-weight: 600;
    transition: background .25s, border-color .2s, color .2s;
}
.pagination a:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, .25); }
.pagination .is-current { background: var(--red); border-color: var(--red); color: #fff; }
.pagination .is-disabled { opacity: .35; }

.empty-state { text-align: center; padding: clamp(2.5rem, 7vw, 4.5rem) 1rem; color: var(--muted); }
.empty-state .icon { width: 3rem; height: 3rem; margin: 0 auto 1rem; color: var(--line); stroke-width: 1.2; }

/* ==========================================================================
   10. Fußzeile
   ========================================================================== */
.site-footer {
    background: #05070b;
    border-top: 1px solid var(--line);
    padding-top: clamp(3rem, 6vw, 4.5rem);
    margin-top: 0;
}
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2.2rem; padding-bottom: 2.8rem; }
.footer__brand { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.1rem; }
.footer__brand img { width: 44px; }
.footer h4 { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer__list a { color: var(--text-soft); font-size: .94rem; transition: color .2s, padding-left .2s; }
.footer__list a:hover { color: var(--red); padding-left: .35rem; }
.footer__text { color: var(--text-soft); font-size: .94rem; }
.footer__social { display: flex; gap: .6rem; margin-top: 1.1rem; }
.footer__social a {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 11px;
    color: var(--text-soft);
    transition: background .25s, color .2s, transform .25s, border-color .25s;
}
.footer__social a:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-3px); }

.footer__bottom {
    border-top: 1px solid var(--line);
    padding: 1.3rem 0;
    display: flex; flex-wrap: wrap; gap: .6rem 1.4rem;
    align-items: center; justify-content: space-between;
    font-size: .86rem; color: var(--muted);
}
.footer__bottom a:hover { color: var(--red); }

/* Entwicklerhinweis – fest im Quellcode, nicht über den Adminbereich änderbar */
.footer__credit {
    border-top: 1px solid var(--line-soft);
    padding: .95rem 0 1.3rem;
    text-align: center;
    font-size: .8rem;
    letter-spacing: .02em;
    color: #6a7285;
}
.footer__credit a {
    color: var(--text-soft);
    font-weight: 600;
    transition: color .2s;
}
.footer__credit a:hover,
.footer__credit a:focus-visible { color: var(--red); }

.to-top {
    position: fixed;
    right: 1.2rem; bottom: 1.2rem;
    z-index: 80;
    width: 48px; height: 48px;
    display: grid; place-items: center;
    background: var(--red); color: #fff;
    border: 0; border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 12px 30px -8px var(--red-glow);
    opacity: 0; visibility: hidden; transform: translateY(14px);
    transition: opacity .3s, transform .3s var(--ease), visibility .3s, background .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: #f0323f; }

/* ==========================================================================
   11. Animationen
   ========================================================================== */
[data-animate] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    will-change: opacity, transform;
}
[data-animate="left"]  { transform: translateX(-32px); }
[data-animate="right"] { transform: translateX(32px); }
[data-animate="zoom"]  { transform: scale(.94); }
[data-animate].is-visible { opacity: 1; transform: none; }

@keyframes heroZoom   { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes pulseGlow  { 0%, 100% { opacity: .38; transform: scale(1); } 50% { opacity: .62; transform: scale(1.1); } }
@keyframes blink      { 0%, 100% { box-shadow: 0 0 0 0 var(--red-glow); } 50% { box-shadow: 0 0 0 8px rgba(216, 19, 36, 0); } }
@keyframes scrollHint { 0% { transform: scaleY(.2); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(.2); transform-origin: bottom; } }
@keyframes fadeIn     { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn     { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes spin       { to { transform: rotate(360deg); } }

.spinner {
    width: 22px; height: 22px;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    [data-animate] { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   12. Responsive Anpassungen
   ========================================================================== */
/* Bei mittlerer Breite die Navigation kompakter setzen.
   Die Kontakt-Schaltfläche bleibt erhalten – sie ist der einzige
   Kontaktpunkt im Kopfbereich. */
@media (max-width: 1560px) {
    .site-header__inner { gap: .8rem; }
    .nav__link { padding: .66rem .52rem; font-size: .87rem; }
    .nav__link.is-active::after { left: .52rem; right: .52rem; }
    .nav__sub { min-width: 210px; }
}

/* Ab hier reicht der Platz nicht mehr für den Schriftzug – das Wappen genügt. */
@media (max-width: 1400px) {
    .brand__text { display: none; }
    .nav__link { padding: .62rem .46rem; font-size: .85rem; }
    .nav__link.is-active::after { left: .46rem; right: .46rem; }
}

@media (max-width: 1340px) {
    .brand__text { display: flex; }
    .nav { display: none; }
    .nav-toggle { display: inline-flex; }
    .header__actions .btn--desktop { display: none; }
    .site-header__inner { min-height: 72px; }
}

@media (max-width: 860px) {
    .vehicle-card { grid-template-columns: 1fr; }
    .vehicle-card:nth-child(even) .vehicle-card__media { order: 0; }
    .vehicle-card__media { min-height: 220px; }
    .calendar__day { min-height: 62px; }
    .calendar__event { font-size: 0; padding: 0; height: 6px; margin-bottom: 3px; border-radius: 3px; border-left: 0; background: var(--red); }
    .timeline { padding-left: 2.1rem; }
    .timeline__item::before { left: -2.1rem; width: 18px; height: 18px; }
}

@media (max-width: 560px) {
    body { font-size: .98rem; }
    .topbar__inner { justify-content: center; font-size: .78rem; }
    .site-header__inner { min-height: 68px; }
    .brand__logo { width: 38px; }
    .brand__name { font-size: .95rem; }
    .hero { min-height: 78vh; }
    .hero__actions .btn { width: 100%; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
    .facts { grid-template-columns: repeat(2, 1fr); }
    .event-row { flex-direction: column; align-items: flex-start; gap: .8rem; }
    .lightbox__btn { width: 44px; height: 44px; }
    .lightbox__btn--prev { left: .5rem; }
    .lightbox__btn--next { right: .5rem; }
}

@media print {
    .site-header, .topbar, .site-footer, .to-top, .nav-toggle, .hero__scroll { display: none !important; }
    body { background: #fff; color: #000; }
    .card, .timeline__card { border: 1px solid #ccc; }
}
