/* ============================================
   ANIMATIONS.CSS - Micro-animations for UX
   ============================================ */

/* ============================================
   1. FADE IN ANIMATION
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

/* Stagger animation for offer cards */
.offer-card.fade-in:nth-child(1) {
  animation-delay: 0.1s;
}

.offer-card.fade-in:nth-child(2) {
  animation-delay: 0.2s;
}

.offer-card.fade-in:nth-child(3) {
  animation-delay: 0.3s;
}

.offer-card.fade-in:nth-child(4) {
  animation-delay: 0.4s;
}

.offer-card.fade-in:nth-child(5) {
  animation-delay: 0.5s;
}

.offer-card.fade-in:nth-child(6) {
  animation-delay: 0.6s;
}

.offer-card.fade-in:nth-child(7) {
  animation-delay: 0.7s;
}

.offer-card.fade-in:nth-child(8) {
  animation-delay: 0.8s;
}

/* ============================================
   2. FLOATING ANIMATION
   ============================================ */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* Apply floating to promo block */
.promo-block {
  animation: float 3s ease-in-out infinite;
}

/* ============================================
   3. SCALE PULSE ANIMATION
   ============================================ */
@keyframes scalePulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.scale-pulse {
  animation: scalePulse 2s ease-in-out infinite;
}

/* ============================================
   4. SHIMMER LOADING EFFECT
   ============================================ */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(90deg,
      #f0f0f0 25%,
      #e0e0e0 50%,
      #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* ============================================
   5. SLIDE IN FROM LEFT
   ============================================ */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out forwards;
  opacity: 0;
}

/* ============================================
   6. SLIDE IN FROM RIGHT
   ============================================ */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out forwards;
  opacity: 0;
}

/* ============================================
   7. BOUNCE IN
   ============================================ */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }

  70% {
    transform: scale(0.9);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.bounce-in {
  animation: bounceIn 0.6s ease-out forwards;
  opacity: 0;
}

/* ============================================
   8. ROTATE IN
   ============================================ */
@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
  }

  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

.rotate-in {
  animation: rotateIn 0.6s ease-out forwards;
  opacity: 0;
}

/* ============================================
   9. FADE IN UP (Subtle)
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.4s ease-out forwards;
  opacity: 0;
}

/* ============================================
   10. SKELETON LOADING
   ============================================ */
@keyframes skeleton {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg,
      #f0f0f0 25%,
      #e0e0e0 50%,
      #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: 8px;
}

/* ============================================
   11. GLOW PULSE (for highlights)
   ============================================ */
@keyframes glowPulse {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
  }

  50% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
  }
}

.glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

/* ============================================
   12. WIGGLE (attention grabber)
   ============================================ */
@keyframes wiggle {

  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-5deg);
  }

  75% {
    transform: rotate(5deg);
  }
}

.wiggle {
  animation: wiggle 0.5s ease-in-out;
}

/* ============================================
   13. HEARTBEAT (for likes/favorites)
   ============================================ */
@keyframes heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  10%,
  30% {
    transform: scale(0.9);
  }

  20%,
  40% {
    transform: scale(1.1);
  }
}

.heartbeat {
  animation: heartbeat 1.3s ease-in-out infinite;
}

/* ============================================
   14. STAGGER ANIMATIONS (helpers)
   ============================================ */
.stagger-1 {
  animation-delay: 0.1s !important;
}

.stagger-2 {
  animation-delay: 0.2s !important;
}

.stagger-3 {
  animation-delay: 0.3s !important;
}

.stagger-4 {
  animation-delay: 0.4s !important;
}

.stagger-5 {
  animation-delay: 0.5s !important;
}

.stagger-6 {
  animation-delay: 0.6s !important;
}

/* ============================================
   15. UTILITY CLASSES
   ============================================ */
.animate-once {
  animation-iteration-count: 1;
}

.animate-infinite {
  animation-iteration-count: infinite;
}

.animate-fast {
  animation-duration: 0.3s !important;
}

.animate-slow {
  animation-duration: 1s !important;
}

/* Pause animations on hover (useful for debugging) */
.pause-on-hover:hover * {
  animation-play-state: paused !important;
}

/* ============================================
   16. ACCORDION ANIMATIONS
   ============================================ */


/* ============================================
   17. MOBILE MENU ANIMATIONS
   ============================================ */
/* Анимация гамбургер-меню */
.menu-toggle {
  transition: transform 0.2s ease;
}

.menu-toggle:active {
  transform: scale(0.95);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: currentColor;
  transition: all 0.3s ease;
}

/* Плавное появление мобильного меню */
.header-cta {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.header-cta:not(.show) {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.header-cta.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}