.video-container {
    position: relative;
    width: 100%;
    height: var(--video-container-height, 500px); /* default 500px */
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    /* Responsive video sizing */
    width: 100vw;
    height: calc(100vw * (var(--video-h, 9) / var(--video-w, 16)));

    /* Prevent shrinking below container-fit threshold */
    min-width: calc(var(--video-container-height, 500px) * (var(--video-w, 16) / var(--video-h, 9)));
    min-height: var(--video-container-height, 500px);
}

/* Overlay using hex color + opacity */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Editors set a hex value like #000000 or #1a75ff */
    background-color: var(--video-overlay-color, #000000);

    /* Opacity applied separately */
    opacity: var(--video-overlay-opacity, 0.35);

    pointer-events: none;
}

.video-title-block {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    line-height:1.2em;
    font-size: 40px;
    text-align: center;
    font-weight: 500;
}
