/**
 * Перелинковка статей и услуг.
 *
 * Два блока: на странице услуги — карточки статей по теме, под статьёй —
 * строка с самой услугой и кнопкой. Оформление повторяет остальной сайт:
 * белые карточки со скруглением и чёрная кнопка.
 */

/* Статьи на странице услуги */

.page .related_articles .mw {
    padding: 20px 2vh 90px;
}

.page .related_articles .m_title {
    padding-bottom: 30px;
}

.page .related_articles .m_title .h3 {
    font-size: 34px;
    line-height: 1.25;
    text-transform: none;
}

.page .related_articles ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page .related_articles ul li a {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
    padding: 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 20px;
    color: #000;
    text-decoration: none;
    transition: 0.25s;
}

.page .related_articles ul li a:hover {
    border-color: #000;
}

.page .related_articles ul li .img {
    flex: 0 0 120px;
    width: 120px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
}

.page .related_articles ul li .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page .related_articles ul li .desc .h5 {
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    margin-bottom: 8px;
}

.page .related_articles ul li .desc .more {
    font-size: 15px;
    line-height: 20px;
    color: #656565;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    padding-bottom: 2px;
}

/* Услуга под текстом статьи */

.page .related_service {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0 10px;
    padding: 26px 30px;
    background: #f5f5f5;
    border-radius: 20px;
}

.page .related_service .related_service_label {
    font-size: 14px;
    line-height: 18px;
    color: #656565;
    margin-bottom: 6px;
}

.page .related_service .h5 {
    font-size: 20px;
    line-height: 26px;
    font-weight: 500;
}

.page .related_service .btn_c .btn_m {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    min-height: 52px;
    padding: 14px 30px;
    border: 1px solid #000;
    border-radius: 100px;
    background: #000;
    color: #fff;
    font-size: 16px;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.25s;
}

.page .related_service .btn_c .btn_m:hover {
    background: #fff;
    color: #000;
}

/* В шаблоне статьи все ссылки внутри текста покрашены правилом из шести
   классов (.article_desc_cont a) — кнопка попадала под него и получалась
   чёрной на чёрном. Повторяем цепочку, чтобы перебить. */
.page_articles .article .mw .cont .left_side .article_desc_cont .related_service .btn_c .btn_m {
    color: #fff;
}

.page_articles .article .mw .cont .left_side .article_desc_cont .related_service .btn_c .btn_m:hover {
    color: #000;
}

@media (max-width: 991px) {
    .page .related_articles ul {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .page .related_articles .m_title .h3 {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    .page .related_articles .mw {
        padding: 10px 2vh 60px;
    }

    .page .related_service {
        padding: 22px;
        text-align: center;
        justify-content: center;
    }

    .page .related_service .btn_c {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .page .related_service .btn_c .btn_m {
        width: 100%;
        max-width: 320px;
        white-space: normal;
    }
}
