/* ============================================================
   FF Gundernhausen – Weihnachts-Thema
   Wird nur im eingestellten Zeitraum oder in der Vorschau geladen
   (includes/saison.php, Verwaltung → Einstellungen → Weihnachten).
   Grafiken: assets/xmas/*.svg (Girlande, Schneekante, Schneewehe).
   Kein fallender Schnee; einzige Bewegung ist ein langsamer Goldschimmer
   auf schmalen Linien – bei „Bewegung reduzieren“ steht auch der still.
   ============================================================ */
.theme-xmas {
  --x-green:      #1e4d2e;
  --x-green-dark: #133621;
  --x-green-deep: #0c2416;
  --x-gold:       #c9a227;
  --x-gold-light: #f1d98a;
  --x-gold-grad:  linear-gradient(90deg, #8f6b12 0%, #d9b244 18%, #fff0bd 32%, #d9b244 46%, #8f6b12 62%, #d9b244 80%, #8f6b12 100%);
}

/* ── Goldschimmer (schmale Linien) ── */
@keyframes xmasGlanz { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.theme-xmas .main-nav::after,
.theme-xmas .topbar::after,
.theme-xmas .archiv-kopf::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--x-gold-grad);
  background-size: 200% 100%;
  animation: xmasGlanz 9s linear infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .theme-xmas .main-nav::after,
  .theme-xmas .topbar::after,
  .theme-xmas .archiv-kopf::after { animation: none !important; }
  .theme-xmas .hero-badge { animation: heroFadeUp .6s ease forwards .2s !important; }   /* nur Einblenden, kein Schimmer */
}

/* ── Topbar: bleibt weiß, Goldkante statt roter Linie.
   Bewusst KEINE farbige Topbar: über weißem Kopf und roter Navigation ergäbe Grün die
   Iran-Flagge, Schwarz die Reichsflagge, Dunkelrot die Flagge Österreichs. ── */
.theme-xmas .topbar {
  position: relative;
  border-bottom: 0;
  padding-bottom: 9px;
}

/* ── Kopf ── */
.theme-xmas .header-motto { border-left-color: var(--x-gold); }

/* ── Navigation: rot mit Goldkante ── */
.theme-xmas .main-nav { box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.theme-xmas .main-nav::after { height: 3px; }

/* ── Tannengirlande: hängt unter der Navigation, scrollt mit der Seite weg ── */
.xmas-girlande {
  position: relative;
  height: 0;
  z-index: 150;           /* unter der Navigation (200), damit Untermenüs darüber liegen */
  pointer-events: none;
}
.xmas-girlande::before {
  content: '';
  position: absolute; left: 0; right: 0; top: -9px;
  height: 76px;
  background: url('xmas/girlande.svg') repeat-x center top;
  background-size: 360px 76px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.18));
}
/* Platz für die Girlande über der Brotkrumen-Leiste */
.theme-xmas .breadcrumb-inner { padding-top: 40px; }
@media (max-width: 600px) {
  .xmas-girlande::before { top: -7px; height: 57px; background-size: 270px 57px; }
  .theme-xmas .breadcrumb-inner { padding-top: 32px; }
}

/* ── Seitenkopf der Archive: rot mit Goldkante ── */
.theme-xmas .archiv-kopf { position: relative; }

/* ── Schnee auf Kacheln ── */
.theme-xmas .news-card,
.theme-xmas .einsatz-card,
.theme-xmas .bk-karte,
.theme-xmas .ez-karte,
.theme-xmas .article-card { position: relative; }
.theme-xmas .news-card::after,
.theme-xmas .einsatz-card::after,
.theme-xmas .bk-karte::after,
.theme-xmas .ez-karte::after,
.theme-xmas .article-card::after,
.theme-xmas .dept-card::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0; bottom: auto;
  height: 28px;
  background: url('xmas/schnee-kante.svg') repeat-x left top;
  background-size: 300px 28px;
  z-index: 4;
  pointer-events: none;
}
/* Kacheln versetzt, damit nicht überall dieselbe Schneeform liegt */
.theme-xmas .news-card:nth-child(3n+2)::after, .theme-xmas .bk-karte:nth-child(3n+2)::after,
.theme-xmas .einsatz-card:nth-child(3n+2)::after, .theme-xmas .ez-karte:nth-child(3n+2)::after,
.theme-xmas .dept-card:nth-child(3n+2)::before { background-position: -110px top; }
.theme-xmas .news-card:nth-child(3n)::after, .theme-xmas .bk-karte:nth-child(3n)::after,
.theme-xmas .einsatz-card:nth-child(3n)::after, .theme-xmas .ez-karte:nth-child(3n)::after,
.theme-xmas .dept-card:nth-child(3n)::before { background-position: -205px top; }
/* Etiketten oben auf den Bildern liegen vor dem Schnee, ein Stück tiefer */
.theme-xmas .bk-art,
.theme-xmas .news-badges,
.theme-xmas .featured-pill,
.theme-xmas .einsatz-card-badge { top: 20px; z-index: 5; }
.theme-xmas :is(.bk-karte, .news-card, .einsatz-card, .ez-karte) .ki-thumb-badge:not(.ki-thumb-badge-bottom-left) { top: 17px; z-index: 5; }
/* Kleine Kacheln: etwas feinerer Schnee */
.theme-xmas .ez-karte::after { height: 22px; background-size: 236px 22px; }

