/* Фильтр по годам — фактическая разметка архива */
.stm-news-archive .stm-archive-years {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    padding: 0;
    border: 0;
}

.stm-news-archive .stm-archive-years__item {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    margin: 0;
    padding: 10px 17px;
    border: 1px solid #e2e6ef;
    border-radius: 0;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.stm-news-archive .stm-archive-years__item:hover {
    border-color: #001b72;
    background: #f5f7fc;
    color: #001b72;
}

.stm-news-archive .stm-archive-years__item.is-active,
.stm-news-archive .stm-archive-years__item[aria-pressed="true"] {
    border-color: #001b72;
    background: #001b72;
    color: #fff;
}

@media (max-width: 640px) {
    .stm-news-archive .stm-archive-years {
        gap: 8px;
        margin-bottom: 20px;
    }

    .stm-news-archive .stm-archive-years__item {
        min-height: 40px;
        padding: 9px 12px;
        font-size: 13px;
    }
}



/* =========================================================
   1. ОБЩИЕ НАСТРОЙКИ
   ========================================================= */

.stm-news-intro,
.stm-news-archive,
.stm-news-contact,
.stm-news-bottom-image {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.stm-news-intro *,
.stm-news-archive *,
.stm-news-contact *,
.stm-news-bottom-image *,
.stm-news-intro *::before,
.stm-news-archive *::before,
.stm-news-contact *::before,
.stm-news-bottom-image *::before,
.stm-news-intro *::after,
.stm-news-archive *::after,
.stm-news-contact *::after,
.stm-news-bottom-image *::after {
    box-sizing: border-box;
}

/* =========================================================
   2. ВСТУПИТЕЛЬНОЕ ОПИСАНИЕ
   ========================================================= */

.stm-news-intro {
    padding: 0 0 30px;
    background: #fff;
    color: #222;
}

.stm-news-intro__inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.stm-news-intro__title {
    margin: 0 0 18px;
    color: #111;
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 700;
    line-height: 1.2;
}

.stm-news-intro__text {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    color: #454545;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
}

/* =========================================================
   3. АРХИВ НОВОСТЕЙ
   ========================================================= */

.stm-news-archive {
    margin-bottom: 48px;
    color: #222;
    background: #fff;
}

.stm-news-archive a,
.stm-news-archive a:hover,
.stm-news-archive a:focus {
    text-decoration: none !important;
}

/* Фильтры новостей */

.stm-news-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    padding: 0;
    border: 0;
}

.stm-news-filter {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    margin: 0;
    padding: 10px 17px;
    border: 1px solid #e2e6ef;
    border-radius: 0;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    cursor: pointer;
    transition:
        background-color .2s ease,
        color .2s ease,
        border-color .2s ease;
}

.stm-news-filter:hover {
    border-color: #001b72;
    background: #f5f7fc;
    color: #001b72;
}

.stm-news-filter.is-active,
.stm-news-filter[aria-pressed="true"] {
    border-color: #001b72;
    background: #001b72;
    color: #fff;
}

/* Сетка карточек */

.stm-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 28px;
    width: 100%;
    max-width: none;
}

.stm-news-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    overflow: hidden;
    border: 1px solid #e1e5ed;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.stm-news-card:hover {
    border-color: #cbd4e5;
    box-shadow: 0 5px 18px rgba(0, 27, 114, .06);
}

/* Изображение новости */

.stm-news-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f7fc;
}

.stm-news-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: 0;
    object-fit: cover;
    object-position: center;
    transition: transform .3s ease;
}

.stm-news-card:hover .stm-news-card__image img {
    transform: scale(1.02);
}

/* Содержимое карточки */

.stm-news-card__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 20px;
}

/* Дата, время чтения, просмотры */

.stm-news-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    width: 100%;
    margin: 0 0 14px;
    color: #718096;
    font-size: 12px;
    line-height: 1.5;
}

.stm-news-card__meta > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.stm-news-card__date,
.stm-news-card__reading-time,
.stm-news-card__views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stm-news-card__meta svg,
.stm-news-card__views svg {
    display: block;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Категории */

.stm-news-card__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding-top: 2px;
}

