/* Category Video — Front-end styles */

/* Regular / inline mode — responsive 16:9 aspect ratio container */
.pv-cat-regular-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    margin: 0;
}

/* YouTube target div must also fill the wrapper */
.pv-cat-regular-wrap > div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Override fixed pixel dimensions set by the YouTube/Vimeo JS players */
.pv-cat-regular-wrap iframe,
.pv-cat-regular-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}

/* Background / hero mode */
.pv-cat-bg-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* Fallback so the hero never collapses to 0 if PV_CAT_BG_HEIGHT is unset or
       the video iframe is slow to supply height. The inline height (PV_CAT_BG_HEIGHT)
       still wins when present. */
    min-height: 320px;
}

.pv-cat-bg-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border: none;
}

/* HTML5 hero video covers the container natively (iframes are JS cover-scaled). */
video.pv-cat-bg-player {
    object-fit: cover;
}

.pv-cat-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.pv-cat-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,.6);
    pointer-events: none;
    width: 80%;
    max-width: 800px;
}

.pv-cat-bg-name {
    display: block;
    font-size: 2em;
    font-weight: 700;
    line-height: 1.2;
}

.pv-cat-bg-desc {
    display: block;
    font-size: 1em;
    font-weight: 400;
    margin: 0.5em 0 0;
    line-height: 1.5;
    opacity: .9;
}
