/* ==========================================================================
   Podcasts — barra de filtros en una fila + tarjetas con la ficha sobre la
   imagen. Clases nuevas (rba-pod-*) para no chocar con las viejas.
   ========================================================================== */

.rba-pod {
    --pod-red: #e30613;
    --pod-ink: #101114;
    --pod-line: #e1e2e5;
    --pod-gap: 18px;
    /* Las bandas a sangre de móvil se salen del .shell; clip evita el scroll
       horizontal sin romper position: sticky. */
    overflow-x: clip;
}

/* ---------- Encabezado ---------- */

.rba-pod-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 36px 40px;
    border-radius: 18px;
    background:
        radial-gradient(120% 160% at 100% 0, rgba(227, 6, 19, .35), transparent 58%),
        linear-gradient(135deg, #16171b, #0a0a0c);
    color: #fff;
}
.rba-pod-intro > div > span { color: #ff5a63; font-size: 10.5px; font-weight: 900; letter-spacing: .16em; }
.rba-pod-intro h1 { margin: 10px 0 8px; font-size: 44px; line-height: 1.02; letter-spacing: -.025em; }
.rba-pod-intro p { max-width: 560px; margin: 0; color: #b9bcc2; font-size: 14px; }
.rba-pod-intro-mark { color: rgba(255, 255, 255, .14); font-size: 92px; line-height: 1; }

.rba-pod-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 46px 0 16px;
}
.rba-pod-section-heading span { color: var(--pod-red); font-size: 10.5px; font-weight: 900; letter-spacing: .16em; }
.rba-pod-section-heading h2 { margin: 7px 0 0; font-size: 29px; letter-spacing: -.02em; }
.rba-pod-section-heading p { margin: 0; color: #6d7077; font-size: 13px; }

/* ---------- Barra de filtros (una sola fila) ---------- */

.rba-pod-bar {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    background: linear-gradient(180deg, #1a1b20, #0d0e11);
    box-shadow: 0 14px 34px rgba(16, 17, 20, .22), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* --- El desplegable --- */

.rba-pod-pick { position: relative; flex: 0 0 auto; }

.rba-pod-pick-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    height: 46px;
    padding: 0 16px 0 14px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    cursor: pointer;
    transition: background .18s, border-color .18s;
}
.rba-pod-pick-btn.is-on { border-color: rgba(227, 6, 19, .75); background: rgba(227, 6, 19, .18); }
@media (hover: hover) { .rba-pod-pick-btn:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .3); } }
.rba-pod-pick-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .34); }

/* Icono: tres barras decrecientes, como un control de ecualizador. */
.rba-pod-pick-ico {
    position: relative;
    flex: none;
    width: 17px;
    height: 13px;
}
.rba-pod-pick-ico::before,
.rba-pod-pick-ico::after {
    content: '';
    position: absolute;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}
.rba-pod-pick-ico::before { top: 0; width: 17px; box-shadow: 0 5px 0 0 currentColor; }
.rba-pod-pick-ico::after { bottom: 0; width: 8px; }

