.table-blocks-section .table-block,
.text-blocks-section .text-block{
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.table-blocks-section,
.text-blocks-section {
	margin-bottom: 46px;
}

.text-block__title,
.table-block__title {
	font-weight: 400;
	font-size: 36px;
	line-height: 150%;
	color: var(--brand100);
	margin: 0;
}

.text-block__content {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.text-block__content p,
.text-block__content li {
	font-weight: 400;
	font-size: 16px;
	line-height: 150%;
	color: var(--brand100);
	margin: 0;
}

.text-block__content a {
	font-weight: 400;
	font-size: 16px;
	line-height: 150%;
	color: var(--brand200);
}

.text-block__content ul {
	list-style-type: disc;
	padding-left: 20px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.table-header {
	display: flex;
}

.table-cell.table-header__cell{
	padding-bottom: 16px;
	border-bottom: 1px solid var(--brand300);
}

.table-cell.table-header__cell,
.table-row .table-cell {
	min-width: 240px;
}

.table-row {
	display: flex;
}

.table-cell {
	width: 100%;
}

.custom-table__container {
	overflow: overlay;
	padding-bottom: 10px;
}

.custom-table {
	width: 100%;
	padding: 16px 16px 6px ;
	box-sizing: border-box;
	border-radius: 8px;
	border: 1px solid var(--brand300);
}

.table-cell.table-header__cell {
	font-weight: 700;
	font-size: 16px;
	line-height: 16px;
	color: var(--brand100);
	margin: 0;
}

.table-row .table-cell {
	font-weight: 400;
	font-size: 16px;
	line-height: 16px;
	color: var(--brand100);
}


.table-row .table-cell:first-child {
	font-weight: 500;
}

.table-row .table-cell {
	padding: 16px 0;
}

.table-row:not(:last-child) .table-cell {
	border-bottom: 1px solid var(--brand300);


}
.table-row:last-child .table-cell {
	padding-bottom: 0;
}

.custom-table__container::-webkit-scrollbar {
	height: 8px; 
	width: 8px; 
}

.custom-table__container::-webkit-scrollbar-track {
	background: transparent;
	border-radius: 4px;
	margin: 0 4px;
}

.custom-table__container::-webkit-scrollbar-thumb {
	background: var(--brand300);
	border-radius: 4px;
	border: 2px solid transparent;
	background-clip: padding-box;
}

.custom-table__container::-webkit-scrollbar-thumb:hover {
	background: var(--brand400); 
	background-clip: padding-box;
}

.custom-table__container::-webkit-scrollbar-corner {
	background: transparent;
}

.custom-table__container {
	scroll-behavior: smooth;
}

.custom-table__container.scrolled {
	box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.05);
}

/* Таблицы */

/* Контейнер для адаптивности */
.text-blocks-section {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* Стилизация таблицы */
.text-blocks-section table {
    width: 100%;
    /* Используем separate вместо collapse, чтобы работал border-radius на самой таблице */
    border-collapse: separate !important; 
    border-spacing: 0;
    border: 1px solid var(--brand300);
    border-radius: 12px;
    overflow: hidden; /* Чтобы фон первой/последней строк не вылезал за радиус */
    margin-bottom: 5px;
}

/* Базовая стилизация всех ячеек */
.text-blocks-section table tr td,
.text-blocks-section table tr th {
    padding: 16px;
    /* У каждой ячейки есть граница справа и снизу */
    border-bottom: 1px solid var(--brand300);
    border-right: 1px solid var(--brand300);
    font-weight: 500;
    font-size: 16px;
    line-height: 25px;
    background-color: var(--white);
    text-align: left;
}

/* Убираем правую границу у последнего столбца, чтобы не дублировать рамку таблицы */
.text-blocks-section table tr td:last-child,
.text-blocks-section table tr th:last-child {
    border-right: none;
}

/* Убираем нижнюю границу у последней строки */
.text-blocks-section table tr:last-child td,
.text-blocks-section table tr:last-child th {
    border-bottom: none;
}

/* Стили первой строки (шапки) */
.text-blocks-section table tr:first-child td,
.text-blocks-section table tr:first-child th {
    background-color: var(--brand200);
    color: var(--white);
    font-weight: bold;
    /* Делаем границу под шапкой тоже оранжевой или оставляем brand300 для строгости */
    border-bottom: 1px solid var(--brand300); 
}

.text-blocks-section table tr:first-child td p,
.text-blocks-section table tr:first-child th p {
	    color: var(--white);
}

/* Скроллбар */
.text-blocks-section::-webkit-scrollbar {
    height: 8px;
}
.text-blocks-section::-webkit-scrollbar-track {
    background: #fff;
}
.text-blocks-section::-webkit-scrollbar-thumb {
    background: var(--brand200);
    border-radius: 6px;
}

/* Адаптив */
@media(max-width: 768px) {
    .text-block__title,
    .table-block__title {
        font-size: 22px;
    }
    .text-blocks-section table tr td,
    .text-blocks-section table tr th {
        white-space: normal;
        padding: 12px; /* Чуть уменьшаем отступы на мобильных */
        font-size: 14px;
    }
}

