/* ============================================================
   МОДАЛКА С ВИДЕО
   ============================================================ */

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.video-modal.is-open {
    display: flex;
    animation: videoModalFadeIn .25s ease-out both;
}

@keyframes videoModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 27, 36, .92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.video-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    max-width: 100%;
    max-height: 100%;
    animation: videoModalSlideIn .3s cubic-bezier(.22, .76, .25, 1) both;
}

@keyframes videoModalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.video-modal__close {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.video-modal__close:hover {
    background: rgba(255, 255, 255, .22);
    transform: rotate(90deg);
}

.video-modal__player {
    display: flex;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.video-modal__player video {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    object-fit: contain;
    background: #000;
}

@media (max-width: 760px) {
    .video-modal {
        padding: 12px;
    }

    .video-modal__close {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .video-modal__player {
        max-height: calc(100vh - 64px);
    }

    .video-modal__player video {
        max-height: calc(100vh - 64px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .video-modal.is-open,
    .video-modal__dialog {
        animation: none;
    }
}