/* Yandex Cloud Video: независимые стили шаблона yandex_new. */
.b24-videos-section {
    padding-top: clamp(50px, 5.2vw, 88px);
    padding-bottom: clamp(54px, 5.5vw, 96px);
}
.b24-videos-section__intro {
    max-width: 980px;
    margin: 0 auto clamp(28px, 3.2vw, 46px);
    text-align: center;
}
.b24-videos-section__title {
    margin: 0 0 14px;
    color: #fff;
    font-family: 'Manrope', Arial, sans-serif;
    font-size: clamp(29px, 2.8vw, 42px);
    font-weight: 700;
    line-height: 1.18;
}
.b24-videos-section__lead {
    margin: 0;
    color: #c8c2de;
    font-family: 'Manrope', Arial, sans-serif;
    font-size: clamp(16px, 1.3vw, 20px);
    line-height: 1.55;
}
.yandex-new,
.yandex-new * { box-sizing: border-box; }
.yandex-new__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 1.6vw, 26px);
    align-items: stretch;
}
.yandex-new__card {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 0 0 22px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
    background: rgba(255,255,255,.045);
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.yandex-new__card:hover {
    border-color: rgba(202,230,82,.65);
    background: rgba(255,255,255,.07);
    transform: translateY(-3px);
}
/* Кнопка лежит НАД исходным Yandex iframe: клик открывает модальное окно,
   а сам встроенный плеер показывает исходную обложку и не перехватывает события. */
.yandex-new__open {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    cursor: pointer;
}
.yandex-new__open:focus-visible { outline: 3px solid #cae652; outline-offset: -4px; }
.yandex-new__poster {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: radial-gradient(circle at 68% 38%, rgba(105,81,172,.63), transparent 55%),
                linear-gradient(135deg, #1b163e 0%, #0c0b24 100%);
}
.yandex-new__poster--2 {
    background: radial-gradient(circle at 68% 38%, rgba(38,107,167,.52), transparent 55%),
                linear-gradient(135deg, #171c42 0%, #0c0b24 100%);
}
.yandex-new__poster--3 {
    background: radial-gradient(circle at 68% 38%, rgba(91,102,188,.6), transparent 55%),
                linear-gradient(135deg, #211437 0%, #0c0b24 100%);
}
.yandex-new__preview-frame {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
    background: #0c0b24;
}
.yandex-new__poster-image {
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.yandex-new__card:hover .yandex-new__poster-image { transform: scale(1.04); }
.yandex-new__art {
    position: absolute; inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}
.yandex-new__art-ring {
    position: absolute;
    width: 52%; aspect-ratio: 1;
    border: 2px solid rgba(202,230,82,.22);
    border-radius: 50%;
    box-shadow: 0 0 0 25px rgba(202,230,82,.035), 0 0 90px rgba(128,98,244,.18);
}
.yandex-new__art-chip {
    position: relative;
    color: rgba(255,255,255,.16);
    font: 800 clamp(40px, 5.5vw, 84px)/1 'Manrope', Arial, sans-serif;
    letter-spacing: -.045em;
}
.yandex-new__play {
    position: absolute;
    z-index: 1;
    top: 50%; left: 50%;
    display: grid;
    place-items: center;
    width: clamp(56px, 5.1vw, 78px);
    height: clamp(56px, 5.1vw, 78px);
    border-radius: 50%;
    background: #cae652;
    box-shadow: 0 7px 26px rgba(3,2,18,.4);
    transform: translate(-50%, -50%);
    transition: transform .2s ease, box-shadow .2s ease;
}
.yandex-new__play::before {
    content: '';
    width: 0; height: 0;
    margin-left: 5px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid #111024;
}
.yandex-new__card:hover .yandex-new__play {
    transform: translate(-50%, -50%) scale(1.09);
    box-shadow: 0 7px 32px rgba(202,230,82,.25);
}
.yandex-new__card-meta {
    display: block;
    margin: 20px 22px 8px;
    color: #cae652;
    font: 600 12px/1.4 'Manrope', Arial, sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.yandex-new__card-title {
    display: block;
    margin: 0 22px;
    color: #fff;
    font: 700 clamp(17px, 1.3vw, 21px)/1.38 'Manrope', Arial, sans-serif;
    overflow-wrap: anywhere;
}
.yandex-new__empty { margin: 0; color: #cbc5dd; text-align: center; }
/* Модалка переносится в body — не зависит от overflow/transform секций. */
.yandex-new-modal[hidden] { display: none !important; }
.yandex-new-modal,
.yandex-new-modal * { box-sizing: border-box; }
.yandex-new-modal {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}
.yandex-new-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(5,4,19,.92);
}
.yandex-new-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1080px, 100%);
    max-height: calc(100dvh - 44px);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 18px;
    background: #0d0b24;
    box-shadow: 0 35px 95px rgba(0,0,0,.45);
}
.yandex-new-modal__header {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 16px 10px 22px;
}
.yandex-new-modal__title {
    min-width: 0;
    color: #fff;
    font: 600 clamp(15px, 1.4vw, 19px)/1.35 'Manrope', Arial, sans-serif;
}
.yandex-new-modal__close {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
    font: 400 30px/1 Arial, sans-serif;
}
.yandex-new-modal__close:hover { color: #cae652; border-color: #cae652; }
.yandex-new-modal__close:focus-visible { outline: 2px solid #cae652; outline-offset: 2px; }
.yandex-new-modal__player {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: calc(100dvh - 110px);
    background: #000;
}
.yandex-new-modal__player iframe { display: block; width: 100%; height: 100%; border: 0; }
body.yandex-new-modal-open { overflow: hidden; }
@media (max-width: 1050px) {
    .yandex-new__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .yandex-new__grid { grid-template-columns: 1fr; gap: 18px; }
    .yandex-new__card { padding-bottom: 18px; }
    .yandex-new__card-meta { margin: 16px 18px 7px; }
    .yandex-new__card-title { margin: 0 18px; font-size: 18px; }
    .yandex-new-modal { padding: 10px; }
    .yandex-new-modal__header { min-height: 54px; padding: 8px 10px 8px 14px; }
    .yandex-new-modal__dialog { max-height: calc(100dvh - 20px); border-radius: 12px; }
    .yandex-new-modal__player { max-height: calc(100dvh - 76px); }
}
@media (prefers-reduced-motion: reduce) {
    .yandex-new__card,
    .yandex-new__poster-image,
    .yandex-new__play { transition: none; }
}
