/* Mobile/header fixes that apply site-wide without rebuild */
.header .icon-social--phone svg,
.header .icon-social--phone path {
    fill: #15B392 !important;
}

.icon-social--phone svg {
    fill: #15B392 !important;
}

.icon-social--phone path {
    fill: #15B392 !important;
}

/* Price list: keep arrow buttons inside without overlapping prices */
.price-list__card-button {
    margin-right: 0 !important;
}

/* Hero photo: desktop uses background-image, photo block is mobile-only */
.main-info__photo {
    display: none;
}

.main-info__photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2rem;
    object-fit: cover;
}

/* Desktop: keep hero text out of the right-side photo */
@media (min-width: 768px) {
    .main-info {
        background-size: 48% !important;
        background-position: right center !important;
    }

    .main-info__info {
        max-width: 44% !important;
        padding-right: 3rem;
        box-sizing: border-box;
    }

    .main-info__title,
    .main-info__lead,
    .main-info__list {
        max-width: 100%;
    }

    .page--narkolog .main-info__lead,
    .page--kapelnica .main-info__lead,
    .page--vyvod .main-info__lead {
        max-width: 100% !important;
    }
}

/* CTA + messengers: keep WA/TG together under the main button on mobile only */
.main-info__buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.main-info__buttons > :not(.icon-social),
.main-info__buttons > .icon-social {
    flex: 0 0 auto;
}

@media (max-width: 767.98px) {
    /*
     * Root font-size on mobile is ~6–8px (vw-based), so rem sizes stay tiny.
     * Logo must use px to actually grow.
     */
    .header__container {
        height: auto !important;
        min-height: 72px;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        align-items: center !important;
    }

    .header__logo {
        width: 118px !important;
        height: 92px !important;
        flex-shrink: 0 !important;
        margin-right: auto !important;
    }

    .header__logo img {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        object-position: left center !important;
    }

    .main-info:has(.main-info__photo) {
        background-image: none !important;
    }

    .main-info:has(.main-info__photo) .main-info__container {
        height: auto !important;
        min-height: 0 !important;
    }

    .main-info:has(.main-info__photo) .main-info__info {
        max-width: 100% !important;
        background-color: transparent;
        padding-bottom: 3.2rem !important;
    }

    .main-info__photo {
        display: block;
        margin: 0.8rem 0;
    }

    /* Main CTA takes full row; messengers stay side-by-side below */
    .main-info__buttons > :not(.icon-social) {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .main-info__buttons > .icon-social {
        flex: 0 0 auto !important;
    }

    .price-list__card {
        display: flex !important;
        align-items: center !important;
        gap: 1.2rem;
        padding: 3rem 2rem 3rem 3rem !important;
    }

    .price-list__card-title {
        flex: 1 1 auto;
        min-width: 0;
    }

    .price-list__card-price {
        flex: 0 0 auto !important;
        white-space: nowrap;
    }

    .price-list__card-button {
        position: static !important;
        right: auto !important;
        flex: 0 0 auto;
        margin-left: 0 !important;
    }

    .main-info__container {
        height: auto !important;
        min-height: 0 !important;
    }

    .main-info__info {
        max-width: 100% !important;
        position: relative;
        z-index: 2;
    }

    /* На страницах без inline-фото оставляем фон внизу, без пустого отступа */
    .main-info:not(:has(.main-info__photo)) {
        background-size: 100% auto !important;
        background-position: bottom center !important;
        padding-bottom: 36rem;
    }

    .main-info:not(:has(.main-info__photo)) .main-info__info {
        background-color: #ffffff;
        padding-bottom: 2.4rem !important;
    }
}
