/* ===== animaciones.css - Opinión Técnica y Análisis de Riesgos Querétaro ===== */
:root {
  --color-primario: #2C6E6A;
  --color-secundario: #F2A65A;
  --color-acento: #9AB8F0;
  --color-fondo: #091615;
  --color-tarjeta: #102827;
  --c-primario: #2C6E6A;
  --c-secundario: #F2A65A;
  --c-acento: #9AB8F0;
  --c-fondo: #091615;
  --c-tarjeta: #102827;
  --c-cyan: #9AB8F0;
}

/* --- Justificación tipográfica de párrafos --- */
p {
  text-align: justify;
  text-justify: inter-word;
}

/* Excepciones de alineación intencional */
.text-center,
.text-center p,
p.text-center {
  text-align: center !important;
}

.text-left,
.text-left p,
p.text-left {
  text-align: left !important;
}

.text-right,
.text-right p,
p.text-right {
  text-align: right !important;
}

/* --- 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-acento);
  box-shadow: 0 10px 24px -12px rgba(154, 184, 240, 0.4);
}

/* --- Hover en botones --- */
.btn-hover {
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -4px rgba(242, 166, 90, 0.45);
}

/* --- Pulso en WhatsApp flotante --- */
.whatsapp-pulso {
  animation: pulso-wa 2.5s infinite;
}
@keyframes pulso-wa {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.65);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* --- Subrayado animado en el menú --- */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-secundario);
  transition: width .25s ease;
}
.nav-link:hover::after,
.nav-link.activo::after {
  width: 100%;
}

/* --- Acordeón de FAQs --- */
.faq-header {
  cursor: pointer;
  user-select: none;
}
.faq-icon {
  transition: transform .3s ease;
}
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, opacity .3s ease;
  opacity: 0;
}
.faq-item.abierto .faq-body {
  opacity: 1;
}

/* --- Barra de progreso de lectura (artículos) --- */
#barra-progreso {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primario), var(--color-secundario));
  z-index: 100;
  transition: width .1s ease-out;
}

/* --- Barra CTA fija inferior al hacer scroll --- */
#barra-cta-fija {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(100%);
  transition: transform .3s ease-in-out;
  z-index: 40;
}
#barra-cta-fija.visible {
  transform: translateY(0);
}

/* --- Shimmer de carga de imágenes --- */
.shimmer {
  background: linear-gradient(90deg, var(--color-tarjeta) 0%, rgba(44, 110, 106, 0.15) 50%, var(--color-tarjeta) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* --- Accesibilidad: respeta la preferencia de movimiento reducido --- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .tarjeta,
  .btn-hover,
  .btn-magnetico,
  .nav-link::after,
  .faq-icon,
  .faq-body,
  #barra-cta-fija {
    transition: none !important;
    transform: none !important;
  }
  .whatsapp-pulso {
    animation: none !important;
  }
  .shimmer {
    animation: none !important;
  }
}
