/* VOX IUDEX - animaciones. Si este archivo falla, la web se ve igual que antes. */
:root { --vx-ease: cubic-bezier(.2, .7, .2, 1); }

/* Barra de progreso de lectura */
#vx-progreso { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--dorado-vox, #C5A059); z-index: 10000; pointer-events: none; }

/* Navbar: se compacta al bajar (solo escritorio) */
.navbar.bg-institucional { transition: padding .35s ease, box-shadow .35s ease; }
.navbar.bg-institucional .logo-vox { transition: height .35s ease, max-height .35s ease; }
.navbar.bg-institucional.vx-fija { position: fixed; top: 0; left: 0; right: 0; width: 100%; }
.navbar.bg-institucional.vx-compacta { padding-top: .2rem; padding-bottom: .2rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
.navbar.bg-institucional.vx-compacta .logo-vox { height: 56px; max-height: 56px; }
#vx-nav-spacer { flex: none; }

/* Subrayado dorado en los enlaces del menú */
.navbar .nav-link { position: relative; }
@media (min-width: 1200px) {
  .navbar .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle)::after { content: ""; position: absolute; left: .5rem; right: .5rem; bottom: .25rem; height: 2px; background: var(--dorado-vox, #C5A059); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--vx-ease); }
  .navbar .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle):hover::after,
  .navbar .navbar-nav > .nav-item > .nav-link.active:not(.dropdown-toggle)::after { transform: scaleX(1); }
}

/* Hero: entrada escalonada */
.hero-v2-tag, .hero-v2-titulo, .hero-v2-lema, .hero-v2-acciones { animation: vxSube .9s var(--vx-ease) backwards; }
.hero-v2-tag { animation-delay: .15s; }
.hero-v2-titulo { animation-delay: .35s; }
.hero-v2-lema { animation-delay: .7s; }
.hero-v2-acciones { animation-delay: .9s; }
.hero-v2-titulo::after { content: ""; display: block; height: 3px; width: 0; background: var(--dorado-vox, #C5A059); margin-top: 16px; animation: vxLinea 1s .8s var(--vx-ease) forwards; }
@keyframes vxSube { from { opacity: 0; transform: translateY(24px); } }
@keyframes vxLinea { to { width: 90px; } }
.hero-v2-btn:hover { transform: translateY(-2px); }
.hero-v2-btn { transition: background .15s, transform .25s; display: inline-block; }

/* Indicador "Desliza" */
.vx-scroll { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 3; color: var(--dorado-vox, #C5A059); text-align: center; font-size: .65rem; letter-spacing: 3px; text-transform: uppercase; pointer-events: none; animation: vxSube 1s 1.6s backwards; }
.vx-scroll span { display: block; }
.vx-raton { width: 20px; height: 32px; border: 2px solid var(--dorado-vox, #C5A059); border-radius: 11px; margin: 0 auto 6px; position: relative; }
.vx-raton::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--dorado-vox, #C5A059); animation: vxRueda 1.6s infinite; }
@keyframes vxRueda { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(11px); } }

/* Aparición al hacer scroll (solo marcos; videos y flyers no se tocan) */
.vx-rv:not(.vx-on) { opacity: 0; }
.vx-rv.vx-on { animation: vxRevela .75s var(--vx-ease) backwards; }
@keyframes vxRevela { from { opacity: 0; transform: translateY(22px); } }

/* Tarjetas */
.card-articulo:hover { transform: translateY(-3px); }
.card-articulo .etiqueta-categoria { transition: background .3s, color .3s; }
.card-articulo:hover .etiqueta-categoria { background: var(--dorado-vox, #C5A059); color: var(--azul-vox, #001F3F); }

/* Carrusel "Nosotros" */
#galeriaVox .carousel-item.active img { animation: vxZoom 6s ease-out both; }
@keyframes vxZoom { from { transform: scale(1.04); } }
#galeriaVox .carousel-indicators button { transition: width .4s ease, background-color .4s ease, opacity .4s ease; }
#galeriaVox .carousel-indicators button:not(.active) { background-color: #fff !important; }
#galeriaVox .carousel-indicators button.active { background-color: var(--dorado-vox, #C5A059) !important; width: 28px !important; border-radius: 6px !important; opacity: 1; }
#galeriaVox .carousel-control-prev > div, #galeriaVox .carousel-control-next > div { transition: background-color .3s, transform .3s; }
#galeriaVox .carousel-control-prev:hover > div, #galeriaVox .carousel-control-next:hover > div { background-color: rgba(197, 160, 89, .9) !important; transform: scale(1.08); }

/* Botones flotantes */
.icono-tiktok, .icono-facebook, .icono-instagram, .icono-whatsapp { animation: vxFab .6s var(--vx-ease) backwards; transition: transform .3s ease, background-color .3s ease; }
.icono-tiktok { animation-delay: 1.9s; }
.icono-facebook { animation-delay: 2s; }
.icono-instagram { animation-delay: 2.1s; }
.icono-whatsapp { animation-delay: 2.2s; }
.icono-instagram:hover, .icono-whatsapp:hover { transform: scale(1.1); }
@keyframes vxFab { from { opacity: 0; transform: translateX(50px); } }

/* Botón volver arriba (arriba del botón "Síguenos") */
#vx-arriba { position: fixed; left: 20px; bottom: 90px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--dorado-vox, #C5A059); color: var(--azul-vox, #001F3F); display: flex; align-items: center; justify-content: center; z-index: 1040; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); cursor: pointer; opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .4s, transform .4s, background-color .3s; }
#vx-arriba.vx-visible { opacity: 1; transform: none; pointer-events: auto; }
#vx-arriba:hover { background: #fff; }

/* Accesibilidad: sin movimiento si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
  .hero-v2-tag, .hero-v2-titulo, .hero-v2-lema, .hero-v2-acciones, .vx-scroll, .vx-raton::after,
  .vx-rv.vx-on, #galeriaVox .carousel-item.active img, .icono-tiktok, .icono-facebook, .icono-instagram, .icono-whatsapp { animation: none !important; }
  .hero-v2-titulo::after { animation: none; width: 90px; }
  .vx-rv:not(.vx-on) { opacity: 1; }
  .navbar.bg-institucional, .navbar.bg-institucional .logo-vox, #vx-arriba { transition: none; }
}
