/* =========================================================
   Weihnachts-Deko für lindland.de
   Wird nur aktiv, wenn weihnachten.js die Klasse "xmas" an
   <body> setzt (automatisch bis zum Enddatum in der JS-Datei).
   Entfernen: die zwei Einbindungszeilen in index.html löschen.
   ========================================================= */

body.xmas .xm { pointer-events: none; }
body.xmas .xm svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ---------- Lichterkette unter der Navigation ---------- */
body.xmas .xm-lights {
  position: absolute; left: 0; right: 0; top: 100%;
  height: 26px; overflow: hidden; z-index: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='26'%3E%3Cpath d='M0 2 Q28 18 56 2' stroke='%233b4a3f' stroke-width='1.4' fill='none'/%3E%3C/svg%3E") repeat-x 0 0;
  background-size: 56px 26px;
}
body.xmas .xm-bulb {
  position: absolute; top: 9px; width: 8px; height: 12px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--c); box-shadow: 0 0 8px 2px var(--c);
  animation: xm-glow 1.6s ease-in-out infinite alternate;
}
body.xmas .xm-bulb::before {
  content: ""; position: absolute; top: -3px; left: 2px; width: 4px; height: 4px;
  border-radius: 1px; background: #3b4a3f;
}
@keyframes xm-glow { from { opacity: .35; box-shadow: 0 0 2px 0 var(--c); } to { opacity: 1; box-shadow: 0 0 10px 3px var(--c); } }

/* ---------- Schneeflocken ---------- */
body.xmas .xm-snow { position: absolute; inset: 0; overflow: hidden; z-index: 1; }
body.xmas .xm-flake {
  position: absolute; top: -24px; line-height: 1;
  animation: xm-fall linear infinite;
}
body.xmas .xm-flake > span { display: inline-block; animation: xm-sway ease-in-out infinite alternate; }
@keyframes xm-fall { to { transform: translateY(var(--fall, 400px)) rotate(240deg); } }
@keyframes xm-sway { from { transform: translateX(-14px); } to { transform: translateX(14px); } }

