/* ===== RIOACTION ANIMATIONS CSS ===== */
/* All animation and transition-based effects consolidated here */

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

/* Logo pulse animation */
@keyframes logoPulse {

  0%,
  100% {
    box-shadow: 0 22px 70px rgba(0, 0, 0, .65), 0 0 0 10px rgba(255, 176, 0, .15), 0 0 40px rgba(255, 176, 0, .25);
  }

  50% {
    box-shadow: 0 22px 70px rgba(0, 0, 0, .65), 0 0 0 10px rgba(255, 176, 0, .25), 0 0 50px rgba(255, 176, 0, .35);
  }
}

/* Floating badge animation */
@keyframes floatBadge {

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

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

/* Gradient shift animation for hero background */
@keyframes gradientShift {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.92;
  }
}

/* Floating glow animation for hero pseudo-element */
@keyframes floatingGlow {

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

  50% {
    transform: translate(-10px, -10px) scale(1.05);
    opacity: 0.5;
  }
}

/* Pulse glow for primary buttons */
@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 18px 46px rgba(0, 0, 0, .45), 0 0 18px rgba(255, 176, 0, .20);
  }

  50% {
    box-shadow: 0 18px 46px rgba(0, 0, 0, .45), 0 0 28px rgba(255, 176, 0, .35);
  }
}

/* Fade in up animation (POTENTIALLY UNSAFE - see documentation) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

/* Fade in animation (POTENTIALLY UNSAFE - see documentation) */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Slide in up animation without opacity change */
@keyframes slideInUp {
  from {
    -webkit-transform: translateY(30px) translateZ(0);
    transform: translateY(30px) translateZ(0);
  }

  to {
    -webkit-transform: translateY(0) translateZ(0);
    transform: translateY(0) translateZ(0);
  }
}

/* Halo glow animation for social elements */
@-webkit-keyframes halo {
  0% {
    opacity: .35;
    box-shadow: 0 0 10px rgba(255, 176, 0, .10), 0 0 0 rgba(124, 92, 255, 0);
  }

  50% {
    opacity: .75;
    box-shadow: 0 0 22px rgba(255, 176, 0, .18), 0 0 18px rgba(124, 92, 255, .14);
  }

  100% {
    opacity: .35;
    box-shadow: 0 0 10px rgba(255, 176, 0, .10), 0 0 0 rgba(124, 92, 255, 0);
  }
}

@keyframes halo {
  0% {
    opacity: .35;
    box-shadow: 0 0 10px rgba(255, 176, 0, .10), 0 0 0 rgba(124, 92, 255, 0);
  }

  50% {
    opacity: .75;
    box-shadow: 0 0 22px rgba(255, 176, 0, .18), 0 0 18px rgba(124, 92, 255, .14);
  }

  100% {
    opacity: .35;
    box-shadow: 0 0 10px rgba(255, 176, 0, .10), 0 0 0 rgba(124, 92, 255, 0);
  }
}

/* Nudge animation for swipe hint */
@-webkit-keyframes nudge {
  0% {
    -webkit-transform: translateX(0);
    transform: translateX(0);
    opacity: .75;
  }

  60% {
    -webkit-transform: translateX(6px);
    transform: translateX(6px);
    opacity: 1;
  }

  100% {
    -webkit-transform: translateX(0);
    transform: translateX(0);
    opacity: .75;
  }
}

@keyframes nudge {
  0% {
    transform: translateX(0);
    opacity: .75;
  }

  60% {
    transform: translateX(6px);
    opacity: 1;
  }

  100% {
    transform: translateX(0);
    opacity: .75;
  }
}

/* Lightbox zoom in animation */
@keyframes lightboxZoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

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

/* ========================================
   ANIMATION APPLICATIONS
   ======================================== */

/* Hero logo pulse */
.heroLogo {
  animation: logoPulse 3s ease-in-out infinite;
}

/* Badge float */
.badge {
  animation: floatBadge 3s ease-in-out infinite;
}

/* Hero gradient shift */
.hero {
  animation: gradientShift 8s ease-in-out infinite;
}

/* Hero floating glow pseudo-element */
.hero::before {
  animation: floatingGlow 6s ease-in-out infinite;
}

/* Primary button pulse glow */
.btn.primary {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Swipe hint nudge animation */
.swipeHint {
  -webkit-animation: nudge 2.4s ease-in-out infinite;
  animation: nudge 2.4s ease-in-out infinite;
}

/* Glow on social elements (pseudo-elements) */
.fbHero:before,
.groupCard:before,
.gBtn:before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  opacity: .45;
  -webkit-animation: halo 4.8s ease-in-out infinite;
  animation: halo 4.8s ease-in-out infinite;
}

.fbHero:hover:before,
.groupCard:hover:before,
.gBtn:hover:before {
  opacity: 1;
  box-shadow: 0 0 28px rgba(255, 176, 0, .28), 0 0 22px rgba(124, 92, 255, .22);
}

/* Lightbox content zoom */
.lightbox-content {
  animation: lightboxZoomIn 0.3s ease;
}

