/* customizable snowflake styling */
.snowflake {
  color: #fbfafa;
  font-size: 1em;
  font-family: Arial, sans-serif;
  text-shadow: 0 0 5px #faf9f9;
}

.snowflake,
.snowflake .inner {
  animation-iteration-count: infinite;
  animation-play-state: running;
}
@keyframes snowflakes-fall {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(110vh);
  }
}
@keyframes snowflakes-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(80px);
  }
}
.snowflake {
  position: fixed;
  top: -10%;
  z-index: 9999;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
  pointer-events: none;
  animation-name: snowflakes-shake;
  animation-duration: 3s;
  animation-timing-function: ease-in-out;
}
.snowflake .inner {
  animation-duration: 10s;
  animation-name: snowflakes-fall;
  animation-timing-function: linear;
}
.snowflake:nth-of-type(0) {
  left: 1%;
  animation-delay: 0s;
}
.snowflake:nth-of-type(0) .inner {
  animation-delay: 0s;
}
.snowflake:first-of-type {
  left: 10%;
  animation-delay: 1s;
}
.snowflake:first-of-type .inner,
.snowflake:nth-of-type(8) .inner {
  animation-delay: 1s;
}
.snowflake:nth-of-type(2) {
  left: 20%;
  animation-delay: 0.5s;
}
.snowflake:nth-of-type(2) .inner,
.snowflake:nth-of-type(6) .inner {
  animation-delay: 6s;
}
.snowflake:nth-of-type(3) {
  left: 30%;
  animation-delay: 2s;
}
.snowflake:nth-of-type(11) .inner,
.snowflake:nth-of-type(3) .inner {
  animation-delay: 4s;
}
.snowflake:nth-of-type(4) {
  left: 40%;
  animation-delay: 2s;
}
.snowflake:nth-of-type(10) .inner,
.snowflake:nth-of-type(4) .inner {
  animation-delay: 2s;
}
.snowflake:nth-of-type(5) {
  left: 50%;
  animation-delay: 3s;
}
.snowflake:nth-of-type(5) .inner {
  animation-delay: 8s;
}
.snowflake:nth-of-type(6) {
  left: 60%;
  animation-delay: 2s;
}
.snowflake:nth-of-type(7) {
  left: 70%;
  animation-delay: 1s;
}
.snowflake:nth-of-type(7) .inner {
  animation-delay: 2.5s;
}
.snowflake:nth-of-type(8) {
  left: 80%;
  animation-delay: 0s;
}
.snowflake:nth-of-type(9) {
  left: 90%;
  animation-delay: 1.5s;
}
.snowflake:nth-of-type(9) .inner {
  animation-delay: 3s;
}
.snowflake:nth-of-type(10) {
  left: 25%;
  animation-delay: 0s;
}
.snowflake:nth-of-type(11) {
  left: 65%;
  animation-delay: 2.5s;
}
/* Neue Flocken 12–22 */
.snowflake:nth-of-type(12) {
  left: 5%;
  animation-delay: 1.5s;
}
.snowflake:nth-of-type(12) .inner {
  animation-delay: 3.5s;
}
.snowflake:nth-of-type(13) {
  left: 15%;
  animation-delay: 0s;
}
.snowflake:nth-of-type(13) .inner {
  animation-delay: 7s;
}
.snowflake:nth-of-type(14) {
  left: 35%;
  animation-delay: 2.5s;
}
.snowflake:nth-of-type(14) .inner {
  animation-delay: 1.5s;
}
.snowflake:nth-of-type(15) {
  left: 45%;
  animation-delay: 1s;
}
.snowflake:nth-of-type(15) .inner {
  animation-delay: 5s;
}
.snowflake:nth-of-type(16) {
  left: 55%;
  animation-delay: 0.5s;
}
.snowflake:nth-of-type(16) .inner {
  animation-delay: 9s;
}
.snowflake:nth-of-type(17) {
  left: 75%;
  animation-delay: 3s;
}
.snowflake:nth-of-type(17) .inner {
  animation-delay: 0.5s;
}
.snowflake:nth-of-type(18) {
  left: 85%;
  animation-delay: 2s;
}
.snowflake:nth-of-type(18) .inner {
  animation-delay: 6.5s;
}
.snowflake:nth-of-type(19) {
  left: 95%;
  animation-delay: 0.5s;
}
.snowflake:nth-of-type(19) .inner {
  animation-delay: 4.5s;
}
.snowflake:nth-of-type(20) {
  left: 3%;
  animation-delay: 2.5s;
}
.snowflake:nth-of-type(20) .inner {
  animation-delay: 8.5s;
}
.snowflake:nth-of-type(21) {
  left: 48%;
  animation-delay: 1.5s;
}
.snowflake:nth-of-type(21) .inner {
  animation-delay: 2.5s;
}
.snowflake:nth-of-type(22) {
  left: 72%;
  animation-delay: 0s;
}
.snowflake:nth-of-type(22) .inner {
  animation-delay: 5.5s;
}

