/*
 * Enhanced Dynamic Background Animations for Recycling Website
 * Beautiful SVG-based eco-friendly animated elements
 */

/* ===== DYNAMIC BACKGROUND CONTAINER ===== */
.dynamic-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg, 
    rgba(45, 90, 39, 0.02) 0%, 
    rgba(107, 191, 89, 0.01) 50%, 
    transparent 100%);
}

/* ===== FLOATING LEAVES ===== */
.floating-particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.floating-particles::before,
.floating-particles::after {
  content: '🍃';
  position: absolute;
  font-size: 20px;
  color: rgba(107, 191, 89, 0.6);
  animation: floatLeaf 12s infinite ease-in-out;
  text-shadow: 0 0 10px rgba(107, 191, 89, 0.3);
}

.floating-particles::before {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 15s;
}

.floating-particles::after {
  top: 60%;
  right: 15%;
  animation-delay: 7s;
  animation-duration: 18s;
}

/* ===== SVG LEAF ELEMENTS ===== */
.svg-leaves {
  position: absolute;
  width: 100%;
  height: 100%;
}

.leaf-element {
  position: absolute;
  width: 30px;
  height: 30px;
  opacity: 0.4;
  animation: leafFloat 20s infinite linear;
}

.leaf-element:nth-child(1) {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.leaf-element:nth-child(2) {
  top: 30%;
  right: 10%;
  animation-delay: 5s;
  animation-duration: 22s;
}

.leaf-element:nth-child(3) {
  top: 70%;
  left: 20%;
  animation-delay: 10s;
  animation-duration: 28s;
}

.leaf-element:nth-child(4) {
  top: 50%;
  right: 25%;
  animation-delay: 15s;
  animation-duration: 24s;
}

.leaf-element:nth-child(5) {
  top: 80%;
  left: 60%;
  animation-delay: 8s;
  animation-duration: 26s;
}

/* ===== ECO WAVES ===== */
.eco-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(45deg, 
    rgba(45, 90, 39, 0.08) 0%, 
    rgba(107, 191, 89, 0.04) 50%, 
    transparent 100%);
  animation: wave 15s infinite linear;
}

.eco-waves::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 80px,
    rgba(107, 191, 89, 0.06) 80px,
    rgba(107, 191, 89, 0.06) 120px
  );
  animation: slide 25s infinite linear;
}

/* ===== RECYCLING SYMBOLS ===== */
.recycling-symbols {
  position: absolute;
  width: 100%;
  height: 100%;
}

.recycle-symbol {
  position: absolute;
  font-size: 24px;
  color: rgba(45, 90, 39, 0.15);
  animation: recycleFloat 30s infinite ease-in-out;
}

.recycle-symbol:nth-child(1) {
  top: 15%;
  left: 80%;
  animation-delay: 0s;
}

.recycle-symbol:nth-child(2) {
  top: 45%;
  left: 5%;
  animation-delay: 10s;
}

.recycle-symbol:nth-child(3) {
  top: 75%;
  right: 15%;
  animation-delay: 20s;
}

/* ===== ANIMATED GRADIENTS ===== */
.gradient-orbs {
  position: absolute;
  width: 100%;
  height: 100%;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, 
    rgba(107, 191, 89, 0.1) 0%, 
    rgba(45, 90, 39, 0.05) 50%, 
    transparent 100%);
  animation: orbFloat 40s infinite ease-in-out;
}

.gradient-orb:nth-child(1) {
  width: 200px;
  height: 200px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.gradient-orb:nth-child(2) {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 20%;
  animation-delay: 15s;
}

.gradient-orb:nth-child(3) {
  width: 100px;
  height: 100px;
  top: 80%;
  left: 70%;
  animation-delay: 25s;
}

/* ===== ANIMATIONS ===== */
@keyframes floatLeaf {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.4;
  }
  25% {
    transform: translateY(-30px) rotate(90deg) scale(1.1);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-60px) rotate(180deg) scale(0.9);
    opacity: 0.8;
  }
  75% {
    transform: translateY(-30px) rotate(270deg) scale(1.1);
    opacity: 0.6;
  }
}

@keyframes leafFloat {
  0% {
    transform: translateX(-100px) translateY(0px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateX(calc(100vw + 100px)) translateY(-200px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes recycleFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.1;
  }
  50% {
    transform: translateY(-40px) rotate(180deg);
    opacity: 0.3;
  }
}

@keyframes orbFloat {
  0%, 100% {
    transform: translateX(0px) translateY(0px) scale(1);
    opacity: 0.1;
  }
  33% {
    transform: translateX(50px) translateY(-30px) scale(1.2);
    opacity: 0.15;
  }
  66% {
    transform: translateX(-30px) translateY(-60px) scale(0.8);
    opacity: 0.2;
  }
}@keyfram
es wave {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100px);
  }
}

/* ===== ADDITIONAL PARTICLES (REDUCED) ===== */
.floating-particles {
  background-image: 
    radial-gradient(1px 1px at 40px 70px, rgba(107, 191, 89, 0.2), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(45, 90, 39, 0.2), transparent);
  background-repeat: repeat;
  background-size: 300px 200px; /* Larger size = fewer particles */
  animation: sparkle 25s linear infinite; /* Slower animation */
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* ===== DARK MODE ADJUSTMENTS ===== */
[data-theme="dark"] .floating-particles::before,
[data-theme="dark"] .floating-particles::after {
  background: rgba(107, 191, 89, 0.5);
}

[data-theme="dark"] .eco-waves {
  background: linear-gradient(45deg, 
    rgba(107, 191, 89, 0.15) 0%, 
    rgba(45, 90, 39, 0.1) 50%, 
    transparent 100%);
}

[data-theme="dark"] .floating-particles {
  background-image: 
    radial-gradient(1px 1px at 40px 70px, rgba(107, 191, 89, 0.3), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(45, 90, 39, 0.3), transparent);
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.dynamic-background * {
  will-change: transform, opacity;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .floating-particles,
  .eco-waves,
  .floating-particles::before,
  .floating-particles::after,
  .eco-waves::before {
    animation: none !important;
  }
  
  .dynamic-background {
    display: none;
  }
}/*
 ===== ENHANCED PARTICLES (MINIMAL) ===== */
.enhanced-particles {
  opacity: 0.3; /* Reduce visibility */
  pointer-events: none;
}

/* Hide enhanced particles on mobile for better performance */
@media (max-width: 768px) {
  .enhanced-particles {
    display: none;
  }
}