/* Scroll Animations CSS */

/* Base animation classes - elements start hidden */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Animation state when visible */
.animate-on-scroll.animated {
  opacity: 1;
  transform: translate(0, 0) !important;
}

/* Fade In */
.fade-in {
  opacity: 0;
}

.fade-in.animated {
  opacity: 1;
}

/* Fade In Up */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
}

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

/* Fade In Down */
.fade-in-down {
  opacity: 0;
  transform: translateY(-30px);
}

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

/* Fade In Left */
.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
}

.fade-in-left.animated {
  opacity: 1;
  transform: translateX(0);
}

/* Fade In Right */
.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
}

.fade-in-right.animated {
  opacity: 1;
  transform: translateX(0);
}

/* Scale In */
.scale-in {
  opacity: 0;
  transform: scale(0.9);
}

.scale-in.animated {
  opacity: 1;
  transform: scale(1);
}

/* Zoom In */
.zoom-in {
  opacity: 0;
  transform: scale(0.8);
}

.zoom-in.animated {
  opacity: 1;
  transform: scale(1);
}

/* Slide In Up */
.slide-in-up {
  opacity: 0;
  transform: translateY(50px);
}

.slide-in-up.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Slide In Left */
.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
}

.slide-in-left.animated {
  opacity: 1;
  transform: translateX(0);
}

/* Slide In Right */
.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
}

.slide-in-right.animated {
  opacity: 1;
  transform: translateX(0);
}

/* Rotate In */
.rotate-in {
  opacity: 0;
  transform: rotate(-10deg) scale(0.9);
}

.rotate-in.animated {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Flip In X */
.flip-in-x {
  opacity: 0;
  transform: perspective(400px) rotateX(-90deg);
}

.flip-in-x.animated {
  opacity: 1;
  transform: perspective(400px) rotateX(0);
}

/* Flip In Y */
.flip-in-y {
  opacity: 0;
  transform: perspective(400px) rotateY(-90deg);
}

.flip-in-y.animated {
  opacity: 1;
  transform: perspective(400px) rotateY(0);
}

/* Animation delays for staggered effects */
.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

.delay-400 {
  transition-delay: 0.4s;
}

.delay-500 {
  transition-delay: 0.5s;
}

.delay-600 {
  transition-delay: 0.6s;
}

.delay-700 {
  transition-delay: 0.7s;
}

.delay-800 {
  transition-delay: 0.8s;
}

/* Animation duration variations */
.duration-fast {
  transition-duration: 0.3s;
}

.duration-normal {
  transition-duration: 0.6s;
}

.duration-slow {
  transition-duration: 0.9s;
}

.duration-slower {
  transition-duration: 1.2s;
}

/* Easing variations */
.ease-in {
  transition-timing-function: ease-in;
}

.ease-out {
  transition-timing-function: ease-out;
}

.ease-in-out {
  transition-timing-function: ease-in-out;
}

.ease-bounce {
  transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Specific element animations */
section.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
}

section.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.card.animate-on-scroll,
.col-md-4.animate-on-scroll,
.col-lg-4.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
}

.card.animate-on-scroll.animated,
.col-md-4.animate-on-scroll.animated,
.col-lg-4.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

h1.animate-on-scroll,
h2.animate-on-scroll,
h3.animate-on-scroll {
  opacity: 0;
  transform: translateY(-20px);
}

h1.animate-on-scroll.animated,
h2.animate-on-scroll.animated,
h3.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

img.animate-on-scroll {
  opacity: 0;
  transform: scale(0.95);
}

img.animate-on-scroll.animated {
  opacity: 1;
  transform: scale(1);
}

/* Prevent animation on reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
