/* Сам элемент Zero */
.t396__elem.HeadVideo {
    position: absolute !important;
    left: 50% !important;
    bottom: 0 !important;
    top: auto !important;

    width: 100vw !important;    /* ширина экрана */
    height: auto !important;

    transform: translateX(-50%) !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

/* Внутренняя обёртка Tilda-video (.tn-atom) */
.t396__elem.HeadVideo .tn-atom {
    width: 100vw !important;        /* растягиваем под видео */
    height: auto !important;
    min-height: 100% !important;    /* чтобы iframe заполнял весь контейнер */
    background: none !important;    /* убираем чёрный фон внутри */
    overflow: hidden !important;
}

/* Видео-плеер внутри */
.t396__elem.HeadVideo iframe {
    width: 100vw !important;
    height: calc(100vw * 0.5625) !important; /* принудительно 16:9 */
    object-fit: cover !important;
    object-position: bottom center !important;
    border: none !important;
    display: block !important;
}

/* Чтобы нижняя точка была фиксирована */
.t396__elem.HeadVideo {
    height: calc(100vw * 0.5625) !important;
}
/* Поведение по умолчанию (Desktop) — фиксируем по нижней точке */
.t396__elem.HeadVideo {
    bottom: 0 !important;
    top: auto !important;
}

/* Если экран низкий — фиксируем по ВЕРХУ */
@media (max-height: 900px) {
    .t396__elem.HeadVideo {
        top: 0 !important;
        bottom: auto !important;
        transform: translateX(-50%) !important;
    }
    
    /* tn-atom растягиваем строго по размеру блока */
    .t396__elem.HeadVideo .tn-atom {
        height: 100% !important;
    }

    /* iframe тоже фиксированно от верха */
    .t396__elem.HeadVideo iframe {
        height: 100% !important;
        object-fit: cover !important;
        object-position: top center !important;
    }
