.documents-page-gallery {
    display: grid;
    width: 100%;
    background: var(--color-page);
}

.documents-page-gallery__heading {
    min-width: 0;
    padding: 2.5rem 1rem;
    color: var(--color-title);
    background: var(--color-page);
    transition: color 250ms ease, background-color 250ms ease;
}

.documents-page-gallery__heading.is-active {
    color: var(--color-white);
    background: var(--advantages-hover-bg);
}

.documents-page-gallery__title {
    margin: 0;
    color: inherit;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 3.75rem);
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
}

.documents-page-gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    border-top: var(--border-1);
    border-left: var(--border-1);
}

.documents-page-gallery__item {
    min-width: 0;
    aspect-ratio: 0.72;
    border-right: var(--border-1);
    border-bottom: var(--border-1);
    overflow: hidden;
}

.documents-page-gallery__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    color: inherit;
    background: var(--color-white);
    appearance: none;
    cursor: pointer;
}

.documents-page-gallery__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 250ms ease;
}

.documents-page-gallery__link:hover .documents-page-gallery__image,
.documents-page-gallery__link:focus-visible .documents-page-gallery__image {
    transform: scale(1.025);
}

.documents-page-gallery__link.is-active {
    box-shadow: inset 0 0 0 0.2rem var(--advantages-hover-bg);
}

.documents-page-gallery__previews {
    width: 100%;
}

.documents-page-gallery__preview {
    width: 100%;
    margin-top: 2rem;
}

.documents-page-gallery__preview-image {
    display: block;
    width: min(100%, 21rem);
    max-height: 30rem;
    margin: 0 0 1.25rem;
    background: var(--color-white);
    object-fit: contain;
    box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.28);
}

.documents-page-gallery__preview-name {
    margin: 0 0 0.75rem;
    color: inherit;
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
}

.documents-page-gallery__preview-text {
    max-width: 25rem;
    color: inherit;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.25;
}

.documents-page-gallery__preview-text > :last-child {
    margin-bottom: 0;
}

@media (min-width: 42rem) {
    .documents-page-gallery__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 64rem) {
    .documents-page-gallery {
        grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
    }

    .documents-page-gallery__heading {
        padding: 4.5rem clamp(2rem, 6vw, 8rem);
    }

    .documents-page-gallery__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .documents-page-gallery__image {
        transition: none;
    }

    .documents-page-gallery__heading {
        transition: none;
    }
}
