/* Video Reel — Frontend */

/* ── Reel individual ─────────────────────────────── */
.vr-container {
    max-width: 315px;
    width: 100%;
    margin: 0 auto;
}

/* ── Rejilla de reels ────────────────────────────── */
.vr-grid-section {
    width: 100%;
    display: flex;
    justify-content: var( --vr-justify, center );
    box-sizing: border-box;
}

.vr-grid-section.vr-grid-full {
    display: block;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

.vr-grid {
    display: grid;
    grid-template-columns: repeat( var( --vr-grid-cols, 3 ), minmax( 0, 315px ) );
    gap: 24px;
}

.vr-grid-section.vr-grid-full .vr-grid {
    grid-template-columns: repeat( var( --vr-grid-cols, 3 ), minmax( 0, 315px ) );
    justify-content: center;
    margin: 0 auto;
}

/* Cada celda ocupa el 100% de su columna y mantiene ratio 9:16 */
.vr-grid-item {
    width: 100%;
}

@media ( max-width: 720px ) {
    .vr-grid {
        grid-template-columns: repeat( 2, minmax( 0, 315px ) );
    }
}

@media ( max-width: 420px ) {
    .vr-grid {
        grid-template-columns: minmax( 0, 315px );
    }
}

.vr-wrapper {
    position: relative;
    padding-bottom: 177.78%; /* ratio 9:16 */
    height: 0;
    overflow: hidden;
    border-radius: 14px;
    background: #000;
}

/* ── Poster (thumbnail + play button) ─── */
.vr-poster {
    position: absolute;
    inset: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vr-poster-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.vr-poster:hover .vr-poster-img {
    transform: scale(1.03);
}

/* Overlay oscuro al hacer hover */
.vr-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .18);
    opacity: 0;
    transition: opacity .25s;
    z-index: 1;
    border-radius: 14px;
}

.vr-poster:hover::before {
    opacity: 1;
}

/* ── Título sobre el poster ──────────────── */
.vr-poster-title {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    padding: 0 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
    text-shadow: 0 1px 6px rgba(0,0,0,.7), 0 0 20px rgba(0,0,0,.4);
    z-index: 2;
    pointer-events: none;
}

/* ── Botón de play ───────────────────────── */
.vr-play-btn {
    color: var( --vr-play, #29abe2 ); /* circle fill via currentColor en el SVG */
    position: relative;
    z-index: 2;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.35));
}

.vr-play-btn:hover {
    transform: scale(1.1);
}

.vr-play-btn:active {
    transform: scale(.96);
}

.vr-play-icon {
    width: 72px;
    height: 72px;
    display: block;
}

/* ── iframe (cargado al pulsar play) ────── */
.vr-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
