/* =============================================
   HAND SWIPE HINT ANIMATION
   Beautiful hand gesture animation for carousels
   ============================================= */

.hand-swipe-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.5s ease;
  z-index: 5;
  pointer-events: none;
}

.hand-swipe-hint.fade-out {
  opacity: 0;
}

.hand-gesture {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.hand-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  animation: handSwipe 3s ease-in-out infinite;
  transition: opacity 0.3s ease;
}

.swipe-trail {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  height: 2px;
}

.trail-line {
  position: absolute;
  top: 0;
  left: 25px;
  right: 25px;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.8) 30%,
    rgba(255, 255, 255, 0.6) 70%,
    transparent 100%
  );
  border-radius: 1.5px;
  opacity: 0;
  animation: trailFade 3s ease-in-out infinite;
}

.trail-dots {
  position: absolute;
  top: -3px;
  left: 25px;
  right: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trail-dots span {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  opacity: 0;
  animation: dotTrail 3s ease-in-out infinite;
}

.trail-dots span:nth-child(1) {
  animation-delay: 0.3s;
}

.trail-dots span:nth-child(2) {
  animation-delay: 0.6s;
}

.trail-dots span:nth-child(3) {
  animation-delay: 0.9s;
}

/* Keyframe Animations */
@keyframes handSwipe {
  0%, 10% {
    left: 0;
    opacity: 0;
    transform: translateY(-50%) scale(0.95);
  }
  15%, 20% {
    left: 0;
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  25% {
    transform: translateY(-50%) scale(1.05);
  }
  60% {
    left: calc(100% - 50px);
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  70%, 75% {
    left: calc(100% - 50px);
    opacity: 0;
    transform: translateY(-50%) scale(0.95);
  }
  80%, 100% {
    left: calc(100% - 50px);
    opacity: 0;
    transform: translateY(-50%) scale(0.95);
  }
}

@keyframes trailFade {
  0%, 10% {
    opacity: 0;
  }
  20% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.8;
  }
  60%, 100% {
    opacity: 0;
  }
}

@keyframes dotTrail {
  0%, 15% {
    opacity: 0;
    transform: scale(0.5);
  }
  35% {
    opacity: 1;
    transform: scale(1.2);
  }
  55%, 100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* Subtle effect on phone hover */
[class*="phone-mockup"]:hover .hand-swipe-hint {
  opacity: 0.7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hand-swipe-hint {
    width: 130px;
    height: 65px;
  }

  .hand-icon {
    font-size: 32px;
  }

  .trail-dots span {
    width: 5px;
    height: 5px;
  }

  .trail-line {
    height: 2.5px;
    left: 20px;
    right: 20px;
  }

  .trail-dots {
    left: 20px;
    right: 20px;
    top: -2.5px;
  }

  @keyframes handSwipe {
    0%, 10% {
      left: 0;
      opacity: 0;
      transform: translateY(-50%) scale(0.95);
    }
    15%, 20% {
      left: 0;
      opacity: 1;
      transform: translateY(-50%) scale(1);
    }
    25% {
      transform: translateY(-50%) scale(1.05);
    }
    60% {
      left: calc(100% - 40px);
      opacity: 1;
      transform: translateY(-50%) scale(1);
    }
    70%, 75% {
      left: calc(100% - 40px);
      opacity: 0;
      transform: translateY(-50%) scale(0.95);
    }
    80%, 100% {
      left: calc(100% - 40px);
      opacity: 0;
      transform: translateY(-50%) scale(0.95);
    }
  }
}
