/* Типографика редакционного контента: статьи блога (.post-wrap__content)
   и юридические страницы (.policy).

   Зачем отдельный файл: контент статей приходит из редактора как «голый»
   HTML (h2/h3/p/ul/ol/table/blockquote) и до этого опирался на дефолты
   Bootstrap. Из-за этого h3 (28px) выходил крупнее h2 (26px), списки шли
   браузерными «дисками» с отступом 32px, таблицы были без рамок и без
   прокрутки на телефоне. Здесь тот же визуальный язык, что у SEO-блока
   .dka-seo: фирменный красный #ff3333, панели #F8F8F8, радиус 15px.

   Все селекторы ограничены .post-wrap__content и .policy — на другие
   блоки темы файл не влияет. */

.post-wrap__content,
.policy {
    color: #010101;
    font-size: 15px;
    line-height: 1.55;
}

.post-wrap__content p,
.policy p {
    margin: 0 0 14px;
}

/* ---------- Заголовки ---------- */

.post-wrap__content h2,
.policy h2 {
    margin: 32px 0 14px;
    color: #010101;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

/* Красная черта под заголовком — как в SEO-блоке */
.post-wrap__content h2::after,
.policy h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin-top: 8px;
    border-radius: 2px;
    background: #ff3333;
}

.post-wrap__content h2:first-child,
.policy h2:first-child {
    margin-top: 0;
}

/* h3 обязан быть мельче h2: раньше его подхватывал Bootstrap (1.75rem) */
.post-wrap__content h3,
.policy h3 {
    margin: 22px 0 10px;
    color: #010101;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.post-wrap__content h4,
.policy h4 {
    margin: 18px 0 8px;
    color: #010101;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

/* ---------- Ссылки ---------- */

.post-wrap__content a,
.policy a {
    color: #ff3333;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-wrap__content a:hover,
.policy a:hover {
    text-decoration: none;
}

/* ---------- Списки ---------- */

.post-wrap__content ul,
.policy ul {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.post-wrap__content ul > li,
.policy ul > li {
    position: relative;
    margin-bottom: 9px;
    padding-left: 22px;
}

.post-wrap__content ul > li::before,
.policy ul > li::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    left: 2px;
    top: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff3333;
}

.post-wrap__content ol,
.policy ol {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    counter-reset: dka-ol;
}

.post-wrap__content ol > li,
.policy ol > li {
    position: relative;
    margin-bottom: 9px;
    padding-left: 26px;
    counter-increment: dka-ol;
}

.post-wrap__content ol > li::before,
.policy ol > li::before {
    content: counter(dka-ol) "." !important;
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    color: #ff3333;
    font-weight: 600;
}

/* Вложенные списки не дублируют маркеры */
.post-wrap__content ul ul,
.post-wrap__content ol ul,
.policy ul ul,
.policy ol ul {
    margin: 9px 0 0;
}

/* ---------- Таблицы ---------- */

/* Обёртка .dka-table-scroll добавляется фильтром the_content и в single-post.php:
   на узких экранах таблица прокручивается, а не растягивает страницу. */
.dka-table-scroll {
    margin: 0 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.post-wrap__content table,
.policy table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 14px;
}

.post-wrap__content caption,
.policy caption {
    margin-bottom: 8px;
    color: #7a7a7a;
    font-size: 13px;
    text-align: left;
}

.post-wrap__content th,
.post-wrap__content td,
.policy th,
.policy td {
    padding: 10px 12px;
    border: 1px solid #ececec;
    text-align: left;
    vertical-align: top;
}

.post-wrap__content th,
.policy th {
    background: #F8F8F8;
    font-weight: 600;
}

.post-wrap__content tbody tr:nth-child(even) td,
.policy tbody tr:nth-child(even) td {
    background: #fcfcfc;
}

/* ---------- Цитата ---------- */

.post-wrap__content blockquote,
.policy blockquote {
    margin: 20px 0;
    padding: 16px 18px;
    border-left: 4px solid #ff3333;
    border-radius: 0 10px 10px 0;
    background: #F8F8F8;
    font-style: normal;
}

.post-wrap__content blockquote p:last-child,
.policy blockquote p:last-child {
    margin-bottom: 0;
}

/* ---------- Картинки ---------- */

.post-wrap__content img,
.policy img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
}

.post-wrap__content figure,
.policy figure {
    margin: 0 0 20px;
}

.post-wrap__content figcaption,
.policy figcaption {
    margin-top: 8px;
    color: #7a7a7a;
    font-size: 13px;
}

/* ---------- Адаптив ---------- */

@media (min-width: 768px) {
    .post-wrap__content,
    .policy {
        font-size: 17px;
    }

    .post-wrap__content h2,
    .policy h2 {
        margin-top: 38px;
        font-size: 24px;
    }

    .post-wrap__content h3,
    .policy h3 {
        font-size: 19px;
    }

    .post-wrap__content h4,
    .policy h4 {
        font-size: 16px;
    }

    .post-wrap__content table,
    .policy table {
        font-size: 15px;
    }
}

@media (min-width: 1276px) {
    .post-wrap__content,
    .policy {
        font-size: 18px;
    }

    .post-wrap__content h2,
    .policy h2 {
        margin-top: 44px;
    }
}
