/*
 * Страница /contacts/ по макету Figma («Страница контакты», фреймы 1920w и 390w) с правками «Контакты 16.10».
 * Всё ограничено обёрткой .contacts-page: шапка и подвал остаются на шрифте сайта, страница /thank-you/,
 * которая берёт стили секции contacts/contacts, не меняется.
 *
 * Размеры шрифтов дробные, как в макете (макет снят с HTML-прототипа и перенабран Inter); у колонок контактов
 * они немного разные — повторяем как есть, иначе колонки съезжают относительно макета.
 * Десктоп — от 1200px, мобильная — до 767px; между ними — та же сетка, что на десктопе, тянется по ширине.
 */

@font-face {
    font-family: "Inter";
    src: url(/assets/Inter/Inter-cyrillic.woff2) format("woff2");
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Inter";
    src: url(/assets/Inter/Inter-latin.woff2) format("woff2");
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Всем элементам: у заголовков и .f1–.f6 в base.css свой font-family, наследование его не перебивает.
   Элементы Яндекс.Карты (ymaps-*) не трогаем. */
.contacts-page,
.contacts-page *:not([class*="ymaps"]) {
    font-family: "Inter", Helvetica, Arial, sans-serif;
    /* В макете Inter 3 без оптических размеров; Inter 4 на крупном кегле иначе сужает буквы */
    font-optical-sizing: none;
    font-variation-settings: "opsz" 14;
}

.contacts-page .container,
.contacts-page .max-width-theme {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ---------- Хлебные крошки + контакты (div.bg-light) ---------- */

.contacts-page .decor-wrap,
.contacts-page .bg-light {
    margin: 0;
    padding: 0;
}

.contacts-page .bg-light {
    padding: 20px 0 60px;
    background: #F3F7FA;
}

.contacts-page .breadcrumbs {
    display: block;
    padding: 0;
    margin: 0 auto 20px;
}

.contacts-page .breadcrumbs.container {
    padding: 0;
}

.contacts-page .breadcrumbs__nav {
    display: flex;
    gap: 8px;
}

.contacts-page .breadcrumbs__link,
.contacts-page .breadcrumbs__link[href] {
    margin: 0;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: 0;
    color: #009EE3;
}

.contacts-page .breadcrumbs__link[href]::after {
    content: none;
}

.contacts-page .breadcrumbs__link:last-child {
    font-size: 13.6px;
    color: #565655;
}

.contacts-page .breadcrumbs__link:last-child::before {
    content: "/ ";
    margin-right: 4px;
    font-size: 14px;
    color: #999999;
}

.contacts-page .contacts-block {
    margin: 0;
}

.contacts-page .contacts-block h1 {
    margin: 0 0 40px;
    font-size: 53.1px;
    line-height: 74px;
    font-weight: 400;
    letter-spacing: 0;
    color: #132561;
}

.contacts-page .contacts__flex {
    display: flex;
    gap: 80px;
}

.contacts-page .contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contacts-page .contact .f4 {
    margin: 0;
    font-size: 28.9px;
    line-height: 45px;
    font-weight: 400;
    color: #606981;
}

.contacts-page .contact:first-child .f4 {
    font-size: 30px;
}

.contacts-page .contact > div:not(.f4) {
    padding-top: 8px;
}

.contacts-page .contact .tel {
    display: inline-block;
    font-size: 16.5px;
    line-height: 27px;
    color: #606981;
    text-decoration: none;
}

.contacts-page .contact .mailto {
    display: inline-block;
    margin: 0;
    font-size: 17.6px;
    line-height: 27px;
    color: #0084FF;
    text-decoration: none;
}

/* ---------- Офис (div.offices-section) ---------- */

.contacts-page .offices-section {
    padding: 60px 0;
    background: #fff;
}

.contacts-page .offices-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    grid-template-rows: 400px;
    gap: 40px;
}

.contacts-page .office-info {
    display: block;
}

.contacts-page .office-switch {
    display: block;
    width: 100%;
    margin: 0;
    padding: 20px 0;
    border: none;
    background: none;
    text-align: left;
    font-size: 29.3px;
    line-height: 35px;
    font-weight: 400;
    color: #132561;
    cursor: default;
}

.contacts-page .office-switch::before {
    content: none;
}

.contacts-page .office-switch::after {
    content: "";
    position: static;
    display: block;
    width: 100%;
    height: 2px;
    margin-top: 9px;
    background: #3261EC;
    opacity: 1;
}

.contacts-page .office-switch span {
    position: static;
}

.contacts-page .office-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: -2px;
    padding: 16px 0 8px;
}