.gold-text {
  padding: 5px;
  font-family: "Berkshire Swash", serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 0.833rem + 0.56vw, 2.9rem);
  background: linear-gradient(135deg, #cfc09f 0%, #ffecb3 70%, #ab812d 100%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.062);
}

.double-boxweihnachten {
  background: url("Bilder/Weihnachten/Tannen-Rot70.png");
  /* background: url("Bilder/Weihnachten/schnee.jpg");*/
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  /* Handy: Text über Bild */
  width: 100%;
  border-radius: 12px;
  margin: 5px auto;
  /* Zentriert auf dem Handy */
  border: 5px solid #ccd6e0;
  background-color: #ccd6e0;
  justify-content: center;
  align-items: center;
}

.box-largeweihnachten {
  width: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  padding: 5px;
  color: #bcc6cc;
  font-family: "Berkshire Swash", serif;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 22px 0px 22px 0px;
}
.box-largeweihnachtenkiel {
  background: url("Bilder/Weihnachten/Tannen-Rot.png");
  width: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  padding: 5px;
  color: #bcc6cc;
  font-family: "Berkshire Swash", serif;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 22px 0px 22px 0px;
}

.box-smallweihnachten {
  font-family: "Berkshire Swash", serif;
}

.box-largeweihnachten img {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0px auto;
}

/* --- Weihnachtsmann-Schlitten: fliegt von links unten nach rechts oben --- */
.santa-sleigh {
  position: fixed;
  left: 0;
  bottom: 0;
  width: clamp(180px, 28vw, 420px);
  height: auto;
  z-index: 9990;
  pointer-events: none;
  user-select: none;
  /* Grundstellung: außerhalb des sichtbaren Bereichs (links) */
  transform: translate(-110%, 0) rotate(-12deg);
  /* Gesamtdauer 60 s: ca. 14 s Flug, den Rest über Pause bis zum nächsten Flug */
  animation: santa-fly 60s linear 3s infinite both;
}

@keyframes santa-fly {
  0% {
    transform: translate(-110%, 0) rotate(-12deg);
  }
  23% {
    /* Ende des Flugs: außerhalb rechts oben */
    transform: translate(calc(100vw + 10%), -110vh) rotate(-12deg);
  }
  100% {
    transform: translate(calc(100vw + 10%), -110vh) rotate(-12deg);
  }
}

/* Bewegungen reduzieren, wenn vom Nutzer so eingestellt */
/*@media (prefers-reduced-motion: reduce) {
  .santa-sleigh {
    display: none;
  }
}
*/
/* Transparenter Overlay-Container am unteren Bildschirmrand */
.xmas-train-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  pointer-events: none; /* Macht den Bereich klickdurchlässig für deine Website */
  overflow: hidden;
  z-index: 9999;
}

