/**
 * FOOTER ANIMATIONS CSS - Módulo de animaciones del footer
 * 
 * CONTENIDO:
 * - Animaciones de aparición del footer
 * - Efectos hover y focus
 * - Transiciones suaves
 * - Scroll-to-top animations
 * - Performance optimizations
 * 
 * NAMESPACE: .meloopets-footer
 */

/* ===================================================================
   ANIMACIONES DE APARICIÓN
   ================================================================= */

.meloopets-footer .custom-footer {
  animation: fadeInUp 0.8s ease-out;
}

.meloopets-footer .footer-section {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

/* Delay progresivo para cada sección */
.meloopets-footer .footer-section:nth-child(1) { animation-delay: 0.1s; }
.meloopets-footer .footer-section:nth-child(2) { animation-delay: 0.2s; }
.meloopets-footer .footer-section:nth-child(3) { animation-delay: 0.3s; }
.meloopets-footer .footer-section:nth-child(4) { animation-delay: 0.4s; }

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

/* ===================================================================
   SCROLL TO TOP ANIMATIONS
   ================================================================= */

.meloopets-footer .scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: var(--z-footer-scroll-top);
  background: var(--footer-accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: var(--footer-social-shadow);
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all var(--footer-transition-normal);
  will-change: transform, opacity;
}

.meloopets-footer .scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.meloopets-footer .scroll-to-top:hover {
  background: var(--footer-accent-hover);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px rgba(242, 103, 34, 0.4);
}

.meloopets-footer .scroll-to-top:active {
  transform: translateY(0) scale(0.95);
}

/* Pulso sutil para llamar la atención */
.meloopets-footer .scroll-to-top.pulse {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: var(--footer-social-shadow);
  }
  50% {
    box-shadow: 0 4px 20px rgba(242, 103, 34, 0.6);
  }
}

/* ===================================================================
   HOVER EFFECTS EN SECCIONES
   ================================================================= */

.meloopets-footer .footer-section {
  transition: transform var(--footer-transition-slow);
}

.meloopets-footer .footer-section:hover {
  transform: translateY(-2px);
}

/* ===================================================================
   EFECTOS EN ENLACES
   ================================================================= */

.meloopets-footer .footer-section a {
  position: relative;
  transition: all var(--footer-transition-fast);
}

/* ===================================================================
   ANIMACIONES DE TÍTULOS
   ================================================================= */

.meloopets-footer .footer-section h3 {
  position: relative;
  overflow: hidden;
}

.meloopets-footer .footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: var(--footer-accent);
  animation: slideInTitle 1s ease-out 0.5s both;
}

@keyframes slideInTitle {
  to {
    left: 0;
  }
}

/* ===================================================================
   EFECTOS EN ICONOS Y EMOJIS
   ================================================================= */

.meloopets-footer .footer-section li::before {
  transition: transform var(--footer-transition-fast);
}

.meloopets-footer .footer-section li:hover::before {
  transform: scale(1.2) rotate(10deg);
}

/* ===================================================================
   LOADING STATES
   ================================================================= */

.meloopets-footer .footer-loading {
  opacity: 0.6;
  pointer-events: none;
}

.meloopets-footer .footer-loading .footer-section {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
}

/* ===================================================================
   INTERSECTION OBSERVER ANIMATIONS
   ================================================================= */

.meloopets-footer .footer-section.observe {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.meloopets-footer .footer-section.observe.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   FOCUS STATES PARA ACCESIBILIDAD
   ================================================================= */

.meloopets-footer .footer-section a:focus {
  outline: 2px solid var(--footer-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.meloopets-footer .scroll-to-top:focus {
  outline: 3px solid var(--footer-accent);
  outline-offset: 3px;
}

/* ===================================================================
   PERFORMANCE OPTIMIZATIONS
   ================================================================= */

.meloopets-footer .footer-section,
.meloopets-footer .scroll-to-top {
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* ===================================================================
   ANIMACIONES DESHABILITADAS (ACCESIBILIDAD)
   ================================================================= */

@media (prefers-reduced-motion: reduce) {
  .meloopets-footer .custom-footer,
  .meloopets-footer .footer-section,
  .meloopets-footer .scroll-to-top,
  .meloopets-footer .footer-section a,
  .meloopets-footer .footer-section h3,
  .meloopets-footer .footer-section li::before {
    animation: none;
    transition: none;
  }
  
  .meloopets-footer .footer-section.observe {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradiente decorativo superior en el footer principal */
.meloopets-footer .custom-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f26722 0%, #F4BE0C 50%, #4A7356 100%);
  z-index: 2;
}

/* Sombras de texto para mejorar legibilidad */
.meloopets-footer .footer-section * {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.meloopets-footer .footer-section h3 {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
