/* =========================================================
   СТРАНИЦА
   ========================================================= */

.video-activity-page {
    width: 100%;
    padding: 32px 38px 90px;
    background: #ffffff;
}

.video-activity-container {
    width: 100%;
    max-width: 1840px;
    margin: 0 auto;
}

.video-activity-title {
    margin: 0;
    color: #0878bd;
    font-size: clamp(40px, 3.2vw, 62px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.03em;
}


/* =========================================================
   СЕТКА
   ========================================================= */

.video-activity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px 16px;

    margin-top: 96px;
}


/* =========================================================
   КАРТОЧКА
   ========================================================= */

.video-card {
    min-width: 0;
}

.video-card__media {
    display: block;
    width: 100%;
    padding: 0;

    appearance: none;
    border: 0;
    background: transparent;

    cursor: pointer;
    text-align: inherit;
}

.video-card__image-wrapper {
    position: relative;

    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;
    background: #e7e7e7;
}

.video-card__image {
    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    transition:
        transform 350ms ease,
        filter 350ms ease;
}

.video-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    color: #0878bd;
    background:
        linear-gradient(
            135deg,
            #f0f6fa 0%,
            #dcecf7 100%
        );

    font-size: 24px;
    font-weight: 600;
}

.video-card__overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.05);

    transition: background-color 250ms ease;
}

.video-card__play {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 74px;
    height: 74px;

    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);

    transition:
        opacity 250ms ease,
        transform 250ms ease;
}

.video-card__play svg {
    display: block;
    width: 100%;
    height: 100%;
}

.video-card__play circle {
    fill: rgba(255, 255, 255, 0.94);
    stroke: rgba(0, 0, 0, 0.1);
    stroke-width: 1;
}

.video-card__play path {
    fill: #0878bd;
}

.video-card__title {
    max-width: 95%;
    margin: 6px auto 0;

    color: #050505;
    font-size: clamp(23px, 1.65vw, 32px);
    font-weight: 600;
    line-height: 1.25;
    /* text-align: center; */
    text-wrap: balance;
}

.video-card__media:hover .video-card__image {
    transform: scale(1.025);
    filter: brightness(0.9);
}

.video-card__media:hover .video-card__overlay {
    background: rgba(0, 0, 0, 0.12);
}

.video-card__media:hover .video-card__play,
.video-card__media:focus-visible .video-card__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-card__media:focus-visible {
    outline: 3px solid #0878bd;
    outline-offset: 5px;
}


/* =========================================================
   ПАГИНАЦИЯ
   ========================================================= */

.video-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;

    margin-top: 70px;
}

.video-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 43px;
    height: 43px;
    padding: 0 10px;

    border: 1px solid transparent;

    color: #367dff;
    background: transparent;

    font-size: 18px;
    line-height: 1;
    text-decoration: none;

    transition:
        color 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;
}

.video-pagination__item:hover {
    color: #0878bd;
    background: #f2f7fb;
}

.video-pagination__item--current {
    border-color: #111111;
    color: #367dff;
    background: #ffffff;
}

.video-pagination__arrow {
    font-size: 30px;
}

.video-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 30px;
    height: 43px;

    color: #777777;
}


/* =========================================================
   ПУСТАЯ СТРАНИЦА
   ========================================================= */

.video-activity-empty {
    margin-top: 90px;
    padding: 70px 30px;

    background: #f4f7f9;
    text-align: center;
}

.video-activity-empty__title {
    margin: 0;

    color: #111111;
    font-size: 30px;
    font-weight: 600;
}

.video-activity-empty__text {
    margin: 12px 0 0;

    color: #616161;
    font-size: 18px;
    line-height: 1.5;
}


/* =========================================================
   МОДАЛЬНОЕ ОКНО
   ========================================================= */

body.video-modal-open {
    overflow: hidden;
}

.video-modal {
    position: fixed;
    z-index: 9999;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;
}

.video-modal[hidden] {
    display: none;
}

.video-modal__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(5px);
}

.video-modal__dialog {
    position: relative;
    z-index: 1;

    width: min(1100px, 100%);
    max-height: calc(100vh - 60px);
    padding: 48px 30px 30px;

    overflow-y: auto;

    background: #ffffff;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

.video-modal__close {
    position: absolute;
    top: 5px;
    right: 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;
    padding: 0;

    border: 0;
    background: transparent;
    color: #111111;

    font-size: 42px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;
}

.video-modal__close:hover {
    color: #0878bd;
}

.video-modal__close:focus-visible {
    outline: 3px solid #0878bd;
    outline-offset: 2px;
}

.video-modal__title {
    margin: 0 50px 24px 0;

    color: #111111;
    font-size: clamp(24px, 2vw, 34px);
    font-weight: 600;
    line-height: 1.25;
}

.video-modal__player-wrapper {
    width: 100%;
    background: #000000;
}

.video-modal__player {
    display: block;
    width: 100%;
    max-height: 72vh;
    aspect-ratio: 16 / 9;

    background: #000000;
}


/* =========================================================
   АДАПТИВ
   ========================================================= */

@media (max-width: 1100px) {
    .video-activity-page {
        padding-inline: 24px;
    }

    .video-activity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 45px 20px;
        margin-top: 70px;
    }
}


@media (max-width: 700px) {
    .video-activity-page {
        padding:
            25px
            16px
            65px;
    }

    .video-activity-title {
        font-size: 37px;
    }

    .video-activity-grid {
        grid-template-columns: 1fr;
        gap: 42px;
        margin-top: 52px;
    }

    .video-card__title {
        margin-top: 10px;
        font-size: 24px;
    }

    .video-card__play {
        width: 62px;
        height: 62px;

        opacity: 1;
        transform: translate(-50%, -50%);
    }

    .video-pagination {
        margin-top: 55px;
    }

    .video-modal {
        padding: 12px;
    }

    .video-modal__dialog {
        max-height: calc(100vh - 24px);
        padding:
            48px
            14px
            18px;
    }

    .video-modal__title {
        margin-bottom: 18px;
        font-size: 23px;
    }
}


@media (prefers-reduced-motion: reduce) {
    .video-card__image,
    .video-card__overlay,
    .video-card__play,
    .video-pagination__item {
        transition: none;
    }
}