/* Animaciones personalizadas para Pallevar (CSS nativo sin dependencias externas) */

/* Variables de animación */
:root {
  --animation-duration: 0.6s;
  --animation-delay: 0.1s;
}

/* Animaciones de entrada para secciones */
.section-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--animation-duration) ease-out, transform var(--animation-duration) ease-out;
}

.section-fade-in.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Animación para las tarjetas de comida */
.food-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(0); /* Force hardware acceleration */
}

.food-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Animación para botones */
.btn {
  transition: all 0.3s ease;
  transform: translateZ(0);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* Efecto de pulso suave para elementos interactivos */
.pulse-hover {
  transition: all 0.3s ease;
}

.pulse-hover:hover {
  animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Animación de fade in escalonada */
.fade-in-stagger {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-stagger.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Animaciones para la barra de navegación */
.nav-links a {
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: #315c39;
  transform: translateY(-2px);
}

/* Efecto parallax ligero para la sección hero */
.hero {
  perspective: 1000px;
}

.hero-dish {
  transition: transform 0.5s ease-out;
  transform-style: preserve-3d;
}

/* Animación de carga inicial */
.site-header {
  animation: fadeInDown 0.8s ease-out;
}

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

/* Animación para la barra de progreso de scroll */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: #315c39;
  z-index: 1000;
  transition: width 0.3s ease;
}

/* Media queries para mantener performance en móviles */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Optimización para performance */
.animated {
  will-change: auto;
}

.animated.scrolling {
  will-change: transform;
}