/* ==========================================
   Общая структура
========================================== */

.mblog {
    background: #fff;
    color: #07182f;
    font-family: "LatoWeb", Arial, sans-serif;
}

.mblog *,
.mblog *::before,
.mblog *::after {
    box-sizing: border-box;
}

.mblog [hidden] {
    display: none !important;
}

.mblog a {
    text-decoration: none;
}

.mblog :is(a, button):focus-visible {
    outline: 3px solid #80baf0;
    outline-offset: 4px;
}


/* ==========================================
   Хлебные крошки
========================================== */

.mblog__breadcrumbs {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    color: #71849a;
    font-size: 14px;
}

.mblog__breadcrumbs a {
    color: #014a8d;
}


/* ==========================================
   Заголовок страницы
========================================== */

.mblog__title {
    margin: 0;
    color: #014a8d;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.12;
}

.mblog__intro {
    margin: 16px 0 0;
    color: #71849a;
    font-size: 18px;
    line-height: 1.5;
}


/* ==========================================
   Уведомление редактора
========================================== */

.mblog__notice {
    margin: 22px 0 0;
    padding: 14px 18px;
    border: 1px solid #ead8b6;
    border-radius: 14px;
    background: #fff8e9;
    font-size: 14px;
    line-height: 1.5;
}


/* ==========================================
   Фильтры по рубрикам
========================================== */

.mblog__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.mblog__featured {
    margin-top: 40px;
}

.mblog .mblog__filter {
    display: inline-flex;
    padding: 12px 21px;
    border: 1px solid transparent;
    border-radius: 26px;
    background: #edf7ff;
    color: #687b90;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1.3;
    transition:
        background-color .4s ease,
        color .4s ease,
        border-color .4s ease;
}

.mblog .mblog__filter.is-active {
    background: #014a8d;
    color: #fff;
}


/* ==========================================
   Карточки статей
========================================== */

.mblog__card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dcebf6;
    border-radius: 22px;
    background: #fff;
    flex-direction: column;
    transition:
        border-color .4s ease,
        transform .4s ease;
}

.mblog__cover {
    display: block;
    overflow: hidden;
    background: #edf7ff;
    flex-shrink: 0;
    aspect-ratio: 3 / 2;
}

.mblog__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.mblog__card-body {
    display: flex;
    min-width: 0;
    padding: 23px;
    flex: 1;
    flex-direction: column;
}

.mblog__card-title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}

.mblog__card-title a {
    color: #014a8d;
    transition: color .4s ease;
}

.mblog__excerpt {
    margin: 13px 0 22px;
    color: #687b90;
    font-size: 15px;
    line-height: 1.55;
}

.mblog__date {
    display: block;
    margin-top: auto;
    color: #7c91a7;
    font-size: 13px;
}


/* ==========================================
   Рубрики и статус карточки
========================================== */

.mblog__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 13px;
}

.mblog__tag,
.mblog__draft {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    background: #e5f3ff;
    color: #075ca8;
    font-size: 12px;
    line-height: 1.3;
}

.mblog__draft {
    background: #fff3d9;
    color: #806536;
}


/* ==========================================
   Заглушки обложек
========================================== */

.mblog__placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    background: #edf6fc;
    color: #0870c9;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
}

.mblog__placeholder--cosmo {
    background: #f0f5f9;
    color: #59849f;
}

.mblog__placeholder svg {
    width: 70px;
    height: 70px;
}

.mblog__placeholder span {
    font-size: 14px;
    letter-spacing: .05em;
}


/* ==========================================
   Выделенная статья
========================================== */

.mblog__card--featured {
    display: grid;
    padding: 18px;
    border-color: transparent;
    border-radius: 28px;
    background: #f4f9fd;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mblog__card--featured .mblog__cover {
    height: 100%;
    min-height: 330px;
    border-radius: 20px;
}

.mblog__card--featured .mblog__card-body {
    padding: 28px;
    align-self: center;
}

.mblog__card--featured .mblog__card-title {
    font-size: 30px;
    line-height: 1.2;
}

.mblog__card--featured .mblog__excerpt {
    font-size: 17px;
}

