.stm-documents {
    --stm-doc-blue: #001b72;
    --stm-doc-blue-light: #f2f5ff;
    --stm-doc-border: #d8e1fa;
    --stm-doc-text: #252525;
    --stm-doc-muted: #68758f;
    --stm-doc-white: #ffffff;

    width: 100%;
    max-width: 1450px;
    margin: 0 auto;
    color: var(--stm-doc-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    box-sizing: border-box;
}

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


/* Описание страницы */
.stm-documents-intro {
    margin: 0 0 30px;
    padding: 0;
}

.stm-documents-intro p {
    margin: 0;
    padding: 0;
    color: #333333;
    font-size: 16px;
    line-height: 1.8;
}


/* Сетка документов */
.stm-documents-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
    margin: 0;
    padding: 0;
    align-items: stretch;
}


/* Карточка документа */
.stm-documents-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    min-height: 100%;
    margin: 0;
    padding: 28px;
    background: var(--stm-doc-white);
    border: 1px solid #e3e7f0;
    border-radius: 4px;
    box-shadow: 0 6px 24px rgba(0, 27, 114, 0.045);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.stm-documents-card:hover {
    border-color: #c8d4f2;
    box-shadow: 0 9px 28px rgba(0, 27, 114, 0.08);
}

/* Центрирование изображения документа */
.stm-documents-card__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 190px;
    margin: 0 0 22px;
    overflow: hidden;
}

.stm-documents-card__preview img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}


/* Иконка PDF */
.stm-documents-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 0 0 22px;
    color: var(--stm-doc-blue);
    background: var(--stm-doc-blue-light);
    border-radius: 4px;
}

.stm-documents-card__icon svg {
    display: block;
    width: 36px;
    height: 36px;
}


/* Формат документа */
.stm-documents-card__format {
    display: inline-flex;
    align-items: center;
    margin: 0 0 12px;
    padding: 5px 10px;
    color: var(--stm-doc-blue);
    background: #f2f5ff;
    border: 1px solid #e0e7fa;
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
}


/* Название и описание карточки */
.stm-documents-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    width: 100%;
    height: 60px;
    flex: 0 0 60px;
    margin: 0 0 12px;
    padding: 0;
    color: #202020;
    font-size: 21px;
    line-height: 1.4;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.stm-documents-card__description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    flex: 0 0 102px;
    width: 100%;
    height: 102px;
    margin: 0 0 24px;
    padding: 0;
    color: #626b7c;
    font-size: 15px;
    line-height: 1.7;
}


/* Кнопки */
.stm-documents-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-top: auto;
}

.stm-documents .stm-documents-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 44px;
    margin: 0;
    padding: 11px 15px;
    border: 1px solid var(--stm-doc-blue);
    border-radius: 3px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease,
                border-color .2s ease;
}

.stm-documents .stm-documents-button--primary {
    color: #ffffff !important;
    background: var(--stm-doc-blue);
}

.stm-documents .stm-documents-button--primary:hover {
    color: #ffffff !important;
    background: #12318e;
    border-color: #12318e;
}

.stm-documents .stm-documents-button--secondary {
    color: var(--stm-doc-blue) !important;
    background: #ffffff;
}

.stm-documents .stm-documents-button--secondary:hover {
    color: var(--stm-doc-blue) !important;
    background: #f2f5ff;
}


/* Информационная заметка */
.stm-documents-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 26px 0 0;
    padding: 20px 22px;
    background: #f7f8fc;
    border: 1px solid #e8ebf2;
}

.stm-documents-note__icon {
    display: flex;
    flex: 0 0 25px;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    margin-top: 2px;
    color: var(--stm-doc-blue);
}

.stm-documents-note__icon svg {
    display: block;
    width: 23px;
    height: 23px;
}

.stm-documents-note p {
    margin: 0;
    padding: 0;
    color: #4d5668;
    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   БЛОК «НЕ НАШЛИ НУЖНОГО ОТВЕТА?»
   ========================================================= */

.stm-documents-help {
    width: 100%;
    margin: 28px 0 20px;
    padding: 30px;
    color: #222222;
    background: var(--stm-doc-blue-light);
    border: 1px solid var(--stm-doc-border);
    border-radius: 0;
}

.stm-documents-help__title {
    margin: 0 0 14px;
    padding: 0;
    color: #252525;
    font-size: 26px;
    line-height: 1.3;
    font-weight: 700;
}

.stm-documents-help__description {
    margin: 0 0 24px;
    padding: 0;
    color: #333333;
    font-size: 16px;
    line-height: 1.75;
}


/* Три контактные карточки */
.stm-documents-help__contacts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin: 0;
    padding: 0;
}

.stm-documents-help__contact {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    min-height: 105px;
    margin: 0;
    padding: 20px;
    color: var(--stm-doc-blue) !important;
    background: #ffffff;
    border: 1px solid var(--stm-doc-border);
    border-radius: 0;
    text-decoration: none !important;
    box-shadow: none;
    transition: background-color .2s ease, border-color .2s ease;
}

.stm-documents-help__contact:hover,
.stm-documents-help__contact:focus {
    color: var(--stm-doc-blue) !important;
    background: #fafbff;
    border-color: #b9c9f0;
    text-decoration: none !important;
}

.stm-documents-help__icon {
    display: flex;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: var(--stm-doc-blue);
    background: var(--stm-doc-blue-light);
}