.contacts-page .office-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17.2px;
    line-height: 32.4px;
    color: #606981;
}

.contacts-page .office-detail a {
    color: #606981;
    text-decoration: none;
}

.contacts-page .office-detail a[href^="tel:"] {
    font-size: 16.3px;
}

.contacts-page .office-detail a[href^="mailto:"] {
    font-size: 17.4px;
    color: #0084FF !important;
}

.contacts-page .btn-route {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0;
    padding: 12px 24px;
    border: 1px solid #0A2896;
    border-radius: 4px;
    font-size: 15.1px;
    line-height: 24px;
    color: #0A2896;
    transition: background .3s, color .3s;
}

.contacts-page .btn-route:hover {
    background: #0A2896;
    color: #fff;
}

.contacts-page .map-placeholder {
    position: relative;
    height: 400px;
    min-height: 400px;
    overflow: hidden;
    border-radius: 12px;
    background: #E0E8F2;
}

.contacts-page .office-map {
    height: 400px;
    max-height: none;
    border-radius: 12px;
}

/* ---------- «Хотите стать резидентом?» с формой ---------- */

.contacts-page .become-section {
    display: flex;
    flex-direction: row;
    /* В макете ряд выровнен по центру при форме 341px; капча удлиняет форму, поэтому — по верху
       с тем же отступом текста, что в макете (65.6px от края блока) */
    align-items: flex-start;
    gap: 56px;
    height: auto;
    margin: 0;
    padding: 52px 56px;
    border-radius: 16px;
    background: linear-gradient(120deg, #3261EC 0%, #2B53D6 45%, #24318A 100%);
}

.contacts-page .become__container {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 16.2px;
    min-width: 0;
    margin-top: 13.6px;
    padding: 0;
}

.contacts-page .become-section h2 {
    margin: 0;
    font-size: 31.8px;
    line-height: 36.8px;
    font-weight: 700;
    letter-spacing: -0.32px;
    color: #fff;
}

.contacts-page .become-section .become__subtitle {
    max-width: none;
    margin: 0;
    font-size: 17px;
    line-height: 28.8px;
    color: rgba(255, 255, 255, .7);
}

.contacts-page .become-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 7.8px;
}

.contacts-page .become-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.9px;
    line-height: 17px;
    color: #EAF0FF;
}

.contacts-page .become-item:nth-child(1) {
    font-size: 14.2px;
}

.contacts-page .become-item:nth-child(2) {
    font-size: 14.1px;
}

.contacts-page .become-item span {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin: 0;
    border-radius: 13px;
    background: rgba(255, 255, 255, .16);
    font-size: 14px;
    line-height: 17px;
}

/* Форма (шаблон contacts_form) */
.contacts-page .contacts_form_wrapper {
    display: flex;
    flex: none;
    flex-direction: column;
    gap: 10px;
    width: 400px;
    padding: 28px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .35);
}

.contacts-page .contacts_form_wrapper .form_head:has(.result_wrapper:empty) {
    display: none;
}

.contacts-page .contacts_form_field input {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid #E4ECF4;
    border-radius: 7px;
    background: #fff;
    font-size: 13.3px;
    color: #2F3441;
}

.contacts-page .contacts_form_field:first-of-type input {
    height: 52px;
}

.contacts-page .contacts_form_field input::placeholder {
    color: #757575;
    opacity: 1;
}

.contacts-page .contacts_form_field input:focus {
    border-color: #3261EC;
    outline: none;
}

