/* ================================================
   NOURISH YOUR MIND — Animations & Transitions
   ================================================ */

/* --- Scroll-triggered fade-in animations --- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.anim-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for card groups */
.nym-about__features .anim-fade-up:nth-child(1) { transition-delay: 0s; }
.nym-about__features .anim-fade-up:nth-child(2) { transition-delay: 0.15s; }
.nym-about__features .anim-fade-up:nth-child(3) { transition-delay: 0.3s; }

/* --- Coral glow text effect --- */
.nym-hero__title-main {
  animation: glowPulse 4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% {
    text-shadow: 0 0 30px rgba(240, 100, 84, 0.3);
  }
  100% {
    text-shadow: 0 0 50px rgba(240, 100, 84, 0.5), 0 0 80px rgba(240, 100, 84, 0.15);
  }
}

/* --- Nav transition --- */
.nym-nav {
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* --- Button press effect --- */
.nym-btn:active {
  transform: translateY(0) scale(0.98);
}

/* --- Card hover glow --- */
.nym-card--glass::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(92, 184, 92, 0.15), transparent, rgba(240, 100, 84, 0.1));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  pointer-events: none;
}

.nym-card--glass {
  position: relative;
  overflow: hidden;
}

.nym-card--glass:hover::before {
  opacity: 1;
}

/* --- Gallery hover overlay --- */
.nym-gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 26, 13, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.nym-gallery__item:hover::after {
  opacity: 1;
}

.nym-gallery__item--video::after {
  display: none;
}

/* --- Sponsor logo hover --- */
.nym-sponsors__logo {
  transition: opacity 0.4s ease, filter 0.4s ease, transform 0.3s ease;
}

.nym-sponsors__logo:hover {
  transform: scale(1.05);
}

/* --- Scroll indicator bounce --- */
@keyframes scrollBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) translateY(12px);
    opacity: 0.3;
  }
}

/* --- Mobile menu overlay fade --- */
.nym-nav__menu::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: -1;
}

@media (max-width: 767px) {
  .nym-nav__menu.open::before {
    opacity: 1;
    pointer-events: auto;
  }
}

/* --- Lightbox transitions --- */
.nym-lightbox {
  transition: opacity 0.3s ease;
}

.nym-lightbox__content img {
  animation: lightboxIn 0.3s ease-out;
}

@keyframes lightboxIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- Form focus glow --- */
.nym-form-group input:focus,
.nym-form-group select:focus,
.nym-form-group textarea:focus {
  box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.15);
}

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

  .anim-fade-up {
    opacity: 1;
    transform: none;
  }

  .nym-hero__title-main {
    animation: none;
    text-shadow: 0 0 30px rgba(240, 100, 84, 0.3);
  }

  .nym-gallery__item img,
  .nym-gallery__item video {
    transition: none;
  }

  .nym-gallery__item:hover img,
  .nym-gallery__item:hover video {
    transform: none;
  }
}
