/* Scroll Animation Styles */

/* Base animation classes */
.scroll-animate {
  opacity: 0;
  transition: all 0.8s ease-out;
}

.scroll-animate.animate-in {
  opacity: 1;
}

/* Fade In animations */
.fade-in-up {
  transform: translateY(50px);
}

.fade-in-up.animate-in {
  transform: translateY(0);
}

.fade-in-down {
  transform: translateY(-50px);
}

.fade-in-down.animate-in {
  transform: translateY(0);
}

.fade-in-left {
  transform: translateX(-50px);
}

.fade-in-left.animate-in {
  transform: translateX(0);
}

.fade-in-right {
  transform: translateX(50px);
}

.fade-in-right.animate-in {
  transform: translateX(0);
}

/* Scale animations */
.scale-in {
  transform: scale(0.8);
}

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

/* Rotate animations */
.rotate-in {
  transform: rotate(-10deg) scale(0.8);
}

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

/* Flip animations */
.flip-in-x {
  transform: perspective(1000px) rotateX(-90deg);
  transform-origin: center;
}

.flip-in-x.animate-in {
  transform: perspective(1000px) rotateX(0);
}

/* Slide animations */
.slide-in-left {
  transform: translateX(-100%);
}

.slide-in-left.animate-in {
  transform: translateX(0);
}

.slide-in-right {
  transform: translateX(100%);
}

.slide-in-right.animate-in {
  transform: translateX(0);
}

/* Bounce effect */
.bounce-in {
  animation-duration: 1s;
}

.bounce-in.animate-in {
  animation-name: bounceIn;
}

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

/* Stagger delay for multiple elements */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Specific section animations */
.pre-header {
  transition: all 0.5s ease;
}

.header-area {
  transition: all 0.5s ease;
}

/* Services section animation */
#services .section-heading {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

#services .section-heading.animate-in {
  opacity: 1;
  transform: translateY(0);
}

#services .owl-services .item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

#services .owl-services .item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Clients section animation */
#clients .section-heading {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s ease;
}

#clients .section-heading.animate-in {
  opacity: 1;
  transform: scale(1);
}

#clients .cl-slider-wrapper {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease 0.3s;
}

#clients .cl-slider-wrapper.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Footer animation */
footer .footer-item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

footer .footer-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* About section animation */
.about-images-new {
  opacity: 0;
  transform: translateX(-80px);
  transition: all 1s ease-out;
  visibility: hidden;
}

.about-images-new.animate-in {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
}

.content-new {
  opacity: 0;
  transform: translateX(80px);
  transition: all 1s ease-out;
  visibility: hidden;
}

.content-new.animate-in {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
}

.about-list li.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease-out;
  visibility: hidden;
}

.about-list li.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

/* Stagger animation for list items */
.about-list li.scroll-animate:nth-child(1) { transition-delay: 0.1s; }
.about-list li.scroll-animate:nth-child(2) { transition-delay: 0.2s; }
.about-list li.scroll-animate:nth-child(3) { transition-delay: 0.3s; }
.about-list li.scroll-animate:nth-child(4) { transition-delay: 0.4s; }
.about-list li.scroll-animate:nth-child(5) { transition-delay: 0.5s; }
.about-list li.scroll-animate:nth-child(6) { transition-delay: 0.6s; }
.about-list li.scroll-animate:nth-child(7) { transition-delay: 0.7s; }
.about-list li.scroll-animate:nth-child(8) { transition-delay: 0.8s; }
.about-list li.scroll-animate:nth-child(9) { transition-delay: 0.9s; }

/* Layanan features animation */
.ly-features-section .ly-section-heading {
  opacity: 0;
  transform: translateY(-30px);
  transition: all 0.8s ease;
}

.ly-features-section .ly-section-heading.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.ly-main-feature-area {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease 0.2s;
}

.ly-main-feature-area.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.ly-feature-menu {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease 0.4s;
}