.stm-documents-help__icon svg {
    display: block;
    width: 23px;
    height: 23px;
}

.stm-documents-help__contact-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.stm-documents-help__label {
    display: block;
    color: var(--stm-doc-muted);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 400;
}

.stm-documents-help__contact strong {
    display: block;
    color: var(--stm-doc-blue);
    font-size: 15px;
    line-height: 1.45;
    font-weight: 700;
    overflow-wrap: anywhere;
}


/* Широкая иллюстрация под контактами */
.stm-documents-banner {
    width: 100%;
    margin: 20px 0 0;
    padding: 0;
    overflow: hidden;
}

.stm-documents-banner img {
    display: block;
    width: 100%;
    height: 200px;
    margin: 0;
    padding: 0;
    object-fit: cover;
    object-position: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}


/* =========================================================
   АДАПТИВНОСТЬ
   ========================================================= */

/* Планшеты и небольшие ноутбуки */
@media (max-width: 1050px) {
    .stm-documents-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stm-documents-help__contacts {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stm-documents-help__contact {
        min-height: 85px;
    }
}


/* Мобильные устройства */
@media (max-width: 600px) {
    .stm-documents-intro {
        margin-bottom: 22px;
    }

    .stm-documents-intro p {
        font-size: 15px;
        line-height: 1.7;
    }

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

    .stm-documents-card {
        padding: 22px;
    }

    .stm-documents-card__title {
        font-size: 19px;
    }

    .stm-documents-card__actions {
        flex-direction: column;
    }

    .stm-documents .stm-documents-button {
        width: 100%;
        min-height: 46px;
    }

    .stm-documents-note {
        gap: 10px;
        padding: 16px;
    }

    .stm-documents-help {
        margin-top: 22px;
        padding: 18px;
    }

    .stm-documents-help__title {
        font-size: 22px;
    }

    .stm-documents-help__description {
        margin-bottom: 20px;
        font-size: 15px;
        line-height: 1.6;
    }

    .stm-documents-help__contact {
        gap: 12px;
        padding: 15px;
    }

    .stm-documents-help__contact strong {
        font-size: 14px;
    }

    .stm-documents-banner img {
        height: 120px;
    }
}


/* Очень узкие экраны */
@media (max-width: 360px) {
    .stm-documents-card {
        padding: 17px;
    }

    .stm-documents-help {
        padding: 14px;
    }

    .stm-documents-help__contact {
        gap: 9px;
        padding: 12px;
    }

    .stm-documents-help__icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }
}
/* Заголовок блока документов на главной странице */
.stm-documents-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 24px;
}

.stm-documents-heading__content {
    min-width: 0;
}

.stm-documents-heading__title {
    margin: 0 0 8px;
    color: #001b72;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.2;
}

.stm-documents-heading__description {
    margin: 0;
    color: #68758f;
    font-size: 16px;
    line-height: 1.6;
}

.stm-documents-heading__link {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border: 1px solid #001b72;
    border-radius: 8px;
    background: #fff;
    color: #001b72;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.stm-documents-heading__link:hover {
    background: #001b72;
    color: #fff;
}

@media (max-width: 600px) {
    .stm-documents-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }
}

/* Итоговая компоновка карточек документов */
.stm-documents-grid {
    align-items: stretch;
}

.stm-documents-card {
    display: flex;
    flex-direction: column;
    height: 500px;
    min-height: 500px;
    box-sizing: border-box;
}

.stm-documents-card__preview {
    flex: 0 0 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 190px;
    margin: 0;
    overflow: hidden;
}

.stm-documents-card__preview img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

.stm-documents-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    margin-top: auto;
    padding-top: 22px;
    box-sizing: border-box;
}

.stm-documents-card__body .stm-documents-card__title {
    flex: 0 0 60px;
    height: 60px;
    margin: 0 0 12px;
    overflow: hidden;
}

.stm-documents-card__body .stm-documents-card__description {
    flex: 0 0 102px;
    height: 102px;
    margin: 0 0 18px;
    overflow: hidden;
}

.stm-documents-card__body .stm-documents-card__actions {
    margin-top: auto;
}

@media (max-width: 600px) {
    .stm-documents-card {
        height: 480px;
        min-height: 480px;
    }

    .stm-documents-card__preview {
        flex-basis: 180px;
        height: 180px;
    }
}

/* Итоговая компоновка карточек документов */
.stm-documents-grid {
    align-items: stretch;
}

.stm-documents-card {
    display: flex;
    flex-direction: column;
    height: 500px;
    min-height: 500px;
    box-sizing: border-box;
}

.stm-documents-card__preview {
    flex: 0 0 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 190px;
    margin: 0;
    overflow: hidden;
}

.stm-documents-card__preview img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

.stm-documents-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    margin-top: auto;
    padding-top: 22px;
    box-sizing: border-box;
}

.stm-documents-card__body .stm-documents-card__title {
    flex: 0 0 60px;
    height: 60px;
    margin: 0 0 12px;
    overflow: hidden;
}

.stm-documents-card__body .stm-documents-card__description {
    flex: 0 0 102px;
    height: 102px;
    margin: 0 0 18px;
    overflow: hidden;
}

.stm-documents-card__body .stm-documents-card__actions {
    margin-top: auto;
}

@media (max-width: 600px) {
    .stm-documents-card {
        height: 480px;
        min-height: 480px;
    }

    .stm-documents-card__preview {
        flex-basis: 180px;
        height: 180px;
    }
}
