table.border { 
    border-collapse: collapse;
    width: 100%;
}

table.border td { 
    font-size: 18px; 
    background-color: transparent;  
}
.container-fluid.bg-light table.border td { 
    font-size: 18px; 
    background-color: #F9F9F9; 
}

table.border td:first-child { 
    max-width: 70%; 
    width: auto; 
    min-width: 200px;
    line-height: 1.6em;
    position: relative;
    text-align: left;
    border-bottom: 1px dotted #BDBDBD;
    vertical-align: bottom;
    padding: 10px 0 0 0;
}

table.border td:first-child b, 
table.border td:first-child strong {
    margin: 0;
    position: relative;
    top: 0.25em;
    padding: 0 5px 0 0;
    vertical-align: bottom;
    font-weight: 400 !important;
    color: #303030;
}

table.border td:nth-child(even){ 
    width: auto; 
    padding-left: 20px; 
    position: relative;  
    top: 0.70em;
    color: #303030;
}

.container-p4 table.border td:first-child b, 
.container-p4 table.border td:first-child strong {  
    background: #FFF; 
}

table.border1, 
table.border2 { 
    width: 100%;  
}

table.border1 th, 
table.border1 thead, 
table.border1 thead tr, 
table.border1 thead td,
table.border2 th, 
table.border2 thead, 
table.border2 thead tr, 
table.border2 thead td {
    border: none;
    padding: 25px;
    vertical-align: top !important;
}

table.border1 td, 
table.border2 td {    
    border: none;    
    padding: 25px 45px 25px 0;    
    vertical-align: middle; 
    text-align: left;
}

table.borderD { 
    border-collapse: collapse; 
    margin: 15px 0; 
    border-top: 0px solid #FF7930; 
}
table.borderD td{ 
    padding: 10px 15px; 
    color: #000;  
    border: 1px solid #EAEAEA;  
    background-color: #FFF; 
}

/* СТИЛИ ДЛЯ ТАБЛИЦ С ВИДЕО */
table.video {
    table-layout: fixed;
    width: 100%;
    position: relative;
    z-index: 1;
    margin-bottom: 30px;
    border-spacing: 0;
    border-collapse: collapse;
}

/* Ячейка с текстом в таблице с видео */
table.video td:first-child { 
    width: 60%;
    max-width: none;
    vertical-align: top;
    padding: 10px 20px 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    z-index: 1;
}

/* Ячейка с видео в таблице с видео */
table.video td:nth-child(even) { 
    width: 40%;
    max-width: 325px;
    padding-left: 20px; 
    position: relative;  
    top: 0;
    vertical-align: top;
    z-index: 1;
}

/* Стили для iframe в таблицах с видео */
table.video iframe {
    width: 100%;
    max-width: 325px;
    height: 646px;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    background-color: #000;
    position: relative;
    z-index: 1;
}

/* Автоматическое определение ориентации видео */
table.video iframe[height*="6"] {
    /* Вертикальное видео */
    max-width: 325px;
    height: 646px;
}

table.video iframe[width*="6"] {
    /* Горизонтальное видео */
    width: 100%;
    max-width: 600px;
    height: 338px;
}

/* Адаптивность для таблиц с видео */
@media (max-width: 480px) {
    table.video iframe {
        width: 100%;
        height: 70vh;
        max-height: 600px;
        max-width: 100%;
    }
}

/* МОБИЛЬНАЯ ВЕРСИЯ - ПОЛНОСТЬЮ ПЕРЕПИСАНА */
@media (max-width: 1024px) { 
    /* Сбрасываем таблицу в блочный режим */
    table.video {
        display: block;
        width: 100%;
        margin-bottom: 25px;
        overflow: visible;
    }
    
    table.video tbody {
        display: block;
        width: 100%;
    }
    
    table.video tr {
        display: block;
        width: 100%;
        position: relative;
    }
    
    table.video td { 
        display: block; 
        width: 100% !important; 
        max-width: 100% !important;
        padding: 12px 0 !important;
        box-sizing: border-box;
        position: relative;
        z-index: 2;
    }
    
    /* Текст - полная ширина */
    table.video td:first-child { 
        padding: 15px 0 8px 0 !important;
        border-bottom: none;
        text-align: left;
        order: 1;
    }
    
    /* Видео - полная ширина */
    table.video td:nth-child(even) { 
        padding: 8px 0 15px 0 !important;
        max-width: 100%;
        text-align: center;
        order: 2;
    }
    
    /* Видео с ограничением высоты */
    table.video iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: 50vh !important;
        min-height: 280px;
        max-height: 450px;
        margin: 0 auto;
        position: relative;
        z-index: 1;
    }
    
    /* Гарантируем, что контент после таблицы будет поверх */
    table.video + * {
        position: relative;
        z-index: 10;
        clear: both;
    }
    
    /* Остальные таблицы */
    table.border2 tr { 
        display: block;  
        width: 100%;  
    }
    table.border2 td { 
        display: block; 
        width: 100% !important; 
        height: auto; 
    }
    table.border2 td img { 
        text-align: center; 
        margin: 1%; 
        max-width: 100%;
    }
    table.border1 td, 
    table.border2 td {    
        border: none;    
        padding: 15px 0;    
        vertical-align: middle; 
        text-align: left;
    }
    table.border td:first-child b, 
    table.border td:first-child strong {  
        top: 0.25em; 
    }
}

