/* ═══════════════════════════════════════════════════════════════════
   Round Table 39 Kitzbühel – Design-System
   Zwei Welten in einem Stylesheet:
     1. Hauptsite  – „alpin-edel": Warmweiß, Anthrazit, Gold (Gams)
     2. .er-seite  – Entenrennen-Landingpage: Wasser, Enten-Gelb, Bojen-Rot
   Barrierefreiheit: WCAG 2.1 AA – geprüfte Kontraste, sichtbarer Fokus,
   Skip-Link, reduzierte Bewegung via prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════ */

@font-face {
    font-family: 'Montserrat';
    src: url('/assets/fonts/montserrat-var.woff2') format('woff2');
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Mulish';
    src: url('/assets/fonts/mulish-normal.woff2') format('woff2');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Mulish';
    src: url('/assets/fonts/mulish-italic.woff2') format('woff2');
    font-weight: 200 900;
    font-style: italic;
    font-display: swap;
}

:root {
    /* Hauptsite */
    --ink: #23262b;
    --paper: #faf9f6;
    --card: #ffffff;
    --line: #e6e2d8;
    --muted: #595e66;
    --gold: #c2a15c;        /* dekorativ (Linien, große Flächen) */
    --gold-text: #7d6528;   /* AA-Kontrast auf Papier – Links, Eyebrows */
    --dark: #191b1f;
    --dark-text: #d4d6da;
    --ok: #1a7a43;
    --bad: #b3261e;
    /* Entenrennen */
    --er-tief: #073d5c;
    --er-wasser: #0c6396;
    --er-himmel: #cdeaf6;
    --er-schaum: #eef8fc;
    --er-gelb: #ffd23f;
    --er-rot: #c92f22;
    --schrift: 'Mulish', system-ui, sans-serif;
    --display: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
    margin: 0;
    font-family: var(--schrift);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--gold-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.16; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.wrap-schmal { max-width: 820px; }
.zentriert { text-align: center; }

/* ── Barrierefreiheit: Fokus + Skip-Link ── */
:focus-visible { outline: 3px solid var(--gold-text); outline-offset: 2px; border-radius: 2px; }
.er-seite :focus-visible { outline-color: var(--er-gelb); }
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--ink); color: #fff; padding: 12px 20px; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ═══ Header / Navigation ═══ */
.site-header {
    position: sticky; top: 0; z-index: 60;
    background: rgba(250, 249, 246, .92);
    border-bottom: 1px solid var(--line);
}
/* Blur als Pseudo-Element: backdrop-filter direkt am Header würde ihn zum
   Containing Block der fixed positionierten Mobile-Nav machen – die
   Schublade klebte dann IM Header statt am Viewport. */