.rba-pod-pick-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
.rba-pod-pick-txt small { color: #9b9ea6; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rba-pod-pick-txt strong { max-width: 190px; overflow: hidden; font-size: 13.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.rba-pod-pick-chev { flex: none; width: 9px; height: 9px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.rba-pod-pick-btn[aria-expanded="true"] .rba-pod-pick-chev { transform: translateY(2px) rotate(-135deg); }

/* --- Panel del desplegable (escritorio: popover) --- */

.rba-pod-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 40;
    width: 330px;
    padding: 8px;
    border: 1px solid var(--pod-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 54px rgba(16, 17, 20, .22);
    animation: rbaPodIn .16s ease-out;
}
.rba-pod-panel[hidden] { display: none; }
@keyframes rbaPodIn { from { opacity: 0; transform: translateY(-6px); } }

.rba-pod-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 12px; }
.rba-pod-panel-head small { display: block; color: var(--pod-red); font-size: 9.5px; font-weight: 900; letter-spacing: .14em; }
.rba-pod-panel-head strong { font-size: 17px; letter-spacing: -.01em; }
.rba-pod-panel-x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f1f2f4; color: #4a4d54; cursor: pointer; font-size: 12px; }
@media (hover: hover) { .rba-pod-panel-x:hover { background: #e4e5e8; } }

.rba-pod-panel-list { max-height: 330px; margin: 0; padding: 0; overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.rba-pod-panel-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 11px;
    color: #2b2d32;
    font-size: 13.5px;
}
.rba-pod-panel-list b { flex: 1; min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.rba-pod-panel-list em {
    flex: none;
    min-width: 26px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f1f2f4;
    color: #6d7077;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    text-align: center;
}
.rba-pod-dot { flex: none; width: 7px; height: 7px; border: 2px solid #c9cbd0; border-radius: 50%; }
@media (hover: hover) { .rba-pod-panel-list a:hover { background: #f5f6f7; } }
.rba-pod-panel-list a.is-on { background: var(--pod-ink); color: #fff; }
.rba-pod-panel-list a.is-on .rba-pod-dot { border-color: var(--pod-red); background: var(--pod-red); }
.rba-pod-panel-list a.is-on em { background: rgba(255, 255, 255, .16); color: #fff; }
/* Al abrir el panel se enfoca la opción activa: el anillo azul del navegador
   desentona, lo reemplazamos por el rojo de la marca. */
.rba-pod-panel-list a:focus-visible,
.rba-pod-panel-x:focus-visible { outline: 2px solid var(--pod-red); outline-offset: -2px; }

/* --- Riel de accesos rápidos --- */

.rba-pod-rail {
    display: flex;
    gap: 7px;
    min-width: 0;
    flex: 1;
    padding: 2px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Difumina el corte cuando la lista sigue hacia la derecha. */
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
}
.rba-pod-rail::-webkit-scrollbar { display: none; }
.rba-pod-rail a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    color: #c9cbd0;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    scroll-snap-align: start;
    transition: background .18s, color .18s, border-color .18s;
}
.rba-pod-rail a i { padding: 2px 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #9b9ea6; font-size: 10.5px; font-style: normal; font-weight: 800; }
@media (hover: hover) { .rba-pod-rail a:hover { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: #fff; } }
.rba-pod-rail a.is-on { border-color: var(--pod-red); background: var(--pod-red); color: #fff; }
.rba-pod-rail a.is-on i { background: rgba(0, 0, 0, .22); color: #fff; }

.rba-pod-count { flex: 0 0 auto; margin: 0; padding-right: 14px; color: #8b8e95; font-size: 12px; white-space: nowrap; }
.rba-pod-count b { color: #fff; font-size: 13.5px; }

/* ---------- Tarjetas ---------- */

.rba-pod-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--pod-gap);
    margin-top: 22px;
}

.rba-pod-card {
    min-width: 0;
    border-radius: 16px;
    background: #0b0b0c;
    box-shadow: 0 2px 4px rgba(16, 17, 20, .08), 0 14px 30px rgba(16, 17, 20, .1);
}
.rba-pod-card > a {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border-radius: inherit;
    color: #fff;
    isolation: isolate;
}

.rba-pod-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
@media (hover: hover) { .rba-pod-card > a:hover .rba-pod-card-img { transform: scale(1.05); } }

/* El velo: transparente arriba para que la foto se siga viendo entera y
   opaco sólo donde apoya el texto. */
.rba-pod-card-copy {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 46px 17px 16px;
    background: linear-gradient(0deg, rgba(5, 5, 6, .95) 0%, rgba(5, 5, 6, .82) 34%, rgba(5, 5, 6, .45) 64%, rgba(5, 5, 6, 0) 100%);
}
.rba-pod-card-badge {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 9px;
    padding: 5px 9px;
    overflow: hidden;
    border-radius: 5px;
    background: var(--pod-red);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: .07em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: top;
}
.rba-pod-card-copy h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    margin: 0;
    overflow: hidden;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.26;
    letter-spacing: -.015em;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .55);
}
.rba-pod-card-copy p { display: flex; align-items: center; gap: 8px; margin: 9px 0 0; color: #c6c8cd; font-size: 11.5px; }
.rba-pod-card-copy p i { width: 3px; height: 3px; border-radius: 50%; background: #74777e; }
.rba-pod-card-copy p span { color: #ff7b83; font-weight: 800; }

.rba-pod-card-kind {
    position: absolute;
    top: 13px;
    left: 13px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 999px;
    background: rgba(10, 10, 12, .5);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.rba-pod-card-play {
    position: absolute;
    top: 13px;
    right: 13px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(10, 10, 12, .46);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
    transition: background .2s, transform .2s;
}
/* El triángulo, dibujado con bordes para no depender de una fuente. */
.rba-pod-card-play::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    border: 6px solid transparent;
    border-left: 10px solid #fff;
    transform: translate(-35%, -50%);
}
@media (hover: hover) { .rba-pod-card > a:hover .rba-pod-card-play { background: var(--pod-red); transform: scale(1.07); } }

.rba-pod-empty { grid-column: 1 / -1; padding: 46px 24px; border: 1px dashed var(--pod-line); border-radius: 16px; background: #fafafb; text-align: center; }
.rba-pod-empty strong { display: block; font-size: 16px; }
.rba-pod-empty p { margin: 7px 0 0; color: #6d7077; font-size: 13px; }

.rba-pod-pagination { margin-top: 26px; }

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 1024px) {
    .rba-pod-intro { padding: 30px 28px; }
    .rba-pod-intro h1 { font-size: 36px; }
    .rba-pod-intro-mark { font-size: 68px; }
    .rba-pod-section-heading { margin: 36px 0 14px; }
    .rba-pod-section-heading h2 { font-size: 25px; }
    .rba-pod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rba-pod-count { display: none; }
}

/* ==========================================================================
   Móvil y tablet angosta: se comporta como app
   ========================================================================== */

@media (max-width: 900px) {
    .rba-pod { --pod-gap: 14px; }

    .rba-pod-intro { flex-direction: column; align-items: flex-start; gap: 0; padding: 26px 22px 28px; border-radius: 20px; }
    .rba-pod-intro h1 { font-size: 30px; letter-spacing: -.03em; }
    .rba-pod-intro p { font-size: 13.5px; }
    .rba-pod-intro-mark { display: none; }

    .rba-pod-section-heading { flex-direction: column; align-items: flex-start; gap: 4px; margin: 28px 0 12px; }
    .rba-pod-section-heading h2 { font-size: 23px; }
    .rba-pod-section-heading p { display: none; }

    /* La barra se pega arriba al hacer scroll, como la de una app.
       El z-index tiene que superar al del velo: la barra abre un contexto de
       apilado propio y la hoja vive adentro, así que si la barra queda por
       debajo el velo la tapa por más z-index que tenga la hoja. */
    .rba-pod-bar {
        position: sticky;
        top: 8px;
        z-index: 45;
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px;
        border-radius: 18px;
    }
    .rba-pod-pick { flex: 1 1 100%; }
    .rba-pod-pick-btn { width: 100%; height: 48px; border-radius: 13px; }
    .rba-pod-pick-txt { flex: 1; min-width: 0; }
    .rba-pod-pick-txt strong { max-width: 100%; }
    .rba-pod-pick-chev { margin-left: auto; }

    .rba-pod-rail { flex: 1 1 100%; margin: 0 -8px -2px; padding: 0 8px 2px; }
    .rba-pod-rail a { height: 38px; padding: 0 13px; font-size: 12px; }
    .rba-pod-count { display: none; }

    /* El panel deja de ser popover y pasa a ser una hoja inferior. */
    .rba-pod-panel {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        max-height: 76vh;
        padding: 6px 10px calc(14px + env(safe-area-inset-bottom));
        border: 0;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, .3);
        animation: rbaPodSheet .22s cubic-bezier(.22, .68, .36, 1);
    }
    @keyframes rbaPodSheet { from { transform: translateY(100%); } }
    /* El tirador de la hoja. */
    .rba-pod-panel::before {
        content: '';
        display: block;
        width: 38px;
        height: 4px;
        margin: 8px auto 2px;
        border-radius: 999px;
        background: #d6d8dc;
    }
    .rba-pod-panel-head { padding: 8px 8px 12px; }
    .rba-pod-panel-head strong { font-size: 19px; }
    .rba-pod-panel-x { width: 34px; height: 34px; }
    .rba-pod-panel-list { max-height: 54vh; }
    .rba-pod-panel-list a { min-height: 52px; padding: 12px 10px; border-radius: 13px; font-size: 15px; }
    .rba-pod-panel-list a:active { background: #ececee; }
    .rba-pod-panel-list a.is-on:active { background: #000; }

    /* El velo que oscurece la página detrás de la hoja. */
    .rba-pod-scrim {
        position: fixed;
        inset: 0;
        z-index: 39;
        background: rgba(8, 8, 10, .46);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        animation: rbaPodFade .22s ease-out;
    }
    @keyframes rbaPodFade { from { opacity: 0; } }

    .rba-pod-grid { grid-template-columns: 1fr; margin-top: 16px; }
    .rba-pod-card { border-radius: 18px; }
    .rba-pod-card > a { aspect-ratio: 5 / 4; }
    .rba-pod-card > a:active { transform: scale(.985); transition: transform .1s; }
    .rba-pod-card-copy { padding: 54px 18px 18px; }
    .rba-pod-card-copy h3 { font-size: 20px; -webkit-line-clamp: 3; }
    .rba-pod-card-copy p { font-size: 12px; }
    .rba-pod-card-play { top: 14px; right: 14px; width: 46px; height: 46px; }
    .rba-pod-card-kind { top: 16px; left: 14px; }
}

/* En tablet angosta entran dos columnas y conviene una tarjeta menos alta. */
@media (min-width: 681px) and (max-width: 900px) {
    .rba-pod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rba-pod-card > a { aspect-ratio: 16 / 11; }
    .rba-pod-card-copy h3 { font-size: 17.5px; }
    .rba-pod-pick { flex: 0 0 auto; }
    .rba-pod-pick-btn { width: auto; min-width: 210px; }
    .rba-pod-rail { flex: 1 1 0; margin: 0; padding: 2px; }
    .rba-pod-panel { position: absolute; top: calc(100% + 10px); right: auto; bottom: auto; left: 0; width: 330px; max-height: none; padding: 8px; border: 1px solid var(--pod-line); border-radius: 16px; box-shadow: 0 24px 54px rgba(16, 17, 20, .22); animation: rbaPodIn .16s ease-out; }
    .rba-pod-panel::before { display: none; }
    .rba-pod-panel-list { max-height: 330px; }
    .rba-pod-scrim { display: none; }
}

@media (max-width: 600px) {
    .rba-pod-intro h1 { font-size: 27px; }
    .rba-pod-card > a { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
    .rba-pod-card-img,
    .rba-pod-card-play,
    .rba-pod-panel { transition: none; animation: none; }
}