.mblog .mblog__read {
    display: inline-flex;
    margin-top: 24px;
    color: #014a8d;
    align-items: center;
    align-self: flex-start;
    gap: 12px;
    font-size: 16px;
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* ==========================================
   Сетка статей
========================================== */


.mblog__section-title {
    margin: 0 0 24px;
    color: #014a8d;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.mblog__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.mblog__empty {
    padding: 25px 0;
    color: #71849a;
}

.mblog__status {
    min-height: 21px;
    margin: 15px 0 0;
    color: #71849a;
    font-size: 14px;
    text-align: center;
}


/* ==========================================
   Кнопка «Показать ещё»
========================================== */

.mblog__more-wrap {
    margin-top: 20px;
    text-align: center;
}

.mblog__more {
    min-height: 52px;
    padding: 0 35px;
    border: 1px solid #c6dff2;
    border-radius: 28px;
    background: #edf7ff;
    color: #014a8d;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color .4s ease,
        color .4s ease,
        opacity .4s ease;
}

.mblog__more:disabled {
    opacity: .5;
    cursor: wait;
}


/* ==========================================
   Призыв к записи
========================================== */

.mblog__cta {
    display: flex;
    padding: 30px;
    border-radius: 24px;
    background: #f0f8fe;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.mblog__cta h2 {
    margin: 0;
    color: #014a8d;
    font-size: 24px;
    line-height: 1.3;
}

.mblog__cta p {
    margin: 8px 0 0;
    color: #71849a;
    font-size: 16px;
    line-height: 1.5;
}

.mblog .mblog__cta-button {
    display: inline-flex;
    min-height: 54px;
    padding: 12px 26px;
    border-radius: 28px;
    background: #014a8d;
    color: #fff;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    transition: background-color .4s ease;
}


/* ==========================================
   Форма обратного звонка
========================================== */

.mblog__form {
    margin-top: 45px;
    margin-bottom: 45px;
    scroll-margin-top: 100px;
}


/* ==========================================
   Hover-состояния
========================================== */

@media (hover: hover) {
    .mblog .mblog__filter:hover {
        border-color: #a6cde9;
        color: #014a8d;
    }

    .mblog .mblog__filter.is-active:hover {
        color: #fff;
    }

    .mblog__card:hover {
        border-color: #9bc8e8;
        transform: translateY(-3px);
    }

    .mblog__card:hover .mblog__image {
        transform: scale(1.035);
    }

    .mblog__more:hover:not(:disabled) {
        background: #014a8d;
        color: #fff;
    }

    .mblog .mblog__cta-button:hover {
        background: #0870c9;
    }
}


/* ==========================================
   Адаптив — до 1024px
========================================== */

@media (max-width: 1024px) {
    .mblog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mblog__card--featured .mblog__card-body {
        padding: 15px;
    }

    .mblog__card--featured .mblog__card-title {
        font-size: 26px;
    }

    .mblog__cta {
        align-items: flex-start;
    }
}


/* ==========================================
   Адаптив — до 768px
========================================== */

@media (max-width: 768px) {
    .mblog .mblog__container {
        padding: 0 18px;
    }

    .mblog__title {
        font-size: 34px;
    }

    .mblog__intro {
        font-size: 16px;
    }

    .mblog__desktop-break {
        display: none;
    }

    .mblog__filters {
        margin: 23px 0;
        gap: 8px;
    }

    .mblog .mblog__filter {
        padding: 11px 15px;
        font-size: 14px;
    }

    .mblog__card--featured {
        padding: 14px;
        border-radius: 22px;
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .mblog__card--featured .mblog__cover {
        height: auto;
        min-height: 0;
        aspect-ratio: 3 / 2;
    }

    .mblog__card--featured .mblog__card-body {
        padding: 17px 7px 10px;
    }

    .mblog__card--featured .mblog__excerpt {
        font-size: 15px;
    }

    .mblog__section-title {
        font-size: 27px;
    }

    .mblog__grid {
        gap: 16px;
    }

    .mblog__card-body {
        padding: 18px;
    }

    .mblog__card-title {
        font-size: 19px;
    }

    .mblog__cta {
        padding: 24px;
        flex-direction: column;
        gap: 20px;
    }

    .mblog__cta h2 {
        font-size: 22px;
    }
}


/* ==========================================
   Адаптив — до 540px
========================================== */

@media (max-width: 540px) {
    .mblog__grid {
        grid-template-columns: 1fr;
    }

    .mblog__title {
        font-size: 30px;
    }

    .mblog__cta-button {
        width: 100%;
    }
}

/* Вся карточка кликабельна */
.mblog__card {
    position: relative;
}

.mblog__card-title a::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    border-radius: inherit;
    content: "";
}

/* Ссылка «Читать статью» остаётся поверх */
.mblog .mblog__read {
    position: relative;
    z-index: 2;
}

.mblog__card--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mblog__card--featured .mblog__cover {
    width: 100%;
    min-width: 0;
    aspect-ratio: auto;
}

@media (max-width: 768px) {
    .mblog__card--featured {
        grid-template-columns: 1fr;
    }

    .mblog__card--featured .mblog__cover {
        height: auto;
        aspect-ratio: 3 / 2;
    }
}

/* ==========================================
   Статья — общая структура
========================================== */

.marticle {
    background: #fff;
    color: #263a4d;
    font-family: "LatoWeb", Arial, sans-serif;
}

.marticle *,
.marticle *::before,
.marticle *::after {
    box-sizing: border-box;
}

.marticle__breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 20px 0 24px;
    color: #71849a;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.marticle__breadcrumbs a,
.marticle__back {
    color: #014a8d;
    text-decoration: none;
    transition: color .4s ease;
}

.marticle__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: #71849a;
    font-size: 14px;
}

