/* Micro Animations for wiGO Landing Page */

/* Fade in animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Apply animations to elements */
.navbar-brand {
  animation: fadeInLeft 0.8s ease-out;
}

.navbar-nav .nav-link {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.navbar-nav .nav-link:nth-child(1) { animation-delay: 0.1s; }
.navbar-nav .nav-link:nth-child(2) { animation-delay: 0.2s; }
.navbar-nav .nav-link:nth-child(3) { animation-delay: 0.3s; }
.navbar-nav .nav-link:nth-child(4) { animation-delay: 0.4s; }

.green-button {
  animation: scaleIn 0.5s ease-out;
  transition: all 0.3s ease;
}

.green-button:hover {
  animation: pulse 1s infinite;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(86, 134, 42, 0.3);
}

.big-text {
  animation: fadeInUp 1s ease-out;
}

.md-text {
  animation: fadeInUp 1s ease-out 0.3s both;
}

.landing-img {
  animation: float 3s ease-in-out infinite;
}

.special {
  animation: float 3s ease-in-out infinite 1.5s;
}

.test img {
  animation: scaleIn 0.6s ease-out;
  animation-fill-mode: both;
}

.test img:nth-child(1) { animation-delay: 0.1s; }
.test img:nth-child(2) { animation-delay: 0.2s; }
.test img:nth-child(3) { animation-delay: 0.3s; }
.test img:nth-child(4) { animation-delay: 0.4s; }
.test img:nth-child(5) { animation-delay: 0.5s; }
.test img:nth-child(6) { animation-delay: 0.6s; }

.top-shop > div {
  animation: bounceIn 0.8s ease-out;
  animation-fill-mode: both;
}

.top-shop > div:nth-child(1) { animation-delay: 0.1s; }
.top-shop > div:nth-child(2) { animation-delay: 0.2s; }
.top-shop > div:nth-child(3) { animation-delay: 0.3s; }
.top-shop > div:nth-child(4) { animation-delay: 0.4s; }
.top-shop > div:nth-child(5) { animation-delay: 0.5s; }
.top-shop > div:nth-child(6) { animation-delay: 0.6s; }
.top-shop > div:nth-child(7) { animation-delay: 0.7s; }
.top-shop > div:nth-child(8) { animation-delay: 0.8s; }

.round-card {
  animation: slideInFromBottom 0.8s ease-out;
  transition: all 0.3s ease;
}

.round-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.step-number {
  animation: scaleIn 0.6s ease-out;
  transition: all 0.3s ease;
}

.step-number:hover {
  animation: pulse 1s infinite;
  transform: scale(1.1);
}

.phone {
  animation: fadeInLeft 1s ease-out;
  transition: all 0.3s ease;
}

.phone:hover {
  transform: scale(1.05);
}

section.users img {
  animation: fadeInRight 1s ease-out;
  transition: all 0.3s ease;
}

section.users img:hover {
  transform: scale(1.05);
}

.testimonial-card {
  animation: slideInFromBottom 0.8s ease-out;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stars i {
  animation: scaleIn 0.5s ease-out;
  animation-fill-mode: both;
}

.stars i:nth-child(1) { animation-delay: 0.1s; }
.stars i:nth-child(2) { animation-delay: 0.2s; }
.stars i:nth-child(3) { animation-delay: 0.3s; }
.stars i:nth-child(4) { animation-delay: 0.4s; }
.stars i:nth-child(5) { animation-delay: 0.5s; }

.user-avatar {
  animation: bounceIn 0.8s ease-out;
}

.faq-categories .btn {
  transition: all 0.3s ease;
}

.faq-categories .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(86, 134, 42, 0.2);
}

.accordion-button {
  transition: all 0.3s ease;
}

.accordion-button:hover {
  transform: translateX(5px);
}

.contact-form .form-control {
  transition: all 0.3s ease;
}

.contact-form .form-control:focus {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(86, 134, 42, 0.2);
}

.input-group-text {
  animation: scaleIn 0.6s ease-out;
}

.icon-circle {
  animation: scaleIn 0.6s ease-out;
  transition: all 0.3s ease;
}

.icon-circle:hover {
  animation: pulse 1s infinite;
  transform: scale(1.2);
  background-color: #56862A;
  color: white;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Loading animation for images */
img {
  transition: opacity 0.3s ease;
}

img[loading] {
  opacity: 0;
}

img.loaded {
  opacity: 1;
}

/* Hover effects for interactive elements */
.nav-link {
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: #56862A;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  transform: translateY(-2px);
}

/* Gold ball animation */
.gold-ball {
  animation: pulse 2s ease-in-out infinite, float 3s ease-in-out infinite;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(217, 193, 25, 0.3);
}

.gold-ball:hover {
  animation: pulse 0.5s ease-in-out infinite, rotate 2s linear infinite;
  transform: scale(1.3);
  box-shadow: 0 0 20px rgba(217, 193, 25, 0.6);
  background-color: #f0d800;
}

/* Additional keyframes for enhanced gold ball animations */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(217, 193, 25, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(217, 193, 25, 0.8), 0 0 30px rgba(217, 193, 25, 0.4);
  }
}

/* Gradient text animation */
.red-text {
  background: linear-gradient(45deg, #EB5A1C, #ff6b35, #EB5A1C);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
}

/* Scroll-triggered animations for sections */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll animation classes */
.scroll-animate-left {
  opacity: 0;
  transform: translateX(-100px);
  transition: all 0.8s ease-out;
}

.scroll-animate-right {
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.8s ease-out;
}

.scroll-animate-bottom {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.scroll-animate-left.animate,
.scroll-animate-right.animate,
.scroll-animate-bottom.animate {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* Staggered animations for multiple elements */
.scroll-animate-left.stagger-1 { transition-delay: 0.1s; }
.scroll-animate-left.stagger-2 { transition-delay: 0.2s; }
.scroll-animate-left.stagger-3 { transition-delay: 0.3s; }
.scroll-animate-left.stagger-4 { transition-delay: 0.4s; }

.scroll-animate-right.stagger-1 { transition-delay: 0.1s; }
.scroll-animate-right.stagger-2 { transition-delay: 0.2s; }
.scroll-animate-right.stagger-3 { transition-delay: 0.3s; }
.scroll-animate-right.stagger-4 { transition-delay: 0.4s; }

.scroll-animate-bottom.stagger-1 { transition-delay: 0.1s; }
.scroll-animate-bottom.stagger-2 { transition-delay: 0.2s; }
.scroll-animate-bottom.stagger-3 { transition-delay: 0.3s; }
.scroll-animate-bottom.stagger-4 { transition-delay: 0.4s; }

/* Intersection Observer animation trigger */
.scroll-animate-left.animate,
.scroll-animate-right.animate,
.scroll-animate-bottom.animate {
  animation: none;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .scroll-animate-left,
  .scroll-animate-right,
  .scroll-animate-bottom {
    transition: none;
    opacity: 1;
    transform: none;
  }
}
