/* =============================================================================
   ISTUDY · PÁGINA PÚBLICA DE CURSOS «ESCAPARATE» (prefijo ise_)
   istudy_escaparate.php. Móvil primero, sin librerías (la misma maqueta que la
   página pública de Actividades de iSQUAD). El color de acento (--ise-acento)
   lo pone la página con el elegido por la federación.
   Formatos: .ise--tienda, .ise--rejilla, .ise--escaparate, .ise--lista.
   ========================================================================== */

:root {
    --ise-acento: #2563eb;
    --ise-acento-suave: #2563eb1f;
    --ise-acento-suave: color-mix(in srgb, var(--ise-acento) 12%, transparent);
    --ise-acento-oscuro: color-mix(in srgb, var(--ise-acento) 72%, #000);
    --ise-fondo: #f5f6fa;
    --ise-tarjeta: #ffffff;
    --ise-texto: #0f172a;
    --ise-suave: #64748b;
    --ise-borde: rgba(15, 23, 42, .08);
    --ise-sombra: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .07);
    --ise-sombra-alta: 0 2px 6px rgba(15, 23, 42, .08), 0 18px 44px rgba(15, 23, 42, .16);
    --ise-radio: 18px;
    --ise-abierta: #12b76a;
    --ise-pronto: #f59e0b;
    --ise-cerrada: #94a3b8;
    --ise-fuente: 'Syne', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --ise-fuente-texto: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --ise-ancho: 1240px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ise-fondo: #0b1020;
        --ise-tarjeta: #141a2e;
        --ise-texto: #e8ecf5;
        --ise-suave: #94a3b8;
        --ise-borde: rgba(255, 255, 255, .08);
        --ise-sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
        --ise-sombra-alta: 0 2px 6px rgba(0, 0, 0, .35), 0 20px 48px rgba(0, 0, 0, .5);
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.ise {
    margin: 0;
    min-height: 100vh;
    background: var(--ise-fondo);
    color: var(--ise-texto);
    font-family: var(--ise-fuente-texto);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: lining-nums;
}

:where(.ise) a { color: inherit; text-decoration: none; }
:where(.ise) :where(button, input, select) { font: inherit; color: inherit; }

/* ---------- Cabecera ---------------------------------------------------- */

.ise-cab {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--ise-acento);
    padding: 28px 16px 34px;
}
.ise-cab__fondo {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 55%),
        radial-gradient(90% 120% at 0% 100%, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, 0) 60%),
        linear-gradient(135deg, var(--ise-acento) 0%, var(--ise-acento-oscuro) 100%);
}
.ise-cab__fondo::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 38px solid rgba(255, 255, 255, .08);
}
.ise-cab__dentro { position: relative; max-width: var(--ise-ancho); margin: 0 auto; }
.ise-cab__fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.ise-cab__fed { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ise-cab__fed .ise-cab__nombre { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ise-cab__acceso {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff !important;
    font-family: var(--ise-fuente);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    transition: background .2s;
}
.ise-cab__acceso:hover { background: rgba(255, 255, 255, .26); }
.ise-cab__acceso svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ise-cab__escudo {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.ise-cab__escudo img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; background: #fff; z-index: 1; }
.ise-cab__ini { font-family: var(--ise-fuente); font-weight: 800; font-size: 17px; color: var(--ise-acento); }
.ise-cab__nombre { font-family: var(--ise-fuente); font-weight: 600; font-size: 15px; opacity: .95; }
.ise-cab__titulo {
    margin: 0;
    font-family: var(--ise-fuente);
    font-weight: 800;
    font-size: clamp(30px, 8vw, 56px);
    line-height: 1.02;
    letter-spacing: -.01em;
}
.ise-cab__sub { margin: 10px 0 0; max-width: 640px; font-size: clamp(15px, 3.6vw, 18px); opacity: .9; }

/* ---------- Barra de filtros -------------------------------------------- */

.ise-barra {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--ise-fondo) 86%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--ise-borde);
    padding: 12px 16px 8px;
}
.ise-barra__dentro { max-width: var(--ise-ancho); margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.ise-barra__chips { flex-direction: column; align-items: stretch; gap: 6px; margin-top: 10px; }

.ise-buscar {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--ise-tarjeta);
    box-shadow: inset 0 0 0 1px var(--ise-borde), 0 1px 2px rgba(15, 23, 42, .04);
    transition: box-shadow .2s;
}
.ise-buscar:focus-within { box-shadow: inset 0 0 0 2px var(--ise-acento), 0 0 0 4px var(--ise-acento-suave); }
.ise-buscar svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--ise-suave); stroke-width: 2; stroke-linecap: round; }
.ise-buscar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.ise-buscar input::placeholder { color: var(--ise-suave); }

