/**
 * Bhanumati Homestay - Animations Stylesheet
 * CSS3 Keyframes & Subtle Motion Design
 */

/* Subtle Continuous Pulse / Vibration for "Book a Room" Floating Button (Section 8) */
@keyframes subtlePulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 18px rgba(20, 61, 43, 0.35);
  }
  50% {
    transform: scale(1.045);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 18px rgba(20, 61, 43, 0.35);
  }
}

.pulse-subtle {
  animation: subtlePulse 2.8s ease-in-out infinite;
}

.pulse-subtle:hover {
  animation-play-state: paused;
}

/* Smooth Slow-Motion Up-Down Floating Animation for Header Logo */
@keyframes logoMotionUpDown {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
    box-shadow: 0 6px 16px rgba(20, 61, 43, 0.3);
  }
  100% {
    transform: translateY(0);
  }
}

.brand-logo-img {
  animation: logoMotionUpDown 3.2s ease-in-out infinite;
  will-change: transform;
  transition: transform 0.3s ease;
}

.brand-link:hover .brand-logo-img {
  animation-play-state: paused;
  transform: translateY(-4px) scale(1.06);
}

/* Cinematic Crossfade & Scaling (Section 4B) */
@keyframes heroZoomIn {
  0% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1.12);
  }
}

/* Modal and Drawer Entrances */
@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-open .modal-card,
.room-popup-overlay.popup-visible .room-popup-container {
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Fade in for dynamic contents */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.35s ease forwards;
}

/* Continuous Seamless Marquee (Immediately Visible on Load from translateX(0) to translateX(-50%)) */
@keyframes marqueeInfiniteLoop {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ticker-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marqueeInfiniteLoop 78s linear infinite;
  will-change: transform;
}

.ticker-marquee-viewport:hover .ticker-marquee-track {
  animation-play-state: paused;
}

.ticker-marquee-inner {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Slide-over Drawer from Right to Left */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .pulse-subtle {
    animation: none;
  }
  .hero-slide-img {
    transition: none;
    transform: none !important;
  }
  .ticker-marquee-inner {
    animation: none;
    transform: none;
  }
}