/* Дополнительные исправления для маленьких экранов */
@media (max-width: 576px) { 
    table.border2 td iframe { 
        width: 100%;
    }
    table.border2 tr { 
        display: block;  
        width: 100%;  
    }
    table.border2 td { 
        display: block; 
        width: 100% !important; 
        height: auto; 
    }
    table.border2 td img { 
        text-align: center; 
        margin: 1%; 
        max-width: 100%;
    }
    table.border1 td, 
    table.border2 td {    
        border: none;    
        padding: 15px 0;    
        vertical-align: middle; 
        text-align: left;
    }
    table.border td:first-child b, 
    table.border td:first-child strong {  
        top: 0.35em; 
    }
    
    /* Для таблиц с видео */
    table.video {
        margin-bottom: 20px;
    }
    
    table.video td:first-child { 
        padding: 12px 0 6px 0 !important;
    }
    
    table.video td:nth-child(even) { 
        padding: 6px 0 12px 0 !important;
    }
    
    table.video iframe {
        height: 45vh !important;
        min-height: 250px;
        max-height: 400px;
    }
}

@media (max-width: 767px) { 
    table.border2 tr { 
        display: block;  
        width: 100%;  
    }
    table.border2 td { 
        display: block; 
        width: 100% !important; 
        height: auto; 
    }
    table.border2 td img { 
        text-align: center; 
        margin: 1%; 
        max-width: 100%;
    }
    table.border1 td, 
    table.border2 td {    
        border: none;    
        padding: 15px 0;    
        vertical-align: middle; 
        text-align: left;
    }
    table.border td:first-child b, 
    table.border td:first-child strong {  
        top: 0.25em; 
    }
}

@media (max-width: 321px) {  
    table.border2 tr { 
        display: block;  
        width: 100%;  
        max-width: 321px; 
    }
    table.border2 td { 
        display: block; 
        width: 100% !important; 
        height: auto; 
    }
    table.border2 td img { 
        text-align: center; 
        margin: 1%; 
        max-width: 100%;
    }
    table.border1 td, 
    table.border2 td {    
        border: none;    
        padding: 15px 0;    
        vertical-align: middle; 
        text-align: left;
    }
    table.border td:first-child b, 
    table.border td:first-child strong {  
        top: 0.35em; 
    }
    
    /* Для самых маленьких экранов */
    table.video iframe {
        height: 40vh !important;
        min-height: 220px;
        max-height: 350px;
    }
}

/* ДЕСКТОПНЫЕ СТИЛИ */
@media (min-width: 1025px) {
    table.video {
        table-layout: fixed;
        display: table;
        margin-bottom: 35px;
    }
    
    table.video tbody {
        display: table-row-group;
    }
    
    table.video tr {
        display: table-row;
    }
    
    table.video td {
        display: table-cell;
        position: static;
    }
    
    table.video td:first-child {
        width: 60%;
        padding: 10px 20px 10px 0 !important;
        vertical-align: top;
    }
    
    table.video td:nth-child(even) {
        width: 40%;
        max-width: 325px;
        padding: 25px 45px 25px 0 !important;
        vertical-align: top;
    }
    
    table.video iframe {
        width: 100%;
        max-width: 325px;
        height: 646px;
        position: relative;
    }
}

/* ГАРАНТИРОВАННАЯ ЗАЩИТА ОТ НАЛОЖЕНИЯ */
table.video {
    isolation: isolate;
}

table.video ~ * {
    position: relative;
    z-index: 100;
}

/* Дополнительная защита для контента после таблицы */
table.video + * {
    clear: both;
    position: relative;
    z-index: 1000 !important;
}





/* ДОБАВЬТЕ ЭТИ СТИЛИ В CSS */

/* Отмена Bootstrap ratio классов внутри таблицы с видео */
table.video .ratio,
table.video .ratio-16x9,
table.video .ratio-1x1,
table.video .ratio-4x3,
table.video .ratio-21x9 {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding-top: 0 !important;
    display: block !important;
}

table.video .ratio::before {
    display: none !important;
    content: none !important;
    padding-top: 0 !important;
}

/* Специально для div с ratio классами */
table.video td .ratio,
table.video td .ratio-16x9 {
    all: unset !important;
    display: block !important;
}

/* Сброс для iframe внутри ratio контейнера */
table.video .ratio iframe {
    position: static !important;
    width: 100% !important;
    height: 646px !important;
    top: auto !important;
    left: auto !important;
}

/* Мобильная версия - сброс ratio */
@media (max-width: 1024px) { 
    table.video .ratio,
    table.video .ratio-16x9 {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        padding-top: 0 !important;
        display: block !important;
    }
    
    table.video .ratio::before {
        display: none !important;
        padding-top: 0 !important;
    }
    
    table.video .ratio iframe {
        position: relative !important;
        width: 100% !important;
        height: 50vh !important;
        min-height: 280px;
        max-height: 450px;
    }
}

/* Десктопная версия - сброс ratio */
@media (min-width: 1025px) {
    table.video .ratio,
    table.video .ratio-16x9 {
        position: static !important;
        width: auto !important;
        height: auto !important;
        padding-top: 0 !important;
    }
    
    table.video .ratio iframe {
        position: static !important;
        width: 100% !important;
        height: 646px !important;
    }
}