.ise-orden { position: relative; flex: 0 0 auto; display: flex; align-items: center; }
.ise-orden span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ise-orden select {
    appearance: none;
    -webkit-appearance: none;
    height: 44px;
    max-width: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--ise-tarjeta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 4v16M7 20l-3-3M7 20l3-3M17 20V4M17 4l-3 3M17 4l3 3'/%3E%3C/svg%3E") center / 20px no-repeat;
    box-shadow: inset 0 0 0 1px var(--ise-borde);
    color: transparent;
    cursor: pointer;
}
.ise-orden select option { color: #0f172a; }

.ise-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0 4px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    scroll-padding: 16px;
}
.ise-chips::-webkit-scrollbar { display: none; }
.ise-chips:empty { display: none; }
.ise-chip[hidden], .ise-chips[hidden], .ise-barra__dentro[hidden] { display: none !important; }

/* Pestañas Cursos / Acreditaciones (solo si hay de las dos) */
.ise-barra__pestanas { margin-bottom: 10px; }
.ise-pestana {
    flex: 1 1 0;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--ise-borde);
    font-family: var(--ise-fuente);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
}
.ise-pestana small { margin-left: 4px; font-weight: 600; opacity: .6; }
.ise-pestana.is-on { background: var(--ise-texto); color: var(--ise-tarjeta); box-shadow: none; }
.ise-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--ise-tarjeta);
    box-shadow: inset 0 0 0 1px var(--ise-borde);
    font-family: var(--ise-fuente);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s, transform .15s;
}
.ise-chip:hover { box-shadow: inset 0 0 0 1px var(--ise-acento); }
.ise-chip:active { transform: scale(.97); }
.ise-chip.is-on { background: var(--ise-acento); color: #fff; box-shadow: none; }
.ise-chip small { font-weight: 600; opacity: .6; }
.ise-chips--tipos .ise-chip.is-on { background: var(--ise-texto); color: var(--ise-tarjeta); }

.ise-punto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ise-punto--abierta { background: var(--ise-abierta); }
.ise-punto--pronto { background: var(--ise-pronto); }
.ise-punto--cerrada { background: var(--ise-cerrada); }
.ise-chip.is-on .ise-punto { box-shadow: 0 0 0 2px #fff; }

/* ---------- Contenido ---------------------------------------------------- */

.ise-main { max-width: var(--ise-ancho); margin: 0 auto; padding: 14px 16px 40px; }
.ise-cuenta { margin: 0 0 12px; min-height: 20px; font-size: 13px; color: var(--ise-suave); }
.ise-cuenta button { border: 0; background: none; padding: 0; margin-left: 6px; color: var(--ise-acento); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.ise-pie { display: flex; flex-wrap: wrap; justify-content: center; text-align: center; gap: 2px 16px; padding: 24px 16px 36px; font-size: 13px; color: var(--ise-suave); }
.ise-pie__sep { opacity: .5; }

/* Imagen o marcador (para que la maqueta nunca se rompa) */
.ise-media { position: relative; overflow: hidden; background: var(--ise-acento-suave); }
.ise-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.ise-ph {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 12px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(150deg, hsl(var(--h, 220) 78% 58%) 0%, hsl(calc(var(--h, 220) + 38) 70% 38%) 100%);
}
.ise-ph::before {
    content: '';
    position: absolute;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 18px solid rgba(255, 255, 255, .09);
    right: -20%;
    bottom: -12%;
}
.ise-ph__ini { position: relative; font-family: var(--ise-fuente); font-weight: 800; font-size: 42px; line-height: 1; letter-spacing: -.02em; opacity: .95; }
.ise-ph__tipo { position: relative; font-family: var(--ise-fuente); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Etiquetas */
.ise-etq {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-family: var(--ise-fuente);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .02em;
    white-space: nowrap;
    background: rgba(255, 255, 255, .94);
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
}
.ise-etq::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ise-cerrada); }
.ise-etq--abierta::before { background: var(--ise-abierta); box-shadow: 0 0 0 3px rgba(18, 183, 106, .2); }
.ise-etq--pronto::before { background: var(--ise-pronto); }
.ise-precio {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--ise-texto);
    color: var(--ise-tarjeta);
    font-family: var(--ise-fuente);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}
.ise-precio--gratis { background: var(--ise-abierta); color: #fff; }
.ise-plazas { font-size: 12px; color: var(--ise-suave); white-space: nowrap; }
.ise-plazas--pocas { color: #dc6803; font-weight: 600; }
.ise-plazas--espera { color: var(--ise-acento); font-weight: 600; }

.ise-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--ise-acento);
    color: #fff !important;
    font-family: var(--ise-fuente);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: filter .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 6px 16px var(--ise-acento-suave);
}
.ise-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.ise-btn--claro { background: #fff; color: #0f172a !important; }
a:hover .ise-btn svg, .ise-btn:hover svg { transform: translateX(3px); }
.ise-btn:hover { filter: brightness(1.06); }

.ise-meta { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--ise-suave); }
.ise-meta li { display: flex; align-items: flex-start; gap: 7px; min-width: 0; }
.ise-meta svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ise-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ise-tipo { font-family: var(--ise-fuente); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ise-acento); }

