/* ==========================================================================
   VIDEO MODAL — Общий компонент для video.html и allvideo.html
   ========================================================================== */

/* Модальное окно видео */
.video-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1050; /* выше Bootstrap sticky-header */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    outline: none;
    z-index: 1051;
}

.video-modal-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-modal-iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ---------- Shared video card components ---------- */

/* Обёртка 16:9 */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

/* Миниатюра */
.video-thumbnail {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Iframe внутри карточки (allvideo) */
.video-frame {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
