.my-page-content {
    --content-video-ratio: 16 / 9;
}

.my-page-content .wp-block-video,
.my-page-content .wp-video {
    width: 100% !important;
    max-width: 100% !important;
}

.my-page-content .wp-block-video video,
.my-page-content .wp-video-shortcode,
.my-page-content video.wp-video-shortcode {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

.my-page-content .wp-video .mejs-container,
.my-page-content .wp-video .mejs-inner,
.my-page-content .wp-video .mejs-mediaelement,
.my-page-content .wp-video .mejs-layers,
.my-page-content .wp-video .mejs-overlay,
.my-page-content .wp-video .mejs-poster,
.my-page-content .wp-video .mejs-layer {
    width: 100% !important;
    max-width: 100% !important;
}

.my-page-content .wp-video .mejs-container {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: var(--content-video-ratio);
    height: auto !important;
}

.my-page-content .wp-video .mejs-inner,
.my-page-content .wp-video .mejs-mediaelement,
.my-page-content .wp-video .mejs-layers,
.my-page-content .wp-video .mejs-overlay,
.my-page-content .wp-video .mejs-poster,
.my-page-content .wp-video .mejs-layer,
.my-page-content .wp-video .mejs-mediaelement > div,
.my-page-content .wp-video .mejs-mediaelement mediaelementwrapper,
.my-page-content .wp-video .wp-video-shortcode {
    height: 100% !important;
}

.my-page-content .wp-video .mejs-controls {
    box-sizing: border-box;
}

body.video-modal-open {
    overflow: hidden;
}

.video-modal[hidden] {
    display: none !important;
}

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
}

.video-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(100% - 32px, 1100px);
    /* max-height: min(100vh - 32px, 900px); */
    height: auto;
    margin: 16px auto;
    background: #0f172a;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.video-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    line-height: 3.6rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.video-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.video-modal__close span {
    font-size: 1.6rem;
    line-height: 1;
}

.video-modal__header {
    padding: 18px 68px 18px 20px;
    color: #ffffff;
}

.video-modal__title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
}

.video-modal__content {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-modal__frame,
.video-modal__player {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000000;
}

.faculty-video-placeholder__media {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    background: transparent;
}

.faculty-video-placeholder .video-play-button {
    position: relative;
    z-index: 1;
}

@media (max-width: 767px) {
    .video-modal__dialog {
        width: min(100% - 16px, 100%);
        max-height: min(100vh - 16px, 100vh);
        margin: 8px auto;
        border-radius: 16px;
    }

    .video-modal__header {
        padding: 14px 56px 8px 14px;
    }

    .video-modal__title {
        font-size: 1.5rem;
    }

    .video-modal__close {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
    }
}
