/* Дополнительные блоки карточки вида массажа.
 * Не меняют первый экран и базовую стилистику темы: только усиливают
 * посадочную ниже вступительного текста.
 */

/* Блок преимуществ оставляем тем же, что на текущей странице «Массаж спины».
 * Здесь лишь возвращаем его штатную геометрию, чтобы локальные стили посадочной
 * не схлопывали слайды по высоте и ширине. */
.single-types .help .help_item {
    max-width: none;
    height: 400px !important;
}

.type-quicknav {
    margin: 26px 0 54px;
}
.type-quicknav__inner {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.type-quicknav__inner::-webkit-scrollbar {
    display: none;
}
.type-quicknav__link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid rgba(47, 47, 47, .12);
    border-radius: 999px;
    background: #F7F7F8;
    color: #2F2F2F;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.type-quicknav__link:hover,
.type-quicknav__link:focus-visible {
    color: #fff;
    background: #89966F;
    border-color: #89966F;
}

.type-section-head {
    display: grid;
    gap: 14px;
    margin-bottom: 26px;
}
.type-section-eyebrow {
    margin: 0 0 8px;
    color: #89966F;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.type-section-head .h2 {
    margin: 0;
}
.type-section-note {
    max-width: 640px;
    margin: 0;
    color: rgba(47, 47, 47, .7);
    font-size: 16px;
    line-height: 1.5;
}

.type-masters {
    margin: 90px 0;
    overflow: hidden;
}
.type-studio-picker {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin: 0 -16px 26px;
    padding: 0 16px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}
.type-studio-picker::-webkit-scrollbar {
    display: none;
}
.type-studio-chip {
    flex: 0 0 auto;
    width: max-content;
    min-width: 0;
    max-width: none;
    padding: 14px 16px;
    border: 1px solid rgba(47, 47, 47, .12);
    border-radius: 18px;
    background: #fff;
    color: #2F2F2F;
    text-decoration: none;
    scroll-snap-align: start;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.type-studio-chip:hover,
.type-studio-chip:focus-visible {
    border-color: #89966F;
}
.type-studio-chip:focus-visible {
    outline: 2px solid rgba(137, 150, 111, .35);
    outline-offset: -2px;
}
.type-studio-chip.is-active {
    color: #fff;
    background: #89966F;
    border-color: #89966F;
}
.type-studio-chip__name,
.type-studio-chip__metro {
    display: block;
    white-space: nowrap;
}
.type-studio-chip__name {
    font-size: 15px;
    line-height: 1.25;
    font-weight: 500;
}
.type-studio-chip__metro {
    margin-top: 5px;
    color: rgba(47, 47, 47, .62);
    font-size: 13px;
    line-height: 1.2;
}
.type-studio-chip.is-active .type-studio-chip__metro {
    color: rgba(255, 255, 255, .78);
}

.type-masters-results {
    transition: opacity .18s ease;
}
.type-masters.is-loading .type-masters-results {
    opacity: .45;
    pointer-events: none;
}
.type-masters-empty {
    padding: 28px;
    border: 1px solid rgba(47, 47, 47, .1);
    border-radius: 24px;
    background: #F7F7F8;
}
.type-masters-empty__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 500;
}
.type-masters-empty__text {
    max-width: 720px;
    margin: 8px 0 0;
    color: rgba(47, 47, 47, .68);
    font-size: 15px;
    line-height: 1.5;
}

.type-masters-selected {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0 18px;
    padding: 0 0 18px;
    border-bottom: 1px solid rgba(47, 47, 47, .12);
}
.type-masters-selected__label {
    margin: 0 0 4px;
    color: rgba(47, 47, 47, .6);
    font-size: 13px;
}
.type-masters-selected__title {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 500;
}
.type-masters-selected__metro {
    margin: 5px 0 0;
    color: #89966F;
    font-size: 14px;
}
.type-masters-selected__aside {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}
.type-masters-selected__rating {
    display: block;
    width: 150px;
    height: 50px;
    border: 0;
}
.type-masters-selected__room {
    flex: 0 0 auto;
    color: #2F2F2F;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.typeMastersSwiper {
    width: 100%;
    overflow: hidden;
    padding: 2px 0 4px;
}
.typeMastersSwiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}
.typeMastersSwiper .swiper-slide {
    height: auto;
    flex-shrink: 0;
}

/* Резервная горизонтальная раскладка до инициализации Swiper. */
.typeMastersSwiper:not(.swiper-initialized) .swiper-slide {
    width: calc((100% - 10px) / 1.18);
    margin-right: 10px;
}

@media (min-width: 768px) {
    .typeMastersSwiper:not(.swiper-initialized) .swiper-slide {
        width: calc((100% - 22px) / 2);
        margin-right: 22px;
    }
}
/*
 * Внутренняя карточка массажиста намеренно не переопределяется здесь.
 * Используем штатную .mastersSwiper / .studio_item из раздела «Массажисты».
 */
.type-masters-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    margin: 22px 0 0;
    padding-bottom: 4px;
    box-sizing: border-box;
}
.type-masters-prev,
.type-masters-next {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(47, 47, 47, .15);
    border-radius: 50%;
    background: #fff;
    color: #2F2F2F;
    cursor: pointer;
}
.type-masters-prev.swiper-button-disabled,
.type-masters-next.swiper-button-disabled {
    opacity: .35;
    cursor: default;
}
.type-masters-count {
    margin-right: auto;
    color: rgba(47, 47, 47, .62);
    font-size: 13px;
}