/* Tarjeta base */
.ise-card { position: relative; display: block; border-radius: var(--ise-radio); background: var(--ise-tarjeta); box-shadow: var(--ise-sombra); overflow: hidden; transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; -webkit-tap-highlight-color: transparent; outline: none; }
.ise-card:hover, .ise-card:focus-visible { transform: translateY(-4px); box-shadow: var(--ise-sombra-alta); }
.ise-card:hover .ise-media img, .ise-card:focus-visible .ise-media img { transform: scale(1.05); }
.ise-card:focus-visible { box-shadow: 0 0 0 3px var(--ise-acento), var(--ise-sombra-alta); }
.ise-card.is-cerrada .ise-media { filter: grayscale(.55); }

/* Esqueletos de carga */
.ise-esq { position: relative; border-radius: var(--ise-radio); background: var(--ise-tarjeta); box-shadow: var(--ise-sombra); overflow: hidden; min-height: 300px; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.ise-esq span { display: block; height: 12px; margin: 0 16px; border-radius: 6px; background: var(--ise-borde); }
.ise-esq span:first-child { height: auto; flex: 1; margin: 0 0 6px; border-radius: 0; }
.ise-esq span:last-child { width: 45%; margin-bottom: 18px; }
.ise-esq::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: ise-brillo 1.3s infinite; }
@media (prefers-color-scheme: dark) { .ise-esq::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); } }
@keyframes ise-brillo { to { transform: translateX(100%); } }

/* Vacío y error */
.ise-vacio { grid-column: 1 / -1; padding: 56px 20px; text-align: center; color: var(--ise-suave); }
.ise-vacio__ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--ise-acento-suave); color: var(--ise-acento); }
.ise-vacio__ic svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ise-vacio strong { display: block; margin-bottom: 4px; font-family: var(--ise-fuente); font-size: 18px; color: var(--ise-texto); }
.ise-vacio button { margin-top: 16px; border: 0; cursor: pointer; }

