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

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Left Animation */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In Right Animation */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale In Animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Flip Card Flip Animation */
@keyframes flipCardRotate {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(180deg);
  }
}

/* Animation Classes */
.scroll-animate {
  opacity: 0;
}

.scroll-animate.visible {
  animation: fadeInUp 0.8s ease-out forwards;
}

.scroll-animate-left {
  opacity: 0;
}

.scroll-animate-left.visible {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.scroll-animate-right {
  opacity: 0;
}

.scroll-animate-right.visible {
  animation: fadeInRight 0.8s ease-out forwards;
}

.scroll-animate-scale {
  opacity: 0;
}

.scroll-animate-scale.visible {
  animation: scaleIn 0.8s ease-out forwards;
}

/* Stagger animation delays for multiple elements */
.scroll-animate.visible:nth-child(1) {
  animation-delay: 0s;
}

.scroll-animate.visible:nth-child(2) {
  animation-delay: 0.1s;
}

.scroll-animate.visible:nth-child(3) {
  animation-delay: 0.2s;
}

.scroll-animate.visible:nth-child(4) {
  animation-delay: 0.3s;
}

.scroll-animate-left.visible:nth-child(1) {
  animation-delay: 0s;
}

.scroll-animate-left.visible:nth-child(2) {
  animation-delay: 0.1s;
}

.scroll-animate-right.visible:nth-child(1) {
  animation-delay: 0s;
}

.scroll-animate-right.visible:nth-child(2) {
  animation-delay: 0.1s;
}

/* Flip card styling */
.flip-card {
  perspective: 1000px;
  height: 300px;
}

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

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

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.flip-card-front {
  transform: rotateY(0deg);
}

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