.marticle__category {
    padding: 6px 12px;
    border-radius: 20px;
    background: #edf7ff;
    color: #014a8d;
    text-decoration: none;
    transition: background-color .4s ease, color .4s ease;
}

.marticle .marticle__title {
    margin: 0;
    color: #014a8d;
    font-family: inherit;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.marticle__cover {
    margin: 28px 0 0;
}

.marticle__cover-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 22px;
}

.marticle__back {
    display: inline-block;
    margin-top: 32px;
    font-size: 16px;
    font-weight: 700;
}

.marticle__pages {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.marticle :is(a, button):focus-visible {
    outline: 3px solid #80baf0;
    outline-offset: 4px;
}

/* MILAR_ARTICLE_CONTENT_START */

/* ==========================================
   Статья — текст и типографика
   Этот раздел также используется в редакторе
========================================== */

.marticle__content {
    display: flow-root;
    color: #263a4d;
    font-family: "LatoWeb", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.marticle__content *,
.marticle__content *::before,
.marticle__content *::after {
    box-sizing: border-box;
}

.marticle__content > :first-child {
    margin-top: 0;
}

.marticle__content > :last-child {
    margin-bottom: 0;
}

.marticle__content p {
    margin: 0 0 20px;
    font-size: inherit;
    line-height: inherit;
}

.marticle__content :is(h1, h2, h3, h4, h5, h6) {
    margin: 36px 0 16px;
    color: #014a8d;
    font-family: inherit;
    font-weight: 700;
    line-height: 1.3;
    scroll-margin-top: 110px;
}

.marticle__content h1 { font-size: 36px; }
.marticle__content h2 { font-size: 30px; }
.marticle__content h3 { font-size: 25px; }
.marticle__content h4 { font-size: 22px; }
.marticle__content h5 { font-size: 20px; }
.marticle__content h6 { font-size: 18px; }

.marticle__content strong,
.marticle__content b {
    font-weight: 700;
}

.marticle__content em,
.marticle__content i {
    font-style: italic;
}

.marticle__content small {
    font-size: .85em;
}

.marticle__content sup,
.marticle__content sub {
    font-size: .75em;
}

.marticle__content mark {
    padding: 1px 4px;
    background: #e3f2fc;
    color: inherit;
}

.marticle__content a {
    color: #0870c9;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .4s ease;
}

.marticle__content a:focus-visible {
    outline: 3px solid #80baf0;
    outline-offset: 3px;
}

/* ==========================================
   Статья — списки
========================================== */

.marticle__content ul,
.marticle__content ol {
    margin: 0 0 24px;
    padding-left: 28px;
    list-style-position: outside;
}

.marticle__content ul { list-style-type: disc; }
.marticle__content ol { list-style-type: decimal; }
.marticle__content ul ul { list-style-type: circle; }
.marticle__content ul ul ul { list-style-type: square; }

.marticle__content li {
    display: list-item;
    margin: 8px 0;
    padding-left: 4px;
    line-height: 1.65;
}

.marticle__content li::marker {
    color: #0870c9;
    font-weight: 700;
}

.marticle__content li::before {
    content: none;
}

.marticle__content li > p {
    margin-bottom: 8px;
}

.marticle__content li > :is(ul, ol) {
    margin: 10px 0;
}

.marticle__content dl { margin: 0 0 24px; }
.marticle__content dt { font-weight: 700; }
.marticle__content dd { margin: 6px 0 18px 22px; }

/* ==========================================
   Статья — цитаты и разделители
========================================== */

.marticle__content blockquote,
.marticle__content .wp-block-pullquote {
    margin: 28px 0;
    padding: 24px 28px;
    border: 0;
    border-left: 4px solid #0870c9;
    border-radius: 0 16px 16px 0;
    background: #f2f8fd;
    color: #465d73;
    font-size: inherit;
    text-align: left;
}

.marticle__content .wp-block-pullquote blockquote {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.marticle__content blockquote > p:last-of-type {
    margin-bottom: 0;
}

.marticle__content cite {
    display: block;
    margin-top: 12px;
    color: #71849a;
    font-size: 14px;
    font-style: normal;
}

.marticle__content hr,
.marticle__content .wp-block-separator {
    width: 100%;
    max-width: none;
    height: 0;
    margin: 32px 0;
    border: 0;
    border-top: 1px solid #dcebf6;
    background: transparent;
}

/* ==========================================
   Статья — фотографии и галереи
========================================== */

.marticle__content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 18px;
}

.marticle__content figure,
.marticle__content .wp-caption {
    max-width: 100%;
    margin: 28px 0;
}

.marticle__content .wp-block-image img {
    margin-inline: auto;
}

.marticle__content figcaption,
.marticle__content .wp-caption-text {
    margin: 10px 0 0;
    color: #71849a;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.marticle__content .aligncenter {
    display: block;
    margin-inline: auto;
}

.marticle__content .alignleft {
    float: left;
    max-width: 45%;
    margin: 6px 24px 18px 0;
}

.marticle__content .alignright {
    float: right;
    max-width: 45%;
    margin: 6px 0 18px 24px;
}

.marticle__content :is(.alignwide, .alignfull) {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
}

.marticle__content .wp-block-gallery {
    gap: 16px !important;
}

.marticle__content .wp-block-gallery figure.wp-block-image {
    margin: 0;
}

.marticle__content .wp-block-gallery .wp-block-image figcaption {
    border-radius: 0 0 18px 18px;
}

.marticle__content .wp-block-gallery .wp-block-image a {
    display: block;
    width: 100%;
}

/* ==========================================
   Статья — видео, аудио и вставки
========================================== */

.marticle__content video,
.marticle__content audio {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
}

.marticle__content video {
    height: auto;
    max-height: 75vh;
    border-radius: 18px;
    background: #07182f;
    object-fit: contain;
}

.marticle__content .wp-block-embed,
.marticle__content .wp-block-video,
.marticle__content .wp-block-audio {
    margin: 28px 0;
}

.marticle__content .wp-block-embed__wrapper {
    overflow: hidden;
    border-radius: 18px;
}

.marticle__content iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
    border-radius: 18px;
}

/* Gutenberg хранит пропорции встроенного ролика в классах блока. */
.marticle__content .wp-has-aspect-ratio .wp-block-embed__wrapper {
    position: relative;
}

.marticle__content .wp-has-aspect-ratio .wp-block-embed__wrapper::before {
    display: block;
    padding-top: 56.25%;
    content: "";
}

.marticle__content .wp-embed-aspect-4-3 .wp-block-embed__wrapper::before { padding-top: 75%; }
.marticle__content .wp-embed-aspect-1-1 .wp-block-embed__wrapper::before { padding-top: 100%; }
.marticle__content .wp-embed-aspect-9-16 .wp-block-embed__wrapper::before { padding-top: 177.78%; }
.marticle__content .wp-embed-aspect-21-9 .wp-block-embed__wrapper::before { padding-top: 42.86%; }

.marticle__content .wp-has-aspect-ratio .wp-block-embed__wrapper iframe {
    position: absolute;
    inset: 0;
    height: 100%;
}

.marticle__content iframe:not(.wp-embedded-content) {
    aspect-ratio: 16 / 9;
}

.marticle__content .wp-has-aspect-ratio iframe {
    aspect-ratio: auto;
}

/* ==========================================
   Статья — таблицы
========================================== */

.marticle__content .wp-block-table {
    width: 100%;
    overflow-x: auto;
    margin: 28px 0;
    -webkit-overflow-scrolling: touch;
}

.marticle__content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 24px 0;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.5;
}

