/* =========================================================================
   Starenfest Heiningen – zentrales Layout  (Festabend, Lila + Blau)
   Mobile-first. Design-Tokens als CSS-Variablen.
   ========================================================================= */

:root {
    --bg:          #0b0a1c;
    --bg-soft:     #15123a;
    --purple:      #6c25be;
    --purple-300:  #a974e8;
    --blue:        #4679bc;
    --blue-300:    #77b1e1;
    --amber:       #f4a83c;          /* Star-Schnabel – sparsamer Akzent */
    --text:        #f3effb;
    --text-dim:    #b3abce;
    --glass:       rgba(255, 255, 255, .055);
    --glass-strong:rgba(255, 255, 255, .09);
    --glass-brd:   rgba(255, 255, 255, .14);
    --line:        linear-gradient(180deg, var(--purple-300), var(--blue));
    --radius:      18px;
    --radius-sm:   12px;
    --maxw:        1080px;
    --ease:        cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; overflow-x: clip; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

/* Ambient: tiefe Festnacht mit Lila/Blau-Schimmer hinter allem */
body::before {
    content: "";
    position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(60% 50% at 15% 0%, rgba(108, 37, 190, .35), transparent 60%),
        radial-gradient(55% 45% at 90% 10%, rgba(70, 121, 188, .28), transparent 60%),
        var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, .display {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.wrap { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.eyebrow {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: .28em;
    font-size: .72rem;
    font-weight: 600;
    color: var(--blue-300);
}

/* ---------------------------------------------------------------- Navbar */
.nav {
    position: sticky; top: 0; z-index: 1100;
    display: flex; align-items: center;
    gap: .6rem;
    padding: .7rem clamp(1rem, 4vw, 2.2rem);
    background: rgba(11, 10, 28, .55);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav.scrolled {
    background: rgba(11, 10, 28, .82);
    border-bottom-color: var(--glass-brd);
}
.nav__brand { display: flex; align-items: center; gap: .55rem; margin-right: auto; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.05rem; }
.nav__logo { width: 46px; height: 38px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); }
.nav__brand b { color: #fff; }
.nav__brand span { color: var(--text-dim); font-weight: 500; font-size: .85rem; }
.nav__links { display: flex; align-items: center; gap: .35rem; }
.nav__links a {
    padding: .5rem .85rem; border-radius: 999px;
    font-size: .92rem; color: var(--text-dim);
    transition: color .2s, background .2s;
}
.nav__links a:hover { color: #fff; background: var(--glass); }
.nav__links a.active { color: #fff; background: var(--glass-strong); }
.nav__links a.is-cta { color: #fff; background: linear-gradient(120deg, var(--purple), var(--blue)); }
.nav__links a.is-cta:hover { filter: brightness(1.12); }
.theme-toggle {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .45rem .75rem; border-radius: 999px;
    background: var(--glass); border: 1px solid var(--glass-brd);
    color: var(--text); cursor: pointer; font-size: .85rem; font-weight: 600;
    font-family: 'Inter', sans-serif; white-space: nowrap;
    transition: background .2s, border-color .2s;
}
.theme-toggle:hover { background: var(--glass-strong); border-color: var(--purple-300); }
.theme-toggle:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 3px; }
.theme-toggle__ico { font-size: 1rem; line-height: 1; }
.nav__toggle { display: none; }

/* ---------------------------------------------------------------- Hero */
.hero {
    position: relative;
    min-height: clamp(520px, 86vh, 760px);
    display: grid; place-items: center;
    text-align: center;
    padding: 5rem clamp(.9rem, 4vw, 2.2rem) 4rem;
    overflow: hidden;
}
.hero__inner > * { max-width: 100%; }
.hero__bg {
    position: absolute; inset: 0; z-index: 0;
    background-image: var(--hero-img);
    background-size: cover; background-position: center 60%;
    /* statisch – keine Dauer-Animation (verhindert Zittern/Jitter des Hintergrunds) */
}
/* Overlay liegt statisch auf .hero (NICHT auf dem animierten Bild) -> kein Flackern */
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        linear-gradient(180deg, rgba(11,10,28,.55) 0%, rgba(11,10,28,.35) 40%, rgba(11,10,28,.96) 100%),
        linear-gradient(115deg, rgba(108,37,190,.55), rgba(70,121,188,.30) 60%, transparent);
}
@keyframes kenburns { from { transform: scale(1.06) translateZ(0); } to { transform: scale(1.12) translateZ(0); } }

.hero__inner { position: relative; z-index: 2; width: 100%; max-width: 760px; }
.hero__head { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: clamp(.4rem, 2.5vw, 1.5rem); }
.hero__head .hero__title { margin: 0; }
.hero__mascot {
    width: clamp(88px, 16vw, 148px); height: auto;
    filter: drop-shadow(0 12px 24px rgba(108, 37, 190, .6));
    animation: floaty 6s var(--ease) infinite alternate;
    will-change: transform;
}
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-9px); } }
.hero__gemeinde { margin: .5rem auto 1.1rem; color: #fff; line-height: 0; }
.hero__gemeinde .logo-hn { width: clamp(140px, 30vw, 185px); }
.hero__title, .hero__sub, .section__title, .tl-title, .tile__d { overflow-wrap: break-word; }
.hero__title {
    font-size: clamp(2.3rem, 12vw, 7rem);
    margin: .3rem 0 .1rem;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .55), 0 6px 28px rgba(0, 0, 0, .42);
}
.hero__sub { font-size: clamp(1rem, 3.4vw, 1.4rem); color: #fff; font-weight: 500; letter-spacing: .02em; text-shadow: 0 1px 5px rgba(0, 0, 0, .55), 0 3px 16px rgba(0, 0, 0, .4); }
.hero__sub b { color: #fff; font-weight: 700; }

/* Countdown als Glas-Pille mit getrennten Einheiten */
.countdown {
    display: inline-flex; flex-wrap: wrap; justify-content: center; max-width: 100%;
    gap: clamp(.4rem, 2vw, 1rem);
    margin: 1.8rem auto .4rem;
    padding: .9rem 1.2rem;
    background: var(--glass); border: 1px solid var(--glass-brd);
    border-radius: var(--radius);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.countdown__cell { min-width: 3.3rem; }
.countdown__num {
    font-family: 'Space Grotesk', sans-serif; font-weight: 700;
    font-size: clamp(1.4rem, 6vw, 2.1rem); line-height: 1;
    font-variant-numeric: tabular-nums; color: #fff;
}
.countdown__lbl { font-size: .62rem; text-transform: uppercase; letter-spacing: .18em; color: var(--text-dim); }
.countdown--done { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--amber); font-size: 1.2rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1.6rem; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .8rem 1.4rem; border-radius: 999px;
    font-weight: 600; font-size: .98rem; cursor: pointer;
    border: 1px solid var(--glass-brd); color: #fff; white-space: nowrap;
    transition: transform .2s var(--ease), filter .2s, background .2s;
}
.btn--primary { background: linear-gradient(120deg, var(--purple), var(--blue)); border-color: transparent; }
.btn--ghost { background: var(--glass); }
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn:focus-visible, .nav__links a:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 3px; }

.scroll-hint { position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--text-dim); font-size: 1.4rem; animation: bob 2s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------------------------------------------------------------- Sections */
.section { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.section__head { max-width: 640px; margin-bottom: 2.6rem; }
.section__title { font-size: clamp(1.8rem, 6vw, 2.8rem); margin: .5rem 0 .6rem; }
.section__lead { color: var(--text-dim); font-size: 1.05rem; }

/* Quick-Cards auf der Startseite */
.tiles { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tile {
    display: flex; flex-direction: column; gap: .5rem;
    padding: 1.6rem; border-radius: var(--radius);
    background: var(--glass); border: 1px solid var(--glass-brd);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: transform .25s var(--ease), background .25s, border-color .25s;
}
.tile:hover { transform: translateY(-4px); background: var(--glass-strong); border-color: var(--purple-300); }
.tile__k { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 700; color: #fff; }
.tile__d { color: var(--text-dim); font-size: .95rem; }
.tile__go { margin-top: auto; color: var(--blue-300); font-weight: 600; font-size: .92rem; }

/* ---------------------------------------------------------------- Timeline (Signature) */
.timeline { position: relative; margin-top: 1rem; }
.timeline::before {
    content: ""; position: absolute; top: .4rem; bottom: .4rem;
    left: 11px; width: 2px; border-radius: 2px;
    background: var(--line); opacity: .55;
}
.tl-item { position: relative; padding: 0 0 1.4rem 2.6rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item__dot {
    position: absolute; left: 3px; top: .55rem;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--purple-300);
    box-shadow: 0 0 0 4px rgba(108, 37, 190, .18), 0 0 16px rgba(169, 116, 232, .6);
}
.tl-item--star .tl-item__dot { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(244, 168, 60, .16), 0 0 18px rgba(244, 168, 60, .7); }
.tl-card {
    background: var(--glass); border: 1px solid var(--glass-brd);
    border-radius: var(--radius); padding: 1.1rem 1.3rem;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transition: transform .25s var(--ease), background .25s, border-color .25s;
}
.tl-card:hover { transform: translateX(4px); background: var(--glass-strong); border-color: var(--glass-brd); }
.tl-card--star { border-color: rgba(244, 168, 60, .35); background: linear-gradient(120deg, rgba(244,168,60,.10), var(--glass)); }
.tl-time {
    font-family: 'Space Grotesk', sans-serif; font-weight: 700;
    color: var(--blue-300); font-size: 1.02rem; font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}
.tl-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.18rem; color: #fff; margin: .15rem 0; }
.tl-text { color: var(--text-dim); font-size: .96rem; }
.tl-img { margin-top: .9rem; border-radius: var(--radius-sm); max-width: 280px; border: 1px solid var(--glass-brd); }

/* Umzug-Aufstellung (aufklappbar im Festumzug-Eintrag) */
.umzug { margin-top: 1rem; border-top: 1px solid var(--glass-brd); padding-top: .8rem; }
.umzug > summary {
    cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem;
    font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: .95rem;
    color: var(--blue-300); padding: .25rem 0;
}
.umzug > summary::-webkit-details-marker { display: none; }
.umzug > summary::before { content: "\25B8"; display: inline-block; transition: transform .2s var(--ease); }
.umzug[open] > summary::before { transform: rotate(90deg); }
.umzug__list { list-style: none; margin: .85rem 0 .3rem; display: grid; gap: .3rem; }
.umzug__item {
    display: grid; grid-template-columns: 1.7rem 1fr auto; align-items: center; gap: .6rem;
    padding: .45rem .6rem; border-radius: 10px; background: rgba(255, 255, 255, .03);
}
.umzug__item--rand { background: transparent; }
.umzug__nr { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; color: var(--purple-300); font-size: .9rem; }
.umzug__item--rand .umzug__nr { color: var(--text-dim); }
.umzug__name { display: flex; flex-direction: column; line-height: 1.3; font-size: .94rem; }
.umzug__name small { color: var(--text-dim); font-size: .82rem; }
.umzug__name em { color: var(--text-dim); font-style: normal; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.umzug__musik { color: var(--amber); font-size: 1rem; }
.umzug__hint { margin-top: .65rem; font-size: .82rem; color: var(--text-dim); display: flex; align-items: center; gap: .4rem; }

/* Rahmenprogramm + Info */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
    padding: .6rem 1rem; border-radius: 999px; font-size: .92rem; color: var(--text);
    background: var(--glass); border: 1px solid var(--glass-brd);
}
.infobar { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 1.4rem; }
.infobar__item { padding: 1.3rem 1.5rem; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--glass-brd); }
.infobar__lbl { color: var(--text-dim); font-size: .92rem; }
.infobar__val { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.5rem; color: #fff; }

/* Karten-Wrapper (Lageplan-Seite, generisch) */
.panel { background: var(--glass); border: 1px solid var(--glass-brd); border-radius: var(--radius); padding: 1.2rem; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* ---------------------------------------------------------------- Lageplan */
.lage-grid { display: grid; gap: 1.4rem; grid-template-columns: 320px 1fr; align-items: start; }
#map { height: min(72vh, 640px); width: 100%; border-radius: var(--radius); border: 1px solid var(--glass-brd); }
.stand-list { list-style: none; }
.stand-list + .stand-list { margin-top: 1rem; }
.stand-head { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--text-dim); font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: .5rem; }
.list-group-item {
    display: flex; align-items: center; gap: .5rem;
    padding: .6rem .85rem; margin-bottom: .35rem;
    border-radius: var(--radius-sm); cursor: pointer;
    background: var(--glass); border: 1px solid var(--glass-brd); color: var(--text);
    font-size: .94rem; transition: background .2s, border-color .2s, transform .2s;
}
.list-group-item:hover { background: var(--glass-strong); border-color: var(--purple-300); transform: translateX(3px); }
.list-group-item.wcList:hover { border-color: var(--blue-300); }
.list-group-item svg { flex: none; color: var(--purple-300); }
.list-group-item.wcList svg { color: var(--blue-300); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #1a1640; color: var(--text); }
.leaflet-popup-content { font-family: 'Inter', sans-serif; font-weight: 500; }

@media (max-width: 860px) {
    .lage-grid { grid-template-columns: 1fr; }
    #map { height: 62vh; order: -1; }
}

/* ---------------------------------------------------------------- Footer */
.footer { border-top: 1px solid var(--glass-brd); padding: 2.6rem 0; margin-top: 2rem; color: var(--text-dim); }
.footer b { color: var(--text); }
.footer__brand { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.8rem; }
.logo-hn { width: clamp(160px, 38vw, 210px); height: auto; color: var(--text); }
.footer__veranstalter { color: var(--text-dim); font-size: .9rem; }
.footer__row { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; justify-content: space-between; align-items: center; font-size: .92rem; }
.footer a:hover { color: #fff; }
.footer__ai { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--glass-brd); color: var(--text-dim); font-size: .8rem; line-height: 1.5; }

/* ---------------------------------------------------------------- Reveal-Animation */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- Mobile */
@media (max-width: 720px) {
    /* WICHTIG: backdrop-filter auf der Navbar macht sie zum Containing-Block
       für position:fixed-Kinder -> das off-canvas-Menü würde sonst nur die
       Navbar-Höhe einnehmen (Hintergrund deckt nicht, Links ragen transparent
       heraus). Auf Mobile daher solide Navbar ohne Blur. */
    .nav {
        backdrop-filter: none; -webkit-backdrop-filter: none;
        background: var(--bg);
    }
    .nav.scrolled { background: var(--bg); }
    .nav__links {
        position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
        height: 100dvh;
        z-index: 1100;
        flex-direction: column; align-items: stretch; gap: .25rem;
        padding: 5rem 1.2rem 2rem;
        background: #0f0d2d;                 /* deckend – KEIN backdrop-filter (iOS-Transparenz-Bug bei transform) */
        border-left: 1px solid var(--glass-brd);
        box-shadow: -12px 0 40px rgba(0, 0, 0, .5);
        transform: translateX(100%); transition: transform .32s var(--ease);
    }
    .nav__links.open { transform: none; }
    .nav__links a { padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: 1.05rem; }
    .nav__toggle {
        display: inline-flex; flex-direction: column; gap: 5px; z-index: 1101;
        background: none; border: 0; cursor: pointer; padding: .4rem;
    }
    .nav__toggle span { width: 26px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }
    .nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav__toggle.open span:nth-child(2) { opacity: 0; }
    .nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}

/* =========================================================================
   HELLES THEME  (Tag-Modus) – ueberschreibt nur die Tokens + harte Weiss-Werte.
   ========================================================================= */
[data-theme="light"] {
    --bg:          #f2f6fb;            /* helles Blau-Weiß wie die Gemeinde-Seite */
    --bg-soft:     #ffffff;
    --purple:      #2e6da4;            /* Gemeinde-Blau (Primär) */
    --purple-300:  #356ea8;
    --blue:        #4a8bc7;
    --blue-300:    #2f6699;
    --amber:       #c5760e;
    --text:        #1e2b3a;            /* dunkles Blaugrau */
    --text-dim:    #5a6b7d;
    --glass:       rgba(46, 109, 164, .05);
    --glass-strong:rgba(46, 109, 164, .10);
    --glass-brd:   rgba(30, 43, 58, .13);
}
[data-theme="light"] body::before {
    background:
        radial-gradient(60% 50% at 15% 0%, rgba(46, 109, 164, .10), transparent 60%),
        radial-gradient(55% 45% at 90% 10%, rgba(74, 139, 199, .10), transparent 60%),
        var(--bg);
}
[data-theme="light"] .nav { background: rgba(242, 246, 251, .75); }
[data-theme="light"] .nav.scrolled { background: rgba(242, 246, 251, .95); }
[data-theme="light"] .nav__brand b { color: var(--text); }
[data-theme="light"] .nav__toggle span { background: var(--text); }
[data-theme="light"] .tl-title,
[data-theme="light"] .tile__k,
[data-theme="light"] .countdown__num,
[data-theme="light"] .infobar__val,
[data-theme="light"] .nav__links a:hover,
[data-theme="light"] .nav__links a.active { color: var(--text); }
/* Hell-Ansicht (Tag): sonniges Umzugsfoto als Hero-Hintergrund */
[data-theme="light"] .hero__bg {
    background-image: url('img/hero-tag.jpg');
    background-position: center 36%;
}
[data-theme="light"] .hero::after {
    background:
        linear-gradient(180deg, rgba(18,38,68,.34) 0%, rgba(18,38,68,.12) 30%, rgba(242,246,251,.55) 76%, rgba(242,246,251,1) 100%),
        linear-gradient(115deg, rgba(46,109,164,.22), transparent 58%);
}
[data-theme="light"] .hero__title {
    color: #fff;
    text-shadow: 0 2px 8px rgba(12, 20, 38, .6), 0 6px 28px rgba(12, 20, 38, .45);
}
/* Heiningen-SVG: im Hero über dem Tagesbild weiss (wie Dark).
   currentColor erbt vom .logo-hn-Element selbst (siehe .logo-hn{color:var(--text)}),
   daher muss die Farbe genau dort gesetzt werden – nicht am Container. */
[data-theme="light"] .hero .logo-hn { color: #fff; }
[data-theme="light"] .essen-head .logo-hn { color: var(--text); }
[data-theme="light"] .countdown { background: rgba(255, 255, 255, .65); }
[data-theme="light"] .btn--ghost { background: rgba(46, 109, 164, .08); color: var(--text); }
[data-theme="light"] .umzug__item { background: rgba(46, 109, 164, .05); }
/* Timeline-Punkte: im hellen Modus blau statt lila */
[data-theme="light"] .tl-item__dot { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(46, 109, 164, .14), 0 0 13px rgba(74, 139, 199, .45); }
[data-theme="light"] .tl-item--star .tl-item__dot { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(197, 118, 14, .14), 0 0 13px rgba(197, 118, 14, .45); }
[data-theme="light"] .timeline::before { opacity: .8; }
[data-theme="light"] .hero__mascot { filter: drop-shadow(0 12px 24px rgba(46, 109, 164, .4)); }
[data-theme="light"] .tile:hover, [data-theme="light"] .tile__d { }
[data-theme="light"] .tl-card:hover { border-color: rgba(46, 109, 164, .35); }
[data-theme="light"] .leaflet-popup-content-wrapper,
[data-theme="light"] .leaflet-popup-tip { background: #fff; color: var(--text); }
@media (max-width: 720px) {
    [data-theme="light"] .nav__links { background: #ffffff; }
}

/* ---------------------------------------------------------------- Sprachumschalter */
.lang { position: relative; }
.lang > summary {
    list-style: none; cursor: pointer; user-select: none;
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .45rem .7rem; border-radius: 999px;
    background: var(--glass); border: 1px solid var(--glass-brd);
    color: var(--text); font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary::marker { content: ''; }
.lang__flag { font-size: 1.1rem; line-height: 1; }
.lang__code { letter-spacing: .04em; }
.lang__menu {
    position: absolute; top: calc(100% + .5rem); inset-inline-end: 0; z-index: 1200;
    display: flex; flex-direction: column; gap: 2px; min-width: 190px;
    padding: .4rem; border-radius: 16px;
    background: var(--bg-soft); border: 1px solid var(--glass-brd);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}
.lang__opt {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem .7rem; border-radius: 10px;
    color: var(--text); text-decoration: none; font-size: .95rem;
    transition: background .15s;
}
.lang__opt:hover { background: var(--glass); color: #fff; }
.lang__opt.is-active { background: var(--glass-strong); font-weight: 700; color: #fff; }

@media (max-width: 720px) {
    .lang__menu { position: fixed; inset-inline: auto; inset-inline-end: 1rem; top: 4.2rem; }
}

/* ---------------------------------------------------------------- RTL (Arabisch) */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .tile__go,
[dir="rtl"] .foot { direction: rtl; }
[dir="rtl"] .tl-time { direction: ltr; unicode-bidi: embed; }   /* Uhrzeiten links-nach-rechts */
[dir="rtl"] .countdown { direction: ltr; }
@media (max-width: 720px) {
    [dir="rtl"] .nav__links {
        inset: 0 auto 0 0;                 /* off-canvas von links statt rechts */
        border-inline-start: 0; border-inline-end: 1px solid var(--glass-brd);
        transform: translateX(-100%);
        box-shadow: 12px 0 40px rgba(0, 0, 0, .5);
    }
    [dir="rtl"] .nav__links.open { transform: none; }
}

/* ---------------------------------------------------------------- Schnellnavigation (alle Seiten) */
.quicknav {
    display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center;
    margin: 1.6rem 0;
}
/* Als eigenständiger Block unter dem Seitentitel (Programm/Lageplan) */
.section .quicknav { margin: 0 0 2rem; }
.quicknav .qbtn { padding: .9rem 1.6rem; font-size: 1.02rem; }
/* aktuelle Seite: deutlich markiert, nicht klickbar */
.quicknav .qbtn.is-current {
    background: var(--glass-strong); color: var(--text);
    border-color: var(--glass-brd); cursor: default; pointer-events: none;
    box-shadow: inset 0 0 0 2px var(--purple-300);
}
.quicknav .qbtn.is-current:hover { transform: none; filter: none; }
[data-theme="light"] .quicknav .qbtn.is-current { background: rgba(46,109,164,.12); color: var(--text); box-shadow: inset 0 0 0 2px var(--blue); }

@media (max-width: 560px) {
    .quicknav { flex-direction: column; align-items: stretch; }
    .quicknav .qbtn { width: 100%; padding: 1rem 1.2rem; font-size: 1.05rem; }
}

/* ---------------------------------------------------------------- Weiche Seitenübergänge */
/* Sanftes Crossfade beim Wechsel zwischen den Seiten (Start/Programm/Lageplan/Essen).
   Moderne Browser zeigen den Übergang; ältere navigieren normal (kein Nachteil). */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .38s;
    animation-timing-function: var(--ease);
}
@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) { animation: none; }
}

/* Sanftes Einblenden beim Laden – Fallback für Browser ohne View Transitions,
   damit der Seitenwechsel auch dort weicher wirkt. Reines Opacity-Fade (kein
   Verschieben), damit nichts springt. */
@media (prefers-reduced-motion: no-preference) {
    body { animation: sf-page-in .42s var(--ease) both; }
}
@keyframes sf-page-in { from { opacity: 0; } to { opacity: 1; } }
