.contacts-page {
    padding-bottom: 120px;
}

.contacts-hero {
    max-width: 760px;
    margin-bottom: 72px;
}

.contacts-hero__title {
    margin: 0 0 32px;
    color: #070707;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
}

.contacts-hero__text {
    margin: 0;
    color: #7B7B7B;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.3;
}

.contacts-map {
    margin-bottom: 120px;
}

.contacts-map__media {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.contacts-map__canvas {
    display: block;
    width: 100%;
    height: 640px;
}

.contacts-map__card {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 2;
    width: min(100%, 350px);
    padding: 32px;
    background-color: #fff;
    border-radius: 10px;
}

.contacts-map__item + .contacts-map__item {
    margin-top: 20px;
}

.contacts-map__label {
    display: inline-block;
    margin-bottom: 10px;
    color: #070707;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.1;
}

.contacts-map__item p,
.contacts-map__item a {
    margin: 0;
    color: #070707;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    text-decoration: none;
}

.contacts-section {
    margin-bottom: 120px;
}

.contacts-section__head {
    margin-bottom: 60px;
}

.contacts-section__head--split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
}

.contacts-section__label {
    display: inline-block;
    color: #7B7B7B;
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
}

.contacts-section__head-main {
    width: min(100%, 760px);
}

.contacts-section__title {
    margin: 0;
    color: #070707;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
}

.contacts-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.contacts-card {
    min-height: 204px;
    padding: 32px;
    background-color: #F7F7F7;
    border-radius: 24px;
}

.contacts-card__head {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 20px;
}

.contacts-card__icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-main);
    border-radius: 8px;
}

.contacts-card__icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.contacts-card h3 {
    margin: 0;
    color: #111;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.08;
}

.contacts-card p {
    margin: 0;
    color: var(--gray-main);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.35;
}

.contacts-map-balloon {
    width: 100%;
    max-width: 260px;
    padding-top: 4px;
    text-align: center;
}

.contacts-map-balloon__logo {
    display: block;
    width: 124px;
    height: auto;
    margin-inline: auto;
    margin-bottom: 16px;
}

.contacts-map-balloon__phone,
.contacts-map-balloon__address {
    display: block;
    color: #070707;
    text-decoration: none;
}

.contacts-map-balloon__phone {
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}

.contacts-map-balloon__address {
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
}

.contacts-map-balloon__route {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 100px;
    background-color: var(--color-main);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.3s;
}

.contacts-map-balloon__route:hover {
    background-color: var(--color-main-hover);
    color: #fff;
}

@media (max-width: 1024px) {
    .contacts-map__item p,
    .contacts-map__item a {
        font-size: 16px;
    }
}

@media (max-width: 1400px) {
    .contacts-hero__title,
    .contacts-section__title {
        font-size: 42px;
    }
}

@media (max-width: 992px) {
    .contacts-page {
        padding-bottom: 80px;
    }

    .contacts-map,
    .contacts-section {
        margin-bottom: 72px;
    }

    .contacts-hero {
        margin-bottom: 56px;
    }

    .contacts-hero__title,
    .contacts-section__title {
        font-size: 34px;
    }

    .contacts-hero__text {
        font-size: 16px;
    }

    .contacts-map__card {
        top: 24px;
        left: 24px;
        padding: 24px;
    }

    .contacts-map__canvas {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .contacts-section__head--split {
        flex-direction: column;
    }

    .contacts-hero__title,
    .contacts-section__title {
        font-size: 28px;
    }

    .contacts-hero__text,
    .contacts-section__label,
    .contacts-map__label,
    .contacts-card p {
        font-size: 16px;
    }

    .contacts-map__card {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        margin-top: -100px;
        transform: none;
        box-shadow:
            0 6px 14px rgba(0, 0, 0, 0.06),
            0 2px 6px rgba(0, 0, 0, 0.03);
    }

    .contacts-map__media {
        overflow: visible;
    }

    .contacts-map__canvas {
        height: 500px;
    }

    .contacts-card-grid {
        grid-template-columns: 1fr;
    }

    .contacts-card {
        min-height: 190px;
        padding: 28px 24px;
        border-radius: 20px;
    }

    .contacts-card h3 {
        font-size: 18px;
        line-height: 1.12;
    }

    .contacts-card__icon {
        width: 40px;
        height: 40px;
    }

    .contacts-card__icon img {
        width: 20px;
        height: 20px;
    }
}