/* ========================================
   PAGE LOAD ANIMATIONS (POTENTIALLY UNSAFE)
   See animation_documentation.md for details
   ======================================== */

/* Hero fade-in animation */
.hero-animate .heroInner {
  animation: fadeInUp 0.6s ease-out forwards;
}

.hero-animate .heroLogo {
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero-animate .h1 {
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-animate .genre {
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.hero-animate .btnRow {
  animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

/* Social buttons stagger */
.hero-animate .socialA {
  animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

/* Grid stagger animation */
.grid-animate .col:nth-child(1) {
  animation: fadeInUp 0.5s ease-out 0.1s both;
}

.grid-animate .col:nth-child(2) {
  animation: fadeInUp 0.5s ease-out 0.2s both;
}

.grid-animate .col:nth-child(3) {
  animation: fadeInUp 0.5s ease-out 0.3s both;
}

.grid-animate .col:nth-child(4) {
  animation: fadeInUp 0.5s ease-out 0.4s both;
}

/* Section fade-in */
.section-animate {
  animation: fadeIn 0.8s ease-out forwards;
}

/* ========================================
   HOVER & TRANSITION ANIMATIONS
   ======================================== */

/* Logo hover transform */
.heroLogo {
  transition: transform 0.3s ease;
}

.heroLogo:hover {
  transform: scale(1.05);
}

/* Button transitions */
.btn {
  transition: all 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.btn.primary:hover {
  transform: translateY(-4px) scale(1.03);
}

/* Facebook hero button */
.fbHero {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.fbHero:hover {
  transform: translateY(-4px) scale(1.02);
}

.fbHero .ico {
  transition: transform 0.3s ease;
}

.fbHero:hover .ico {
  transform: rotate(5deg) scale(1.05);
}

/* Social group buttons */
.gBtn {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.gBtn:hover {
  transform: translateY(-4px) scale(1.04);
}

.gBtn .ico {
  transition: transform 0.3s ease;
}

.gBtn:hover .ico {
  transform: rotate(5deg) scale(1.05);
}

/* Card hover effects */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
}

/* Tile hover effects */
.tile {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tile:hover {
  transform: translateY(-5px);
}

/* Upcoming gig cards */
.upcoming-gig-card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.upcoming-gig-card:hover {
  transform: translateY(-5px) scale(1.02);
}

/* Gallery item hover */
.gItem {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.gItem:hover {
  transform: scale(1.08);
}

.gItem::after {
  transition: opacity 0.3s ease;
}

/* Form input transitions */
.form-input,
.form-textarea {
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* Footer link transitions */
.footer a {
  transition: color 0.25s ease;
}

/* Charity link transitions */
.charity-name a {
  transition: color 0.25s ease;
}

/* ========================================
   MOBILE NAVIGATION ANIMATIONS
   ======================================== */

/* Hamburger button transitions */
.hamburger-btn {
  transition: all 0.3s ease;
}

.hamburger-line {
  transition: all 0.3s ease;
}

/* Mobile nav overlay */
.mobile-nav-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile navigation drawer */
.mobile-nav {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-nav-overlay.active .mobile-nav {
  transform: translateX(0);
}

/* Mobile nav close button */
.mobile-nav-close {
  transition: all 0.2s ease;
}

.mobile-nav-close:hover {
  transform: rotate(90deg);
}

/* Mobile nav links */
.mobile-nav-link {
  transition: all 0.2s ease;
}

.mobile-nav-link:hover {
  transform: translateX(4px);
}

.mobile-nav-link .nav-icon {
  transition: stroke 0.2s ease;
}

/* ========================================
   LIGHTBOX ANIMATIONS
   ======================================== */

/* Lightbox overlay */
.lightbox {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
}

/* Lightbox controls */
.lightbox-close {
  transition: all 0.25s ease;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

.lightbox-nav {
  transition: all 0.25s ease;
}

.lightbox-nav:hover {
  transform: translateY(-50%) scale(1.1);
}

/* ========================================
   BACK TO TOP BUTTON ANIMATION
   ======================================== */

.back-to-top {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.05);
}

.back-to-top:active {
  transform: translateY(-3px) scale(1.02);
}

/* ========================================
   FORM TRANSITIONS
   ======================================== */

.form-input,
.form-textarea {
  transition: all 0.2s ease;
}

/* ========================================
   DISABLE ALL ANIMATIONS ON MOBILE
   Fix for elements disappearing on mobile
   ======================================== */

@media (max-width: 768px) {

  /* Disable all animations completely */
  *,
  *::before,
  *::after {
    animation: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  /* Specifically disable problematic animations */
  .hero {
    animation: none !important;
  }

  .hero::before {
    animation: none !important;
  }

  .heroLogo {
    animation: none !important;
  }

  .badge {
    animation: none !important;
  }

  .btn.primary {
    animation: none !important;
  }

  .fbHero:before,
  .groupCard:before,
  .gBtn:before {
    animation: none !important;
  }

  .swipeHint {
    animation: none !important;
  }

  /* Remove transforms that might cause rendering issues */
  .hero::before {
    transform: none !important;
  }
}