/* ===== ExpertosViajes · estilos personalizados ===== */

/* Aplica las fuentes base */
body {
  font-family: "Poppins", sans-serif;
}
.font-display {
  font-family: "Playfair Display", serif;
}
.font-body {
  font-family: "Poppins", sans-serif;
}

/* ===== Animaciones de reveal al hacer scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Retraso escalonado para hijos dentro de una misma cuadrícula */
.reveal:nth-child(2) {
  transition-delay: 0.1s;
}
.reveal:nth-child(3) {
  transition-delay: 0.2s;
}
.reveal:nth-child(4) {
  transition-delay: 0.15s;
}
.reveal:nth-child(5) {
  transition-delay: 0.25s;
}
.reveal:nth-child(6) {
  transition-delay: 0.35s;
}

/* ===== Parallax del hero ===== */
.hero-parallax {
  background-attachment: fixed;
  transform: scale(1.05);
}
@media (max-width: 768px) {
  .hero-parallax {
    background-attachment: scroll;
  }
}

/* ===== Rebote lento del indicador de scroll ===== */
@keyframes bounce-slow {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 10px);
  }
}
.animate-bounce-slow {
  animation: bounce-slow 2s ease-in-out infinite;
}

/* ===== Navbar con fondo al hacer scroll ===== */
#navbar.scrolled {
  background-color: rgba(15, 61, 62, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Hamburguesa activa -> X */
#hamburger.open .hb-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#hamburger.open .hb-line:nth-child(2) {
  opacity: 0;
}
#hamburger.open .hb-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Menú móvil visible */
#mobile-menu.open {
  display: flex;
}

/* Enlaces del menú móvil con animación de entrada */
#mobile-menu.open .mobile-link {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}
#mobile-menu.open .mobile-link:nth-child(1) {
  animation-delay: 0.1s;
}
#mobile-menu.open .mobile-link:nth-child(2) {
  animation-delay: 0.18s;
}
#mobile-menu.open .mobile-link:nth-child(3) {
  animation-delay: 0.26s;
}
#mobile-menu.open .mobile-link:nth-child(4) {
  animation-delay: 0.34s;
}
#mobile-menu.open .mobile-link:nth-child(5) {
  animation-delay: 0.42s;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Respeta usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-parallax {
    background-attachment: scroll;
  }
  .animate-bounce-slow {
    animation: none;
  }
}
