/* ============================================
   Apartmanska kuća — animations.css
   ============================================ */

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Hero load animation */
.hero__content .h1-hero {
  opacity: 0;
  animation: fadeInUp 1s var(--ease) forwards;
}

.hero__content .hero__sub {
  opacity: 0;
  animation: fadeInUp 1s var(--ease) 0.15s forwards;
}

.hero__content .booking {
  opacity: 0;
  animation: fadeInUp 1s var(--ease) 0.3s forwards;
}

.subhero__title {
  opacity: 0;
  animation: fadeInUp 1s var(--ease) forwards;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children (apartment cards) */
.stagger > * {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger.visible > *:nth-child(2) { transition-delay: 150ms; }
.stagger.visible > *:nth-child(3) { transition-delay: 300ms; }
.stagger.visible > *:nth-child(4) { transition-delay: 450ms; }
.stagger.visible > *:nth-child(5) { transition-delay: 600ms; }

/* Booking results fade */
.booking__list {
  animation: fadeIn 0.5s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .stagger > * { opacity: 1; transform: none; }
}