/* Der fahrende Zug */
.xmas-train {
  position: absolute;
  bottom: 16px; /* Platz für die Räder */
  display: flex;
  align-items: flex-end;
  gap: 12px;
  animation: xmas-drive 34s linear infinite;
}

@keyframes xmas-drive {
  0% {
    transform: translateX(-2800px);
  }
  100% {
    transform: translateX(calc(100vw + 100px));
  }
}

/* Basis-Styling für Waggons & Lok */
.xmas-car {
  position: relative;
  border-radius: 6px;
}

/* --- LOKOMOTIVE --- */
.xmas-loco {
  width: 140px;
  height: 75px;
  background: #c1121f;
  border-bottom: 8px solid #ffb703;
}

.xmas-cabin {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 55px;
  height: 105px;
  background: #780000;
  border-radius: 6px 6px 0 0;
  border-top: 6px solid #ffffff;
}

.xmas-cabin::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 12px;
  width: 30px;
  height: 30px;
  background: #ffd166;
  border-radius: 4px;
}

.xmas-chimney {
  position: absolute;
  right: 20px;
  top: -28px;
  width: 22px;
  height: 28px;
  background: #1d3557;
  border-top: 5px solid #ffb703;
}

.xmas-headlight {
  position: absolute;
  right: -6px;
  top: 25px;
  width: 10px;
  height: 20px;
  background: #ffd166;
  border-radius: 0 5px 5px 0;
  box-shadow: 20px 0 25px 6px rgba(255, 209, 102, 0.7);
}

/* --- GESCHENKE-WAGGON (hinten) --- */
.xmas-wagon {
  width: 120px;
  height: 65px;
  background: #2b9348;
  border-bottom: 8px solid #c1121f;
  border-top: 5px solid #ffffff;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.xmas-window {
  width: 26px;
  height: 26px;
  background: #ffd166;
  border-radius: 4px;
}

/* --- OFFENER NIKOLAUS-WAGGON (Mitte) --- */
.xmas-santa-wagon {
  width: 120px;
  height: 45px; /* Niedriger, damit man Nikolaus sieht */
  background: #800f2f;
  border-bottom: 8px solid #ffb703;
  border-top: 4px solid #ffffff;
}

/* Kupplungen */
.xmas-wagon::after,
.xmas-santa-wagon::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: 8px;
  width: 12px;
  height: 6px;
  background: #333;
}

/* Transparenter Overlay-Container (Höhe etwas erhöht für das Bild) */
.xmas-train-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 190px; /* Etwas höher, damit Mütze & Kopf nicht abgeschnitten werden */
  pointer-events: none;
  overflow: hidden;
  z-index: 9999;
}

/* --- DEIN NIKOLAUS-BILD IM WAGGON --- */
.xmas-santa-img {
  position: absolute;
  bottom: 35px; /* Taucht leicht in den Waggon ein, als würde er darin stehen */
  left: 42px;
  height: 120px; /* Größe des Nikolauses im Zug */
  width: auto;
  z-index: 1; /* Hinter der Waggon-Vorderwand */
  mix-blend-mode: multiply; /* Entfernt weißen Bildhintergrund auf hellen Seiten */
}

/* Waggon-Vorderwand über die Hüfte legen, damit er "im" Waggon steht */
.xmas-santa-wagon {
  width: 120px;
  height: 45px;
  background: #800f2f;
  border-bottom: 8px solid #ffb703;
  border-top: 4px solid #ffffff;
  z-index: 2; /* Liegt optisch vor dem Unterkörper des Bildes */
}

/* Schriftzug auf jedem Wagen, Text kommt aus data-text */
.xmas-car[data-text]::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Berkshire Swash", serif;
  font-size: 24px;
  white-space: nowrap;
  color: #ffecb3;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 3;
}

