/**
 * The Rehab Centre / Elementor-style scroll entrance animations
 * https://handsonpeople.com.au/about-us/
 */

.trc-about-page [data-hop] {
  opacity: 0;
  animation-fill-mode: both;
  animation-duration: var(--hop-duration, 1s);
  animation-timing-function: var(--hop-ease, cubic-bezier(0.25, 0.46, 0.45, 0.94));
  animation-delay: var(--hop-delay, 0ms);
  will-change: opacity, transform;
}

/* Ribbon title stays visible — same as physiotherapy.php */
.trc-about-page .trc-about-ribbon-breadcrumb [data-hop],
.trc-about-page .trc-about-ribbon-breadcrumb__title {
  opacity: 1;
  transform: none;
  animation: none;
  will-change: auto;
}

.trc-about-page [data-hop].hop-played {
  opacity: 1;
}

/* fadeInUp — primary section reveal (Elementor e-animation-fadeInUp) */
@keyframes hopFadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 80px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.trc-about-page [data-hop="fadeInUp"].hop-played {
  animation-name: hopFadeInUp;
}

/* fadeInRight */
@keyframes hopFadeInRight {
  from {
    opacity: 0;
    transform: translate3d(-80px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.trc-about-page [data-hop="fadeInRight"].hop-played {
  animation-name: hopFadeInRight;
}

/* fadeInLeft */
@keyframes hopFadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(80px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.trc-about-page [data-hop="fadeInLeft"].hop-played {
  animation-name: hopFadeInLeft;
}

/* slideInUp */
@keyframes hopSlideInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.trc-about-page [data-hop="slideInUp"].hop-played {
  animation-name: hopSlideInUp;
}

/* slideInRight */
@keyframes hopSlideInRight {
  from {
    opacity: 0;
    transform: translate3d(-100%, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.trc-about-page [data-hop="slideInRight"].hop-played {
  animation-name: hopSlideInRight;
}

/* slideInDown — hero / headings */
@keyframes hopSlideInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -80px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.trc-about-page [data-hop="slideInDown"].hop-played {
  animation-name: hopSlideInDown;
}

/* fadeInDown */
@keyframes hopFadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -60px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.trc-about-page [data-hop="fadeInDown"].hop-played {
  animation-name: hopFadeInDown;
}

/* tada — accent icons (optional) */
@keyframes hopTada {
  from {
    opacity: 0;
    transform: scale3d(0.9, 0.9, 0.9);
  }
  10%, 20% {
    transform: scale3d(0.95, 0.95, 0.95) rotate3d(0, 0, 1, -2deg);
  }
  30%, 50%, 70%, 90% {
    transform: scale3d(1.02, 1.02, 1.02) rotate3d(0, 0, 1, 2deg);
  }
  40%, 60%, 80% {
    transform: scale3d(1.02, 1.02, 1.02) rotate3d(0, 0, 1, -2deg);
  }
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

.trc-about-page [data-hop="tada"].hop-played {
  animation-name: hopTada;
  animation-duration: 1.2s;
}

@media (prefers-reduced-motion: reduce) {
  .trc-about-page [data-hop] {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
}
