/* Animaciones corporativas — Nueva Web Aya */

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-bg,
  .hero-title,
  .hero-subtitle,
  .section-title::after,
  .parallax-img,
  .btn-aya-primary,
  .service-card {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .reveal {
    transform: none !important;
  }
  .hero-slide:not(.active) {
    opacity: 0 !important;
    visibility: hidden !important;
  }
  .hero-slide.active {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .section-title::after {
    width: 96px !important;
  }
}

/* —— Hero —— */
.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s ease-in-out;
  pointer-events: none;
  z-index: 0;
}
.hero-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  will-change: transform;
}
.hero-slide.active .hero-bg {
  animation: kenBurns 22s ease-out forwards;
}
@keyframes kenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}

.hero-title,
.hero-subtitle {
  opacity: 0;
  transform: translateY(28px);
}
.hero-title.hero-text-run {
  animation: heroTextIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-subtitle.hero-text-run {
  animation: heroTextIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.18s;
}
@keyframes heroTextIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#site-header .header-logo-wrap {
  transition: opacity 0.35s ease;
}
#site-header.header-scrolled .header-logo-wrap {
  opacity: 0.92;
}

/* —— Scroll reveal —— */
.reveal {
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-fade-up {
  transform: translateY(32px);
}
.reveal-fade-up-zoom {
  transform: translateY(24px) scale(0.97);
}
.reveal-from-left {
  transform: translateX(-48px);
}
.reveal-from-right {
  transform: translateX(48px);
}
.reveal-zoom-in {
  transform: scale(0.92);
  transform-origin: center center;
}
.reveal-zoom-in.is-visible {
  transform: scale(1);
}

@media (max-width: 767px) {
  .reveal-from-left,
  .reveal-from-right {
    transform: translateY(24px);
  }
}

/* Títulos de sección + línea inferior */
.section-title {
  position: relative;
  display: inline-block;
}
.section-title.text-center {
  display: block;
}
.section-title::after {
  content: '';
  display: block;
  height: 3px;
  width: 0;
  max-width: 96px;
  margin-top: 0.65rem;
  background: linear-gradient(90deg, transparent, #c8922a, transparent);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.section-title.text-center::after {
  margin-left: auto;
  margin-right: auto;
}
.section-title.is-visible::after {
  width: 96px;
}

/* Stagger servicios */
.reveal-stagger-1 { transition-delay: 0ms; }
.reveal-stagger-2 { transition-delay: 150ms; }
.reveal-stagger-3 { transition-delay: 300ms; }

/* Parallax experiencia */
.parallax-wrap {
  overflow: hidden;
}
.parallax-img {
  transition: transform 0.08s linear;
  will-change: transform;
}
@media (max-width: 767px) {
  .parallax-img {
    transform: none !important;
  }
}

/* Botones y tarjetas */
.btn-aya-primary {
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-aya-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px -8px rgba(30, 77, 140, 0.45);
}
.btn-aya-primary .btn-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}
.btn-aya-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-nav-access {
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-nav-access:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px -6px rgba(200, 146, 42, 0.55);
}

.service-card {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 20px 40px -12px rgba(15, 39, 68, 0.2);
}
