/* ===== Custom Animations for Xhino Website ===== */
/* Updated all blue colors (#3b82f6, #0ea5e9) to green theme colors */

/* Floating Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Pulse Glow Animation - Green Theme */
@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(76, 175, 80, 0.6), 0 0 60px rgba(124, 179, 66, 0.4);
  }
}

/* Gradient Shift Animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Rotate Animation */
@keyframes rotate360 {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Scale Pulse */
@keyframes scalePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Slide In from Left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide In from Right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide In from Bottom */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Fade In Up - Added for slider content animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bounce */
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Ripple Effect */
@keyframes ripple {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Typing Cursor */
@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Morph Shape */
@keyframes morph {
  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

/* Leaf Sway Animation */
@keyframes leafSway {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

/* Growing Animation */
@keyframes grow {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== Animation Classes ===== */
.animate-float {
  animation: float 3s ease-in-out infinite;
}
.animate-float-delayed {
  animation: float 3s ease-in-out infinite;
  animation-delay: 1s;
}
.animate-pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}
.animate-gradient {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}
.animate-rotate {
  animation: rotate360 20s linear infinite;
}
.animate-rotate-slow {
  animation: rotate360 40s linear infinite;
}
.animate-scale-pulse {
  animation: scalePulse 2s ease-in-out infinite;
}
.animate-slide-left {
  animation: slideInLeft 0.8s ease-out forwards;
}
.animate-slide-right {
  animation: slideInRight 0.8s ease-out forwards;
}
.animate-slide-up {
  animation: slideInUp 0.8s ease-out forwards;
}
.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}
/* Added fadeInUp animation class */
.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out forwards;
}
.animate-bounce {
  animation: bounce 2s ease infinite;
}
.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
.animate-morph {
  animation: morph 8s ease-in-out infinite;
}
.animate-leaf-sway {
  animation: leafSway 3s ease-in-out infinite;
}
.animate-grow {
  animation: grow 0.6s ease-out forwards;
}

/* ===== Scroll Animation Classes ===== */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}
.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-animate-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease-out;
}
.scroll-animate-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.scroll-animate-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease-out;
}
.scroll-animate-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===== Hover Effects - Green Theme ===== */

/* 3D Card Tilt */
.card-3d {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}
.card-3d:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) translateZ(20px);
}

/* Glow on Hover - Green */
.hover-glow {
  transition: box-shadow 0.3s ease;
}
.hover-glow:hover {
  box-shadow: 0 0 30px rgba(76, 175, 80, 0.5), 0 0 60px rgba(124, 179, 66, 0.3);
}

/* Scale on Hover */
.hover-scale {
  transition: transform 0.3s ease;
}
.hover-scale:hover {
  transform: scale(1.05);
}

/* Lift on Hover */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(61, 107, 61, 0.2);
}

/* Border Animation - Green */
.hover-border {
  position: relative;
  overflow: hidden;
}
.hover-border::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #4caf50, transparent);
  transition: left 0.5s ease;
}
.hover-border:hover::before {
  left: 100%;
}

/* Image Zoom */
.img-zoom {
  overflow: hidden;
}
.img-zoom img {
  transition: transform 0.5s ease;
}
.img-zoom:hover img {
  transform: scale(1.1);
}

/* Button Shine Effect */
.btn-shine {
  position: relative;
  overflow: hidden;
}
.btn-shine::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-25deg);
  transition: left 0.5s ease;
}
.btn-shine:hover::before {
  left: 125%;
}

/* ===== Special Effects - Green Theme ===== */

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Neon Text - Green */
.neon-text {
  text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px #4caf50, 0 0 40px #4caf50, 0 0 80px #4caf50;
}

/* Gradient Text - Green */
.gradient-text {
  background: linear-gradient(135deg, #4caf50, #7cb342, #3d6b3d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animated Background - Nature */
.animated-bg {
  background: linear-gradient(-45deg, #1e3d1e, #3d6b3d, #4caf50, #7cb342);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* Particle Effect Container - Green */
.particles {
  position: relative;
  overflow: hidden;
}
.particles::before,
.particles::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}
.particles::before {
  background: #4caf50;
  top: -150px;
  right: -150px;
}
.particles::after {
  background: #7cb342;
  bottom: -150px;
  left: -150px;
  animation-delay: 3s;
}

/* ===== Loading Animations - Green ===== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(76, 175, 80, 0.3);
  border-top-color: #4caf50;
  border-radius: 50%;
  animation: rotate360 1s linear infinite;
}

.dots-loading span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  background: #4caf50;
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite;
}
.dots-loading span:nth-child(2) {
  animation-delay: 0.2s;
}
.dots-loading span:nth-child(3) {
  animation-delay: 0.4s;
}

/* ===== Stagger Animation Delays ===== */
.stagger-1 {
  animation-delay: 0.1s;
}
.stagger-2 {
  animation-delay: 0.2s;
}
.stagger-3 {
  animation-delay: 0.3s;
}
.stagger-4 {
  animation-delay: 0.4s;
}
.stagger-5 {
  animation-delay: 0.5s;
}
.stagger-6 {
  animation-delay: 0.6s;
}
.stagger-7 {
  animation-delay: 0.7s;
}
.stagger-8 {
  animation-delay: 0.8s;
}