.site-header::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    backdrop-filter: blur(10px);
}
.site-header .wrap { display: flex; align-items: center; gap: 26px; min-height: 76px; }
.marke { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.marke img { width: 46px; height: 46px; }
.marke-text { font-family: var(--display); font-weight: 700; font-size: 1rem; line-height: 1.2; }
.marke-text small { display: block; font-family: var(--schrift); font-weight: 600; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.haupt-nav { display: flex; align-items: center; gap: 4px; }
.haupt-nav a {
    text-decoration: none; color: var(--ink); font-weight: 650; font-size: .95rem;
    padding: 10px 13px; border-radius: 8px;
}
.haupt-nav a:hover:not(.nav-cta):not(.nav-ente) { background: #efece4; }
.haupt-nav a[aria-current="page"] { color: var(--gold-text); }
.haupt-nav a[aria-current="page"]::after {
    content: ''; display: block; height: 2px; margin-top: 1px;
    background: var(--gold); border-radius: 2px;
}
.nav-cta {
    background: var(--ink); color: #fff !important; margin-left: 8px;
}
.nav-cta:hover { background: #000; }
.nav-ente {
    color: #fff !important; margin-left: 4px;
    background: linear-gradient(135deg, var(--er-wasser), var(--er-tief));
}
.nav-ente:hover { filter: brightness(1.12); }
.sprach-wahl { display: flex; gap: 2px; margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.sprach-wahl a { padding: 8px 8px; font-size: .85rem; color: var(--muted); text-decoration: none; font-weight: 700; }
.sprach-wahl a.aktiv { color: var(--gold-text); text-decoration: underline; text-underline-offset: 4px; }

.nav-knopf { display: none; }
.nav-schliessen { display: none; }
.nav-overlay { display: none; }

@media (max-width: 1080px) {
    .haupt-nav {
        position: fixed; inset: 0 0 0 auto; width: min(320px, 88vw); z-index: 80;
        flex-direction: column; align-items: stretch; gap: 6px;
        background: var(--card); padding: 74px 22px 24px;
        transform: translateX(100%); transition: transform .28s ease;
        box-shadow: -18px 0 44px rgba(0, 0, 0, .18); overflow-y: auto;
    }
    .haupt-nav.offen { transform: none; }
    .haupt-nav a { font-size: 1.05rem; padding: 12px 14px; }
    .nav-cta, .nav-ente { margin-left: 0; text-align: center; }
    .sprach-wahl { margin: 10px 0 0; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
    .nav-knopf {
        display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
        width: 46px; height: 46px; padding: 10px; border: 1px solid var(--line);
        border-radius: 10px; background: var(--card); cursor: pointer;
    }
    .nav-knopf span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
    .nav-schliessen {
        display: block; position: absolute; top: 14px; right: 14px;
        width: 44px; height: 44px; border: 0; background: none;
        font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--ink);
    }
    .nav-overlay.sichtbar {
        display: block; position: fixed; inset: 0; z-index: 70;
        background: rgba(20, 22, 26, .45);
    }
}

/* ═══ Buttons ═══ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 48px; padding: 12px 26px;
    font: inherit; font-weight: 750; font-size: .98rem; text-decoration: none;
    border-radius: 999px; border: 2px solid transparent; cursor: pointer;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-dunkel { background: var(--ink); color: #fff; }
.btn-dunkel:hover { background: #000; color: #fff; }
.btn-gold { background: var(--gold); color: #201a0d; }
/* Entenrennen-Farbcodierung: gleicher Wasser-Gradient wie der Nav-Pill */
.btn-ente { background: linear-gradient(135deg, var(--er-wasser), var(--er-tief)); color: #fff; }
.btn-ente:hover { filter: brightness(1.12); color: #fff; }
.btn-gold:hover { background: #cfae67; color: #201a0d; }
.btn-linie { background: transparent; color: var(--ink); border-color: #c9c4b8; }
.btn-linie:hover { border-color: var(--ink); color: var(--ink); }
.btn-hell { background: #fff; color: var(--ink); }
.btn-rot { background: var(--er-rot); color: #fff; }
.btn-rot:hover { background: #a92318; color: #fff; }
.btn-gelb { background: var(--er-gelb); color: #201a0d; }
.btn-gelb:hover { background: #ffdd66; color: #201a0d; }
.btn-reihe { display: flex; flex-wrap: wrap; gap: 14px; }

/* ═══ Sektionen / typografische Bausteine ═══ */
.sektion { padding: clamp(56px, 9vw, 104px) 0; }
.sektion-eng { padding: clamp(40px, 6vw, 64px) 0; }
.bg-hell { background: #f3f0e9; }
.bg-dunkel { background: var(--dark); color: var(--dark-text); }
.bg-dunkel h2, .bg-dunkel h3 { color: #fff; }
.bg-dunkel a:not(.btn) { color: #e2c886; }
.bg-dunkel a:hover:not(.btn) { color: #fff; }

.eyebrow {
    font-size: .78rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
    color: var(--gold-text); margin: 0 0 14px;
}
.bg-dunkel .eyebrow, .auf-dunkel { color: #e2c886; }
.vorwort { font-size: 1.16rem; color: var(--muted); max-width: 58ch; }
.zentriert .vorwort { margin-inline: auto; }
.bg-dunkel .vorwort { color: #b9bcc2; }
.gold-linie { width: 64px; height: 3px; border: 0; margin: 22px 0; background: var(--gold); border-radius: 2px; }
.zentriert .gold-linie { margin-inline: auto; }

/* ═══ Hero (Hauptsite) ═══ */
.hero {
    position: relative; overflow: hidden;
    padding: clamp(64px, 10vw, 130px) 0 clamp(56px, 8vw, 110px);
}
.hero::before {
    /* Gams-Wasserzeichen rechts – rein dekorativ */
    content: ''; position: absolute; right: -140px; top: -60px; width: 560px; height: 640px;
    background: url('/assets/img/logo.png') no-repeat center / contain;
    opacity: .08; pointer-events: none;
}
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 5vw, 72px); align-items: center; }
.hero-text h1 em { font-style: normal; color: var(--gold-text); }
.hero-lead { font-size: 1.18rem; color: var(--muted); max-width: 52ch; margin: 18px 0 28px; }
.hero-bild { position: relative; }
.hero-bild img { border-radius: 18px; box-shadow: 0 30px 70px rgba(35, 38, 43, .22); }
.hero-bild::after {
    content: ''; position: absolute; inset: 26px -26px -26px 26px; z-index: -1;
    border: 2px solid var(--gold); border-radius: 18px; opacity: .55;
}
@media (max-width: 860px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .hero-bild::after { display: none; }
}

/* Zahlen-Band (Spendensumme, Enten, Jahre …) */
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; }
.zahl { text-align: center; padding: 26px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.zahl b { display: block; font-family: var(--display); font-size: 2rem; font-weight: 750; color: var(--gold-text); }
.zahl span { font-size: .92rem; color: var(--muted); font-weight: 650; }

/* ═══ Karten (News, Termine, Projekte) ═══ */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.karte {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--card); border: 1px solid var(--line); border-radius: 18px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.karte:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(35, 38, 43, .12); }
.karte-bild { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
/* Personen-Karten (Vorstand): 6:5 statt 16:9 – im Querformat bliebe von
   einem Portrait nur ein Streifen. Die Bilder sind exakt in diesem
   Verhaeltnis abgelegt, es wird also nichts beschnitten. */
.karte-person .karte-bild { aspect-ratio: 6 / 5; background: #efe7d8; }
.karte-inhalt { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.karte-inhalt h3 { margin: 0; }
.karte-inhalt h3 a { color: inherit; text-decoration: none; }
.karte-inhalt h3 a:hover { color: var(--gold-text); }
.karte-inhalt h3 a::after { content: ''; position: absolute; inset: 0; }
.karte { position: relative; }
.karte-meta { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-text); }
.karte-text { color: var(--muted); font-size: .98rem; }
.karte-fuss { margin-top: auto; padding-top: 8px; font-weight: 750; color: var(--ink); font-size: .95rem; }

/* Termin-Zeile */
.termin { display: flex; gap: 20px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.termin:last-child { border-bottom: 0; }
.termin-datum {
    flex: 0 0 74px; text-align: center; background: var(--card); border: 1px solid var(--line);
    border-radius: 14px; padding: 10px 6px;
}
.termin-datum b { display: block; font-family: var(--display); font-size: 1.6rem; line-height: 1.1; }
.termin-datum span { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); }
.termin-info h3 { margin-bottom: 4px; }
.termin-info p { margin: 0; color: var(--muted); font-size: .97rem; }

/* ═══ Footer ═══ */
.site-footer { background: var(--dark); color: var(--dark-text); padding: clamp(48px, 7vw, 80px) 0 0; }
.site-footer a { color: #e2c886; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 34px; padding-bottom: 40px; }
.footer-marke { display: flex; align-items: center; gap: 12px; color: #fff; font-family: var(--display); font-weight: 700; }
.footer-marke img { width: 44px; height: 44px; }
.footer-spalte h3 { font-family: var(--schrift); font-size: .8rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #9a9da3; margin-bottom: 14px; }
.footer-spalte ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-spalte p { color: #b9bcc2; font-size: .95rem; }
.footer-sozial { display: flex; gap: 12px; margin-top: 16px; }
.footer-sozial a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid #3a3d43; border-radius: 12px; color: #d4d6da;
}
.footer-sozial a:hover { border-color: var(--gold); color: #fff; text-decoration: none; }
.footer-base {
    display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; align-items: center;
    border-top: 1px solid #303339; padding: 20px 0 26px; font-size: .88rem; color: #9a9da3;
}
.footer-sponsor { font-size: .88rem; color: #9a9da3; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

/* ═══ Formulare ═══ */
.feld { margin-bottom: 18px; }
.feld label { display: block; font-weight: 750; font-size: .95rem; margin-bottom: 7px; }
.feld input, .feld select, .feld textarea {
    width: 100%; padding: 13px 15px; font: inherit; color: var(--ink);
    background: var(--card); border: 1px solid #c9c4b8; border-radius: 12px;
}
.feld input:focus-visible, .feld select:focus-visible, .feld textarea:focus-visible {
    outline: 3px solid var(--gold-text); outline-offset: 1px; border-color: var(--gold-text);
}
.feld-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .feld-reihe { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.hp-field { position: absolute; left: -9999px; }
.form-success { background: #e8f4ec; border: 1px solid #b5d9c2; border-radius: 14px; padding: 22px 26px; }
.form-success h3 { color: var(--ok); }
[data-form-error] { color: var(--bad); font-weight: 700; margin: 0 0 14px; }
[data-form-error]:empty { display: none; }

/* ═══ Galerie + Lightbox ═══ */
ul.galerie { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
ul.galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
/* Masonry: natürliche Bildhöhen ohne Beschnitt (gemischte Hoch-/Querformate,
   Sponsorenenten mit Logo am unteren Bildrand) */
ul.galerie-masonry { display: block; columns: 4; column-gap: 14px; }
ul.galerie-masonry li { break-inside: avoid; margin: 0 0 14px; }
ul.galerie-masonry img { aspect-ratio: auto; object-fit: contain; }
@media (max-width: 1000px) { ul.galerie-masonry { columns: 3; } }
@media (max-width: 720px)  { ul.galerie-masonry { columns: 2; } }
@media (max-width: 460px)  { ul.galerie-masonry { columns: 1; } }
.lightbox-thumb { position: relative; display: block; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
.lightbox {
    position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
    background: rgba(15, 17, 20, .93); padding: 30px;
}
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 8px; }
.lightbox-schliessen, .lightbox-pfeil {
    position: absolute; display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.5rem; cursor: pointer;
}
.lightbox-schliessen { top: 18px; right: 18px; }
.lightbox-zurueck { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-weiter { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-zaehler { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #cfd2d6; font-size: .9rem; }
body.lightbox-offen { overflow: hidden; }

/* ═══ FAQ (Akkordeon) ═══ */
.faq-liste details { border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-bottom: 12px; }
.faq-liste summary {
    list-style: none; cursor: pointer; font-weight: 750; padding: 18px 52px 18px 22px; position: relative;
}
.faq-liste summary::-webkit-details-marker { display: none; }
.faq-liste summary::after {
    content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    font-size: 1.5rem; font-weight: 400; color: var(--gold-text);
}
.faq-liste details[open] summary::after { content: '–'; }
.faq-liste .rich { padding: 0 22px 18px; color: var(--muted); }

/* ═══ Hinweis-/Consent-Banner ═══ */
.hinweis-banner { background: var(--gold); color: #201a0d; padding: 12px 0; text-align: center; font-weight: 700; }
.hinweis-banner a { color: inherit; }
.consent-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150;
    max-width: 560px; margin: 0 auto;
    background: var(--card); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 24px 60px rgba(20, 22, 26, .3);
}
.consent-inner { padding: 22px 24px; }
.consent-text { font-size: .95rem; color: var(--muted); }
.consent-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.consent-btn {
    font: inherit; font-weight: 750; padding: 11px 20px; min-height: 44px;
    border-radius: 999px; cursor: pointer; border: 2px solid transparent;
}
.consent-btn-primaer { background: var(--ink); color: #fff; }
.consent-btn-sekundaer { background: transparent; border-color: #c9c4b8; color: var(--ink); }

/* ═══ Reveal-Animationen (nur ohne reduced-motion; JS setzt .sichtbar) ═══ */
@media (prefers-reduced-motion: no-preference) {
    html.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
    html.js [data-reveal].sichtbar { opacity: 1; transform: none; }
}

/* Rich-Text aus dem CMS */
.rich h2, .rich h3 { margin-top: 1.4em; }
.rich ul, .rich ol { padding-left: 22px; }
.rich li { margin-bottom: .35em; }

/* ═══════════════════════════════════════════════════════════════════
   ENTENRENNEN-Landingpage (.er-seite)
   ═══════════════════════════════════════════════════════════════════ */
.er-seite { background: var(--er-schaum); }

/* Hero: Wasserwelt – Original-Sujet der Entenrennen-Site als Hintergrund,
   darüber ein Verlaufs-Overlay (oben dunkel) für AA-Textkontrast */
.er-hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        linear-gradient(180deg, rgba(7, 61, 92, .9) 0%, rgba(7, 61, 92, .62) 36%, rgba(9, 74, 112, .28) 68%, rgba(12, 99, 150, .05) 100%),
        url('/assets/img/entenrennen-sujet.webp') center bottom / cover no-repeat,
        linear-gradient(180deg, var(--er-tief) 0%, var(--er-wasser) 62%, #1478ad 100%);
    padding: clamp(60px, 9vw, 120px) 0 clamp(120px, 16vw, 200px);
    text-align: center;
}
.er-hero h1, .er-hero .vorwort, .er-datum-text { text-shadow: 0 1px 10px rgba(4, 30, 46, .6); }
.er-hero h1 { color: #fff; font-size: clamp(2.5rem, 6.5vw, 4.4rem); font-weight: 780; }
.er-hero h1 .er-akzent { color: var(--er-gelb); }
.er-kicker {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .82rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
    color: #0e2a3d; background: var(--er-gelb); border-radius: 999px; padding: 9px 20px; margin-bottom: 26px;
}
.er-hero .vorwort { color: #d7ecf7; margin-inline: auto; }
.er-hero-enten { position: absolute; inset: auto 0 -6px; pointer-events: none; }

/* Schwimmende Enten (rein dekorativ) */
.er-ente {
    position: absolute; width: 74px; bottom: 34px;
    filter: drop-shadow(0 8px 10px rgba(4, 30, 46, .35));
}
@media (prefers-reduced-motion: no-preference) {
    .er-ente { animation: schaukeln 3.6s ease-in-out infinite; }
    .er-ente:nth-child(2) { animation-delay: -1.2s; }
    .er-ente:nth-child(3) { animation-delay: -2.3s; }
    @keyframes schaukeln {
        0%, 100% { transform: translateY(0) rotate(-4deg); }
        50% { transform: translateY(-12px) rotate(5deg); }
    }
}

/* Wellen-Trenner (SVG als Maske im Element) */
.welle { display: block; width: 100%; height: 70px; margin: -1px 0; }
.welle svg { display: block; width: 100%; height: 100%; }

/* Countdown */
.er-countdown { display: flex; justify-content: center; gap: clamp(10px, 3vw, 26px); margin: 34px 0 10px; }
.cd-zelle {
    display: flex; flex-direction: column; align-items: center; min-width: clamp(70px, 11vw, 110px);
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 18px; padding: 16px 10px 12px; backdrop-filter: blur(4px);
}
.cd-wert { font-family: var(--display); font-size: clamp(1.9rem, 5.2vw, 3.2rem); font-weight: 760; line-height: 1; color: var(--er-gelb); }
.cd-label { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #cfe8f5; margin-top: 8px; }
.cd-fertig { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.6rem); color: var(--er-gelb); }
.er-datum-text { font-size: 1.12rem; font-weight: 750; color: #fff; }

/* Sektionen im Enten-Scope */
.er-seite .sektion h2 { color: #0e3550; }
/* … außer auf dunklen Boxen (Spende/Teaser): dort weiß + Schatten */
.er-seite .er-spende h2, .er-seite .er-teaser h2 { color: #fff; text-shadow: 0 1px 10px rgba(4, 30, 46, .5); }
.er-seite .eyebrow { color: #0d5c8c; }
.er-karte { background: #fff; border: 0; border-radius: 22px; box-shadow: 0 14px 34px rgba(7, 61, 92, .1); }

/* Ablauf-Zeitleiste */
.er-ablauf { list-style: none; margin: 0; padding: 0; position: relative; max-width: 640px; margin-inline: auto; }
.er-ablauf::before { content: ''; position: absolute; left: 87px; top: 8px; bottom: 8px; width: 3px; background: #bfe0f0; border-radius: 3px; }
.er-ablauf li { display: flex; gap: 52px; padding: 14px 0; position: relative; }
.er-ablauf time {
    flex: 0 0 60px; text-align: right; font-weight: 800; color: #0d5c8c; font-variant-numeric: tabular-nums;
    padding-top: 2px;
}
.er-ablauf li::before {
    content: ''; position: absolute; left: 78px; top: 22px; width: 15px; height: 15px;
    border-radius: 50%; background: var(--er-gelb); border: 3px solid #fff; box-shadow: 0 0 0 2px #bfe0f0;
}
.er-ablauf .ablauf-text b { display: block; color: #0e3550; }
.er-ablauf .ablauf-text { color: #40607a; }

/* Gewinn-Karten */
.er-preise { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.er-preis { background: #fff; border-radius: 22px; padding: 28px 26px; box-shadow: 0 14px 34px rgba(7, 61, 92, .1); position: relative; overflow: hidden; }
.er-preis.haupt { background: linear-gradient(150deg, #fff 30%, #fff3cf 100%); }
.er-preis .preis-rang {
    display: inline-block; font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
    background: var(--er-gelb); color: #201a0d; border-radius: 999px; padding: 6px 14px; margin-bottom: 12px;
}
.er-preis h3 { color: #0e3550; }
.er-preis p { color: #40607a; margin: 0; font-size: .97rem; }

/* OpenStreetMap-Karte (laedt erst nach Einwilligung) */
.osm-karte {
    position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden;
    background: #fff; display: grid; place-items: center;
    box-shadow: 0 14px 34px rgba(7, 61, 92, .1); margin-top: 26px;
}
.osm-karte iframe { width: 100%; height: 100%; border: 0; display: block; }
.osm-platzhalter { text-align: center; padding: 2rem; max-width: 46ch; }
.osm-platzhalter p { color: #40607a; font-size: .93rem; margin-bottom: .8rem; }
.osm-fineprint { font-size: .8rem; }
.osm-fineprint a { color: #0d5c8c; text-decoration: underline; }
.osm-platzhalter .btn { margin-top: .4rem; background: var(--er-wasser); color: #fff; }
.osm-platzhalter .btn:hover { background: var(--er-tief); color: #fff; }
/* Anfahrts-Link unter der Karte */
.osm-anfahrt { margin-top: 14px; font-size: .95rem; }

/* Sponsorpakete (Bronze / Silber / Gold) */
.er-pakete { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.er-paket {
    background: #fff; border-radius: 22px; padding: 30px 28px;
    box-shadow: 0 14px 34px rgba(7, 61, 92, .1);
    display: flex; flex-direction: column; gap: 4px;
}
/* Das grösste Paket bekommt den Goldrahmen – ohne Groessensprung, damit die
   Karten in einer Zeile gleich hoch bleiben. */
.er-paket.top { box-shadow: 0 14px 34px rgba(7, 61, 92, .14), inset 0 0 0 2px var(--er-gelb); }
.er-paket .paket-stufe {
    align-self: flex-start; font-size: .74rem; font-weight: 800; letter-spacing: .16em;
    text-transform: uppercase; background: var(--er-gelb); color: #201a0d;
    border-radius: 999px; padding: 6px 14px; margin-bottom: 10px;
}
.er-paket h3 { color: #0e3550; margin: 0; }
.er-paket .paket-betrag { color: #0d5c8c; font-size: 1.5rem; font-weight: 800; margin: 2px 0 14px; }
.paket-leistungen { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.paket-leistungen li {
    position: relative; padding-left: 26px; color: #40607a; font-size: .97rem; line-height: 1.5;
}
/* Häkchen als CSS-Grafik: kein zusaetzliches Bild, skaliert mit der Schrift */
.paket-leistungen li::before {
    content: ''; position: absolute; left: 4px; top: .42em;
    width: 6px; height: 11px; border: solid #0d5c8c; border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* Sponsoren-Raster (Logos) */
.sponsoren { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; align-items: center; }
.sponsoren li { list-style: none; background: #fff; border-radius: 14px; padding: 14px; display: flex; align-items: center; justify-content: center; min-height: 84px; border: 1px solid #e2eef5; }
.sponsoren img { max-height: 56px; width: auto; max-width: 100%; object-fit: contain; }
.sponsoren-hinweis { text-align: center; color: var(--muted); font-size: .95rem; }

/* Ergebnisse-Archiv (Jahres-Abschnitte) */
.jahr-block { background: #fff; border-radius: 22px; padding: 30px 32px; margin-bottom: 22px; box-shadow: 0 14px 34px rgba(7, 61, 92, .08); }
.jahr-block h2 { display: flex; align-items: baseline; gap: 14px; color: #0e3550; }
.jahr-block h2 .jahr-nr { font-size: 1rem; font-weight: 700; color: #0d5c8c; font-family: var(--schrift); }
.jahr-block .rich { color: #35536b; }

/* Startseiten-Teaser Entenrennen: wächst beim Scrollen auf volle Breite.
   --p (0…1) setzt app.js aus dem Scroll-Fortschritt, --vwpx ist die echte
   Viewportbreite (ohne Scrollbalken). Ohne JS/mit reduced-motion: --p bleibt 0
   → normale Karte. Sujet-Hintergrund wie auf der Landingpage. */
/* Gemeinsame Scroll-Expand-Interpolation (Startseiten-Teaser + Spenden-Box) */
[data-scroll-expand] {
    --p: 0;
    margin-inline: calc((var(--vwpx, 100vw) - 100%) / -2 * var(--p));
    border-radius: calc(26px * (1 - var(--p))) !important;
}
.er-teaser {
    position: relative; overflow: hidden; text-align: center; color: #fff;
    padding: clamp(34px, 5.5vw, 60px) 22px;
    background:
        linear-gradient(180deg, rgba(7, 61, 92, .88) 0%, rgba(7, 61, 92, .72) 55%, rgba(9, 74, 112, .62) 100%),
        url('/assets/img/entenrennen-sujet.webp') center 72% / cover no-repeat,
        linear-gradient(135deg, var(--er-tief), var(--er-wasser));
}
.er-teaser-inner { max-width: 680px; margin-inline: auto; }
.er-teaser h2 { color: #fff; }
.er-teaser .spende-ente { width: 92px; margin-bottom: 10px; }
.er-teaser h2, .er-teaser .vorwort { text-shadow: 0 1px 10px rgba(4, 30, 46, .5); }

/* Spenden-Box */
.er-spende {
    background: linear-gradient(135deg, var(--er-tief), var(--er-wasser)); color: #fff;
    border-radius: 26px; padding: clamp(30px, 5vw, 52px); text-align: center; position: relative; overflow: hidden;
}
.er-spende h2 { color: #fff; }
.er-spende .iban { font-variant-numeric: tabular-nums; font-weight: 750; color: var(--er-gelb); }
.er-spende img.spende-ente { width: 92px; margin-bottom: 10px; }

/* ═══ Kleinkram ═══ */
.beitrag-meta { color: var(--muted); font-size: .92rem; font-weight: 650; margin-bottom: 18px; }
.zurueck-link { display: inline-block; margin-bottom: 26px; font-weight: 750; text-decoration: none; }
.seite-kopf { padding: clamp(48px, 7vw, 84px) 0 clamp(20px, 3vw, 36px); }
.trennlinie { border: 0; border-top: 1px solid var(--line); margin: clamp(36px, 6vw, 60px) 0; }
.hidden-visually {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ═══ „Nach oben"-Knopf mit Fortschrittsring (Snippet „nach-oben") ═══
   Deckende Flaeche → auf jedem Untergrund lesbar, auch ueber Fotos.
   app.js schaltet je nach Helligkeit des Untergrunds auf .auf-dunkel um. */
.nach-oben {
    position: fixed; bottom: 22px; z-index: 50;
    width: 48px; height: 48px; padding: 0;
    display: grid; place-items: center;
    border: 0; border-radius: 50%; cursor: pointer;
    background: #fff; color: #23262b;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .07);
    opacity: 0; transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease, background .2s ease, color .2s ease;
}
.nach-oben-links  { left: 22px; }
.nach-oben-rechts { right: 22px; }
.nach-oben.ist-da { opacity: 1; transform: none; }
.nach-oben:hover  { transform: translateY(-2px); }
.nach-oben:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

/* Ring: volle Knopfgroesse, startet oben (12 Uhr) */
.nach-oben-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.nach-oben-ring circle { fill: none; stroke-width: 2.5; }
.nach-oben-spur { stroke: currentColor; opacity: .18; }
.nach-oben-fortschritt { stroke: var(--nach-oben-akzent, currentColor); stroke-linecap: round; transition: stroke-dashoffset .1s linear; }

.nach-oben-pfeil { position: relative; width: 20px; height: 20px; }
.nach-oben-pfeil path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Variante fuer dunklen Untergrund */
.nach-oben.auf-dunkel { background: #23262b; color: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .14); }
.nach-oben.auf-dunkel .nach-oben-fortschritt { stroke: var(--nach-oben-akzent-dunkel, var(--nach-oben-akzent, currentColor)); }

@media (max-width: 640px) {
    .nach-oben { width: 44px; height: 44px; bottom: 16px; }
    .nach-oben-links  { left: 16px; }
    .nach-oben-rechts { right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .nach-oben { transition: opacity .01ms; transform: none; }
    .nach-oben:hover { transform: none; }
    .nach-oben-fortschritt { transition: none; }
}
/* RT39: Fortschrittsring in Gold, auf dunklem Grund etwas heller */
.nach-oben { --nach-oben-akzent: #a8873f; --nach-oben-akzent-dunkel: var(--gold); }
.er-seite .nach-oben { --nach-oben-akzent: var(--er-wasser); --nach-oben-akzent-dunkel: var(--er-gelb); }

/* Feld mit Validierungsfehler (app.js setzt .ist-fehlerhaft + aria-invalid).
   Doppelte Klasse hebt die Spezifitaet, damit die Site-eigene Feld-Regel
   (border-Kurzform) den roten Rahmen nicht ueberschreibt – ohne !important. */
.ist-fehlerhaft.ist-fehlerhaft,
[aria-invalid="true"][aria-invalid] {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, .14);
}

/* Timeline mobil: engere Achse, damit für den Text genug Platz bleibt */
@media (max-width: 560px) {
    .er-ablauf::before { left: 55px; }
    .er-ablauf li { gap: 34px; }
    .er-ablauf time { flex-basis: 46px; }
    .er-ablauf li::before { left: 46px; }
}

/* ═══ Instagram-Feed (Core-Snippet "instagram-feed") ═══
   Basis aus dem site-template, Radien und Akzente an das RT39-Design
   angepasst. Die Bilder liegen gespiegelt auf dem eigenen Server. */
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .ig-grid { gap: 6px; } }
.ig-post { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; }
.ig-post img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.ig-post:hover img { transform: scale(1.05); }
.ig-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,16,14,0);
    color: #fff; opacity: 0; transition: opacity .25s, background .25s; }
.ig-post:hover .ig-overlay { opacity: 1; background: rgba(20,16,14,.35); }
.ig-overlay svg { width: 32px; height: 32px; }
.ig-video-zeichen { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
    background: rgba(20,16,14,.55); color: #fff; display: grid; place-items: center; }
.ig-video-zeichen svg { width: 14px; height: 14px; }
.ig-folgen { text-align: center; margin-top: 1.4rem; }

.ig-sektion { background: var(--paper); }
.ig-post { border-radius: 14px; }
.ig-post:hover .ig-overlay { background: rgba(35, 38, 43, .42); }
.ig-folgen { text-align: center; margin: 26px 0 0; }
.btn-rahmen { background: transparent; color: var(--ink); border-color: var(--gold); }
.btn-rahmen:hover { background: var(--gold); color: #201a0d; border-color: var(--gold); }
/* Spendenkonto (Snippet: Kontoinhaber / IBAN / BIC) */
.spendenkonto { line-height: 1.65; }
.spendenkonto .konto-bic { font-size: .93em; opacity: .85; }
/* auf dunklem Grund (Entenrennen-Spendenbox) */
.konto-hell { color: #d7ecf7; }
.konto-hell strong { color: #fff; }
