/* Entrance Animations for All Website Sections */

/* Base animation classes - elements start hidden */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Animation variants for different elements */
.animate-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Active states - when elements come into view */
.animate-on-scroll.animate-in,
.animate-fade-up.animate-in,
.animate-fade-left.animate-in,
.animate-fade-right.animate-in,
.animate-scale.animate-in {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

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

/* Specific element targeting without changing existing classes */
h1, h2, h3, h4, h5, h6 {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

p {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section, section, .container, .content-section {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Buttons and CTAs */
.cta-btn, .btn, button, .enquire-btn {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Images and media */
img, .image-container, .gallery-item {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Cards and grid items */
.card, .service-card, .process-step, .grid-item {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Active states for all elements */
h1.animate-in, h2.animate-in, h3.animate-in, h4.animate-in, h5.animate-in, h6.animate-in,
p.animate-in,
.section.animate-in, section.animate-in, .container.animate-in, .content-section.animate-in,
.cta-btn.animate-in, .btn.animate-in, button.animate-in, .enquire-btn.animate-in,
img.animate-in, .image-container.animate-in, .gallery-item.animate-in,
.card.animate-in, .service-card.animate-in, .process-step.animate-in, .grid-item.animate-in {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Special handling for hero section text (preserve existing positioning) */
.hero-text h1,
.hero-text p,
.hero-text .cta-btn {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-text h1.animate-in,
.hero-text p.animate-in,
.hero-text .cta-btn.animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .animate-fade-up,
  .animate-fade-left,
  .animate-fade-right,
  .animate-scale,
  h1, h2, h3, h4, h5, h6,
  p,
  .section, section, .container, .content-section,
  .cta-btn, .btn, button, .enquire-btn,
  img, .image-container, .gallery-item,
  .card, .service-card, .process-step, .grid-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Performance optimizations */
.animate-on-scroll,
.animate-fade-up,
.animate-fade-left,
.animate-fade-right,
.animate-scale {
  will-change: opacity, transform;
}

.animate-on-scroll.animate-in,
.animate-fade-up.animate-in,
.animate-fade-left.animate-in,
.animate-fade-right.animate-in,
.animate-scale.animate-in {
  will-change: auto;
}
