.contacts-test {
    --contacts-section-space: 38px;
    --contacts-heading-space: 28px;
    color: #253449;
    background: #fff;
}

.contacts-test .wrapper { max-width: 1260px; }

.contacts-test *,
.contacts-test *::before,
.contacts-test *::after { box-sizing: border-box; }

.wrapper.contacts-test__title-wrap {
    padding-top: 12px;
    padding-bottom: var(--contacts-section-space);
}
.contacts-test__title-wrap h1 { margin: 0; color: #4584cb; }

.contacts-test__heading {
    margin: 0 0 var(--contacts-heading-space);
    padding: 0;
    color: #4584cb;
    font-size: 30px;
    font-weight: 300;
    line-height: 1.2;
}

.contacts-test__offices {
    padding-top: var(--contacts-section-space);
    padding-bottom: var(--contacts-section-space);
    background: linear-gradient(180deg, #e7f2fa 0%, #eef6fb 100%);
}

.contacts-test__office-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.contacts-test__office-card,
.contacts-test__contact-card {
    border: 1px solid #dfeaf4;
    background: #fff;
    box-shadow: 0 10px 36px rgba(20, 56, 86, .07);
}

.contacts-test__office-card {
    display: flex;
    flex-direction: column;
    min-height: 405px;
    padding: 29px 26px;
}

.contacts-test__office-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 21px;
}

.contacts-test__city-symbol {
    display: grid;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 7px;
    color: #4584cb;
    background: #f0f7ff;
}

.contacts-test__office-name {
    color: #253449;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.15;
}

.contacts-test__details { display: grid; gap: 14px; margin-bottom: 22px; }
.contacts-test__details--columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; }

.contacts-test__detail {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    color: #253449;
    font-size: 15px;
    line-height: 1.45;
}

.contacts-test__detail a { color: #4584cb; }

.contacts-test__icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-top: 1px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #758ca5;
}

.contacts-test__city-symbol .contacts-test__icon { width: 27px; height: 27px; margin: 0; color: inherit; }
.contacts-test .contacts-test__button {
    display: inline-flex;
    width: auto;
    min-width: 170px;
    max-width: 100%;
    height: 40px;
    margin: auto 0 0;
    padding: 0 18px;
    align-items: center;
    align-self: flex-start;
    justify-content: center;
    flex-shrink: 0;
    gap: 8px;
    white-space: nowrap;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: #4584cb;
    box-shadow: none;
    font: 400 14px/16px "Open Sans", sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    overflow: visible;
    transition: color .2s, background-color .2s, box-shadow .2s;
}
.contacts-test .contacts-test__button:hover,
.contacts-test .contacts-test__button:focus-visible {
    color: #4584cb;
    background: #fff;
    box-shadow: inset 0 0 0 1px #4584cb;
}
.contacts-test .contacts-test__button:focus-visible {
    outline: 3px solid #92c8fb;
    outline-offset: 3px;
}
.contacts-test__button .contacts-test__icon { width: 17px; height: 17px; color: currentColor; }

.wrapper.contacts-test__support {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 54px;
    align-items: start;
    padding-top: var(--contacts-section-space);
    padding-bottom: var(--contacts-section-space);
}

.contacts-test__support > div,
.contacts-test__detail-bottom > div { min-width: 0; }