.contacts-page .contacts_form_field label.error {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #C14100;
}

.contacts-page .contacts_form_btn {
    display: block;
    width: 100%;
    height: 59px;
    padding: 0 28px;
    border: none;
    border-radius: 7px;
    background: #3261EC;
    font-size: 14.9px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background .3s;
}

.contacts-page .contacts_form_btn:hover {
    background: #192e72;
}

/* Дисклеймер как в попапе «Стать резидентом» в шапке (правка клиента 27.10) */
.contacts-page .contacts_form_descr {
    text-align: left;
    font-size: 13px;
    line-height: 20px;
    color: #565655;
}

.contacts-page .contacts_form_descr a {
    color: #3261EC;
}

/* Капчи в макете нет, но без неё форма не отправится — ставим под подписью */
.contacts-page .contacts_form_wrapper .smart-captcha {
    margin: 0 !important;
}

/* Блок с формой стоит вплотную к подвалу (на мобильных — обычный отступ подвала) */
@media (min-width: 768px) {
    body:has(.contacts-page) footer {
        margin-top: 0;
    }
}

/* ---------- Планшет: 768–1199px ---------- */

@media (max-width: 1199px) {
    .contacts-page .contacts__flex {
        flex-wrap: wrap;
        gap: 30px 80px;
    }

    .contacts-page .breadcrumbs.container {
        padding: 0 40px;
    }
}

@media (max-width: 1023px) {
    .contacts-page .become-section {
        flex-direction: column;
        align-items: stretch;
    }

    .contacts-page .become__container {
        margin-top: 0;
    }

    .contacts-page .contacts_form_wrapper {
        width: 100%;
    }
}

/* ---------- Мобильная: до 767px (макет 390w) ---------- */

@media (max-width: 767px) {
    .contacts-page .container,
    .contacts-page .max-width-theme,
    .contacts-page .breadcrumbs.container {
        max-width: none;
        padding: 0 16px;
    }

    .contacts-page .bg-light {
        padding: 20px 0 0;
    }

    .contacts-page .breadcrumbs {
        margin-bottom: 19px;
    }

    .contacts-page .contacts-block h1 {
        margin-bottom: 40px;
        font-size: 29.8px;
        line-height: 41.6px;
    }

    .contacts-page .contacts__flex {
        flex-direction: column;
        gap: 30px;
    }

    .contacts-page .contact .tel {
        font-size: 16.2px;
    }

    .contacts-page .contact:last-child .tel {
        font-size: 16.5px;
    }

    .contacts-page .contact .mailto {
        font-size: 17.4px;
    }

    .contacts-page .contact:nth-child(2) .mailto {
        font-size: 17.3px;
    }

    .contacts-page .contact:last-child .mailto {
        font-size: 17.6px;
    }

    .contacts-page .offices-section {
        padding: 120px 0 60px;
    }

    .contacts-page .offices-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto 400px;
    }

    .contacts-page .office-panel {
        gap: 0;
    }

    .contacts-page .office-detail {
        font-size: 17.4px;
    }

    .contacts-page section[data-block="7-cta-become"] > .container {
        padding: 0;
    }

    .contacts-page .become-section {
        position: relative;
        overflow: hidden;
        gap: 28px;
        padding: 28px;
        background: linear-gradient(118deg, #3261EC 0%, #2B53D6 45%, #24318A 100%);
    }

    .contacts-page .become-section::after {
        content: "";
        position: absolute;
        left: -120px;
        top: 606px;
        width: 420px;
        height: 420px;
        background: radial-gradient(circle, rgba(0, 170, 255, .25) 0%, rgba(0, 170, 255, 0) 62%);
        pointer-events: none;
    }

    .contacts-page .become__container,
    .contacts-page .contacts_form_wrapper {
        position: relative;
        z-index: 1;
    }

    .contacts-page .become__container {
        gap: 16px;
        margin-top: 0;
        padding: 0;
    }

    .contacts-page .become-controls {
        padding-top: 8px;
    }

    .contacts-page .contacts_form_descr {
        font-size: 12px;
    }
}
