/* =========================================================
   CLAUSES / ARTICLES
   Mobile First + BEM + rd- prefix
   ========================================================= */

.rd-clauses,
.rd-article {
    padding: 14px 0 22px;
    background: #f7f9fc;
    color: #0c274d;
    font-family: "Rubik", sans-serif;
}

.rd-clauses__container,
.rd-article__container {
    width: min(100% - 32px, 1180px);
    margin: 0 auto;
}

.rd-clauses__breadcrumb,
.rd-article__breadcrumb {
    margin-bottom: 12px;
    color: #7b8798;
    font-size: 13px;
    line-height: 1.4;
}

.rd-clauses__breadcrumb a,
.rd-article__breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.rd-clauses__header {
    margin-bottom: 12px;
}

.rd-clauses__title {
    margin: 0;
    color: #0c274d;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.12;
}

.rd-clauses__subtitle {
    margin: 8px 0 0;
    color: #5d6f88;
    font-size: 15px;
    line-height: 1.5;
}

.rd-clauses__content {
    min-width: 0;
}

.rd-clauses__tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.rd-clauses__tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #dfe6ef;
    border-radius: 4px;
    background: #fff;
    color: #0c274d;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.rd-clauses__tab:hover,
.rd-clauses__tab:focus,
.rd-clauses__tab--active {
    /* border-color: #f31d2c;
    background: #f31d2c;
    color: #fff; */
}

.rd-clauses__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.rd-clause-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e3e9f1;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(12, 39, 77, 0.035);
}

.rd-clause-card__image-link,
.rd-clause-card__image-box {
    display: block;
}

.rd-clause-card__image-box {
    position: relative;
    overflow: hidden;
    /* aspect-ratio: 16 / 9; */
    background: #eef2f6;
}

.rd-clause-card__image,
.rd-clause-card__image-box img,
.rd-clause-card__image-box picture {
    display: block;
    width: 100%;
    height: 100%;
}

.rd-clause-card__image,
.rd-clause-card__image-box img {
    object-fit: contain;
}

.rd-clause-card__image-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: #eef2f6;
}

.rd-clause-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 14px;
}

.rd-clause-card__date {
    display: block;
    margin-bottom: 8px;
    color: #748197;
    font-size: 12px;
    line-height: 1.3;
}

.rd-clause-card__title {
    margin: 0 0 10px;
    color: #0c274d;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.28;
}

.rd-clause-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rd-clause-card__title a:hover,
.rd-clause-card__title a:focus {
    color: #f31d2c;
}

.rd-clause-card__anons {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 14px;
    color: #66758a;
    font-size: 13px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.rd-clause-card__anons p {
    margin: 0;
}

.rd-clause-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    margin-top: auto;
    color: #0c5eaa;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rd-clause-card__more:hover,
.rd-clause-card__more:focus {
    color: #f31d2c;
}

.rd-clauses__grid > .paginator_more_form,
.rd-clauses__grid > .showmore-d {
    grid-column: 1 / -1;
    justify-self: center;
    margin: 8px 0 0;
    padding: 0;
}

.rd-clauses__grid > .paginator_more_form .paginator_more_button,
.rd-clauses__grid > .showmore-d .paginator_more_button {
    min-width: 220px;
    min-height: 44px;
    padding: 10px 22px;
    border: 0;
    border-radius: 4px;
    background: #f31d2c;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.rd-clauses__grid > .paginator_more_form .button-d__icon,
.rd-clauses__grid > .showmore-d .button-d__icon {
    display: none;
}

.rd-clauses__pagination {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.rd-clauses__pagination .paginator {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rd-clauses__pagination .paginat-d__item {
    display: inline-flex;
    min-width: 36px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border: 1px solid #dfe6ef;
    border-radius: 50%;
    background: #fff;
    color: #0c274d;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.rd-clauses__pagination a.paginat-d__item:hover,
.rd-clauses__pagination a.paginat-d__item:focus,
.rd-clauses__pagination .paginat-d__item_current {
    border-color: #f31d2c;
    border-radius: 50%;
    background: #f31d2c;
    color: #fff;
}

/* Article */
.rd-article__container {
    max-width: 1160px;
}

.rd-article__content {
    color: #263b59;
}

.rd-article__date {
    display: block;
    margin-bottom: 8px;
    color: #728097;
    font-size: 13px;
    line-height: 1.4;
}

.rd-article__title {
    max-width: 1050px;
    margin: 0 0 16px;
    color: #0c274d;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.14;
}

.rd-article__media {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.rd-article__image-link {
    display: block;
    overflow: hidden;
    border-radius: 4px;
}

.rd-article__image,
.rd-article__image-link img,
.rd-article__image-link picture {
    display: block;
    width: 100%;
}

.rd-article__image,
.rd-article__image-link img {
    max-height: 420px;
    object-fit: cover;
}

@media (max-width: 639px) {
    .rd-article__image,
    .rd-article__image-link img {
        height: auto;
        max-height: none;
        object-fit: contain;
    }
}

.rd-article__text {
    color: #53647d;
    font-size: 15px;
    line-height: 1.65;
}

.rd-article__text p {
    margin: 0 0 16px;
}

.rd-article__text h2,
.rd-article__text h3,
.rd-article__text h4 {
    margin: 24px 0 10px;
    color: #0c274d;
    font-weight: 700;
    line-height: 1.25;
}

.rd-article__text h2 {
    font-size: 24px;
}

.rd-article__text h3 {
    font-size: 20px;
}

.rd-article__text h4 {
    font-size: 18px;
}

.rd-article__text ul,
.rd-article__text ol {
    margin: 0 0 18px;
    padding-left: 24px;
}

.rd-article__text li {
    margin-bottom: 5px;
}

.rd-article__text li::marker {
    color: #f31d2c;
}

.rd-article__text a {
    color: #0c5eaa;
}

.rd-article-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 18px;
}

.rd-article-nav__item {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #e1e7ef;
    border-radius: 4px;
    background: #fff;
    color: #0c274d;
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        color 0.2s ease;
}

.rd-article-nav__item:hover,
.rd-article-nav__item:focus {
    border-color: #f31d2c;
    color: #f31d2c;
}

.rd-article-nav__item--next {
    justify-content: flex-end;
    text-align: right;
}

.rd-article-nav__content {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.rd-article-nav__label {
    color: #7a8799;
    font-size: 11px;
    line-height: 1.2;
}

.rd-article-nav__title {
    overflow: hidden;
    color: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rd-article-nav__arrow {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
}

@media (min-width: 640px) {
    .rd-clauses__tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .rd-article-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .rd-clauses,
    .rd-article {
        padding-top: 18px;
        padding-bottom: 26px;
    }

    .rd-clauses__container,
    .rd-article__container {
        width: min(100% - 64px, 1180px);
    }

    .rd-clauses__title {
        font-size: 40px;
    }

    .rd-clauses__subtitle {
        font-size: 16px;
    }

    .rd-clauses__tabs {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 20px;
    }

    .rd-clauses__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .rd-clause-card__body {
        padding: 16px;
    }

    .rd-clause-card__title {
        font-size: 18px;
    }

    .rd-article__date {
        font-size: 14px;
    }

    .rd-article__title {
        margin-bottom: 14px;
        font-size: 38px;
    }

    .rd-article__media {
        margin-bottom: 12px;
    }

    .rd-article__text {
        font-size: 16px;
    }

    .rd-article__text h2 {
        font-size: 27px;
    }

    .rd-article-nav {
        margin-top: 20px;
    }
}