.marticle__content .wp-block-table table {
    display: table;
    min-width: 540px;
    margin: 0;
    table-layout: auto;
}

.marticle__content th,
.marticle__content td {
    min-width: 120px;
    padding: 14px 16px;
    border: 1px solid #d5e6f3;
    vertical-align: top;
    text-align: left;
    overflow-wrap: anywhere;
}

.marticle__content th {
    background: #edf7ff;
    color: #014a8d;
    font-weight: 700;
}

.marticle__content tbody tr:nth-child(even) {
    background: #f8fbfe;
}

.marticle__content caption {
    margin-bottom: 12px;
    color: #71849a;
    font-size: 14px;
}

/* ==========================================
   Статья — кнопки, файлы и код
========================================== */

.marticle__content .wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.marticle__content .wp-block-button__link,
.marticle__content .wp-block-file__button {
    display: inline-block;
    max-width: 100%;
    padding: 13px 24px;
    border: 1px solid #014a8d;
    border-radius: 28px;
    background: #014a8d;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color .4s ease, color .4s ease, border-color .4s ease;
}

.marticle__content .is-style-outline .wp-block-button__link {
    background: transparent;
    color: #014a8d;
}

.marticle__content .wp-block-file {
    margin: 24px 0;
    font-size: 16px;
}

