/* Animations CSS for Smacy AddUp Website */

/* Network Animation Background */
.network-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.5; /* Adjusted for better visibility */
}

.network-bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Card Flip Animation */
.flip-card {
  perspective: 1000px;
  min-height: 320px; /* Use min-height to ensure consistency */
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.flip-card-front {
  background-color: var(--white);
  box-shadow: var(--shadow-md);
}

.flip-card-back {
  background-color: var(--electric-blue);
  color: var(--white);
  transform: rotateY(180deg);
  box-shadow: var(--shadow-md);
}

/* Fade In Animations on Scroll */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Fade In for Multiple Elements */
.stagger-fade-in > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-fade-in.active > * {
  opacity: 1;
  transform: translateY(0);
}

/* Applying delays to staggered elements */
.stagger-fade-in.active > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-fade-in.active > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-fade-in.active > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-fade-in.active > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-fade-in.active > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-fade-in.active > *:nth-child(6) { transition-delay: 0.6s; }


/* Pulse Animation for CTA Buttons */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

.btn-pulse {
  animation: pulse 2s infinite;
}

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

.float {
  animation: float 4s ease-in-out infinite;
}
