body.page-template-page-all-documents {
    overflow-x: hidden;
}

body.page-template-page-all-documents .site-content,
body.page-template-page-all-documents .ast-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.documents-page {
    width: 100%;
    color: #202429;
    font-family: "Montserrat", sans-serif;
}

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

.documents-page .home-documents {
    min-height: 65vh;
    padding: 84px 0 90px;
    background:
        radial-gradient(circle at 50% 0, rgba(247, 242, 238, 0.55), transparent 40%),
        #ffffff;
}

.documents-page .home-documents__container {
    width: min(100% - 40px, 1440px);
    margin-right: auto;
    margin-left: auto;
}

.documents-page .home-documents__heading {
    max-width: 860px;
    margin: 0 auto 42px;
    text-align: center;
}

.documents-page .home-documents__title {
    margin: 0 0 18px;
    color: #202429;
    font-size: 47px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.documents-page .home-documents__description {
    margin: 0;
    color: #555c63;
    font-size: 20px;
    line-height: 1.75;
}

.documents-page .home-documents__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 31px;
}

.documents-page .home-document-card {
    display: flex;
    min-width: 0;
    min-height: 515px;
    flex-direction: column;
    padding: 24px 23px 22px;
    background: #ffffff;
    border: 1px solid #e9e6e3;
    border-radius: 10px;
    box-shadow: 0 3px 16px rgba(30, 35, 40, 0.025);
}

.documents-page .home-document-card__image-link {
    display: block;
    height: 310px;
    overflow: hidden;
    background: #fafafa;
}

.documents-page .home-document-card__image {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.documents-page .home-document-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.documents-page .home-document-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding-top: 22px;
}

.documents-page .home-document-card__title {
    min-height: 56px;
    margin: 0 0 21px;
    color: #1f2327;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}

.documents-page .home-document-card__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    width: 100%;
    min-height: 56px;
    margin-top: auto;
    padding: 12px 18px;
    color: #bc111b;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border: 1px solid #cf1b25;
    border-radius: 4px;
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.documents-page .home-document-card__button:hover,
.documents-page .home-document-card__button:focus {
    color: #ffffff;
    background: #c41620;
}

.documents-page .home-document-card__button svg {
    width: 24px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.documents-page__empty {
    margin: 40px 0 0;
    color: #555c63;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 1200px) {
    .documents-page .home-documents__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 22px;
    }

    .documents-page .home-document-card {
        padding-right: 18px;
        padding-left: 18px;
    }

    .documents-page .home-document-card__title {
        font-size: 18px;
    }
}

@media (max-width: 900px) {
    .documents-page .home-documents__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .documents-page .home-documents {
        padding: 60px 0;
    }

    .documents-page .home-documents__container {
        width: min(100% - 30px, 1440px);
    }

    .documents-page .home-documents__heading {
        margin-bottom: 28px;
    }

    .documents-page .home-documents__title {
        font-size: 34px;
    }

    .documents-page .home-documents__description {
        font-size: 16px;
        line-height: 1.6;
    }

    .documents-page .home-documents__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .documents-page .home-document-card {
        min-height: 0;
    }

    .documents-page .home-document-card__image-link {
        height: auto;
        aspect-ratio: 1 / 1.05;
    }

    .documents-page .home-document-card__title {
        min-height: 0;
    }
}

@media (max-width: 420px) {
    .documents-page .home-documents__title {
        font-size: 30px;
    }

    .documents-page .home-document-card {
        padding: 16px;
    }
}
