/* ATLAS Dashboard: festliche, dezente Beleuchtung – nur am Begrüßungsbanner.
   Das vorhandene /bg.jpg und die Texte bleiben vollständig erhalten. */
#main .dashboard-hero > :not(.atlas-christmas-decor):not(.atlas-santa-lane) {
  position: relative;
  z-index: 2;
}
#main .dashboard-hero .atlas-christmas-decor {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 29px;
  z-index: 1;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 0 7px;
  pointer-events: none;
  user-select: none;
  background: url('/atlas-christmas-fir.svg') center top / auto 29px repeat-x;
}
#main .dashboard-hero .atlas-christmas-light {
  position: relative;
  display: block;
  flex: 0 0 6px;
  width: 6px;
  height: 9px;
  margin-top: 13px;
  border-radius: 50% 50% 47% 47%;
  border: 1px solid rgba(255, 241, 186, .85);
  background: radial-gradient(circle at 37% 32%, #fffef4 0 16%, #ffe8a0 40%, #ffd45b 78%, #eba32d 100%);
  box-shadow: 0 0 4px 2px rgba(255, 194, 55, .52), 0 0 12px 4px rgba(255, 213, 106, .24);
  animation: atlas-christmas-twinkle 3.6s ease-in-out infinite;
  will-change: opacity;
}
#main .dashboard-hero .atlas-christmas-light::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 1px;
  width: 3px;
  height: 4px;
  border-radius: 1px 1px 0 0;
  background: #806435;
}
#main .dashboard-hero .atlas-christmas-light:nth-child(3n) {
  margin-top: 16px;
  animation-delay: -1.8s;
  animation-duration: 4.1s;
}
#main .dashboard-hero .atlas-christmas-light:nth-child(4n+2) {
  margin-top: 11px;
  animation-delay: -2.8s;
  animation-duration: 3.1s;
}
#main .dashboard-hero .atlas-christmas-light:nth-child(5n+1) {
  animation-delay: -.9s;
  animation-duration: 4.8s;
}
@keyframes atlas-christmas-twinkle {
  0%, 100% {
    opacity: .63;
    box-shadow: 0 0 3px 1px rgba(255, 194, 55, .35), 0 0 8px 3px rgba(255, 213, 106, .16);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 6px 3px rgba(255, 198, 55, .80), 0 0 16px 6px rgba(255, 213, 106, .32);
  }
}
@media (max-width: 500px) {
  #main .dashboard-hero .atlas-christmas-light:nth-child(even) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #main .dashboard-hero .atlas-christmas-light {
    animation: none;
    opacity: .88;
    will-change: auto;
  }
}

/* Weihnachtsmann mit Schlitten und drei Rentieren: ausschließlich innerhalb des Banners. */
#main .dashboard-hero .atlas-santa-lane {
  position: absolute;
  inset: auto 0 2px;
  height: 54px;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  /* Deckung vor dem Text: Fahrtrichtung bleibt links nach rechts.
     Der Weihnachtsmann wird beim Passieren der Schrift ausgeblendet.
     An der rechten Textkante blendet er sanft wieder ein. */
  -webkit-mask-image: linear-gradient(to right,
    transparent 0,
    transparent var(--atlas-santa-text-clearance, 350px),
    #000 calc(var(--atlas-santa-text-clearance, 350px) + 22px));
  mask-image: linear-gradient(to right,
    transparent 0,
    transparent var(--atlas-santa-text-clearance, 350px),
    #000 calc(var(--atlas-santa-text-clearance, 350px) + 22px));
}

#main .dashboard-hero .atlas-santa-scene {
  position: absolute;
  left: -218px;
  bottom: 0;
  width: min(210px, 65%);
  height: 54px;
  animation: atlas-santa-journey 20s linear infinite;
}

#main .dashboard-hero .atlas-santa-scene svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 1px 1px rgba(26, 28, 23, .28));
}

/* 5,4 s Einfahrt, 1,8 s Halt und Winken, 2,8 s Ausfahrt,
   exakt 10 s außerhalb des Banners bis zum nächsten Durchgang. */
@keyframes atlas-santa-journey {
  0% { left: -218px; }
  27%, 36% { left: calc(100% - min(210px, 65%) - 7px); }
  50%, 100% { left: 100%; }
}

/* Der Arm bewegt sich nur während des Halts am rechten Rand. */
#main .dashboard-hero .atlas-santa-wave-arm {
  transform-box: view-box;
  transform-origin: 58px 36px;
  animation: atlas-santa-wave 20s linear infinite;
}

@keyframes atlas-santa-wave {
  0%, 26.99% { transform: rotate(0deg); }
  28% { transform: rotate(-32deg); }
  29.4% { transform: rotate(8deg); }
  30.8% { transform: rotate(-32deg); }
  32.2% { transform: rotate(8deg); }
  33.6% { transform: rotate(-32deg); }
  35% { transform: rotate(8deg); }
  36%, 100% { transform: rotate(0deg); }
}

#main .dashboard-hero .atlas-santa-deer {
  animation: atlas-santa-trot 20s linear infinite;
}
#main .dashboard-hero .atlas-santa-deer-b { animation-delay: -.16s; }
#main .dashboard-hero .atlas-santa-deer-c { animation-delay: -.28s; }

@keyframes atlas-santa-trot {
  0%, 5%, 10%, 15%, 20%, 25%, 27%, 36%, 40%, 44%, 48%, 50%, 100% { transform: translateY(0); }
  2.5%, 7.5%, 12.5%, 17.5%, 22.5%, 38%, 42%, 46% { transform: translateY(-2px); }
}

/* Bewegungsreduzierung: Schlitten steht still am rechten Rand. */
@media (prefers-reduced-motion: reduce) {
  #main .dashboard-hero .atlas-santa-scene {
    animation: none;
    left: calc(100% - min(210px, 65%) - 7px);
  }
  #main .dashboard-hero .atlas-santa-wave-arm,
  #main .dashboard-hero .atlas-santa-deer {
    animation: none;
  }
}
