/* © 2024–2026 Maximilian Krenn · maximiliankrenn.com
   Tauschring Unna - Weihnachtsdesign
   Alles greift nur bei <html class="xmas">. Öffentlich: Nachthimmel wie der
   Adventskalender. Mitgliederbereich: dezente Weihnachtsfarben. */

:root {
    --xm-gold: #f1d48b;
    --xm-gold-tief: #c89b3c;
    --xm-rot: #8e2b33;
    --xm-nacht: linear-gradient(135deg, #061c24 0%, #0b3438 55%, #0f4a48 100%);
    --xm-sterne:
        radial-gradient(1.2px 1.2px at 8% 30%, rgba(255,255,255,.9), transparent),
        radial-gradient(1px 1px at 22% 70%, rgba(255,255,255,.7), transparent),
        radial-gradient(1.3px 1.3px at 37% 22%, rgba(255,255,255,.85), transparent),
        radial-gradient(1px 1px at 51% 62%, rgba(255,255,255,.6), transparent),
        radial-gradient(1.2px 1.2px at 66% 35%, rgba(255,255,255,.8), transparent),
        radial-gradient(1px 1px at 79% 75%, rgba(255,255,255,.65), transparent),
        radial-gradient(1.3px 1.3px at 91% 28%, rgba(255,255,255,.85), transparent);
}

/* Bausteine, die nur mit eingeschaltetem Design sichtbar sind */
.xm-lichter, .xm-schneedecke, .xm-mond { display: none; }
html.xmas .xm-lichter { display: flex; }
html.xmas .xm-schneedecke, html.xmas .xm-mond { display: block; }

/* ── Lichterkette unter der Kopfleiste ───────────────────────── */
html.xmas .header { overflow: visible; }
.xm-lichter {
    position: absolute; left: 0; right: 0; top: 100%; height: 15px; pointer-events: none; z-index: 2;
    justify-content: space-around; padding: 0 12px;
}
.xm-lichter svg.xm-draht { position: absolute; inset: 0 0 auto; width: 100%; height: 7px; overflow: visible; }
.xm-birne {
    position: relative; width: 4px; height: 6px; margin-top: 4px; border-radius: 50% 50% 45% 45%;
    background: var(--c);
    box-shadow: 0 0 4px 1px var(--c), 0 0 10px 3px color-mix(in srgb, var(--c) 35%, transparent);
    animation: xmLeuchten var(--d, 2.4s) ease-in-out infinite;
    animation-delay: var(--v, 0s);
}
.xm-birne:nth-child(odd) { margin-top: 5px; }
.xm-birne::before { content: ""; position: absolute; top: -2px; left: 1px; width: 2px; height: 2px; border-radius: 1px; background: rgba(200,155,60,.8); }
@keyframes xmLeuchten {
    0%, 100% { opacity: 1; }
    50%      { opacity: .6; box-shadow: 0 0 3px 0 var(--c); }
}

/* ── Schneefall ──────────────────────────────────────────────── */
.xm-schnee { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1001; }

/* ── Schalter in der Kopfleiste (bleibt auch bei ausgeschaltetem Design) ── */
.xm-schalter svg { transition: transform .4s; }
.xm-schalter[aria-pressed="true"] { color: var(--xm-gold) !important; }
.xm-schalter[aria-pressed="true"] svg { transform: rotate(30deg); }
.xm-schalter[aria-pressed="false"] { opacity: .7; }
.xm-schalter[hidden] { display: none !important; }
.xm-schnee-knopf[aria-pressed="true"] svg { transform: none; }
/* Am Handy fehlt oben der Platz: dort steht der Schalter als Zeile im Menü */
.xm-schalter.xm-zeile { display: none; }
@media (max-width: 900px) {
    .xm-schalter.xm-oben { display: none !important; }
    .xm-schalter.xm-zeile { display: flex; align-items: center; gap: .6rem; width: 100%; cursor: pointer; font: inherit;
        background: transparent; border: 0; text-align: left; color: inherit; }
    .xm-schalter.xm-zeile[aria-pressed="true"] { color: var(--xm-rot) !important; }
}

/* ═════ Öffentliche Seiten: Nachthimmel wie der Adventskalender ═════ */
html.xmas[data-xm-bereich="oeffentlich"] .header {
    background-color: #5c2c31; /* gedaempft wie #2e5653 bei Teal, faerbt die Safari-Leiste (Maximilian 24.11.2026) */
    background-image: var(--xm-sterne),
        radial-gradient(ellipse 60% 120% at 50% 0%, rgba(255,214,150,.14), transparent 70%),
        linear-gradient(135deg, #5e1019 0%, #8e1f2c 50%, #a52a36 100%);
    border-bottom: 1px solid rgba(241,212,139,.45);
}
html.xmas[data-xm-bereich="oeffentlich"] .header .nav-link.is-active {
    background: var(--xm-gold) !important; color: #2b1b05 !important;
}
html.xmas[data-xm-bereich="oeffentlich"] .header .btn-primary {
    background: linear-gradient(135deg, #f7e2a6, #e2b453 55%, #c8902f) !important; color: #2b1b05 !important; border-color: transparent !important;
}

/* Großes Bild der Startseite: Weihnachtsfoto im Format des normalen Banners (Maximilian 28.11.2026).
   Links Weihnachtsrot mit Text, rechts das Foto; geladen wird es nur bei aktivem Design. */
html.xmas .lp-hero.xm-nacht {
    background:
        linear-gradient(90deg, #5e1019 0%, rgba(110,20,32,.94) 26%, rgba(142,31,44,.55) 44%, rgba(142,31,44,0) 62%),
        url("../images/weihnachten-start.webp?v=20261128") right center / cover no-repeat,
        #5e1019 !important;
}
html.xmas .lp-hero.xm-nacht .xm-mond { display: none; }
@media (min-width: 821px) {
    html.xmas .lp-hero.xm-nacht .lp-hero-content { text-align: left !important; max-width: 1200px; margin: 0 auto; min-height: 520px; }
    html.xmas .lp-hero.xm-nacht .xm-hero-text, html.xmas .lp-hero.xm-nacht .xm-hero-titel,
    html.xmas .lp-hero.xm-nacht .xm-hero-unter { max-width: 520px; margin-left: 0; margin-right: 0; }
    html.xmas .lp-hero.xm-nacht .lp-hero-btns,
    html.xmas .lp-hero.xm-nacht .lp-hero-content > div:last-child { justify-content: flex-start !important; max-width: 560px; }
}
@media (max-width: 820px) {
    html.xmas .lp-hero.xm-nacht {
        background:
            linear-gradient(180deg, rgba(94,16,25,.82) 0%, rgba(110,20,32,.55) 50%, rgba(142,31,44,.12) 100%),
            url("../images/weihnachten-start-mobil.webp?v=20261128") center bottom / cover no-repeat,
            #5e1019 !important;
    }
}
/* Im Dezember verdrängt der Nachthimmel auch ein Foto oder fertiges Banner */
html.xmas .lp-hero.xm-nacht picture, html.xmas .lp-hero.xm-nacht .lp-hero-pic,
html.xmas .lp-hero.xm-nacht .lp-hero-bannerimg, html.xmas .lp-hero.xm-nacht .lp-hero-bannerimg-m,
html.xmas .lp-hero.xm-nacht .lp-hero-overlay,
html.xmas .lp-hero.xm-nacht .lp-hero-h1, html.xmas .lp-hero.xm-nacht .lp-hero-sub { display: none !important; }
html.xmas .lp-hero.xm-nacht .lp-hero-content {
    position: relative !important; inset: auto !important; display: block !important;
    padding: 4.5rem 1.25rem 5.5rem !important;
}
html.xmas .lp-hero.xm-nacht .lp-hero-tag { display: inline-flex !important; }
html.xmas .lp-hero.xm-nacht .lp-hero-btns,
html.xmas .lp-hero.xm-nacht .lp-hero-content > div:last-child { display: flex !important; }
.xm-hero-text { display: none; }
html.xmas .lp-hero.xm-nacht .xm-hero-text { display: block; }
.xm-hero-titel {
    font-family: Georgia, "Times New Roman", serif; font-weight: 400; color: #fffaf0;
    font-size: clamp(2.1rem, 6vw, 3.9rem); line-height: 1.08; letter-spacing: -.01em;
    margin: 0 auto .9rem; text-shadow: 0 2px 24px rgba(241,212,139,.25);
}
.xm-hero-unter { color: rgba(255,250,240,.82); font-size: clamp(.95rem, 2.2vw, 1.1rem); margin: 0 auto 2rem; max-width: 560px; line-height: 1.6; }
@media (max-width: 600px) {
    html.xmas .lp-hero.xm-nacht .lp-hero-content { padding: 3rem 1rem 4rem !important; }
}
html.xmas .lp-hero.xm-nacht .lp-hero-tag { border-color: rgba(241,212,139,.45); color: var(--xm-gold); }
html.xmas .lp-hero.xm-nacht .lp-btn-primary {
    background: linear-gradient(135deg, #f7e2a6, #e2b453 55%, #c8902f) !important; color: #2b1b05 !important; border: 0 !important;
}
html.xmas .lp-hero.xm-nacht .lp-btn-secondary { border-color: rgba(241,212,139,.6) !important; color: #fffaf0 !important; }
.xm-mond {
    position: absolute; top: 9%; right: 8%; width: 70px; height: 70px; border-radius: 50%; z-index: 0; pointer-events: none;
    background: radial-gradient(circle at 38% 38%, #fffaf0, #f3e3b8 60%, #e3cc8f);
    box-shadow: 0 0 40px 10px rgba(241,212,139,.22), 0 0 120px 40px rgba(241,212,139,.08);
}
@media (max-width: 600px) { .xm-mond { width: 34px; height: 34px; top: 34px; right: 16px; } }
.xm-schneedecke {
    position: absolute; left: 0; right: 0; bottom: -1px; height: 46px; z-index: 3; pointer-events: none;
    line-height: 0; color: var(--bg-primary, #fff);
}
.xm-schneedecke svg { width: 100%; height: 100%; display: block; }

/* Fußzeile mit feiner Goldkante */
html.xmas[data-xm-bereich="oeffentlich"] .footer { box-shadow: inset 0 1px 0 rgba(200,155,60,.55); }

/* ═════ Seitenhintergrund: dezentes Weihnachtsrot statt Mint (Maximilian 24.11.2026) ═════ */
html.xmas body {
    background-color: #fdf6f5;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(142,43,51,.08) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 8%, rgba(200,155,60,.07) 0%, transparent 50%),
        linear-gradient(135deg, #fcf8f7 0%, #fbefee 50%, #fdf5f3 100%);
}
html.xmas[data-theme="dark"] body {
    background-color: #1a1214;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(165,42,54,.16) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 10%, rgba(200,155,60,.07) 0%, transparent 45%),
        linear-gradient(135deg, #1a1214 0%, #221719 100%);
}

/* ═════ Mitgliederbereich: dezent ═════ */
/* Gleiches Weihnachtsrot wie die öffentliche Seite (Maximilian 12.11.2026) */
html.xmas[data-xm-bereich="mitglied"] .header {
    background-color: #5c2c31; /* gedaempft wie #2e5653 bei Teal, faerbt die Safari-Leiste (Maximilian 24.11.2026) */
    background-image: var(--xm-sterne),
        radial-gradient(ellipse 60% 120% at 50% 0%, rgba(255,214,150,.14), transparent 70%),
        linear-gradient(135deg, #5e1019 0%, #8e1f2c 50%, #a52a36 100%);
    border-bottom: 1px solid rgba(241,212,139,.45);
}
html.xmas[data-xm-bereich="mitglied"] .member-nav-link.is-active:not(.member-nav-action) {
    background: rgba(142,43,51,.09) !important; color: var(--xm-rot) !important;
}
[data-theme="dark"].xmas[data-xm-bereich="mitglied"] .member-nav-link.is-active:not(.member-nav-action) {
    background: rgba(241,212,139,.12) !important; color: var(--xm-gold) !important;
}
html.xmas[data-xm-bereich="mitglied"] .page-title::after {
    content: ""; display: inline-block; width: .55em; height: .55em; margin-left: .35em; vertical-align: .35em;
    background: var(--xm-gold-tief);
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ── Der Weihnachtsmann fliegt vorbei ────────────────────────── */
.xm-schlitten { display: none; }
html.xmas .xm-schlitten {
    display: block; position: absolute; top: 13%; left: 0; z-index: 0; pointer-events: none;
    color: #f1d48b; filter: drop-shadow(0 0 6px rgba(241,212,139,.55));
    animation: xmFlug 26s linear infinite; animation-delay: 1.5s; transform: translateX(110vw);
}
.ak-himmel .xm-schlitten { top: 4.5rem; z-index: 1; }
.xm-schlitten-wippe { animation: xmWippen 2.6s ease-in-out infinite alternate; }
.xm-schlitten svg { display: block; width: clamp(150px, 16vw, 230px); height: auto; }
@keyframes xmFlug {
    0%   { transform: translateX(110vw) translateY(10px) rotate(-3deg); }
    55%  { transform: translateX(-260px) translateY(-26px) rotate(-6deg); }
    100% { transform: translateX(-260px) translateY(-26px) rotate(-6deg); }
}
@keyframes xmWippen { from { transform: translateY(-4px); } to { transform: translateY(5px); } }
@media (max-width: 600px) { html.xmas .xm-schlitten { top: 26%; } }

@media (prefers-reduced-motion: reduce) { .xm-birne { animation: none; } html.xmas .xm-schlitten { display: none; } }
@media print { .xm-lichter, .xm-schnee, .xm-schneedecke, .xm-mond, .xm-schalter, .xm-schlitten { display: none !important; } }

/* ═════ Vereinsfarbe wird Weihnachtsrot (Maximilian 28.11.2026: „überall den roten Weihnachtsstil, auch die Buttons“).
   Alles, was die Farb-Variablen nutzt (Knöpfe, Reiter, Links, Such-Kopf, Akzente), folgt damit automatisch.
   Spezifischer als [data-color="mint"] in style.css, darum gewinnt es ohne !important. ═════ */
html.xmas, html.xmas[data-color] {
    --color-primary:       #a52a36;
    --color-primary-dark:  #8e1f2c;
    --color-primary-light: #c0414d;
    --color-secondary:     #6e1420;
    --color-accent:        #c8902f;
    --color-primary-mid:   #a52a36;
    --color-primary-mid-hover: #8e1f2c;
    --link-color:          #8e1f2c;
    /* Tönungen, die in style.css/member.css als rgb(var(--primary-rgb, 13 148 136) / x) stehen */
    --primary-rgb:      165 42 54;
    --primary-dark-rgb: 142 31 44;
    --secondary-rgb:    110 20 32;
}
html.xmas[data-theme="dark"], html.xmas[data-color][data-theme="dark"] {
    --color-primary:       #e0646e;
    --color-primary-dark:  #c0414d;
    --color-primary-light: #ea8a92;
    --color-secondary:     #b03440;
    --color-accent:        #e2b453;
    --color-primary-mid:   #c0414d;
    --color-primary-mid-hover: #a52a36;
    --link-color:          #ea8a92;
    --primary-rgb:      224 100 110;
    --primary-dark-rgb: 192 65 77;
    --secondary-rgb:    176 52 64;
}
/* Fest eingetragene Teal-Flächen, die keine Variable nutzen */
html.xmas .hero-new {
    background-image: var(--xm-sterne),
        radial-gradient(ellipse 60% 120% at 50% 0%, rgba(255,214,150,.14), transparent 70%),
        linear-gradient(135deg, #5e1019 0%, #8e1f2c 50%, #a52a36 100%) !important;
    background-color: #5e1019 !important;
}
html.xmas .kl-pill-submit { background: linear-gradient(135deg, #a52a36, #6e1420) !important; }
html.xmas .team-card-placeholder { background: linear-gradient(135deg, #8e1f2c 0%, #a52a36 100%) !important; }

/* ═════ Adminbereich: dieselbe rote Kopfleiste und derselbe Hintergrund (Maximilian 28.11.2026) ═════ */
html.xmas[data-xm-bereich="admin"] .admin-header {
    position: relative;
    background-color: #5c2c31 !important;
    background-image: var(--xm-sterne),
        radial-gradient(ellipse 60% 120% at 50% 0%, rgba(255,214,150,.14), transparent 70%),
        linear-gradient(135deg, #5e1019 0%, #8e1f2c 50%, #a52a36 100%) !important;
    border-bottom: 1px solid rgba(241,212,139,.45);
}
html.xmas[data-xm-bereich="admin"] .adm-layout {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(142,43,51,.08) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 8%, rgba(200,155,60,.07) 0%, transparent 50%),
        linear-gradient(135deg, #fcf8f7 0%, #fbefee 50%, #fdf5f3 100%);
}
html.xmas[data-xm-bereich="admin"][data-theme="dark"] .adm-layout {
    background: linear-gradient(135deg, #1a1214 0%, #221719 100%);
}
html.xmas .admin-header { overflow: visible; }
/* Im Adminbereich gibt es kein Handymenü für die Schalter, dort bleiben sie oben */
@media (max-width: 900px) {
    html[data-xm-bereich="admin"] .xm-schalter.xm-oben { display: inline-flex !important; }
}
html[data-xm-bereich="admin"] .xm-schalter.xm-oben { align-items: center; justify-content: center; }