.marticle__content pre {
    max-width: 100%;
    overflow: auto;
    margin: 24px 0;
    padding: 20px;
    border: 1px solid #dcebf6;
    border-radius: 14px;
    background: #f4f9fd;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre;
}

.marticle__content code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #f0f6fb;
    font-family: Consolas, monospace;
    font-size: .9em;
}

.marticle__content pre code {
    padding: 0;
    background: transparent;
}

/* ==========================================
   Статья — интерактивные состояния
========================================== */

@media (hover: hover) {
    .marticle__content a:hover {
        color: #014a8d;
    }

    .marticle__content .wp-block-button__link:hover,
    .marticle__content .wp-block-file__button:hover {
        border-color: #0870c9;
        background: #0870c9;
        color: #fff;
    }
}

/* ==========================================
   Статья — адаптив текста и медиа
========================================== */

@media (max-width: 768px) {
    .marticle__content {
        font-size: 16px;
        line-height: 1.65;
    }

    .marticle__content :is(h1, h2, h3, h4, h5, h6) {
        margin-top: 28px;
        margin-bottom: 14px;
    }

    .marticle__content h1 { font-size: 30px; }
    .marticle__content h2 { font-size: 26px; }
    .marticle__content h3 { font-size: 22px; }
    .marticle__content h4 { font-size: 20px; }
    .marticle__content h5 { font-size: 18px; }
    .marticle__content h6 { font-size: 16px; }

    .marticle__content blockquote,
    .marticle__content .wp-block-pullquote {
        padding: 20px;
    }

    .marticle__content th,
    .marticle__content td {
        padding: 11px 13px;
    }

    .marticle__content figure,
    .marticle__content .wp-caption {
        margin-block: 22px;
    }
}

@media (max-width: 540px) {
    .marticle__content .alignleft,
    .marticle__content .alignright {
        float: none;
        max-width: 100%;
        margin: 22px auto;
    }

    .marticle__content .wp-block-gallery {
        gap: 12px !important;
    }

    .marticle__content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
        width: calc(50% - 6px);
        flex-grow: 0;
    }

    .marticle__content .wp-block-gallery.columns-1 figure.wp-block-image:not(#individual-image) {
        width: 100%;
    }

    .marticle__content img,
    .marticle__content video,
    .marticle__content iframe {
        border-radius: 14px;
    }
}

/* MILAR_ARTICLE_CONTENT_END */

/* ==========================================
   Статья — адаптив заголовка
========================================== */

@media (max-width: 768px) {
    .marticle .marticle__title {
        font-size: 32px;
    }

    .marticle__breadcrumbs {
        font-size: 12px;
    }

    .marticle__cover {
        margin-top: 22px;
    }
}

@media (max-width: 420px) {
    .marticle .marticle__title {
        font-size: 28px;
    }
}

.mblog__status:empty,
.mblog__more-wrap:has(> .mblog__more[hidden]) {
    display: none;
}