﻿.videos-block {
    background-color: #f0efeb;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    gap: 15px;
}

.videos-content {
    display: flex;
    flex-wrap: nowrap;      /* запрещаем перенос */
    justify-content: center;
    gap: 30px;
    overflow: visible;      /* скрывает лишние видео за пределами контейнера */
    width: 100%;
}

.video-item {
    flex: 0 0 370px;        /* фиксированная ширина по умолчанию */
    max-width: 370px;
}

.video-item iframe {
    width: 100%;
    aspect-ratio: 16/9;
}

/* Для экранов <= 1200px — 2 видео в ряд (шире) */
@media (max-width: 1200px) {
    .video-item {
        flex: 0 0 45%;      /* шире, чтобы помещалось 2 видео */
        max-width: 500px;
    }

    /* Если видео больше 2, можно скрывать лишние */
    .video-item:nth-child(n+3) {
        display: none;
    }
}

/* Для экранов <= 768px — только 1 видео */
@media (max-width: 768px) {
    .video-item {
        flex: 0 0 100%;
        max-width: 600px;
    }

    .video-item:nth-child(n+2) {
        display: none;
    }
}


.videos-link {
    margin-top: 8px;
    color: #003b7f;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: lowercase;
    transition: color 0.3s ease;
}

.videos-link:hover {
    color: #002b60;
}

.videos-link .link-text {
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

.videos-link:hover .link-text {
    text-decoration: underline;
}

.videos-link .arrow {
    text-decoration: none;
    display: inline-block;
    font-weight: 900;
    margin-left: 3px;
    transform: scaleX(0.6);
}

.video-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.video-item {
    flex: 0 0 370px;
    max-width: 370px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.video-item::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 */
}

.video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.videos-block {
    background: #f9f9f9;
}