.ly-feature-menu.animate-in {
  opacity: 1;
  transform: translateX(0);
}

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

/* Parallax effect for decorative elements */
.services-left-dec,
.services-right-dec {
  transition: transform 0.3s ease-out;
}

/* Hover effects enhancement */
.scroll-animate.animate-in:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
}

/* Loading animation */
@keyframes fadeInLoad {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-load-animate {
  animation: fadeInLoad 0.8s ease-out forwards;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  /* Ensure animations are enabled - no !important to allow smooth transitions */
  .scroll-animate {
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
  }
  
  .scroll-animate.animate-in {
    opacity: 1;
  }
  
  /* Reduce animation distances for mobile - smaller movements for smoother feel */
  .fade-in-up {
    transform: translateY(25px);
  }
  
  .fade-in-up.animate-in {
    transform: translateY(0);
  }
  
  .fade-in-down {
    transform: translateY(-25px);
  }
  
  .fade-in-down.animate-in {
    transform: translateY(0);
  }
  
  .fade-in-left {
    transform: translateX(-25px);
  }
  
  .fade-in-left.animate-in {
    transform: translateX(0);
  }
  
  .fade-in-right {
    transform: translateX(25px);
  }
  
  .fade-in-right.animate-in {
    transform: translateX(0);
  }
  
  /* Reduce scale effect */
  .scale-in {
    transform: scale(0.95);
  }
  
  .scale-in.animate-in {
    transform: scale(1);
  }
  
  /* Simplify complex animations on mobile */
  .rotate-in {
    transform: scale(0.95);
  }
  
  .rotate-in.animate-in {
    transform: scale(1);
  }
  
  .flip-in-x {
    transform: translateY(25px);
  }
  
  .flip-in-x.animate-in {
    transform: translateY(0);
  }
  
  /* Reduce stagger delays */
  .stagger-1 { transition-delay: 0.05s; }
  .stagger-2 { transition-delay: 0.1s; }
  .stagger-3 { transition-delay: 0.15s; }
  .stagger-4 { transition-delay: 0.2s; }
  .stagger-5 { transition-delay: 0.25s; }
  .stagger-6 { transition-delay: 0.3s; }
  
  /* Reduce about list stagger on mobile */
  .about-list li:nth-child(1),
  .about-list li:nth-child(2),
  .about-list li:nth-child(3),
  .about-list li:nth-child(4),
  .about-list li:nth-child(5),
  .about-list li:nth-child(6),
  .about-list li:nth-child(7),
  .about-list li:nth-child(8),
  .about-list li:nth-child(9) {
    transition-delay: 0.08s;
  }
  
  /* Disable hover lift effect on mobile */
  .scroll-animate.animate-in:hover {
    transform: none;
  }
  
  /* About section specific - reduce distance and remove visibility toggle */
  .about-images-new,
  .content-new,
  .about-list li.scroll-animate {
    visibility: visible;
  }
  
  .about-images-new {
    transform: translateX(-40px);
  }
  
  .about-images-new.animate-in {
    transform: translateX(0);
  }
  
  .content-new {
    transform: translateX(40px);
  }
  
  .content-new.animate-in {
    transform: translateX(0);
  }
}

@media (max-width: 576px) {
  /* Even smaller animation distances */
  .fade-in-up,
  .fade-in-down,
  .fade-in-left,
  .fade-in-right {
    transform: translateY(20px);
  }
  
  /* Faster animations */
  .scroll-animate {
    transition: all 0.5s ease-out;
  }
  
  /* Minimal stagger */
  .stagger-1,
  .stagger-2,
  .stagger-3,
  .stagger-4,
  .stagger-5,
  .stagger-6 {
    transition-delay: 0s;
  }
  
  /* Simplify bounce animation */
  @keyframes bounceIn {
    0% {
      opacity: 0;
      transform: scale(0.8);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .scroll-animate,
  .scroll-animate * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