.type-reviews {
    margin: 100px 0;
}
.typeReviewsSwiper {
    width: 100%;
    overflow: hidden;
    padding: 2px 0 4px;
}
.typeReviewsSwiper .swiper-wrapper {
    align-items: stretch;
}
.typeReviewsSwiper .swiper-slide {
    display: flex;
    height: auto;
}
.type-review-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 22px;
    border: 1px solid rgba(47, 47, 47, .1);
    border-radius: 22px;
    background: #fff;
    box-sizing: border-box;
}
.type-review-card__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.type-review-card__top strong {
    font-size: 16px;
    font-weight: 500;
}
.type-review-card__top span,
.type-review-card__source {
    color: rgba(47, 47, 47, .55);
    font-size: 13px;
}
.type-review-card__rating {
    margin: -2px 0 14px;
    color: #F5B400;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 2px;
}
.type-review-card p {
    margin: 0 0 14px;
    color: #2F2F2F;
    font-size: 15px;
    line-height: 1.55;
}
.type-review-card a,
.type-review-card__source {
    margin-top: auto;
    color: #89966F;
    font-size: 13px;
}
.type-reviews-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}
.type-reviews-prev,
.type-reviews-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(47, 47, 47, .15);
    border-radius: 50%;
    background: #fff;
    color: #2F2F2F;
    cursor: pointer;
}
.type-reviews-prev.swiper-button-disabled,
.type-reviews-next.swiper-button-disabled {
    opacity: .35;
    cursor: default;
}
.type-reviews-source-note {
    margin-right: auto;
    color: rgba(47, 47, 47, .55);
    font-size: 13px;
}

.type-reviews-empty {
    padding: 22px;
    border: 1px solid rgba(47, 47, 47, .1);
    border-radius: 22px;
    background: #F7F7F8;
}
.type-reviews-empty p {
    max-width: 760px;
    margin: 0;
    color: rgba(47, 47, 47, .68);
    font-size: 15px;
    line-height: 1.55;
}

.type-anchor {
    position: relative;
    top: -96px;
    visibility: hidden;
}

@media (min-width: 768px) {
    .single-types .help .help_item {
        height: 600px !important;
    }

    .type-quicknav {
        margin: 34px 0 72px;
    }
    .type-quicknav__link {
        min-height: 46px;
        padding: 12px 20px;
        font-size: 15px;
    }
    .type-section-head {
        grid-template-columns: minmax(0, 1fr) minmax(300px, .7fr);
        align-items: end;
        gap: 40px;
        margin-bottom: 34px;
    }
    .type-studio-picker {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    /* Десктопный гибрид: две компактные карточки в ряд.
     * До 767px этих переопределений нет — там остаётся штатная карточка
     * из раздела «Массажисты». */
    .typeMastersSwiper .studio_item {
        display: grid;
        grid-template-columns: minmax(130px, 34%) minmax(0, 1fr);
        grid-template-rows: auto 1fr auto;
        grid-template-areas:
            "photo head"
            "photo info"
            "actions actions";
        column-gap: 20px;
        row-gap: 14px;
        align-items: start;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 20px;
        box-sizing: border-box;
    }
    .typeMastersSwiper .studio_item_left {
        grid-area: photo;
        width: 100%;
        max-width: none;
        margin: 0;
    }
    .typeMastersSwiper .studio_item_right {
        display: contents;
    }
    .typeMastersSwiper .studio_masters_text {
        grid-area: head;
    }
    .typeMastersSwiper .studio_info {
        grid-area: info;
        width: auto;
        margin: 0;
        gap: 12px;
        padding-left: 24px;
        font-size: 14px;
        line-height: 1.25;
    }
    .typeMastersSwiper .studio_title {
        font-size: 24px;
        line-height: 1.12;
    }
    .typeMastersSwiper .studio_rank {
        font-size: 16px;
    }
    .typeMastersSwiper .masters_img {
        width: 100%;
        max-height: none;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        object-position: top;
    }
    .typeMastersSwiper .studio_buttons {
        grid-area: actions;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 10px;
        width: 100%;
        margin-top: 4px;
    }
    .typeMastersSwiper .studio_buttons > * {
        width: 100% !important;
        min-width: 0;
        box-sizing: border-box;
    }

    .type-review-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .type-yandex-reviews {
        grid-template-columns: minmax(260px, .65fr) minmax(0, 1.35fr);
        align-items: stretch;
        padding: 28px;
    }
    .type-yandex-reviews__copy {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 20px;
    }
}

@media (min-width: 1200px) {
    .type-masters {
        margin: 130px 0;
    }
    .type-studio-chip {
        min-width: 215px;
        padding: 16px 18px;
    }
}

@media (max-width: 767px) {
    .type-masters,
    .type-reviews {
        margin: 70px 0;
    }
    .type-masters-selected {
        align-items: flex-start;
        flex-direction: column;
    }
    .type-masters-selected__aside {
        width: 100%;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .type-masters-selected__room {
        padding-top: 2px;
    }
    .type-masters-controls {
        justify-content: space-between;
    }
    .type-masters-count {
        max-width: 180px;
        margin-right: 0;
        text-align: center;
    }
}