.contacts-test__legal-card { padding: 24px 28px; border: 1px solid #dfebf4; background: #fff; }
.contacts-test__legal-table { width: 100%; margin-bottom: 20px; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.contacts-test__legal-table td { padding: 6px 0; border-bottom: 1px solid #f1f4f7; vertical-align: top; }
.contacts-test__legal-table td:first-child { width: 48%; padding-right: 12px; color: #708095; }
.contacts-test__legal-table tr:last-child td { border-bottom: 0; }

.wrapper.contacts-test__city-top {
    padding-top: var(--contacts-section-space);
    padding-bottom: var(--contacts-section-space);
}
.contacts-test__contact-card { margin-bottom: 0; padding: 25px 30px; }
.contacts-test__contact-card .contacts-test__office-name { color: #4584cb; }

.contacts-test__social {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px 23px;
    margin-top: 22px;
    padding-top: 19px;
    border-top: 1px solid #dfebf4;
    font-size: 15px;
}

.contacts-test__social-links { display: flex; gap: 12px; }
.contacts-test__social-links a {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 4px;
    color: #4584cb;
    background: #e9f4fd;
    transition: color .2s, background-color .2s;
}
.contacts-test__social-links a:hover { color: #fff; background: #4584cb; }
.contacts-test__social-icon { display: block; width: 18px; height: 18px; fill: currentColor; }
.contacts-test__social-links a[aria-label="ВКонтакте"] .contacts-test__social-icon { width: 19px; }
.contacts-test__social-links a[aria-label="YouTube"] .contacts-test__social-icon { width: 19px; }

.contacts-test__contact-card + .contacts-test__route { margin-top: var(--contacts-section-space); }
.contacts-test__route { padding-top: 0; }
.contacts-test__route h3 { margin: 0 0 19px; color: #496785; font-size: 19px; font-weight: 600; }
.contacts-test__route h3:not(:first-of-type) { margin-top: 29px; }
.contacts-test__route-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 46px; }
.contacts-test__route-card { padding: 8px 0 20px; border-bottom: 1px solid #dfebf4; }
.contacts-test__route-card strong { display: block; margin-bottom: 5px; color: #243143; font-size: 16px; }
.contacts-test__route-card p,
.contacts-test__route-drive p { margin: 0; padding: 0; color: #253449; font-size: 15px; line-height: 1.6; }
.contacts-test__route-drive { display: flex; gap: 15px; padding: 9px 0 20px; border-bottom: 1px solid #dfebf4; }
.contacts-test__route-drive > .contacts-test__icon { width: 34px; height: 34px; flex-basis: 34px; color: #4584cb; }

.contacts-test__map-section {
    padding-top: var(--contacts-section-space);
    padding-bottom: var(--contacts-section-space);
    background: #e7eff5;
}
.contacts-test__map { min-height: 400px; overflow: hidden; border: 1px solid #d9e5ee; background: #cadfea; }
.contacts-test__map iframe { display: block; width: 100%; height: 400px; border: 0; }

.wrapper.contacts-test__detail-bottom {
    display: grid;
    grid-template-columns: 1.06fr 1fr;
    gap: 35px;
    padding-top: var(--contacts-section-space);
    padding-bottom: var(--contacts-section-space);
}
.contacts-test__form-block > .contacts-test__heading,
.contacts-test__media > .contacts-test__heading { margin-bottom: var(--contacts-heading-space); }
.contacts-test__form-block--full { grid-column: 1 / -1; }
.contacts-test__photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.contacts-test__photos--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contacts-test__photos figure { margin: 0; }
.contacts-test__photo { display: block; width: 100%; padding: 0; border: 0; background: #e8f1f8; cursor: zoom-in; }
.contacts-test__photo:focus-visible,
.contacts-test__other-card:focus-visible,
.contacts-test__social-links a:focus-visible { outline: 3px solid #92c8fb; outline-offset: 3px; }
.contacts-test__photo img { display: block; width: 100%; height: 182px; object-fit: cover; }
.contacts-test__photos--three .contacts-test__photo img { height: 152px; }
.contacts-test__photos figcaption { margin-top: 8px; color: #5b6f82; font-size: 13px; line-height: 1.35; }

.wrapper.contacts-test__other {
    padding-top: var(--contacts-section-space);
    padding-bottom: var(--contacts-section-space);
    border-top: 1px solid #dfebf4;
}
.contacts-test__other-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.contacts-test__other-card { display: flex; align-items: center; gap: 16px; padding: 17px 20px; border: 1px solid #dae6f0; color: #253449; }
.contacts-test__other-card > span { flex: 1; }
.contacts-test__other-card strong,
.contacts-test__other-card small { display: block; }
.contacts-test__other-card strong { margin-bottom: 4px; font-size: 17px; }
.contacts-test__other-card small { color: #75869a; font-size: 13px; line-height: 1.4; }
.contacts-test__other-card .contacts-test__icon { color: #4584cb; }

.contacts-test__lightbox { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; padding: 30px; background: rgba(12, 27, 42, .9); }
.contacts-test__lightbox.is-open { display: flex; }
.contacts-test__lightbox > button { position: absolute; top: 12px; right: 22px; padding: 6px 12px; border: 0; color: #fff; background: transparent; font-size: 38px; line-height: 1; }
.contacts-test__lightbox figure { max-width: min(95vw, 1100px); max-height: 95vh; margin: 0; }
.contacts-test__lightbox img { display: block; max-width: 100%; max-height: 85vh; margin: auto; object-fit: contain; }
.contacts-test__lightbox figcaption { margin-top: 10px; color: #fff; text-align: center; }

@media (max-width: 960px) {
    .contacts-test__office-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contacts-test__support { gap: 28px; }
}

@media (max-width: 1200px) {
    .wrapper.contacts-test__support,
    .wrapper.contacts-test__detail-bottom {
        grid-template-columns: minmax(0, 1fr);
    }

    .wrapper.contacts-test__support > *,
    .wrapper.contacts-test__detail-bottom > * {
        width: 100%;
        min-width: 0;
    }

    .contacts-test__form-block,
    .contacts-test__form-block .contacts-test-form {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .contacts-test {
        --contacts-section-space: 32px;
        --contacts-heading-space: 22px;
    }
    .contacts-test__heading { font-size: 27px; }
    .contacts-test__office-grid,
    .contacts-test__support,
    .contacts-test__details--columns,
    .contacts-test__route-grid,
    .contacts-test__other-grid { grid-template-columns: 1fr; }
    .contacts-test__office-card { min-height: 0; padding: 22px; }
    .wrapper.contacts-test__support {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--contacts-section-space);
    }
    .contacts-test__legal-card { padding: 18px 20px; }
    .contacts-test__legal-table tr {
        display: block;
        padding: 11px 0;
        border-bottom: 1px solid #f1f4f7;
    }
    .contacts-test__legal-table tr:first-child { padding-top: 0; }
    .contacts-test__legal-table tr:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }
    .contacts-test__legal-table td,
    .contacts-test__legal-table td:first-child {
        display: block;
        width: 100%;
        padding: 0;
        border-bottom: 0;
        overflow-wrap: anywhere;
    }
    .contacts-test__legal-table td:first-child {
        margin-bottom: 4px;
        font-size: 13px;
    }
    .contacts-test__contact-card { padding: 20px; }
    .contacts-test__map,
    .contacts-test__map iframe { min-height: 300px; height: 300px; }
    .wrapper.contacts-test__detail-bottom {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--contacts-section-space);
    }
    .contacts-test__photos--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contacts-test__photo img,
    .contacts-test__photos--three .contacts-test__photo img { height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
    .contacts-test * { scroll-behavior: auto !important; transition: none !important; }
}