/* ---------- Hero: Weihnachtsbaum mit Geschenken ---------- */
body.xmas .xm-hero-tree {
  position: absolute; right: 2.5%; bottom: 0; width: 190px; z-index: 3;
  display: flex; align-items: flex-end;
}
body.xmas .xm-hero-tree .xm-tree { width: 130px; }
body.xmas .xm-hero-tree .xm-gift { width: 50px; margin-left: -18px; }
body.xmas .xm-hero-tree .xm-gift + .xm-gift { width: 40px; margin-left: -8px; }
body.xmas .xm-star { transform-box: fill-box; transform-origin: center; animation: xm-pulse 2.4s ease-in-out infinite; }
body.xmas .xm-blink { animation: xm-blink 1.8s ease-in-out infinite; }
@keyframes xm-pulse { 0%,100% { transform: scale(1); filter: drop-shadow(0 0 2px #f5c842); } 50% { transform: scale(1.15); filter: drop-shadow(0 0 8px #f5c842); } }
@keyframes xm-blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- Verstreute Deko in den Abschnitten ---------- */
body.xmas #welten, body.xmas #marken, body.xmas #news,
body.xmas #about, body.xmas #impressum { position: relative; }
body.xmas .xm-corner { position: absolute; z-index: 2; }

body.xmas .xm-gifts { display: flex; align-items: flex-end; }
body.xmas .xm-gifts .xm-gift { width: 46px; }
body.xmas .xm-gifts .xm-gift:nth-child(2) { width: 62px; margin-left: -8px; }
body.xmas .xm-gifts .xm-gift:nth-child(3) { width: 40px; margin-left: -6px; }
body.xmas .xm-gift { animation: xm-wobble 4s ease-in-out infinite; transform-origin: 50% 100%; }
body.xmas .xm-gift:nth-child(2) { animation-delay: -1.3s; }
body.xmas .xm-gift:nth-child(3) { animation-delay: -2.6s; }
@keyframes xm-wobble { 0%,80%,100% { transform: rotate(0); } 85% { transform: rotate(-4deg); } 90% { transform: rotate(3deg); } 95% { transform: rotate(-2deg); } }

body.xmas .xm-angel { width: 120px; animation: xm-float 4.5s ease-in-out infinite; }
body.xmas .xm-wings { transform-box: fill-box; transform-origin: 50% 80%; animation: xm-flap 1.8s ease-in-out infinite alternate; }
@keyframes xm-float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes xm-flap { from { transform: scaleY(1); } to { transform: scaleY(.9); } }

body.xmas .xm-baubles { display: flex; gap: 14px; align-items: flex-start; }
body.xmas .xm-bauble { width: 30px; transform-origin: 50% 0; animation: xm-swing 3s ease-in-out infinite alternate; }
body.xmas .xm-bauble:nth-child(2) { animation-delay: -1s; width: 36px; }
body.xmas .xm-bauble:nth-child(3) { animation-delay: -2s; }
@keyframes xm-swing { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }

body.xmas .xm-hstar { width: 46px; transform-origin: 50% 0; animation: xm-swing 3.5s ease-in-out infinite alternate; }

/* ---------- Block "Besucht uns in Augsburg" ---------- */
body.xmas .contact-strip { position: relative; overflow: hidden; }
body.xmas .contact-strip-inner { position: relative; z-index: 2; }
body.xmas .xm-strip-row {
  position: relative; z-index: 2; max-width: 1200px; margin: 1.6rem auto 0;
  padding-top: 1.4rem; border-top: 1px dashed rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center; gap: 2.5rem; flex-wrap: wrap;
}
body.xmas .xm-bells { width: 84px; }
body.xmas .xm-bell { transform-box: fill-box; transform-origin: 50% 0; animation: xm-ring 1.2s ease-in-out infinite alternate; }
body.xmas .xm-bell.b2 { animation-delay: -.6s; }
@keyframes xm-ring { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
body.xmas .xm-greeting { text-align: center; color: #fff; }
body.xmas .xm-greeting strong {
  display: block; font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 2rem; line-height: 1.2;
}
body.xmas .xm-greeting span { font-size: .9rem; opacity: .85; }
body.xmas .xm-santa { width: 92px; }
body.xmas .xm-wave { transform-box: view-box; transform-origin: 70px 66px; animation: xm-waveArm 1.4s ease-in-out infinite alternate; }
@keyframes xm-waveArm { from { transform: rotate(-12deg); } to { transform: rotate(16deg); } }

/* ---------- Footer: Tannengirlande + Gruß ---------- */
body.xmas footer { position: relative; padding-top: 3.8rem; }
body.xmas .xm-garland {
  position: absolute; left: 0; right: 0; top: -14px; height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='64'%3E%3Cpath d='M0 12 Q90 54 180 12' stroke='%23276b4d' stroke-width='13' fill='none' stroke-linecap='round'/%3E%3Cpath d='M0 12 Q90 54 180 12' stroke='%2340a274' stroke-width='9' fill='none' stroke-dasharray='1.5 4'/%3E%3Cpath d='M0 12 Q90 54 180 12' stroke='%23194a35' stroke-width='14' fill='none' stroke-dasharray='1 6' opacity='.7'/%3E%3Ccircle cx='45' cy='26' r='2.6' fill='%23c8453c'/%3E%3Ccircle cx='50' cy='29' r='2.2' fill='%23c8453c'/%3E%3Ccircle cx='132' cy='28' r='2.6' fill='%23c8453c'/%3E%3Ccircle cx='127' cy='30' r='2.2' fill='%23c8453c'/%3E%3Cline x1='90' y1='33' x2='90' y2='44' stroke='%23f5c842' stroke-width='1.2'/%3E%3Crect x='86.5' y='42' width='7' height='4' rx='1' fill='%23d9a92a'/%3E%3Ccircle cx='90' cy='52' r='7.5' fill='%23c8453c'/%3E%3Ccircle cx='87.3' cy='49.3' r='2.2' fill='%23fff' opacity='.55'/%3E%3Cpath d='M0 11 C-15 0 -15 22 0 11 C15 0 15 22 0 11Z' fill='%23c8453c'/%3E%3Cpath d='M180 11 C165 0 165 22 180 11 C195 0 195 22 180 11Z' fill='%23c8453c'/%3E%3Ccircle cx='0' cy='11' r='3' fill='%23a8352d'/%3E%3Ccircle cx='180' cy='11' r='3' fill='%23a8352d'/%3E%3C/svg%3E") repeat-x 0 0;
  background-size: 180px 64px;
}
body.xmas .xm-foot-greet {
  font-family: var(--font-display); font-style: italic; font-size: 1.15rem;
  color: #f5c842; margin-bottom: .6rem;
}

/* ---------- Kleine Bildschirme: nur das Wesentliche ---------- */
@media (max-width: 1150px) {
  body.xmas .xm-corner { display: none; }
}
@media (max-width: 900px) {
  body.xmas .xm-hero-tree { display: none; }
  body.xmas .xm-strip-row { gap: 1.2rem; }
  body.xmas .xm-greeting strong { font-size: 1.6rem; }
  body.xmas .xm-bells { width: 64px; }
  body.xmas .xm-santa { width: 72px; }
}

/* Wer Animationen im System abgeschaltet hat, bekommt ruhige Deko */
@media (prefers-reduced-motion: reduce) {
  body.xmas .xm *, body.xmas .xm, body.xmas .xm-bulb { animation: none !important; }
  body.xmas .xm-snow { display: none; }
}
