/* ===== Resto del sitio: animaciones.css (animar-interfaz) ===== */
:root {
  --color-primario: #007BFF;
  --color-secundario: #38BDF8;
  --color-acento: #25D366;
  --color-fondo: #0b1320;
  --color-tarjeta: #1A2B4C;
}

/* --- Fade-in al hacer scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hover en tarjetas --- */
.tarjeta {
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tarjeta:hover {
  transform: translateY(-4px);
  border-color: var(--color-primario);
  box-shadow: 0 10px 24px -12px rgba(0, 123, 255, 0.55);
}

/* --- Hover en botones --- */
.btn {
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

/* --- Pulso del botón flotante de WhatsApp y avatar de asistente Verónica --- */
.whatsapp-flotante,
a[aria-label="Contactar por WhatsApp"],
a[title="Contacto por WhatsApp"],
#veronica-chat-btn,
#veronica-trigger-btn {
  position: fixed !important;
  overflow: visible !important;
}
.whatsapp-flotante::before,
a[aria-label="Contactar por WhatsApp"]::before,
a[title="Contacto por WhatsApp"]::before,
#veronica-chat-btn::before,
#veronica-trigger-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: .55;
  animation: pulso 2.4s ease-out infinite;
  z-index: -1;
  pointer-events: none;
}
.whatsapp-flotante::before,
a[aria-label="Contactar por WhatsApp"]::before,
a[title="Contacto por WhatsApp"]::before {
  background: #25D366;
}
#veronica-chat-btn::before,
#veronica-trigger-btn::before {
  background: var(--color-primario, #007BFF);
}
@keyframes pulso {
  0% { transform: scale(1); opacity: .55; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* --- Acordeón de FAQs --- */
.faq-pregunta,
.faq-toggle {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-pregunta .icono,
.faq-toggle .faq-icon {
  transition: transform .25s ease;
}
.faq-item.abierto .icono,
.faq-item.abierto .faq-icon {
  transform: rotate(180deg);
}
.faq-respuesta,
.faq-content {
  transition: max-height .35s ease, padding .35s ease, opacity .3s ease;
}
.faq-item.abierto .faq-respuesta,
.faq-item.abierto .faq-content {
  max-height: 500px;
  display: block !important;
}

/* --- Barra de progreso de fases --- */
.fases {
  position: relative;
  padding-left: 32px;
}
.fases .linea-base {
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.fases .linea-progreso {
  position: absolute;
  left: 9px;
  top: 6px;
  width: 2px;
  height: 0%;
  background: var(--color-primario);
  transition: height 1.2s ease;
}
.fase {
  position: relative;
}
.fase::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-fondo);
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: border-color .4s ease, background .4s ease;
}
.fase.activa::before {
  border-color: var(--color-primario);
  background: var(--color-primario);
}

/* --- Subrayado animado en menú --- */
nav a {
  position: relative;
}
nav a:not(.btn):not([class*="bg-"])::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: var(--color-primario);
  transition: width .25s ease;
}
nav a:not(.btn):not([class*="bg-"]):hover::after {
  width: 100%;
}

/* --- Barra CTA fija al hacer scroll (oculta según preferencia) --- */
.barra-cta {
  display: none !important;
}

/* --- Shimmer al cargar imágenes --- */
.img-wrap.cargando {
  position: relative;
}
.img-wrap.cargando::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--color-tarjeta) 25%, rgba(255, 255, 255, 0.08) 50%, var(--color-tarjeta) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  z-index: 2;
  pointer-events: none;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Confirmación animada de formulario --- */
.confirmacion-envio {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s ease, transform .4s ease;
}
.confirmacion-envio.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Accesibilidad: respeta "reducir movimiento" --- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .whatsapp-flotante::before,
  a[aria-label="Contactar por WhatsApp"]::before,
  #veronica-chat-btn::before,
  #veronica-trigger-btn::before {
    animation: none !important;
    display: none !important;
  }
  .tarjeta, .btn, .faq-respuesta, .faq-content, .faq-pregunta .icono, .faq-toggle .faq-icon,
  .fases .linea-progreso, .fase::before, nav a::after,
  .barra-cta, .img-wrap.cargando::before, .confirmacion-envio {
    transition: none !important;
    animation: none !important;
  }
}