/* Geschenk ebenfalls vor die Waggonwand oder dahinter platzieren */
.xmas-gift {
  position: absolute;
  bottom: 45px;
  left: 12px;
  width: 22px;
  height: 22px;
  background: #ffb703;
  border: 2px solid #fb8500;
  z-index: 1;
}

/* Geschenkpaket neben Nikolaus */
.xmas-gift {
  position: absolute;
  bottom: 45px;
  left: 10px;
  width: 22px;
  height: 22px;
  background: #ffb703;
  border: 2px solid #fb8500;
}
.xmas-gift::after {
  content: "";
  position: absolute;
  left: 8px;
  width: 4px;
  height: 100%;
  background: #d90429;
}
/* --- 2. WAGGON neu --- */

/* --- RÄDER --- */
.xmas-wheel {
  position: absolute;
  bottom: -16px;
  width: 26px;
  height: 26px;
  background: #222;
  border: 4px solid #ffb703;
  border-radius: 50%;
  box-sizing: border-box;
  animation: xmas-spin 1s linear infinite;
}

.xmas-wheel::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ffb703;
  transform: translateY(-50%);
}

@keyframes xmas-spin {
  100% {
    transform: rotate(360deg);
  }
}

.xw1 {
  left: 15px;
}
.xw2 {
  right: 15px;
}
.xw3 {
  left: 55px;
}

/* --- RAUCH (leicht abgedunkelt, damit er auch auf hellem Hintergrund sichtbar ist) --- */
.xmas-smoke {
  position: absolute;
  top: -42px;
  right: 22px;
  width: 16px;
  height: 16px;
  background: rgba(180, 190, 200, 0.75);
  border-radius: 50%;
  animation: xmas-puff 2s ease-out infinite;
}

.xmas-smoke:nth-child(2) {
  animation-delay: 0.6s;
}
.xmas-smoke:nth-child(3) {
  animation-delay: 1.2s;
}

@keyframes xmas-puff {
  0% {
    transform: translate(0, 0) scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: translate(-55px, -65px) scale(2.4);
    opacity: 0;
  }
}

/*.weihnachts-rahmen {
  max-width: 1200px;
  margin: 0px auto;
  
  padding: 0px;
  background-color: #fffdf9;
  color: #2c3e50;
  font-family: "Georgia", serif;
  text-align: center;
  position: relative;

  border: 12px solid transparent;
  border-radius: 12px;
  border-image: repeating-linear-gradient(
      45deg,
      #b3000c,
      #b3000c 15px,
      #165b33 15px,
      #165b33 30px,
      #f8b229 30px,
      #f8b229 35px
    )
    12;

  box-shadow:
    inset 0 0 0 3px #d4af37,
    0 10px 25px rgba(0, 0, 0, 0.15);
}*/

.weihnachts-rahmen {
  max-width: 1200px;
  margin: 40px auto;
  padding: 35px;
  color: #2c3e5000;
  font-family: "Georgia", serif;
  text-align: center;
  position: relative;

  /* 1. Durchsichtiger Rahmen als Platzhalter */
  border: 5px solid transparent;
  border-radius: 22px 0px 22px 0px;

  /* 2. Zwei Hintergründe: Oben die Füllfarbe, darunter das Streifenmuster */
  background:
    linear-gradient(#fffdf900, #fffdf900) padding-box,
    repeating-linear-gradient(
        45deg,
        #b3000c00,
        #b3000c00 15px,
        #165b3300 15px,
        #165b3300 30px,
        #f8b32900 30px,
        #f8b32900 35px
      )
      border-box;
  background-color: #0a32b646;

  /* Goldener Innenrahmen und Schatten */
  box-shadow:
    inset 0 0 0 8px #d4af37,
    0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Dekoration oben links */
.weihnachts-rahmen::before {
  content: "🎄";
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 22px;
}

/* Dekoration unten rechts */
.weihnachts-rahmen::after {
  content: "🎄";
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 22px;
}