/* Aparición */
.ise-entra { animation: ise-entra .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes ise-entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =========================================================================
   FORMATO «TIENDA»: mosaico con piezas alta (1:2), cuadrada y apaisada
   ========================================================================= */

.ise-lista--tienda { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; grid-auto-flow: dense; gap: 10px; }
.ise-lista--tienda .ise-esq { min-height: 0; }
.ise-lista--tienda .ise-esq--0 { grid-row: span 2; }
.ise-lista--tienda .ise-esq--3 { grid-column: span 2; }
.ise-pieza { height: 100%; }
.ise-pieza--alta { grid-row: span 2; }
.ise-pieza--apaisada { grid-column: span 2; }
.ise-pieza .ise-media { position: absolute; inset: 0; }
.ise-pieza .ise-media img { object-position: center 35%; }
.ise-pieza__velo { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .78) 100%); pointer-events: none; }
.ise-pieza__arriba { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px; }
.ise-pieza__arriba .ise-precio { background: rgba(255, 255, 255, .94); color: #0f172a; box-shadow: 0 2px 8px rgba(15, 23, 42, .12); }
.ise-pieza__arriba .ise-precio--gratis { background: var(--ise-abierta); color: #fff; }
.ise-pieza__abajo { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; color: #fff; }
.ise-pieza__tipo { font-family: var(--ise-fuente); font-weight: 700; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.ise-pieza__nombre { margin: 2px 0 0; font-family: var(--ise-fuente); font-weight: 700; font-size: 15px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.ise-pieza--alta .ise-pieza__nombre { font-size: 17px; }
.ise-pieza__fecha { margin-top: 4px; font-size: 12px; opacity: .88; }
.ise-pieza__ir { display: flex; align-items: center; gap: 6px; max-height: 0; opacity: 0; overflow: hidden; margin-top: 0; font-family: var(--ise-fuente); font-weight: 700; font-size: 13px; transition: max-height .3s, opacity .3s, margin .3s; }
.ise-pieza__ir svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ise-pieza:hover .ise-pieza__ir, .ise-pieza:focus-visible .ise-pieza__ir { max-height: 24px; opacity: 1; margin-top: 8px; }
.ise-pieza .ise-etq { height: 22px; font-size: 10px; padding: 0 8px; }
.ise-pieza--cuadrada .ise-pieza__fecha { display: none; }

@media (min-width: 640px) {
    .ise-lista--tienda { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 180px; gap: 14px; }
    .ise-pieza--cuadrada .ise-pieza__fecha { display: block; }
}
@media (min-width: 960px) { .ise-lista--tienda { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 16px; } }
@media (min-width: 1200px) { .ise-lista--tienda { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (hover: none) { .ise-pieza--alta .ise-pieza__ir, .ise-pieza--apaisada .ise-pieza__ir { max-height: 24px; opacity: 1; margin-top: 8px; } }

/* =========================================================================
   FORMATO «REJILLA»: tarjetas iguales con la imagen apaisada arriba
   ========================================================================= */

.ise-lista--rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.ise-tarjeta { display: flex; flex-direction: column; }
.ise-tarjeta .ise-media { aspect-ratio: 16 / 10; }
.ise-tarjeta__arriba { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 6px; }
.ise-tarjeta__cuerpo { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 18px; }
.ise-tarjeta__nombre { margin: 0; font-family: var(--ise-fuente); font-weight: 700; font-size: 18px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ise-tarjeta__desc { margin: 0; font-size: 13.5px; color: var(--ise-suave); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Pie: precio y plazas a la izquierda, botón a la derecha; si no caben en
   una línea, el botón baja a la siguiente a todo el ancho (nunca se montan) */
.ise-tarjeta__pie { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--ise-borde); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ise-tarjeta__precio { flex: 999 1 auto; display: flex; flex-direction: column; gap: 2px; }
.ise-tarjeta__pie .ise-btn { flex: 1 0 auto; }
.ise-tarjeta__cuerpo { container-type: inline-size; }
@container (max-width: 290px) { .ise-tarjeta__pie .ise-btn { flex-basis: 100%; } }
.ise-tarjeta__precio strong { font-family: var(--ise-fuente); font-weight: 800; font-size: 20px; line-height: 1; }
.ise-tarjeta__precio strong.is-gratis { color: var(--ise-abierta); }
.ise-tarjeta .ise-btn { height: 40px; padding: 0 16px; font-size: 13px; }
.ise-lista--rejilla .ise-esq { min-height: 360px; }

/* =========================================================================
   FORMATO «ESCAPARATE»: la próxima abierta en grande y filas por grupo
   ========================================================================= */

.ise-lista--escaparate { display: flex; flex-direction: column; gap: 30px; }
.ise-lista--escaparate .ise-esq { min-height: 240px; }
.ise-lista--escaparate .ise-esq:nth-child(n+3) { display: none; }

.ise-hero { position: relative; display: block; border-radius: 26px; overflow: hidden; color: #fff; background: #0f172a; box-shadow: var(--ise-sombra-alta); isolation: isolate; }
.ise-hero__fondo { position: absolute; inset: -30px; z-index: -2; background-size: cover; background-position: center; filter: blur(28px) saturate(1.3); transform: scale(1.1); opacity: .85; }
.ise-hero__fondo--ph { filter: none; inset: 0; transform: none; opacity: 1; background: linear-gradient(135deg, var(--ise-acento) 0%, var(--ise-acento-oscuro) 100%); }
.ise-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 10, 25, .82) 0%, rgba(5, 10, 25, .55) 60%, rgba(5, 10, 25, .3) 100%); }
.ise-hero__dentro { display: flex; gap: 18px; align-items: center; padding: 18px; }
.ise-hero__poster { flex: 0 0 auto; width: 112px; aspect-ratio: 1 / 2; border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); transform: rotate(-2deg); transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.ise-hero:hover .ise-hero__poster { transform: rotate(0) scale(1.03); }
.ise-hero__txt { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ise-hero__sobre { font-family: var(--ise-fuente); font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.ise-hero__nombre { margin: 0; font-family: var(--ise-fuente); font-weight: 800; font-size: clamp(22px, 6vw, 44px); line-height: 1.05; }
.ise-hero__desc { margin: 0; max-width: 560px; font-size: 14px; opacity: .85; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ise-hero .ise-meta { color: rgba(255, 255, 255, .85); }
.ise-hero__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.ise-hero .ise-precio { background: rgba(255, 255, 255, .16); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ise-hero .ise-precio--gratis { background: var(--ise-abierta); }
@media (max-width: 479px) { .ise-hero__desc { display: none; } .ise-hero .ise-btn { height: 38px; padding: 0 14px; font-size: 13px; } }
@media (min-width: 720px) {
    .ise-hero__dentro { padding: 30px 36px; gap: 36px; }
    .ise-hero__poster { width: 190px; }
}

.ise-carril__cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ise-carril__tit { margin: 0; font-family: var(--ise-fuente); font-weight: 800; font-size: 21px; line-height: 1.1; }
.ise-carril__tit small { display: block; margin-top: 3px; font-family: var(--ise-fuente-texto); font-weight: 400; font-size: 13px; color: var(--ise-suave); }
.ise-carril__flechas { display: none; gap: 8px; }
.ise-carril__flechas button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ise-tarjeta); box-shadow: var(--ise-sombra); display: grid; place-items: center; cursor: pointer; transition: transform .15s, opacity .2s; }
.ise-carril__flechas button:hover { transform: scale(1.06); }
.ise-carril__flechas button:disabled { opacity: .35; cursor: default; transform: none; }
.ise-carril__flechas svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (min-width: 720px) { .ise-carril__flechas { display: flex; } }
.ise-carril__pista { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 16px; scroll-padding: 16px; }
.ise-carril__pista::-webkit-scrollbar { display: none; }
.ise-poster { flex: 0 0 auto; width: 150px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; outline: none; -webkit-tap-highlight-color: transparent; }
.ise-poster .ise-media { aspect-ratio: 1 / 2; border-radius: 16px; box-shadow: var(--ise-sombra); transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; }
.ise-poster:hover .ise-media, .ise-poster:focus-visible .ise-media { transform: translateY(-4px); box-shadow: var(--ise-sombra-alta); }
.ise-poster:hover .ise-media img { transform: scale(1.05); }
.ise-poster:focus-visible .ise-media { box-shadow: 0 0 0 3px var(--ise-acento), var(--ise-sombra-alta); }
.ise-poster .ise-etq { position: absolute; top: 8px; left: 8px; height: 22px; font-size: 10px; padding: 0 8px; }
.ise-poster.is-cerrada .ise-media { filter: grayscale(.55); }
.ise-poster__nombre { margin: 0; font-family: var(--ise-fuente); font-weight: 700; font-size: 14px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ise-poster__linea { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 6px; font-size: 12px; color: var(--ise-suave); }
.ise-poster__linea b { font-family: var(--ise-fuente); font-weight: 700; color: var(--ise-texto); white-space: nowrap; }
.ise-poster__linea b.is-gratis { color: var(--ise-abierta); }
@media (min-width: 720px) { .ise-poster { width: 178px; } }

/* =========================================================================
   FORMATO «LISTA»: filas miniatura · título · subtítulo · flecha
   ========================================================================= */

.ise-lista--lista { background: var(--ise-tarjeta); border-radius: var(--ise-radio); box-shadow: var(--ise-sombra); overflow: hidden; }
.ise-lista--lista .ise-esq { min-height: 76px; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--ise-borde); }
.ise-lista--lista .ise-esq span:first-child { display: none; }
.ise-lista--lista .ise-esq span { margin-left: 88px; }
.ise-lista--lista .ise-esq span:nth-child(2) { margin-top: 20px; width: 50%; }
.ise-lista--lista .ise-esq span:last-child { margin-bottom: 20px; width: 30%; }
.ise-fila { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--ise-borde); transition: background .2s; outline: none; -webkit-tap-highlight-color: transparent; }
.ise-fila:last-child { border-bottom: 0; }
.ise-fila:hover, .ise-fila:focus-visible { background: var(--ise-acento-suave); }
.ise-fila .ise-media { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 14px; }
.ise-fila .ise-ph__ini { font-size: 20px; }
.ise-fila .ise-ph__tipo, .ise-fila .ise-ph::before { display: none; }
.ise-fila.is-cerrada .ise-media { filter: grayscale(.55); }
.ise-fila__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ise-fila__nombre { margin: 0; font-family: var(--ise-fuente); font-weight: 700; font-size: 15.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ise-fila__sub { font-size: 13px; color: var(--ise-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ise-fila__lado { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; white-space: nowrap; }
.ise-fila__lado .ise-etq { box-shadow: none; background: var(--ise-fondo); height: 22px; font-size: 10.5px; }
.ise-fila__precio { font-family: var(--ise-fuente); font-weight: 800; font-size: 15px; }
.ise-fila__precio.is-gratis { color: var(--ise-abierta); }
.ise-fila__flecha { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ise-acento-suave); color: var(--ise-acento); transition: transform .2s, background .2s, color .2s; }
.ise-fila__flecha svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ise-fila:hover .ise-fila__flecha { transform: translateX(3px); background: var(--ise-acento); color: #fff; }
@media (max-width: 479px) {
    .ise-fila { gap: 12px; padding: 12px; }
    .ise-fila .ise-media { width: 52px; height: 52px; border-radius: 12px; }
    .ise-fila__lado .ise-etq { display: none; }
    .ise-fila__flecha { display: none; }
}
@media (min-width: 720px) { .ise-fila { padding: 14px 20px; } .ise-fila .ise-media { width: 64px; height: 64px; } }

/* Pantallas anchas */
@media (min-width: 720px) {
    .ise-cab { padding: 40px 24px 52px; }
    .ise-barra { padding: 14px 24px 8px; }
    .ise-barra__chips { flex-direction: row; align-items: center; gap: 14px; }
    .ise-chips { margin: 0; padding-left: 0; padding-right: 0; }
    .ise-chips--tipos { flex: 1; min-width: 0; }
    .ise-main { padding: 20px 24px 56px; }
    .ise-orden select { max-width: none; padding: 0 40px 0 16px; color: var(--ise-texto); font-size: 14px; font-weight: 500; background-position: right 14px center; background-size: 18px; }
    .ise-carril__pista { margin: 0 -24px; padding-left: 24px; padding-right: 24px; scroll-padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .ise *, .ise *::before, .ise *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =========================================================================
   PIEZAS PROPIAS DE LOS CURSOS
   ========================================================================= */

/* Fechas con su rótulo (Inscripción / Curso) */
.ise-meta b { font-weight: 600; color: var(--ise-texto); margin-right: 4px; }
.ise-hero .ise-meta b { color: #fff; }
.ise-modalidad { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--ise-acento-suave); color: var(--ise-acento); font-family: var(--ise-fuente); font-weight: 700; font-size: 10.5px; letter-spacing: .03em; white-space: nowrap; }
.ise-tarjeta__tipos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.ise-tarjeta__tipos .ise-tipo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ise-tarjeta__fed { font-size: 12.5px; color: var(--ise-suave); }

/* En la tienda, el marcador sin imagen es una marca de agua: nunca se monta con el nombre */
.ise-pieza .ise-ph { justify-content: flex-start; padding-top: 22%; }
.ise-pieza .ise-ph__ini { font-size: 72px; opacity: .2; }
.ise-pieza .ise-ph__tipo { display: none; }
.ise-pieza__tipo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* En la portada del escaparate los datos ocupan el ancho que hay y, si no caben, bajan de línea */
.ise-hero__txt { flex: 1 1 auto; }
.ise-hero__txt > .ise-meta { align-self: stretch; min-width: 0; }
.ise-hero .ise-meta span { white-space: normal; }

/* Lista: los nombres de curso son largos, dos líneas antes de cortar */
.ise-fila__nombre { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 479px) { .ise-fila__precio { font-size: 14px; } }
