/* Базовые стили секции */
.video-section {
    text-align: center;
    padding: 0; /* Убираем отступы вокруг секции */
    background: linear-gradient(
        to bottom,
        var(--top-color),
        var(--bottom-color)
    );
    overflow: hidden;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1.875rem;
    color: #333;
    line-height: 1.2;
}

/* Карусель видео */
.video-carousel {
    max-width: 75rem;
    margin: 0 auto;
    padding: 0; /* Убираем отступы внутри карусели */
    height: auto; /* Подстраиваем высоту под содержимое */
}

.video-carousel .dmc-Carousel-slide,
.video-carousel .dmc-Center {
    padding: 0;
    margin: 0;
    height: 100%;
}

/* Миниатюры видео */
.video-thumbnail-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.625rem;
    aspect-ratio: 16/9; /* Горизонтальный формат */
    width: 100%;
    height: auto; /* Подстраиваем высоту под ширину */
    background-color: #000; /* Черный фон для пустых областей */
}

.video-carousel video {
    width: 100%;
    height: 100%; /* Занимает всю доступную высоту */
    object-fit: cover; /* Заполняет контейнер, обрезая лишнее */
    border-radius: 0.625rem 0.625rem 0 0;
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
    display: block;
    transition: transform 0.3s ease;
}

.video-carousel video:hover {
    transform: scale(1.02);
}

/* Эффект наложения для миниатюр */
.video-thumbnail-wrapper {
    position: relative;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.video-thumbnail-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: inherit;
    transition: background 0.3s ease;
}

.video-thumbnail-wrapper:hover::after {
    background: rgba(0, 0, 0, 0.5);
}

/* Стили для кнопки воспроизведения */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Модальное окно */
.dmc-Modal-root {
    padding: 0;
    margin: 0;
}

.dmc-Modal-body {
    padding: 0;
    margin: 0;
}

.dmc-Modal-content {
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    max-width: none;
    width: 100%;
}

.dmc-Modal-inner {
    padding: 0;
    margin: 0;
    max-width: none;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Контейнер видео в модальном окне */
.modal-video-container {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#modal-video {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    display: block;
    background: #000;
}

/* Затемненный фон */
.dmc-Modal-overlay {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Адаптивность */
@media (max-width: 48rem) {
    .video-section {
        padding: 1.875rem 0.625rem;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }

    .video-carousel {
        padding: 0 0.3125rem;
    }

    .video-carousel video {
        max-height: none; /* Убираем ограничение по высоте */
    }

    #modal-video {
        max-height: 60vh;
        width: 95vw;
    }
}