/* JoyeuxR Animations CSS */

/* Dynamic Background Slideshow */
.dynamic-background-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* Adjust based on Wix layering, might need to be higher if inside a container */
  overflow: hidden;
  pointer-events: none;
  /* Let clicks pass through */
}

/* Ensure the slideshow container (Wix component) allows absolute positioning */
#comp-kpf45ntk {
  position: relative !important;
}

/* Hide original Wix background elements in the hero section if needed */
#comp-kpf45ntk>div:not(.dynamic-background-slideshow) {
  /* We might need to keep content, so be careful. 
       Usually Wix separates background (bgLayers) from content. 
       We'll target specific background layers in JS or CSS if possible. */
}

/* Hide specific Wix background layers in the hero section only */
#comp-kpf45ntk [data-hook="bgLayers"],
#bgLayers_comp-kpf45ntk {
  display: none !important;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
}

/* Overlay to improve text readability */
.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.3) 0%,
      rgba(0, 0, 0, 0.1) 40%,
      rgba(0, 0, 0, 0.4) 100%);
  z-index: 2;
}

/* Casual Game Showcase Animation */
.casual-game-showcase-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.casual-game-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.casual-game-slide.active {
  opacity: 1;
}


/* Existing Animations (Kept) */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Glow Orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
  animation: floatOrb 20s infinite ease-in-out;
}

.glow-orb-1 {
  width: 400px;
  height: 400px;
  background: #7003ff;
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.glow-orb-2 {
  width: 300px;
  height: 300px;
  background: #0088cb;
  bottom: 20%;
  left: -50px;
  animation-delay: -5s;
}

.glow-orb-3 {
  width: 250px;
  height: 250px;
  background: #FF0055;
  top: 40%;
  right: 20%;
  animation-delay: -10s;
}

@keyframes floatOrb {

  0%,
  100% {
    transform: translate(0, 0);
  }

  33% {
    transform: translate(30px, -50px);
  }

  66% {
    transform: translate(-20px, 20px);
  }
}

/* Particles */
.particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  animation: floatParticle linear infinite;
}

@keyframes floatParticle {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.8;
  }

  90% {
    opacity: 0.8;
  }

  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Vignette */
.vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, 0.7) 100%);
  z-index: 2;
  pointer-events: none;
}