/* About and contacts pages ported from the old Bitrix templates. */
/* Source: o-kompanii/index.php, kontakty/index.php,
   news.list/aboutSertificat, news.list/aboutEttude,
   include_area/contactsInfo.php. */

/* --- About: two columns on desktop --- */

#content article.about-page {
    display: grid;
    grid-template-columns: minmax(0, 640fr) minmax(0, 240fr);
    column-gap: 3.75rem; /* 60px */
    align-items: start;
    width: 100%;
    max-width: 61.25rem; /* 980px */
    margin: 0 auto 2rem; /* 32px */
    padding: 0 1.25rem; /* 20px */
    box-sizing: border-box;
}

#content article.about-page .about-page__text {
    font-size: .875rem; /* 14px */
    line-height: 1.5rem; /* 24px */
}

#content article.about-page .about-page__text p {
    margin: 0 0 1.5em;
}

#content article.about-page .about-page__text p:first-child {
    margin-top: 0;
}

#content article.about-page .about-page__text--before {
    grid-column: 1;
    grid-row: 1;
}

#content article.about-page .about-page__text--after {
    grid-column: 1;
    grid-row: 3;
}

#content article.about-page .about-page__text--after p:first-child {
    margin-top: 1.5em;
}

#content article.about-page .about-page__advantages {
    grid-column: 2;
    grid-row: 1 / span 3;
}

.about-page__advantages {
    line-height: 1.25rem; /* 20px */
}

.about-page__advantages h3 {
    margin: 0 0 .75rem; /* 12px */
    color: #0c55a0;
    font-size: .875rem; /* 14px */
    font-style: italic;
    font-weight: 700;
    line-height: 1.25rem; /* 20px */
}

.about-page__advantages ul {
    margin: .75rem 0 0; /* 12px */
    padding: 0;
    font-style: italic;
    list-style: none;
}

.about-page__advantages li {
    padding-bottom: .75rem; /* 12px */
    font-size: .8125rem; /* 13px */
    line-height: 1.25rem; /* 20px */
}

.about-page__advantages li::after {
    content: '';
    display: block;
    width: 3.75rem; /* 60px */
    height: 1px;
    margin-top: .75rem; /* 12px */
    background: #9cbbda;
}

.about-page__advantages li:last-child::after {
    display: none;
}

/* --- About: certificates between the second and the third paragraph --- */

.about-page__certificates {
    grid-column: 1;
    grid-row: 2;
    margin: 0 0 .5rem; /* 8px */
}

.about-page__certificates-list {
    display: grid;
    grid-template-columns: repeat(5, 6rem); /* 96px */
    justify-content: space-between;
    gap: 0;
}

.about-page__certificate {
    width: 6rem; /* 96px */
    height: 8.5rem; /* 136px */
    overflow: hidden;
}

.about-page__certificate-link {
    display: block;
    width: 6rem; /* 96px */
    height: 8.5rem; /* 136px */
}

.about-page__certificate-img {
    display: block;
    width: 6rem; /* 96px */
    height: 8.5rem; /* 136px */
    object-fit: cover;
}

/* --- Contacts: three columns with icons --- */

.contacts-page {
    width: 100%;
    max-width: 61.25rem; /* 980px */
    margin: 0 auto 1.875rem; /* 30px */
    padding: 0 1rem; /* 16px */
    box-sizing: border-box;
}

.contacts-page__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem; /* 40px */
    text-align: center;
}

.contacts-page__icon {
    display: block;
    width: 2.75rem; /* 44px */
    height: 2.75rem; /* 44px */
    margin: 0 auto 1.5rem; /* 24px */
}

.contacts-page__text {
    margin: 0 0 .5rem; /* 8px */
    font-size: .875rem; /* 14px */
    line-height: 1.375rem; /* 22px */
}

.contacts-page__text:last-child {
    margin-bottom: 0;
}

.contacts-page__text a {
    color: #004f9f;
}

.contacts-page__person {
    color: #26272a;
}

.contacts-map {
    width: 100%;
    margin: 0;
}

.contacts-map__frame {
    display: block;
    width: 100%;
    height: 35.625rem; /* 570px */
    border: 0;
}

.contacts-map__link {
    margin: .75rem 1rem 0; /* 12px 16px 0 */
    font-size: .875rem; /* 14px */
    line-height: 1.25rem; /* 20px */
}

.contacts-map__link a {
    color: #004f9f;
}

/* --- Tablet: columns stack, five certificates in one centered row --- */

@media (max-width: 60rem) { /* 960px */
    #content article.about-page {
        display: flex;
        flex-direction: column;
        gap: 2rem; /* 32px */
        max-width: 42.5rem; /* 680px */
        padding: 0 1rem; /* 16px */
    }

    #content article.about-page .about-page__text,
    #content article.about-page .about-page__advantages,
    .about-page__certificates {
        width: 100%;
    }

    .about-page__certificates {
        margin: 0;
    }

    #content article.about-page .about-page__text--after p:first-child {
        margin-top: 0;
    }

    .about-page__certificates-list {
        display: flex;
        flex-wrap: wrap;
        gap: 1.875rem; /* 30px */
        justify-content: center;
    }
}

/* --- Mobile: contacts in one column --- */

@media (max-width: 42.5rem) { /* 680px */
    #content article.about-page {
        gap: 1.5rem; /* 24px */
        padding: 0 1rem; /* 16px */
    }

    .contacts-page__grid {
        grid-template-columns: 1fr;
        gap: 2rem; /* 32px */
    }
}

/* Narrow screens: certificates 3 + 2, then 2 + 2 + 1.
   At 631 the five 96px previews with 30px gaps no longer fit. */

@media (max-width: 39.4375rem) { /* 631px */
    .about-page__certificates-list {
        display: grid;
        grid-template-columns: repeat(3, 6rem); /* 96px */
        gap: 1.875rem; /* 30px */
        justify-content: center;
    }
}

@media (max-width: 23.0625rem) { /* 369px */
    .about-page__certificates-list {
        grid-template-columns: repeat(2, 6rem); /* 96px */
    }
}

/* --- General price page --- */

.price-page {
    width: 100%;
    max-width: 61.25rem; /* 980px */
    margin: 0 auto 2rem; /* 32px */
    padding: 0 1rem; /* 16px */
    box-sizing: border-box;
    text-align: center;
}

.price-page__lead {
    margin: 0 0 .75rem; /* 12px */
    color: #26272a;
    font-size: 1rem;
    line-height: 1.5;
}

.price-page__note {
    margin: 0 0 1.5rem; /* 24px */
    color: #565656;
    font-size: .875rem; /* 14px */
    line-height: 1.25rem; /* 20px */
}

.price-page__download {
    display: inline-block;
    padding: .625rem 1.5rem; /* 10px 24px */
    border: 2px solid #004f9f;
    border-radius: 1.25rem; /* 20px */
    color: #004f9f;
    background: #fff;
    font-size: 1rem;
    line-height: 1.4;
    text-decoration: none;
}

.price-page__download:hover {
    color: #fff;
    background: #004f9f;
}

.price-page__file {
    margin: 1rem 0 0;
    color: #565656;
    font-size: .875rem; /* 14px */
    line-height: 1.25rem; /* 20px */
}
