/* Content Block Styles */

.content-block-wrapper {
    padding: 36px;
    background-color: #fff;
    border-radius: 25px;
    margin: 24px 0;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.content-block-inner {
    width: 100%;
}

/* Header with badge and title */
.content-block-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.content-block-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: #F8F8F8;
    border: 1px solid #E6E6E6;
    border-radius: 50%;
    color: #908F8F;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    flex-shrink: 0;
}

/* Title - основной заголовок блока */
.content-block-title {
    margin: 0;
    font-size: 36px;
    font-weight: 800;
    color: #34363D;
    font-family: 'Manrope', sans-serif;
    line-height: 130%;
}

/* Description - описание блока */
.content-block-description {
    margin: 0 0 24px 0;
    font-size: 18px;
    line-height: 28px;
    color: #34363D;
    font-family: 'Manrope', sans-serif;
    font-weight: 400;
}

/* Content Items */
.content-block-items {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Text Blocks */
.content-block-text-item {
    margin: 0;
}

/* Headings внутри блока */
.content-block-heading {
    margin: 0 0 16px 0;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    color: #34363D;
    line-height: 130%;
}

h2.content-block-heading {
    font-size: 32px;
}

h3.content-block-heading {
    font-size: 28px;
}

h4.content-block-heading {
    font-size: 24px;
}

h5.content-block-heading {
    font-size: 20px;
}

h6.content-block-heading {
    font-size: 18px;
}

/* Text paragraphs */
.content-block-text {
    margin: 0 0 16px 0;
    font-size: 18px;
    line-height: 28px;
    color: #34363D;
    font-family: 'Manrope', sans-serif;
    font-weight: 400;
}

.content-block-text:last-child {
    margin-bottom: 0;
}

/* Tables - используются глобальные стили из style.css темы:
 * .custom-pay-tab
 * .custom-pay-tab thead, .custom-pay-tab tbody
 * .custom-pay-tab-mob (для мобильных)
 */
.content-block-table-wrapper {
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.content-block-table.custom-pay-tab {
    margin-top: 50px;
    margin-bottom: 0;
}

.content-block-table.custom-pay-tab:first-child {
    margin-top: 0;
}

/* Добавляем рамку для таблицы */
.content-block-table.custom-pay-tab table {
    border: 1px solid rgb(0, 0, 0, 10%);
    border-collapse: collapse;
}

/* Добавляем вертикальные и горизонтальные границы для ячеек */
.content-block-table.custom-pay-tab table th,
.content-block-table.custom-pay-tab table td {
    border: 1px solid rgb(0, 0, 0, 10%) !important;
}

/* Переопределение padding для ячеек таблицы */
.content-block-table-wrapper table {
    table-layout: fixed !important;
    width: 100% !important;
}

.content-block-table-wrapper table tbody tr td,
.content-block-table-wrapper td {
    padding: 10px 15px !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    vertical-align: top !important;
}

.content-block-table-wrapper table tbody tr td span,
.content-block-table-wrapper td span {
    display: inline-block !important;
    max-width: none !important;
    width: auto !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

/* Для таблиц с 2 колонками */
.content-block-table-wrapper .table-two-columns td {
    width: 50% !important;
}

/* Фон заголовков таблицы */
.content-block-table.custom-pay-tab thead tr {
    background-color: #f9f9f9;
}

/* Чередование цветов строк */
.content-block-table.custom-pay-tab tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}


/* Lists */
.content-block-list-item {
    margin: 0;
}

.content-block-list {
    margin: 0;
    padding-left: 24px;
}

.content-block-list li {
    color: #34363D;
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 12px;
}

.content-block-list li:last-child {
    margin-bottom: 0;
}

.content-block-list-ordered {
    list-style-type: decimal;
}

.content-block-list-unordered {
    list-style-type: disc;
}

/* Images */
.content-block-image-item {
    margin: 0;
}

/* Image alignment */
.content-block-image-item.align-left {
    text-align: left;
}

.content-block-image-item.align-left .content-block-image {
    margin-left: 0;
    margin-right: auto;
}

.content-block-image-item.align-center {
    text-align: center;
}

.content-block-image-item.align-center .content-block-image {
    margin-left: auto;
    margin-right: auto;
}

.content-block-image-item.align-right {
    text-align: right;
}

.content-block-image-item.align-right .content-block-image {
    margin-left: auto;
    margin-right: 0;
}

.content-block-image {
    margin: 0;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: #F8F8F8;
}

.content-block-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
    display: block;
}

.content-block-image figcaption {
    margin-top: 12px;
    color: #8C8C8C;
    font-size: 14px;
    line-height: 20px;
    font-style: italic;
    font-family: 'Manrope', sans-serif;
}

.content-block-image-caption-bold {
    display: block;
    margin-bottom: 12px;
    color: #34363D;
    font-size: 18px;
    line-height: 28px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
}

/* Quotes (Blockquote) */
.content-block-quote-item {
    margin: 0;
}

.content-block-quote {
    font-style: italic;
    padding: 20px 20px 20px 30px;
    margin: 0;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    position: relative;
    background: #F8F8F8;
    font-size: 18px;
    line-height: 28px;
    color: #34363D;
    font-family: 'Manrope', sans-serif;
}

.content-block-quote:before {
    content: "\201C";
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 40px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #E5E7EB;
    padding-left: 4px;
    padding-bottom: 4px;
    line-height: 1.3;
    color: #8C8C8C;
}

.content-block-quote:after {
    content: "\201D";
    position: absolute;
    bottom: -20px;
    right: 20px;
    font-size: 40px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #E5E7EB;
    padding-left: 4px;
    padding-top: 4px;
    line-height: 1.3;
    color: #8C8C8C;
}

/* Expert Comment - копируем стили из expert-block */
.comment-block {
    width: 100%;
    background: #FFFFFF;
    padding: 36px;
    border-radius: 25px;
    margin-top: 33px;
    margin-bottom: 33px;
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

.comment-block:first-child {
    margin-top: 0;
}

/* Avatar Left */
.comment-block-left {
    flex-shrink: 0;
}

.comment-block-figure {
    margin: 0;
    padding: 0;
}

.comment-block-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Content Right */
.comment-block-right {
    flex: 1;
}

.comment-block-right p {
    font-family: 'Manrope', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 28px;
    letter-spacing: 0%;
    color: #34363D;
    margin: 0 0 12px 0;
}

.comment-block-right p:last-child {
    margin-bottom: 0;
}

/* Mobile Responsive */
@media screen and (max-width: 1400px) {
    .content-block-wrapper {
        padding: 16px;
    }
}

@media screen and (max-width: 992px) {
    .content-block-badge {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 20px;
    }
}

@media screen and (max-width: 768px) {
    .content-block-wrapper {
        padding: 24px;
    }

    .content-block-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .content-block-badge {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 18px;
    }

    .content-block-title {
        font-size: 28px;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .content-block-description {
        font-size: 16px;
        line-height: 24px;
        margin-bottom: 20px;
    }

    .content-block-items {
        gap: 20px;
    }

    /* Таблицы с 2 столбцами - нормальная ширина столбцов */
    .content-block-table.custom-pay-tab.table-two-columns tbody tr td {
        width: 50%;
    }

    h2.content-block-heading {
        font-size: 26px;
    }

    h3.content-block-heading {
        font-size: 24px;
    }

    h4.content-block-heading {
        font-size: 20px;
    }

    h5.content-block-heading {
        font-size: 18px;
    }

    h6.content-block-heading {
        font-size: 16px;
    }

    .content-block-text {
        font-size: 16px;
        line-height: 24px;
    }

    .content-block-list {
        padding-left: 20px;
    }

    .content-block-list li {
        font-size: 16px;
        line-height: 24px;
        margin-bottom: 10px;
    }

    .content-block-image img {
        max-width: 100%;
        height: auto;
    }

    .content-block-image figcaption {
        font-size: 12px;
        line-height: 18px;
    }

    .content-block-image-caption-bold {
        font-size: 16px;
        line-height: 24px;
    }

    .content-block-quote {
        padding: 15px 15px 15px 25px;
        font-size: 16px;
        line-height: 24px;
    }

    .content-block-quote:before {
        font-size: 32px;
        width: 30px;
        height: 30px;
        top: -15px;
        left: 15px;
    }

    .content-block-quote:after {
        font-size: 32px;
        width: 30px;
        height: 30px;
        bottom: -15px;
        right: 15px;
    }

    /* Expert Comment - адаптив для планшетов */
    .comment-block {
        padding: 16px;
        margin-top: 20px;
        margin-bottom: 20px;
        gap: 24px;
    }

    .comment-block-avatar {
        width: 120px;
        height: 120px;
    }

    .comment-block-right p {
        font-size: 16px;
        line-height: 24px;
    }
}

/* Mobile styles for Expert Comment */
@media (max-width: 768px) {
    .comment-block {
        padding: 20px;
        border-radius: 20px;
        display: block;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    /* Аватар слева, контент справа */
    .comment-block-left {
        float: left;
        margin-right: 24px;
    }

    .comment-block-avatar {
        width: 64px;
        height: 64px;
    }

    .comment-block-right {
        display: block;
    }

    .comment-block-right p {
        font-size: 14px;
        line-height: 20px;
        margin: 0 0 8px 0;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .content-block-wrapper {
        padding: 20px;
    }

    .content-block-title {
        font-size: 24px;
    }

    .content-block-description {
        font-size: 14px;
        line-height: 22px;
    }

    h2.content-block-heading {
        font-size: 22px;
    }

    h3.content-block-heading {
        font-size: 20px;
    }

    h4.content-block-heading {
        font-size: 18px;
    }

    h5.content-block-heading {
        font-size: 16px;
    }

    h6.content-block-heading {
        font-size: 14px;
    }

    .content-block-text {
        font-size: 14px;
        line-height: 22px;
    }

    .content-block-list li {
        font-size: 14px;
        line-height: 22px;
    }

    .content-block-image-caption-bold {
        font-size: 14px;
        line-height: 22px;
    }

    .content-block-quote {
        font-size: 14px;
        line-height: 22px;
        padding: 12px 12px 12px 20px;
    }
}