/* Дополнительный телефон + ссылка MAX. Существующий основной телефон не меняем. */
.max-contact {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    max-width: 100%;
    vertical-align: middle;
}

.max-contact a.max-contact__phone {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: normal;
    white-space: nowrap;
    text-decoration: none;
}

.max-contact a.max-contact__max {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 6px;
    box-sizing: border-box;
    min-width: 44px;
    min-height: 40px;
    margin: 0;
    padding: 6px 8px;
    border: 1px solid #d8e4f0;
    border-radius: 10px;
    background: #fff;
    color: #173b64;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: none;
}

.max-contact .max-contact__icon {
    display: block;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    filter: none;
    opacity: 1;
}

.max-contact .max-contact__label {
    display: inline;
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: 0.6875rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.015em;
}

.max-contact a:focus-visible {
    outline: 2px solid #0f5eaa;
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    .max-contact a.max-contact__phone:hover {
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .max-contact a.max-contact__max:hover {
        border-color: #8aabc9;
        background: #f5f9fd;
        color: #173b64;
    }
}

/* Desktop: не меняем правила видимости header-contact из существующего сайта. */
.site-header .header-contact--with-max {
    gap: 0;
    align-items: flex-start;
}

.site-header .header-contact--with-max > .header-contact__phone {
    line-height: 1.25;
}

.site-header .header-contact--with-max .max-contact {
    flex-wrap: nowrap;
    gap: 6px;
}

.site-header .header-contact--with-max .max-contact__phone {
    min-height: 30px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.site-header .header-contact--with-max .max-contact__max {
    min-width: 32px;
    min-height: 30px;
    padding: 4px 5px;
    border-radius: 8px;
}

.site-header .header-contact--with-max .max-contact__icon {
    flex-basis: 20px;
    width: 20px;
    height: 20px;
}

.site-header .header-contact--with-max .max-contact__max--with-logo .max-contact__label {
    display: none;
}

/* Отдельный блок ВНУТРИ мобильного меню, не в тесной строке с логотипом. */
.site-header .header-mobile-contact {
    display: none;
}

@media (max-width: 900px) {
    .site-header .main-nav .header-mobile-contact {
        display: block;
        margin: 8px 0 0;
        padding: 12px 20px 18px;
        border-top: 1px solid #e2eaf1;
        background: #f7fafd;
        color: #173b64;
    }

    .site-header .main-nav .header-mobile-contact__label {
        margin: 0 0 6px;
        padding: 0;
        color: #60758a;
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .site-header .main-nav .max-contact a.max-contact__phone {
        min-height: 44px;
        padding: 0;
        border: 0;
        font-size: 1rem;
        font-weight: 700;
        color: #173b64;
    }

    .site-header .main-nav .max-contact a.max-contact__max {
        min-height: 44px;
        padding: 7px 10px;
        border: 1px solid #d8e4f0;
    }
}

/* Footer: номер наследует цвет контактного списка; у кнопки светлый фон. */
.site-footer .footer-contact-max {
    margin-top: 2px;
}

.site-footer .max-contact a.max-contact__max,
.site-footer .max-contact a.max-contact__max:visited {
    color: #173b64;
}

.site-footer .max-contact a:focus-visible {
    outline-color: #8bc9ff;
}

/* Второй номер внутри уже существующей телефонной карточки. */
.contact-method-card .contact-method-card__extra {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(96, 134, 169, 0.22);
}

.contact-method-card .contact-method-card__extra > .contact-method-card__label {
    display: block;
    margin-bottom: 4px;
}

.contact-method-card .max-contact a.max-contact__phone {
    min-height: 44px;
    font-size: 1.0625rem;
    color: inherit;
}

.contact-method-card .max-contact a.max-contact__max {
    min-height: 44px;
}
