/* ============================================================
 *  enhancements.css
 *  Shared visual enhancements for /capacitaciones/* landing pages.
 *  Loaded by every Línea 01 page.
 * ============================================================ */

/* ----- Fade-in on scroll ----- */
.fade-in-section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  will-change: opacity, transform;
}
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-in-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ----- Sticky WhatsApp button (injected by enhancements.js on Capa 3) ----- */
.whatsapp-sticky {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  z-index: 9999;
}
.whatsapp-sticky.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  animation: ws-pulse 2.5s ease-in-out infinite;
}
.whatsapp-sticky:hover {
  background: #128c7e;
  animation: none;
}
.whatsapp-sticky svg {
  width: 28px;
  height: 28px;
}
@keyframes ws-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  50%      { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 14px rgba(37, 211, 102, 0); }
}
@media (max-width: 760px) {
  .whatsapp-sticky { width: 54px; height: 54px; bottom: 18px; right: 18px; }
  .whatsapp-sticky svg { width: 24px; height: 24px; }
}