.stm-news-card__category {
    display: inline-block;
    padding: 3px 7px;
    border: 1px solid #e2e7f2;
    border-radius: 0;
    background: #f5f7fc;
    color: #001b72;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

/* Заголовок новости */

.stm-news-card__title {
    width: 100%;
    margin: 0 0 10px;
    color: #111;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.stm-news-card__title a {
    color: inherit;
    text-decoration: none !important;
}

.stm-news-card__title a:hover,
.stm-news-card__title a:focus {
    color: #001b72;
    text-decoration: none !important;
}

/* Краткое описание новости */

.stm-news-card__description {
    width: 100%;
    margin: 0 0 14px;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* Счётчик просмотров */

.stm-news-card__views {
    order: 10;
    margin: 0;
    padding-top: 0;
    border-top: 1px solid #e8ebf2;
    color: #747b88;
    font-size: 12px;
    line-height: 1.5;
}

/* Состояния фильтра */

.stm-news-card[hidden] {
    display: none !important;
}

.stm-news-no-results,
.stm-news-empty {
    margin: 25px 0;
    padding: 22px;
    border: 1px solid #e8ebf2;
    background: #f5f7fc;
    color: #444;
    font-size: 15px;
    line-height: 1.7;
}

/* =========================================================
   4. БЛОК ОБРАТНОЙ СВЯЗИ
   ========================================================= */

.stm-news-contact {
    display: block;
    margin-top: 40px !important;
    margin-bottom: 0 !important;
    padding: 30px !important;
    border: 1px solid #e1e7f3 !important;
    border-radius: 0 !important;
    background: #f3f6ff !important;
    color: #252b38;
    box-shadow: none !important;
}

/* Заголовок контактного блока */

.stm-news-contact .stm-news-contact__title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: #171717 !important;
    font-family: inherit;
    font-size: 27px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

/* Описание контактного блока */

.stm-news-contact .stm-news-contact__description {
    width: 100%;
    max-width: none;
    margin: 0 0 22px !important;
    padding: 0 !important;
    color: #252b38 !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.85 !important;
}

/* Сетка контактов */

.stm-news-contact .stm-news-contact__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Карточки контактов */

.stm-news-contact .stm-news-contact__card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    width: 100%;
    min-width: 0;
    min-height: 105px;
    margin: 0 !important;
    padding: 20px !important;
    border: 1px solid #e1e7f3 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #252b38 !important;
    font-family: inherit;
    font-size: inherit;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

/* Наведение и фокус */

.stm-news-contact a.stm-news-contact__card:hover,
.stm-news-contact a.stm-news-contact__card:focus,
.stm-news-contact button.stm-news-contact__card:hover,
.stm-news-contact button.stm-news-contact__card:focus {
    border-color: #315cff !important;
    background: #fff !important;
    color: #252b38 !important;
    text-decoration: none !important;
    box-shadow: 0 5px 18px rgba(0, 27, 114, .08) !important;
}

/* Кнопка Popup Maker */

.stm-news-contact button.stm-news-contact__card {
    appearance: none !important;
    -webkit-appearance: none !important;
    font-family: inherit;
    text-transform: none !important;
    letter-spacing: normal !important;
    outline-offset: 3px;
}

.stm-news-contact button.stm-news-contact__card,
.stm-news-contact button.stm-news-contact__card *,
.stm-news-contact button.stm-news-contact__card:hover *,
.stm-news-contact button.stm-news-contact__card:focus * {
    text-decoration: none !important;
}

.stm-news-contact .stm-news-contact__card:focus-visible {
    outline: 2px solid #315cff;
    outline-offset: 3px;
}

/* Иконки контактов */

.stm-news-contact .stm-news-contact__icon {
    display: flex;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #f3f6ff;
    color: #001b72;
}

.stm-news-contact .stm-news-contact__icon svg {
    display: block;
    width: 25px;
    height: 25px;
    max-width: none;
    margin: 0;
    padding: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Текст внутри карточек */

.stm-news-contact .stm-news-contact__info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.stm-news-contact .stm-news-contact__label {
    display: block;
    margin: 0;
    padding: 0;
    color: #596579 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5;
}

.stm-news-contact .stm-news-contact__value {
    display: block;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: #001b72 !important;
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.45;
    text-align: left;
    text-decoration: none !important;
    box-shadow: none !important;
    overflow-wrap: anywhere;
}

/* =========================================================
   5. НИЖНЕЕ ИЗОБРАЖЕНИЕ — НА ВСЮ ШИРИНУ ЭКРАНА
   ========================================================= */

.stm-news-bottom-image {
    display: block !important;
    position: relative !important;

    width: 100vw !important;
    max-width: none !important;

    /* Верхний отступ сохраняем */
    margin-top: 20px !important;

    /* Нижний отступ убираем */
    margin-bottom: 0 !important;

    /* Выход за границы контейнера WordPress */
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;

    padding: 0 !important;
    border: 0 !important;
    overflow: hidden;
    line-height: 0 !important;
    font-size: 0 !important;
}

.stm-news-bottom-image img {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 331px !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;

    object-fit: cover;
    object-position: center;
    vertical-align: bottom;
}

/* =========================================================
   МОБИЛЬНЫЕ УСТРОЙСТВА
   ========================================================= */

@media (max-width: 600px) {
    .stm-news-bottom-image {
        width: 100vw !important;
        max-width: none !important;

        /* Сохраняем верхний отступ на телефоне */
        margin-top: 16px !important;

        margin-bottom: 0 !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;

        padding: 0 !important;
    }

    .stm-news-bottom-image img {
        width: 100% !important;
        height: 150px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* =========================================================
   6. ПЛАНШЕТЫ
   ========================================================= */

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

@media (max-width: 1000px) {
    .stm-news-contact {
        padding: 25px 22px !important;
    }

    .stm-news-contact .stm-news-contact__grid {
        gap: 12px;
    }

    .stm-news-contact .stm-news-contact__card {
        gap: 11px;
        padding: 16px 13px !important;
    }

    .stm-news-contact .stm-news-contact__icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .stm-news-contact .stm-news-contact__value {
        font-size: 14px !important;
    }
}

@media (max-width: 800px) {
    .stm-news-contact .stm-news-contact__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stm-news-contact .stm-news-contact__card:last-child {
        grid-column: 1 / -1;
    }
}

/* =========================================================
   7. МОБИЛЬНЫЕ УСТРОЙСТВА
   ========================================================= */

@media (max-width: 640px) {
    .stm-news-intro {
        padding-bottom: 23px;
    }

    .stm-news-intro__title {
        font-size: 27px;
        line-height: 1.25;
    }

    .stm-news-intro__text {
        font-size: 15px;
        line-height: 1.7;
    }

    .stm-news-archive {
        margin-bottom: 35px;
    }

    .stm-news-filters {
        gap: 8px;
        margin-bottom: 20px;
    }

    .stm-news-filter {
        min-height: 40px;
        padding: 9px 12px;
        font-size: 13px;
    }

    .stm-news-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .stm-news-card__content {
        padding: 19px;
    }

    .stm-news-card__title {
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .stm-news-contact {
        margin-top: 30px !important;
        padding: 21px 17px !important;
    }

    .stm-news-contact .stm-news-contact__title {
        margin-bottom: 10px !important;
        font-size: 23px !important;
        line-height: 1.35 !important;
    }

    .stm-news-contact .stm-news-contact__description {
        margin-bottom: 20px !important;
        font-size: 14px !important;
        line-height: 1.8 !important;
    }

    .stm-news-contact .stm-news-contact__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .stm-news-contact .stm-news-contact__card,
    .stm-news-contact .stm-news-contact__card:last-child {
        grid-column: auto;
        min-height: 88px;
        gap: 13px;
        padding: 17px !important;
    }

    .stm-news-contact .stm-news-contact__icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    .stm-news-contact .stm-news-contact__icon svg {
        width: 23px;
        height: 23px;
    }

    .stm-news-contact .stm-news-contact__label {
        font-size: 12px !important;
    }

    .stm-news-contact .stm-news-contact__value {
        font-size: 15px !important;
    }

		.stm-news-bottom-image {
				margin: 16px 0 0 !important;
				padding: 0 !important;
				line-height: 0 !important;
		}

		.stm-news-bottom-image img {
				display: block;
				margin: 0 !important;
				vertical-align: bottom;
		}
}

/* Очень узкие экраны */

@media (max-width: 360px) {
    .stm-news-contact {
        padding: 15px !important;
    }

    .stm-news-contact .stm-news-contact__card {
        gap: 10px;
        padding: 13px !important;
    }

    .stm-news-contact .stm-news-contact__value {
        font-size: 14px !important;
    }
}

/* =========================================================
   8. УМЕНЬШЕНИЕ АНИМАЦИИ
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .stm-news-card,
    .stm-news-card__image img,
    .stm-news-filter,
    .stm-news-contact *,
    .stm-news-contact *::before,
    .stm-news-contact *::after {
        transition: none !important;
        animation: none !important;
    }
}


/* Фильтр по годам — фактическая разметка архива */
.stm-news-archive .stm-archive-years {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    padding: 0;
    border: 0;
}

.stm-news-archive .stm-archive-years__item {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    margin: 0;
    padding: 10px 17px;
    border: 1px solid #e2e6ef;
    border-radius: 0;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.stm-news-archive .stm-archive-years__item:hover {
    border-color: #001b72;
    background: #f5f7fc;
    color: #001b72;
}

.stm-news-archive .stm-archive-years__item.is-active,
.stm-news-archive .stm-archive-years__item[aria-pressed="true"] {
    border-color: #001b72;
    background: #001b72;
    color: #fff;
}

@media (max-width: 640px) {
    .stm-news-archive .stm-archive-years {
        gap: 8px;
        margin-bottom: 20px;
    }

    .stm-news-archive .stm-archive-years__item {
        min-height: 40px;
        padding: 9px 12px;
        font-size: 13px;
    }
}
/* Фильтр годов новостей — оформление как на странице блога */
.stm-news-archive:not(.stm-blog-archive) .stm-archive-years {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    margin: 0 0 28px;
    padding: 15px 24px;
    border: 0;
    border-radius: 11px;
    background: #f7f7f9;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-years__item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    margin: 0;
    padding: 5px 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #000 !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    cursor: pointer;
    transition: color .18s ease;
}

.stm-news-archive:not(.stm-blog-archive)
.stm-archive-years__item + .stm-archive-years__item::before {
    content: "|";
    position: absolute;
    left: 0;
    top: 50%;
    color: #a6a8af;
    transform: translateY(-50%);
}

.stm-news-archive:not(.stm-blog-archive)
.stm-archive-years__item:hover,
.stm-news-archive:not(.stm-blog-archive)
.stm-archive-years__item.is-active {
    background: transparent;
    color: #001b72 !important;
}

.stm-news-archive:not(.stm-blog-archive)
.stm-archive-years__item:focus-visible {
    outline: 2px solid #315cff;
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .stm-news-archive:not(.stm-blog-archive) .stm-archive-years {
        gap: 3px 0;
        margin-bottom: 20px;
        padding: 10px 8px;
    }

    .stm-news-archive:not(.stm-blog-archive) .stm-archive-years__item {
        padding: 5px 12px;
        font-size: 13px;
    }
}


/* Пагинация архива новостей */
.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    margin: 10px 0 35px;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination[hidden] {
    display: none !important;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination__item {
    min-width: 38px;
    min-height: 38px;
    padding: 7px 11px;
    border: 0;
    background: transparent;
    color: #001b72;
    font: inherit;
    font-size: 15px;
    cursor: pointer;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination__item + .stm-archive-pagination__item::before {
    content: "|";
    margin-right: 17px;
    color: #a6a8af;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination__item.is-active {
    color: #315cff;
    font-weight: 700;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination__item:disabled {
    opacity: .35;
    cursor: default;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination__item:focus-visible {
    outline: 2px solid #315cff;
    outline-offset: 2px;
}

/* Кнопка «Загрузить ещё» */
.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 20px 0 35px;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination[hidden] {
    display: none !important;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination__load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 24px;
    border: 1px solid #001b72;
    border-radius: 4px;
    background: #fff;
    color: #001b72;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination__load-more:hover {
    background: #001b72;
    color: #fff;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination__load-more span {
    font-size: 19px;
    line-height: 1;
}

.stm-news-archive:not(.stm-blog-archive) .stm-archive-pagination__load-more:focus-visible {
    outline: 2px solid #315cff;
    outline-offset: 3px;
}
