/* Sistema compartido para "Sección Azul" y "Conoce a nuestras voces".
   Misma anatomía en las dos bandas: una placa vertical 4:5 (foto o logotipo),
   debajo el nombre y una línea de apoyo. Escritorio: rejilla de 4. Móvil: riel
   horizontal con snap. Va al final de $pageStylesheet para ganar a
   index-fresh-content.css / index-fresh-mobile.css sin !important. */
/* Encabezado común: titulo a la izquierda, enlace a la derecha (layout.css lo
   deja en columna con align-items:flex-end y el titulo se iba al borde derecho). */
.home-main #seccion-azul .section-head,
.home-main #nuestras-voces .section-head {
    flex-direction: row;
    align-items: flex-end;
    margin-bottom: var(--space-6, 32px);
}

.home-main .roster {
    --roster-plate: var(--ps-surface-card, #f5f7fa);
    --roster-name: var(--ps-ink, #000);
    --roster-meta: var(--ps-mute-light, #6b6b6b);
    --roster-accent: var(--ps-link-light, #0064b7);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-7, 40px) var(--space-5, 24px);
    margin: 0;
    padding: 0;
    overflow: visible;
}

.home-main .ps-band--dark .roster {
    --roster-plate: #eef2f6;
    --roster-name: var(--ps-on-dark, #fff);
    --roster-meta: var(--ps-mute-dark, rgba(229, 229, 229, 0.7));
    --roster-accent: var(--ps-link-dark, #53b1ff);
}

.home-main .roster > a {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: auto;
    min-width: 0;
    color: var(--roster-name);
    text-decoration: none;
}

/* Placa: voces (foto a sangre) y aliados (logotipo centrado) comparten caja. */
.home-main .roster .roster-plate,
.home-main .roster .home-host-photo,
.home-main .roster .home-host-portrait {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    border: 0;
    border-radius: var(--ps-radius-lg, 16px);
    background: var(--roster-plate);
    overflow: hidden;
}

/* En App-radio el portrait envuelve a la foto: solo uno dibuja la caja. */
.home-main .roster .home-host-portrait .home-host-photo {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    border-radius: 0;
}

.home-main .roster .home-host-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s var(--ease-out, ease-out);
}

.home-main .roster .roster-plate img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 18% 16%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.6s var(--ease-out, ease-out);
}

/* Etiqueta de giro sobre la placa del aliado. */
.home-main .roster .roster-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    max-width: calc(100% - 24px);
    padding: 5px 10px;
    border-radius: var(--ps-radius-full, 999px);
    background: #fff;
    color: #1b3550;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.home-main .roster .roster-tag--featured {
    background: var(--ps-primary, #0070d1);
    color: #fff;
}

/* Indicador "En vivo" de las voces (App-radio) alineado con la etiqueta. */
.home-main .roster .home-host-live {
    top: 12px;
    right: auto;
    left: 12px;
}

.home-main .roster .roster-caption {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.home-main .roster strong {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--roster-name);
    overflow-wrap: anywhere;
}

.home-main .roster .roster-caption small,
.home-main .roster > a > span:not([class]),
.home-main .roster .home-host > span:last-child {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--roster-meta);
}

.home-main .roster .roster-caption small {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

/* Voces: nombre y rol van juntos, separados de la foto. */
.home-main .roster .home-host strong + span,
.home-main .roster .home-host > strong + span {
    margin-top: -10px;
}

/* Única respuesta al cursor: el nombre se subraya y la imagen se acerca. */
@media (hover: hover) and (pointer: fine) {
    .home-main .roster > a:hover strong,
    .home-main .roster > a:focus-visible strong {
        color: var(--roster-accent);
        text-decoration: underline;
        text-underline-offset: 4px;
        text-decoration-thickness: 1px;
    }
    .home-main .roster > a:hover .home-host-photo img,
    .home-main .roster > a:hover .roster-plate img {
        transform: scale(1.04);
    }
}

.home-main .roster > a:focus-visible {
    outline: 2px solid var(--roster-accent);
    outline-offset: 6px;
    border-radius: var(--ps-radius-lg, 16px);
}

/* Escritorio: una sola fila de 4 (igual que las voces); el resto va en el
   directorio. En móvil el riel muestra los 8. */
@media (min-width: 721px) {
    .home-main .roster--azul > a:nth-child(n + 5) { display: none; }
}

@media (max-width: 1024px) {
    .home-main .roster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Móvil: riel horizontal, la siguiente tarjeta asoma para invitar al gesto. */
@media (max-width: 720px) {
    .home-main .roster {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        margin-inline: -20px;
        padding-inline: 20px;
        padding-bottom: 4px;
        scrollbar-width: none;
        scroll-padding-inline: 20px;
    }
    .home-main .roster::-webkit-scrollbar { display: none; }
    .home-main .roster > a {
        flex: 0 0 62%;
        max-width: 240px;
        scroll-snap-align: start;
    }
    .home-main .roster strong { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .home-main .roster .home-host-photo img,
    .home-main .roster .roster-plate img { transition: none; }
}
