/* Статья раздела «Актуальное» */

/*
 * Колонки страницы. Шаблон сайта не оборачивает контент в контейнер,
 * поэтому каждый блок статьи сам занимает нужную ширину:
 *   .editorial-wide   — по ширине карусели товаров (до 1400 px)
 *   .editorial-narrow — колонка для чтения (до 880 px)
 *   .editorial-full   — во всю ширину окна
 *
 * Картинки не зависят от классов сайта: размеры и кадрирование заданы здесь.
 */
.editorial-article {
    padding-bottom: 96px;
    overflow-x: hidden;
}

.editorial-wide,
.editorial-narrow {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.editorial-wide {
    max-width: 1400px;
}

.editorial-narrow {
    max-width: 880px;
}

.editorial-full {
    width: 100%;
}

.editorial-section {
    padding-top: 16px;
    padding-bottom: 16px;
}

/* --- Типографика --- */
.editorial-h {
    display: block;
    margin: 0;
    font-family: "Zt Chablis", serif;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.15;
}

.editorial-subh {
    display: block;
    margin-bottom: 16px;
    font-family: "Zt Chablis", serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.editorial-copy {
    font-size: 18px;
    line-height: 1.6;
}

/*
 * --- Картинка слева, текст справа ---
 * Шапка статьи и блок «Баннер» в этом виде. Ширина — как у карусели товаров,
 * картинке хватает 1000 px по ширине. Картинка кадрируется в 3:2,
 * текст по вертикали по центру на бежевом поле.
 */
.editorial-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 100%;
    color: inherit;
    background: #F3F0E6;
}

.editorial-split--image {
    grid-template-columns: 1fr;
    background: none;
}

.editorial-split__figure {
    width: 100%;
    margin: 0;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.editorial-split--image .editorial-split__figure {
    aspect-ratio: auto;
}

.editorial-split__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.editorial-split__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 48px 64px;
}

.editorial-split__content .editorial-article__lead,
.editorial-split__content .editorial-banner__text {
    margin: 0;
}

.editorial-hero {
    padding-top: 24px;
}

/*
 * --- Баннер во всю ширину ---
 * Тянется на всю ширину, но не выше экрана — иначе на широком мониторе
 * картинка растягивается до артефактов.
 */
.editorial-banner__inner {
    position: relative;
    display: block;
    width: 100%;
    color: inherit;
}

.editorial-banner__figure {
    position: relative;
    width: 100%;
    max-height: 60vh;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 16 / 7;
}

.editorial-banner__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* подложка под белый текст: без неё заголовок теряется на светлой картинке */
.editorial-banner__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 96px 24px 32px;
    color: #fff;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.editorial-banner__content .main-btn {
    pointer-events: auto;
}

.editorial-banner__text {
    margin: 8px 0 16px;
}

/* --- Шапка без баннера --- */
.editorial-article__header {
    padding-top: 40px;
    text-align: center;
}

.editorial-article__lead {
    margin-top: 12px;
    color: #757575;
}

/*
 * --- Текст из визуального редактора ---
 * В шаблоне сайта теги заголовков, абзацев и списков сброшены (margin: 0,
 * padding: 0), а ссылки сделаны inline-block без подчёркивания. Возвращаем
 * привычный вид только внутри текста статьи, чтобы жирный, курсив, списки,
 * цитаты и ссылки из редактора были видны.
 */
.editorial-article .rte > *:first-child {
    margin-top: 0;
}

.editorial-article .rte :is(b, strong) {
    font-weight: 700;
}

.editorial-article .rte :is(i, em) {
    font-style: italic;
}

.editorial-article .rte :is(u, ins) {
    text-decoration: underline;
}

.editorial-article .rte :is(s, strike, del) {
    text-decoration: line-through;
}

.editorial-article .rte sup {
    vertical-align: super;
    font-size: .75em;
}

.editorial-article .rte sub {
    vertical-align: sub;
    font-size: .75em;
}

.editorial-article .rte a:not(.main-btn) {
    display: inline;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.editorial-article .rte a:not(.main-btn):hover {
    text-decoration-thickness: 2px;
}

.editorial-article .rte :is(h2, h3, h4) {
    display: block;
    margin: 1.2em 0 .5em;
    font-family: "Zt Chablis", serif;
    font-weight: 700;
    line-height: 1.25;
}

.editorial-article .rte h2 {
    font-size: 1.7em;
}

.editorial-article .rte h3 {
    font-size: 1.4em;
}

.editorial-article .rte h4 {
    font-size: 1.15em;
}

.editorial-article .rte :is(p, ul, ol, blockquote) {
    margin-bottom: 1em;
}

.editorial-article .rte > :last-child {
    margin-bottom: 0;
}

/* кнопка «Отступ» в редакторе оборачивает абзац в blockquote */
.editorial-article .rte blockquote {
    display: block;
    margin-top: 0;
    margin-left: 24px;
    margin-right: 0;
}

.editorial-article .rte ul {
    list-style: disc;
    padding-left: 24px;
}

.editorial-article .rte ol {
    list-style: decimal;
    padding-left: 24px;
}

.editorial-article .rte li {
    display: list-item;
}

.editorial-article .rte img {
    max-width: 100%;
    height: auto;
}

/* «во всю ширину»: editorial-full тянет блок до краёв окна, поля возвращаем сами */
.editorial-text--wide {
    padding-left: 24px;
    padding-right: 24px;
}

/*
 * --- Картинка + текст ---
 * Картинка вписывается в колонку по ширине и сохраняет свои пропорции:
 * видно её целиком, без кадрирования и без пустых полей.
 */
.editorial-info {
    display: flex;
    align-items: center;
    gap: 64px;
}

.editorial-info--revers {
    flex-direction: row-reverse;
}

.editorial-info__col {
    flex: 1 1 0;
    min-width: 0;
}

.editorial-info__col--img:only-child,
.editorial-info__col--text:only-child {
    flex-basis: 100%;
}

.editorial-media__figure {
    width: 100%;
    margin: 0;
}

.editorial-media__img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* --- Низ статьи --- */
.editorial-article__back {
    padding-top: 24px;
    text-align: center;
}

@media only screen and (max-width: 991px) {
    .editorial-info {
        gap: 32px;
    }

    .editorial-split__content {
        padding: 32px;
    }
}

@media only screen and (max-width: 767px) {
    .editorial-article {
        padding-bottom: 64px;
    }

    .editorial-wide,
    .editorial-narrow {
        padding-left: 16px;
        padding-right: 16px;
    }

    .editorial-text--wide {
        padding-left: 16px;
        padding-right: 16px;
    }

    .editorial-section {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .editorial-h {
        font-size: 30px;
    }

    .editorial-subh {
        font-size: 24px;
    }

    .editorial-copy {
        font-size: 16px;
    }

    .editorial-banner__figure {
        max-height: none;
        aspect-ratio: 4 / 3;
    }

    .editorial-banner__content {
        padding: 64px 16px 20px;
    }

    .editorial-split {
        grid-template-columns: 1fr;
    }

    .editorial-split__content {
        padding: 24px 16px 32px;
    }

    .editorial-hero {
        padding-top: 0;
    }

    .editorial-article__header {
        padding-top: 24px;
    }

    .editorial-info,
    .editorial-info--revers {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
}
