.video-block {
    background: rgba(252, 245, 252, 1);
}

.video-block__wrapper {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(141, 42, 143, 0.12);
    /* Фиксируем соотношение сторон через псевдоэлемент */
    aspect-ratio: 16 / 9;
}

/* ── Фоновое автовоспроизводимое видео ── */
.video-block__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Оверлей-ссылка для лайтбокса ── */
.video-block__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    /* Лёгкий затемняющий градиент, чтобы кнопка была заметна */
    background: linear-gradient(
            to bottom,
            transparent 60%,
            rgba(0, 0, 0, 0.15) 100%
    );
    transition: background 0.3s ease;
}

.video-block__overlay:hover {
    background: linear-gradient(
            to bottom,
            transparent 40%,
            rgba(0, 0, 0, 0.25) 100%
    );
}

/* ── Кнопка воспроизведения (открывает лайтбокс) ── */
.video-block__play-button {
    transition: transform 0.3s ease;
    pointer-events: none;
}

.video-block__overlay:hover .video-block__play-button {
    transform: scale(1.1);
}

.video-block__play-icon {
    width: 80px;
    height: 80px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

/* ── Кнопка звука ── */
.video-block__mute-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.video-block__mute-btn:hover {
    background: rgba(0, 0, 0, 0.65);
    transform: scale(1.08);
}

.video-block__mute-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* По умолчанию: звук выключен — показываем иконку "muted" */
.video-block__mute-icon--off { display: block; }
.video-block__mute-icon--on  { display: none;  }

/* Когда звук включён (кнопка получает класс .is-unmuted) */
.video-block__mute-btn.is-unmuted .video-block__mute-icon--off { display: none;  }
.video-block__mute-btn.is-unmuted .video-block__mute-icon--on  { display: block; }

/* ── Превью для URL-типа (YouTube/Vimeo) — без изменений ── */
.video-block__preview {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
}

.video-block__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-block__preview:hover .video-block__image {
    transform: scale(1.05);
}

.video-block__preview .video-block__play-button {
    position: relative;
    z-index: 2;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.video-block__preview:hover .video-block__play-button {
    transform: scale(1.1);
}

/* ── Адаптив ── */
@media (max-width: 1024px) {
    .video-block {
        padding: 0;
    }

    .video-block__play-icon {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 576px) {
    .video-block {
        padding: 40px 0;
        margin-bottom: 30px !important;
    }
    .home .video-block {
        padding-top: 0;
        padding-bottom: 0;
    }

    .video-block__wrapper {
        border-radius: 8px;
    }

    .video-block__play-icon {
        width: 60px;
        height: 60px;
    }

    .video-block__mute-btn {
        bottom: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
    }

    .video-block__mute-icon {
        width: 16px;
        height: 16px;
    }
}