/*
 * Rania Abdela Seid Foreign Employment Agency — custom animations
 */

/* Hero */
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroShine {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes brokerShine {
  0% { left: -60%; }
  50%, 100% { left: 120%; }
}

@keyframes pulseRing {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(61, 155, 92, 0.5);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(61, 155, 92, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(61, 155, 92, 0);
  }
}

@keyframes trustSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes statPop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

#hero-banner .hero-banner-img {
  animation: heroFadeIn 1s ease-out both;
}

#hero-banner .hero-banner-footer {
  animation: heroFadeIn 0.8s ease-out 0.35s both;
}

#hero-banner .btn-primary {
  animation: pulseRing 2.5s ease-out infinite;
}

.trust-bar .trust-item {
  animation: trustSlideUp 0.7s ease-out both;
}

.trust-bar .col-sm-3:nth-child(1) .trust-item { animation-delay: 0.1s; }
.trust-bar .col-sm-3:nth-child(2) .trust-item { animation-delay: 0.25s; }
.trust-bar .col-sm-3:nth-child(3) .trust-item { animation-delay: 0.4s; }
.trust-bar .col-sm-3:nth-child(4) .trust-item { animation-delay: 0.55s; }

.trust-bar .trust-item:hover i {
  animation: iconBounce 0.6s ease;
}

.process-step {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.process-step:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(30, 61, 43, 0.15);
}

.process-step:hover i {
  animation: iconBounce 0.5s ease;
}

/* Scroll reveal (JS adds .is-visible) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-on-scroll.reveal-left {
  transform: translateX(-40px);
}

.reveal-on-scroll.reveal-right {
  transform: translateX(40px);
}

.reveal-on-scroll.reveal-left.is-visible,
.reveal-on-scroll.reveal-right.is-visible {
  transform: translateX(0);
}

/* Portfolio */
#portfolio .portfolio-item-inner img {
  transition: transform 0.5s ease;
}

#portfolio .portfolio-item:hover .portfolio-item-inner img {
  transform: scale(1.08);
}

#portfolio .portfolio-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#portfolio .portfolio-item.portfolio-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Team */
.team-wrapper {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.team-wrapper:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 32px rgba(30, 61, 43, 0.2);
}

/* Stats */
#business-stats .business-stats.animated-stat {
  animation: statPop 0.6s ease-out both;
}

/* Testimonials */
#testimonial .single-testimonial {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#testimonial .single-testimonial.testimonial-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar scroll */
#main-nav.navbar-scrolled {
  background: var(--fea-section-dark) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#main-nav.navbar-scrolled .navbar-nav > li > a {
  padding-top: 28px !important;
  padding-bottom: 24px !important;
}

/* Service boxes */
#services .media.service-box {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

#services .media.service-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(45, 106, 62, 0.12);
}

#services .media.service-box:hover .pull-left > i {
  animation: iconBounce 0.5s ease;
}

/* Pricing cards */
#pricing .pricing {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

#pricing .pricing:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 30px rgba(30, 61, 43, 0.12);
}

/* About image */
#about .about-image-wrap {
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(30, 61, 43, 0.15);
}

#about .about-image-wrap img {
  transition: transform 0.6s ease;
}

#about .about-image-wrap:hover img {
  transform: scale(1.05);
}

/* Back to top */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  background: var(--fea-green-mid);
  color: #fff;
  border-radius: 50%;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: var(--fea-green-dark);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}