/* ── Startseite: Hero ── */
.theme-xmas .hero-overlay {
  background: linear-gradient(160deg,
    rgba(0,0,0,.66) 0%,
    rgba(110,0,8,.50) 50%,
    rgba(8,36,20,.78) 100%);
}
/* Hero-Inhalte liegen vor der Girlande (Kugeln hängen in den Hero hinein) und rücken etwas tiefer */
.theme-xmas .hero-content { z-index: 160; padding-top: 64px; }
@media (max-width: 600px) { .theme-xmas .hero-content { padding-top: 48px; } }
.theme-xmas .hero::after {      /* Schneewehe am unteren Rand */
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 34px;
  background: url('xmas/schnee-wehe.svg') repeat-x left bottom;
  background-size: 480px 34px;
  z-index: 5;
  pointer-events: none;
}
.theme-xmas .hero-badge {
  background: var(--x-gold-grad);
  background-size: 200% 100%;
  animation: heroFadeUp .6s ease forwards .2s, xmasGlanz 9s linear infinite 1s;
  color: #4a0a0a;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.theme-xmas .hero-badge::before {     /* kleiner Stern */
  content: '';
  display: inline-block;
  width: 11px; height: 11px;
  margin: 0 9px 1px 0;
  vertical-align: middle;
  background: #9a0000;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

/* ── Startseite: Abschnitts-Überschriften mit Gold-Zier ── */
.theme-xmas .section-heading h2::after {
  content: '';
  display: block;
  width: 240px; height: 18px;
  margin: 12px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='18' viewBox='0 0 240 18'%3E%3Cdefs%3E%3ClinearGradient id='l' x1='0' x2='96' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23c9a227' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23d9b244'/%3E%3C/linearGradient%3E%3ClinearGradient id='r' x1='144' x2='240' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23d9b244'/%3E%3Cstop offset='1' stop-color='%23c9a227' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='s' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fff0bd'/%3E%3Cstop offset='.5' stop-color='%23d9b244'/%3E%3Cstop offset='1' stop-color='%238f6b12'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 9H96' stroke='url(%23l)' stroke-width='2'/%3E%3Cpath d='M144 9H240' stroke='url(%23r)' stroke-width='2'/%3E%3Cpath d='M120 0l3 6l6 3l-6 3l-3 6l-3-6l-6-3l6-3z' fill='url(%23s)'/%3E%3Ccircle cx='103' cy='9' r='2.6' fill='%23b3121f'/%3E%3Ccircle cx='137' cy='9' r='2.6' fill='%23b3121f'/%3E%3C/svg%3E") no-repeat center;
}
/* „Letzte Einsätze“ bleibt sachlich: keine Zier, keine Festfarben – nur der Schnee auf den Karten */
.theme-xmas .einsatz-section .section-heading h2::after { display: none; }

/* ── Footer: Tannengrün mit Schnee obenauf ── */
.theme-xmas .site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--x-green-dark) 0%, var(--x-green-deep) 100%);
  padding-top: 52px;
  color: #c9d6cc;
}
.theme-xmas .site-footer::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0;
  height: 34px;
  background: url('xmas/schnee-kante.svg') repeat-x left top;
  background-size: 364px 34px;
  pointer-events: none;
}
.theme-xmas .footer-logo { color: var(--x-gold-light); }
.theme-xmas .footer-col h4 { border-bottom-color: rgba(201,162,39,.45); }
.theme-xmas .footer-col ul li a { color: #c9d6cc; }
.theme-xmas .footer-col ul li a:hover { color: var(--x-gold-light); }
.theme-xmas .footer-bottom { border-top-color: rgba(255,255,255,.12); color: #9fb3a5; }

/* ── Hinweisleiste während der Vorschau (nur für Admins) ── */
.xmas-vorschau-leiste {
  position: fixed; left: 16px; bottom: 16px; z-index: 9000;
  background: var(--x-green, #1e4d2e); color: #fff;
  border-left: 4px solid var(--x-gold, #c9a227);
  border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.25);
  padding: 10px 14px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 12px;
}
.xmas-vorschau-leiste a {
  color: #fff; background: rgba(255,255,255,.15);
  padding: 4px 10px; border-radius: 4px; text-decoration: none;
}
.xmas-vorschau-leiste a:hover { background: rgba(255,255,255,.28); }
@media (max-width: 600px) { .xmas-vorschau-leiste { left: 8px; right: 8px; bottom: 8px; justify-content: space-between; } }

@media print {
  .xmas-girlande, .xmas-vorschau-leiste,
  .theme-xmas .news-card::after, .theme-xmas .einsatz-card::after, .theme-xmas .bk-karte::after,
  .theme-xmas .ez-karte::after, .theme-xmas .article-card::after, .theme-xmas .dept-card::before,
  .theme-xmas .site-footer::before, .theme-xmas .hero::after { display: none !important; }
}
