/* Listado de cursos (cursos/listado.php), diseño «Escaparate» (docs/mockups/listado-variantes.html, variante 1):
   cabecera con la foto del área bajo el velo azul de la ficha, subcategorías en píldoras sobre una tarjeta de cristal,
   barra fija con buscador, créditos y orden, y rejilla de tarjetas con foto. */
.lst { --l-azul:#0d1a2a; --l-azul-medio:#24364d; --l-suave:#eef2f7; --l-linea:#e4e8ee; --l-texto-2:#5d6673; --l-texto-3:#7a828e;
  --l-sombra-1:0 1px 2px rgba(13,26,42,.06), 0 4px 14px -6px rgba(13,26,42,.14); --l-sombra-2:0 2px 4px rgba(13,26,42,.06), 0 18px 40px -18px rgba(13,26,42,.35);
  --l-ease:cubic-bezier(.2,.7,.2,1);
  padding-bottom:56px; background:#f3f5f8; }
.lst .ico { width:16px; height:16px; flex:none; }

/* Cabecera */
.lst-hero { position:relative; isolation:isolate; color:#fff; padding:44px 0 92px; background:#173457 var(--foto) center 35% / cover no-repeat; }
.lst-hero::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(to right, rgba(17,38,64,.96) 0%, rgba(17,38,64,.90) 40%, rgba(36,84,150,.78) 78%, rgba(36,84,150,.68) 100%); }
.lst-migas { font-size:13.5px; color:rgba(255,255,255,.82); } .lst-migas a { color:#fff; text-decoration:none; } .lst-migas a:hover { text-decoration:underline; }
.lst-hero-fila { display:flex; justify-content:space-between; align-items:flex-end; gap:30px; margin-top:14px; }
.lst-hero h1 { margin:0; color:#fff; font-size:clamp(30px, 3.8vw, 50px); line-height:1.08; letter-spacing:-1px; text-shadow:0 1px 2px rgba(0,0,0,.25); }
.lst-hero p { margin:12px 0 0; max-width:640px; font-size:17px; color:rgba(255,255,255,.88); }
.lst-datos { display:flex; gap:10px; margin-top:22px; flex-wrap:wrap; }
.lst-dato { display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border-radius:999px; background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.22); font-size:14px; font-weight:600; }
.lst-sello { display:flex; flex-direction:column; align-items:flex-end; gap:8px; flex:none; }
.lst-sello small { font-size:11px; letter-spacing:.1em; text-transform:uppercase; font-weight:600; color:rgba(255,255,255,.75); }
.lst-sello img { height:44px; width:auto; filter:drop-shadow(0 2px 6px rgba(0,0,0,.35)); }

/* Subcategorías: tarjeta de cristal que monta sobre la cabecera */
.lst-subs { position:relative; z-index:2; margin-top:-58px; }
.lst-subs-caja { background:rgba(255,255,255,.94); border:1px solid #fff; border-radius:20px; box-shadow:var(--l-sombra-2); padding:16px 16px 14px; }
.lst-subs-tit { font-size:12px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--l-texto-3); margin:0 4px 10px; }
.lst-pildoras { display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; padding:2px; scroll-snap-type:x proximity; } .lst-pildoras::-webkit-scrollbar { display:none; }
.lst-pildora { scroll-snap-align:start; flex:none; display:inline-flex; align-items:center; gap:8px; min-height:42px; padding:0 14px 0 6px; border-radius:999px; border:1px solid var(--l-linea); background:#fff; font-size:14px; font-weight:600; color:var(--l-azul-medio); white-space:nowrap; text-decoration:none; transition:border-color .15s, background .15s, color .15s; }
.lst-pildora.sin-foto { padding-left:14px; }
.lst-pildora img { width:30px; height:30px; border-radius:50%; object-fit:cover; }
.lst-pildora .n { font-size:12px; font-weight:700; color:var(--l-texto-3); background:var(--l-suave); padding:2px 7px; border-radius:999px; }
.lst-pildora:hover { border-color:var(--acento); color:var(--acento); }
.lst-pildora[aria-current] { background:var(--l-azul); border-color:var(--l-azul); color:#fff; } .lst-pildora[aria-current] .n { background:rgba(255,255,255,.18); color:#fff; }

/* Barra de herramientas fija */
/* En los listados el menú superior no se queda fijo (como en la ficha): la que se pega arriba es esta barra, y al pegarse
   enseña la franja con el título del listado sobre la foto y el velo azul. El menú sigue siendo relative para sus paneles. */
body:has(.lst-barra) .mm { position:relative; top:auto; }
.lst-barra { position:sticky; top:0; z-index:40; margin-top:22px; background:rgba(243,245,248,.92); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); transition:box-shadow .2s ease; }
.lst-barra.sin-subs { margin-top:-46px; background:transparent; -webkit-backdrop-filter:none; backdrop-filter:none; }
.lst-barra.es-fija { background:rgba(243,245,248,.92); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); border-bottom:1px solid rgba(13,26,42,.08); box-shadow:0 8px 24px -12px rgba(13,26,42,.35); }
.lst-barra-franja { display:none; position:relative; overflow:hidden; color:#fff; background:#173457 var(--foto, none) center 35% / cover no-repeat; }
.lst-barra-franja::before { content:""; position:absolute; inset:0; background:linear-gradient(to right, rgba(17,38,64,.96) 0%, rgba(17,38,64,.90) 40%, rgba(36,84,150,.78) 78%, rgba(36,84,150,.68) 100%); }
.lst-barra.es-fija .lst-barra-franja { display:block; }
.lst-barra-franja .web-inner { position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:20px; padding-top:8px; padding-bottom:8px; }
.lst-barra-nombre { font-weight:700; font-size:15.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 1px 2px rgba(0,0,0,.25); }
.lst-barra-franja img { height:30px; width:auto; flex:none; filter:drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
.lst-barra form { display:flex; gap:12px; align-items:center; flex-wrap:wrap; padding-top:12px; padding-bottom:12px; }
.lst-barra.es-fija form { padding-top:8px; padding-bottom:8px; }
/* El buscador ocupa el ancho libre, a la izquierda; los filtros (créditos y orden) y el recuento van agrupados a la derecha para que no se confundan con él */
.lst-buscar { position:relative; flex:1 1 320px; max-width:680px; margin-right:auto; }
.lst-buscar .ico { position:absolute; left:14px; top:50%; transform:translateY(-50%); width:18px; height:18px; color:var(--l-texto-3); pointer-events:none; }
.lst-buscar input { width:100%; height:46px; padding:0 14px 0 42px; border-radius:12px; border:1px solid var(--l-linea); background:#fff; font:inherit; font-size:15px; color:var(--l-azul); box-sizing:border-box; transition:border-color .15s, box-shadow .15s; }
.lst-buscar input:focus { outline:none; border-color:var(--acento); box-shadow:0 0 0 4px rgba(47,111,222,.15); }
.lst-seg-caja { display:flex; align-items:center; gap:8px; order:2; }
.lst-seg-tit { font-size:13px; color:var(--l-texto-3); font-weight:600; }
.lst-seg { display:inline-flex; padding:4px; gap:2px; background:#fff; border:1px solid var(--l-linea); border-radius:12px; }
.lst-seg a { min-width:44px; height:36px; padding:0 10px; display:inline-flex; align-items:center; justify-content:center; border-radius:8px; font-size:14px; font-weight:600; color:var(--l-texto-2); text-decoration:none; transition:background .15s, color .15s; }
.lst-seg a:hover { color:var(--l-azul); }
.lst-seg a[aria-current] { background:var(--l-azul); color:#fff; }
.lst-orden { order:4; } .lst-orden { height:46px; padding:0 36px 0 14px; border-radius:12px; border:1px solid var(--l-linea); background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2324364d' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance:none; appearance:none; font:inherit; font-size:14.5px; color:var(--l-azul); cursor:pointer; }
.lst-cuenta { order:3; font-size:14.5px; color:var(--l-texto-2); } .lst-cuenta b { color:var(--l-azul); }

/* Rejilla y tarjetas */
.lst-cuerpo { padding-top:10px; }
.lst-rejilla { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:24px; }
.lst-tarjeta { position:relative; display:flex; flex-direction:column; background:#fff; border-radius:20px; overflow:hidden; border:1px solid rgba(13,26,42,.06); box-shadow:var(--l-sombra-1); transition:transform .28s var(--l-ease), box-shadow .28s var(--l-ease); }
.lst-tarjeta:hover { transform:translateY(-4px); box-shadow:var(--l-sombra-2); }
.lst-foto { position:relative; aspect-ratio:3/2; overflow:hidden; background:var(--l-suave); }
.lst-foto img { width:100%; height:100%; object-fit:cover; transition:transform .6s var(--l-ease); }
.lst-tarjeta:hover .lst-foto img { transform:scale(1.05); }
.lst-foto::after { content:""; position:absolute; inset:auto 0 0 0; height:55%; background:linear-gradient(to top, rgba(13,26,42,.55), rgba(13,26,42,0)); pointer-events:none; }
.lst-ects { position:absolute; top:12px; left:12px; z-index:1; display:inline-flex; align-items:center; gap:6px; padding:6px 11px; border-radius:999px; background:rgba(255,255,255,.94); font-size:13px; font-weight:700; color:var(--l-azul); box-shadow:0 4px 12px -4px rgba(0,0,0,.3); }
.lst-ambito { position:absolute; left:14px; right:14px; bottom:12px; z-index:1; color:#fff; font-size:12.5px; font-weight:600; letter-spacing:.02em; text-shadow:0 1px 2px rgba(0,0,0,.45); }
.lst-cuerpo-t { display:flex; flex-direction:column; gap:12px; padding:18px 20px 20px; flex:1; }
.lst-titulo { margin:0; font-size:17px; line-height:1.35; font-weight:700; letter-spacing:-.1px; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.lst-titulo a { color:var(--l-azul); text-decoration:none; }
.lst-titulo a::after { content:""; position:absolute; inset:0; z-index:2; border-radius:inherit; }   /* toda la tarjeta enlaza a la ficha */
.lst-titulo a:focus-visible { outline:none; } .lst-tarjeta:has(.lst-titulo a:focus-visible) { outline:3px solid var(--acento); outline-offset:3px; }
.lst-meta { display:flex; gap:14px; flex-wrap:wrap; font-size:13.5px; color:var(--l-texto-2); } .lst-meta span { display:inline-flex; align-items:center; gap:6px; } .lst-meta .ico { color:var(--acento); }
.lst-pie { margin-top:auto; display:flex; align-items:center; justify-content:space-between; padding-top:14px; border-top:1px solid var(--l-linea); }
.lst-precio { font-size:26px; font-weight:700; letter-spacing:-.4px; color:var(--l-azul); }
.lst-ver { display:inline-flex; align-items:center; gap:6px; font-weight:700; font-size:14.5px; color:var(--acento); }
.lst-ver .ico { transition:transform .2s var(--l-ease); } .lst-tarjeta:hover .lst-ver .ico { transform:translateX(4px); }
.lst-vacio { padding:56px 20px; text-align:center; color:var(--l-texto-2); background:#fff; border-radius:20px; border:1px solid var(--l-linea); }
.lst-vacio strong { display:block; color:var(--l-azul); font-size:18px; margin-bottom:6px; }

/* Paginación */
.lst-paginas { display:flex; justify-content:center; align-items:center; gap:6px; margin:36px 0 0; flex-wrap:wrap; }
.lst-paginas a, .lst-paginas span { min-width:42px; height:42px; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:0 12px; border-radius:10px; font-weight:600; font-size:14.5px; color:var(--l-azul-medio); background:#fff; border:1px solid var(--l-linea); text-decoration:none; box-sizing:border-box; }
.lst-paginas a:hover { border-color:var(--acento); color:var(--acento); }
.lst-paginas .act { background:var(--l-azul); color:#fff; border-color:var(--l-azul); }
.lst-paginas .pto { background:none; border:0; min-width:20px; padding:0; }

@media (max-width:1100px) { .lst-rejilla { grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:760px) {
  .lst-hero { padding:26px 0 80px; } /* En móvil el sello de la universidad va debajo del título: el bloque del título se deshace (display:contents) para poder ordenar título, sello, lema y datos */
  .lst-hero-fila { flex-direction:column; align-items:flex-start; gap:0; } .lst-hero-fila > div:first-child { display:contents; }
  .lst-hero h1 { order:1; } .lst-sello { order:2; align-items:flex-start; margin-top:16px; } .lst-hero p { order:3; margin-top:16px; } .lst-datos { order:4; } .lst-sello img { height:34px; }
  .lst-hero p { font-size:15.5px; }
  .lst-barra-franja .web-inner { gap:12px; padding-top:6px; padding-bottom:6px; } .lst-barra-nombre { font-size:14px; } .lst-barra-franja img { height:22px; }
  .lst-buscar { max-width:none; flex-basis:100%; margin-right:0; } .lst-cuenta { margin-right:auto; } .lst-seg-caja { max-width:100%; overflow-x:auto; } .lst-seg-tit { display:none; }
  .lst-orden { flex:1; } .lst-rejilla { grid-template-columns:1fr; gap:16px; }
}
@media (prefers-reduced-motion: reduce) { .lst-tarjeta, .lst-foto img, .lst-ver .ico { transition:none; } .lst-tarjeta:hover { transform:none; } .lst-tarjeta:hover .lst-foto img { transform:none; } }

/* Flechas de las subcategorías (solo aparecen si quedan píldoras ocultas por ese lado) con un difuminado en el borde */
.lst-marco { position:relative; }
.lst-marco::before, .lst-marco::after { content:""; position:absolute; top:0; bottom:0; width:56px; z-index:1; pointer-events:none; opacity:0; transition:opacity .2s; }
.lst-marco::before { left:0; background:linear-gradient(to right, rgba(255,255,255,.98) 30%, rgba(255,255,255,0)); }
.lst-marco::after { right:0; background:linear-gradient(to left, rgba(255,255,255,.98) 30%, rgba(255,255,255,0)); }
.lst-marco.hay-izq::before, .lst-marco.hay-der::after { opacity:1; }
.lst-flecha { position:absolute; top:50%; z-index:2; width:38px; height:38px; margin-top:-19px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; border:1px solid var(--l-linea); background:#fff; color:var(--l-azul); box-shadow:0 4px 12px -4px rgba(13,26,42,.35); cursor:pointer; transition:border-color .15s, color .15s; }
.lst-flecha:hover { border-color:var(--acento); color:var(--acento); }
.lst-flecha:focus-visible { outline:3px solid var(--acento); outline-offset:2px; }
.lst-flecha[hidden] { display:none; }
.lst-flecha-izq { left:-4px; } .lst-flecha-der { right:-4px; }
.lst-flecha .ico { width:18px; height:18px; }
@media (hover:none) and (max-width:760px) { .lst-flecha { display:none; } }   /* en el móvil se desliza con el dedo */
.lst-cuerpo.cargando { opacity:.55; transition:opacity .15s; }
.lst-quitar { color:var(--acento); font-weight:600; text-decoration:none; } .lst-quitar:hover { text-decoration:underline; }
