/* ===== CONTACTS: HERO ===== */

.contacts-content {
    color: var(--white);
}

.contacts-content a {
    text-decoration: none;
}

.contacts-content > section {
    padding: 76px 0;
    color: var(--white);
    background: transparent;
}

/* Сетка: левая колонка + правая колонка */
.contacts-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

/* Левая колонка */
.contacts-hero__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 520px;
    gap: 16px;
    height: 100%;
}

.contacts-hero__title {
    font-weight: 500;
    font-size: 56px;
    line-height: 1.1;
    letter-spacing: 0;
    color: var(--white);
    margin: 0;
    padding: 0;
}

.contacts-hero__description {
    margin: 0;
    padding: 0;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: 0;
    max-width: 420px;
}

/* Кнопка «Оставить обращение» */
.contacts-content a.contacts-hero__btn {
    display: inline-flex;
    margin-top: auto;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    padding: 16px 28px;
    border: 1px solid var(--line);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    background: var(--cyan);
    color: var(--bg);
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.contacts-hero__btn:hover,
.contacts-hero__btn:focus-visible {
    color: var(--bg);
    box-shadow: 0 2px 30px 0 rgba(var(--scrollbar-rgb), 0.4);
}

.contacts-hero__btn:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

/* Правая колонка с карточками */
.contacts-hero__cards {
    display: grid;
    gap: 16px;
    justify-self: end;
    width: 100%;
}

/* Карточка контакта */
.contacts-card {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface-card);
    transition: border-color .25s ease, background .25s ease;
}

.contacts-card:hover {
    border-color: rgba(var(--cyan-rgb), .44);
    background: var(--card-hover);
}

.contacts-card__label {
    margin: 0;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--cyan);
}

.contacts-card__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contacts-card__phone,
.contacts-card__email {
    font-weight: 500;
    font-size: 32px;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--white);
    transition: color .2s ease;
}

.contacts-card__offices {
    margin: 0;
    font-weight: 500;
    font-size: 32px;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--white);
}

.contacts-card__dot {
    color: var(--muted);
    margin: 0 4px;
}

/* ===== ОБЕРТКА ДЛЯ БЛОКА С ФОРМОЙ ===== */

.contacts-form-section {
    scroll-margin-top: 88px;
}

.contacts-form-section__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.contacts-form-section__title {
    margin: 0 0 40px;
    font-weight: 500;
    font-size: 48px;
    line-height: 1.1;
    color: var(--white);
}

.contacts-form-section__title .color-cyan {
    color: var(--cyan);
}

.contacts-form-section__subtitle {
    margin: 0 0 12px;
    font-weight: 500;
    font-size: 24px;
    line-height: 1.3;
    color: var(--white);
}

.contacts-form-section__desc {
    margin: 0 0 40px;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted-light);
}

.contacts-form-section__contacts {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contacts-form-section__contact-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contacts-form-section__label {
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}

.contacts-form-section__value {
    font-weight: 500;
    font-size: 24px;
    line-height: 1.3;
    color: var(--white);
    text-decoration: none;
    transition: color .2s ease;
}

.contacts-form-section__value:hover {
    color: var(--cyan);
}

@media (max-width: 1440px) {
    /* Уменьшаем общие отступы секций */
    .contacts-content > section {
        padding: 70px 0;
    }
    .contacts-hero__title {
        font-size: 48px;
    }
    .contacts-hero__description {
        font-size: 16px
    }
    .contacts-card__label {
        font-size: 18px
    }
    .contacts-card {
        gap: 32px;
        padding: 20px;
    }
    .contacts-card__phone,
    .contacts-card__email {
        font-size: 28px;
    }
    .contacts-card__offices {
        font-size: 28px;
    }
    .contacts-form-section__title { font-size: 40px; margin: 0 0 32px 0;}
    .contacts-form-section__subtitle { font-size: 22px; }
    .contacts-form-section__desc { margin: 0 0 47px 0;}
    .contacts-form-section__value { font-size: 22px; }
}

/* =======================================================
   МОБИЛЬНЫЕ (max-width: 767px)
   ======================================================= */
@media (max-width: 767px) {
    /* Уменьшаем общие отступы секций */
    .contacts-content > section {
        padding: 40px 0;
    }

    /* --- HERO --- */
    .contacts-hero {
        padding: 40px 0;
    }

    .contacts-hero__grid {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    /* "Растворяем" обертку, чтобы вытащить кнопку и управлять порядком */
    .contacts-hero__info {
        display: contents; 
    }

    /* Порядок элементов на мобилке */
    .contacts-hero__title {
        order: 1;
        font-size: 32px;
    }

    .contacts-hero__description {
        order: 2;
        font-size: 15px;
        max-width: 100%;
        margin-top: -16px;
    }

    .contacts-hero__cards {
        order: 3;
        width: 100%;
    }

    /* Кнопка уезжает вниз */
    .contacts-content a.contacts-hero__btn {
        order: 4;
        display: flex;
        width: 100%;
        min-height: 52px;
        padding: 16px 28px;
        border-radius: 12px;
        max-width: 328px;
        margin: 0 auto;
    }

    /* Карточки контактов */
    .contacts-card {
        gap: 32px;
        padding: 16px;
        border-radius: 16px;
    }

    .contacts-card__label {
        font-size: 18px;
    }

    .contacts-card__content {
        gap: 8px;
    }

    .contacts-card__phone,
    .contacts-card__email,
    .contacts-card__offices {
        font-size: 20px;
    }

    /* --- ФОРМА --- */
    .contacts-form-section__info {
        display: flex;
        flex-direction: column;
    }
    .contacts-form-section__grid {
        grid-template-columns: 1fr; /* В одну колонку */
        gap: 32px;
    }

    .contacts-form-section__title {
        font-size: 28px;
        margin-bottom: 24px;
        order: 1;
    }

    .contacts-form-section__contact-item {
        gap: 8px;
    }

    .contacts-form-section__subtitle {
        font-size: 20px;
        order: 3;
    }

    .contacts-form-section__desc {
        margin: 0;
        order: 4;
    }

    .contacts-form-section__contacts {
        gap: 24px;
        order: 2;
        margin: 0 0 24px 0;
    }

    .contacts-form-section__value {
        font-size: 20px;
    }
}