/* Ascensos effects: visible defaults, decorative layers never intercept input. */
.afx-card { position: relative; isolation: isolate; }
.afx-light, .afx-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; z-index: -1; }
.afx-light { background: radial-gradient(circle 230px at var(--afx-x, 50%) var(--afx-y, 50%), var(--primary), transparent 75%); opacity: 0; transition: opacity 180ms ease-out; }
.afx-glare { z-index: 1; }
.afx-glare::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.12) 50%, transparent 65%); transform: translateX(-130%); }
@media (any-hover: hover) and (any-pointer: fine) and (prefers-reduced-motion: no-preference) {
    .afx-mouse > .afx-light { opacity: .12; }
    .afx-mouse > .afx-glare::before { animation: afx-glint 650ms cubic-bezier(.16,1,.3,1) both; }
}
/* Barra cápsula: contenedor redondeado y un deslizador relleno bajo la opción activa. */
.asc-filtro.afx-tabs { position: relative; isolation: isolate; width: -webkit-fit-content; width: fit-content; max-width: 100%; box-sizing: border-box; gap: 4px; padding: 5px; background: #15181d; border: 1px solid rgba(255,255,255,.12); border-radius: 27px; scrollbar-width: none; }
.asc-filtro.afx-tabs::-webkit-scrollbar { display: none; }
.asc-filtro.afx-tabs > button { min-height: 42px; padding: 9px 22px; border: 1px solid transparent !important; border-radius: 999px; background: transparent !important; color: #f4f5f7 !important; transition: color 240ms ease-out; }
.asc-filtro.afx-tabs > button:hover { background: rgba(255,255,255,.06) !important; }
.asc-filtro.afx-tabs > button.on, .asc-filtro.afx-tabs > button[aria-pressed="true"] { background: transparent !important; color: var(--on-primary, #08090b) !important; }
.asc-filtro.afx-tabs > button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.afx-pill { position: absolute; top: 0; left: 0; z-index: -1; box-sizing: border-box; background: var(--primary); border-radius: 999px; pointer-events: none; transition: transform 340ms cubic-bezier(.23,1,.32,1), width 340ms cubic-bezier(.23,1,.32,1), height 240ms ease-out; }
.afx-pill[hidden] { display: none; }
.afx-spark { position: fixed; width: 3px; height: 9px; margin: -4px 0 0 -1px; border-radius: 2px; pointer-events: none; z-index: 2147483647; background: var(--primary); animation: afx-burst 460ms ease-out both; }
/* Palabra rotativa (11) en la cabecera de Ascensos. */
.afx-rota { margin: 14px 0 0; font: 700 clamp(1.4rem, 6vw, 2rem)/1.35 var(--font-display, sans-serif); color: var(--light, #f4f5f7); }
.afx-rota span { display: inline-block; color: var(--primary); }
.afx-rota span.cambia { animation: afx-sube 480ms cubic-bezier(.23,1,.32,1); }
@keyframes afx-sube { from { opacity: 0; transform: translateY(60%); } }
/* Borde en movimiento (7): solo en la acción principal. El ángulo animado requiere Safari 16.4; antes queda fijo. */
@property --afx-giro { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.portal-hero .hero-actions > .btn-access:first-child, .cupo-card [data-inscribir]:not(:disabled) { position: relative; }
.portal-hero .hero-actions > .btn-access:first-child::after, .cupo-card [data-inscribir]:not(:disabled)::after { content: ""; position: absolute; inset: -5px; padding: 2px; border-radius: 14px; pointer-events: none; background: conic-gradient(from var(--afx-giro), transparent 0 62%, var(--primary) 88%, transparent); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: afx-vuelta 2.8s linear infinite; }
@keyframes afx-vuelta { to { --afx-giro: 360deg; } }
/* Directorio de portales en celular: cuadrícula de logos en vez de una lista larga. */
@media (max-width: 600px) {
    #portalesEquipos[data-directorio]:not([hidden]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    #portalesEquipos[data-directorio] .asc-equipo-card { grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; gap: 8px; min-height: 108px; padding: 14px 6px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: #101214; text-align: center; }
    #portalesEquipos[data-directorio] .asc-equipo-card:active { border-color: var(--cat, var(--primary)); }
    #portalesEquipos[data-directorio] .asc-equipo-info small, #portalesEquipos[data-directorio] .asc-equipo-arrow { display: none; }
    #portalesEquipos[data-directorio] .asc-equipo-name { font-size: .7rem; line-height: 1.3; overflow-wrap: anywhere; }
}
/* Animate only after intersection; no hidden/pending state if JS or IO fails. */
@media (prefers-reduced-motion: no-preference) {
    .afx-reveal { animation: afx-arrive 420ms cubic-bezier(.16,1,.3,1) both; }
}
@keyframes afx-arrive { from { opacity: .65; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes afx-glint { to { transform: translateX(130%); } }
@keyframes afx-burst { from { opacity: 1; transform: rotate(var(--afx-angle)); } to { opacity: 0; transform: translate(var(--afx-dx), var(--afx-dy)) rotate(var(--afx-angle)) scale(.3); } }
@media (prefers-reduced-motion: reduce) {
    .afx-light, .afx-glare, .afx-spark { display: none; }
    .afx-pill { transition: none; }
    .afx-reveal { animation: none; }
    .afx-rota span.cambia, .portal-hero .hero-actions > .btn-access:first-child::after, .cupo-card [data-inscribir]:not(:disabled)::after { animation: none; }
}
