/* Методическая помощь — изолированные стили раздела */

.method-help {
    color: #263238;
}

.method-help__intro {
    margin: 0 0 28px;
    padding: 20px 22px;
    background: #f3f8f5;
    border: 1px solid #dce5e0;
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.6;
}

.method-help__intro p {
    margin: 0;
}

.method-help__section {
    margin: 0 0 38px;
}

.method-help__section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dce5e0;
}

.method-help__section-head h2 {
    margin: 0;
    color: #263238;
    font-size: 25px;
    line-height: 1.3;
    font-weight: 600;
}

.method-help__section-link {
    flex: 0 0 auto;
    color: #216b4a;
    font-weight: 600;
    text-decoration: none;
}

.method-help__section-link:hover,
.method-help__section-link:focus {
    color: #174f38;
    text-decoration: underline;
}

.method-help__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.method-help-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    padding: 20px;
    background: #fff;
    border: 1px solid #dce5e0;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(38, 50, 56, .06);
}

.method-help-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    margin-bottom: 10px;
}

.method-help-card__status,
.method-help-card__audience {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.3;
}

.method-help-card__status {
    background: #f3f8f5;
    color: #216b4a;
    border: 1px solid #cfe0d6;
    font-weight: 600;
}

.method-help-card__status--archive {
    background: #f5f5f5;
    color: #5f6b66;
    border-color: #dce5e0;
}

.method-help-card__status--updated {
    background: #eef5fb;
    color: #356f9f;
    border-color: #cdddeb;
}

.method-help-card__audience {
    background: #f7f8f8;
    color: #5f6b66;
}

.method-help-card__title {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.35;
    font-weight: 600;
}

.method-help-card__title a {
    color: #263238;
    text-decoration: none;
}

.method-help-card__title a:hover,
.method-help-card__title a:focus {
    color: #216b4a;
    text-decoration: underline;
}

.method-help-card__summary {
    margin: 0 0 16px;
    color: #5f6b66;
    line-height: 1.55;
}

.method-help-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}

.method-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}

.method-help-btn:hover,
.method-help-btn:focus {
    text-decoration: none;
}

.method-help-btn:focus,
.method-help__section-link:focus,
.method-help-card__title a:focus {
    outline: 3px solid #356f9f;
    outline-offset: 2px;
}

.method-help-btn--primary {
    background: #216b4a;
    border-color: #216b4a;
    color: #fff;
}

.method-help-btn--primary:hover,
.method-help-btn--primary:focus {
    background: #174f38;
    border-color: #174f38;
    color: #fff;
}

.method-help-btn--secondary {
    background: #fff;
    border-color: #216b4a;
    color: #216b4a;
}

.method-help-btn--secondary:hover,
.method-help-btn--secondary:focus {
    background: #f3f8f5;
    color: #174f38;
}

@media (max-width: 767px) {
    .method-help__intro {
        padding: 16px;
    }

    .method-help__section-head {
        display: block;
    }

    .method-help__section-head h2 {
        margin-bottom: 8px;
        font-size: 22px;
    }

    .method-help__cards {
        grid-template-columns: 1fr;
    }

    .method-help-card {
        padding: 16px;
    }

    .method-help-card__actions {
        display: block;
    }

    .method-help-btn {
        width: 100%;
        margin-top: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .method-help *,
    .method-help *::before,
    .method-help *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* Методическая помощь — patch 1.1
   Добавить В КОНЕЦ /assets/css/method-help.css
*/

/* Шаблон main содержит text-justify на родительском article.
   Для интерфейсных элементов раздела принудительно возвращаем
   обычное выравнивание, иначе на узких экранах возникают
   большие пробелы между словами. */
.method-help,
.method-help__intro,
.method-help__section,
.method-help__section-head,
.method-help-card,
.method-help-card__meta,
.method-help-card__title,
.method-help-card__summary,
.method-help-card__actions {
    text-align: left;
}

/* Не даём заголовкам и служебным ссылкам наследовать text-align: justify. */
.method-help__section-head h2,
.method-help__section-link {
    text-align: left;
}

/* Чуть улучшаем мобильную компоновку заголовка секции. */
@media (max-width: 767px) {
    .method-help__section-head {
        display: block;
    }

    .method-help__section-head h2 {
        width: 100%;
        margin-bottom: 6px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .method-help__section-link {
        display: inline-block;
        margin-top: 2px;
    }

    .method-help__intro {
        line-height: 1.55;
    }
}

.method-package-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #dce5e0;
    border-radius: 10px;
}

.method-package-file__body {
    min-width: 0;
    flex: 1 1 auto;
}

.method-package-file__title {
    margin: 0 0 6px;
    color: #263238;
    font-size: 18px;
    line-height: 1.35;
}

.method-package-file__description {
    margin: 0;
    color: #5f6b66;
    line-height: 1.5;
}

.method-package-file__action {
    flex: 0 0 auto;
}

@media (max-width: 767px) {
    .method-package-file {
        display: block;
        padding: 16px;
    }

    .method-package-file__action {
        margin-top: 14px;
    }

    .method-package-file__action .method-help-btn {
        width: 100%;
    }
}

.method-help__intro p,
.method-package-file__description {
    text-align: left !important;
    word-spacing: normal !important;
}

/* Методическая помощь — архитектура v2 */

.method-package__meta {
    margin-bottom: 14px;
}

.method-package-extra {
    margin-top: 28px;
}

.method-package-extra__title {
    margin: 0 0 14px;
    color: #263238;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 600;
}

@media (max-width: 767px) {
    .method-help-card__actions .method-help-btn {
        width: 100%;
    }
}