/* Якоря не прячутся под фиксированную шапку */
html {
    scroll-padding-top: calc(var(--yz-header-offset, 220px) + 40px);
}
h2[id],
h3[id],
[id="about"],
[id="factors"],
[id="benefits"],
[id="indications"],
[id="diag"],
[id="method"],
[id="contraindications"],
[id="pricetab-2"],
[id="specTag"],
[id="doctors"],
[id="faq"],
[id="otzv"],
[id="licenses"],
[id="questions"],
[id="visit"],
[id="prep"] {
    scroll-margin-top: calc(var(--yz-header-offset, 220px) + 40px);
}

/* H1 конструктора — из поля кабинета, не название раздела */
.main-content:has(.yz-landing) > .h1_inner_wrap {
    display: none;
}

/* Вся ветка /-11-11-11/: боковая колонка как на живых /uslugi/ */
.main-inner .main-aside {
    display: block !important;
    visibility: visible !important;
    width: 23.5% !important;
    float: left !important;
    max-width: 23.5% !important;
}
.main-inner .main-base {
    width: 74% !important;
    float: right !important;
    max-width: 74% !important;
}

.yz-tech {
    font-size: 14px;
    line-height: 1.45;
    color: #6b1c16;
    background: #fde8e8;
    border: 1px solid #c0392b;
    padding: 10px 14px;
    border-radius: 4px;
    margin: 12px 0 20px;
    clear: both;
    overflow: hidden;
}
.yz-preview-notice {
    font-size: 14px;
    line-height: 1.45;
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 10px 14px;
    border-radius: 4px;
    margin: 0 0 12px;
}
.yz-preview-notice a {
    color: #856404;
    word-break: break-all;
}

.yz-preview-notice + .yz-tech,
.yz-tech--top {
    margin-top: 0;
    margin-bottom: 16px;
    padding: 12px 16px;
}
.yz-tech strong {
    display: block;
    margin: 0 0 6px;
}
.yz-tech ul {
    margin: 0;
    padding-left: 1.2em;
}
.yz-tech li {
    margin: 0 0 2px;
}

.yz-prog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 0 0 20px;
    align-items: stretch;
}
.yz-prog-grid--3 {
    grid-template-columns: 1fr 1fr 1fr;
}
.yz-prog-card,
.yz-prog-card h3,
.yz-prog-card p {
    text-align: left !important;
}
.yz-prog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--yz-border, #dee0e4);
    border-radius: var(--yz-radius, 10px);
    padding: 16px 18px;
    background: var(--yz-blue-100, rgba(58, 149, 191, 0.1));
    box-sizing: border-box;
    min-width: 0;
}
.yz-prog-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
    color: var(--yz-text, #333);
    overflow-wrap: anywhere;
}
.yz-prog-price {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin: 0 0 10px;
}
.yz-prog-card .yz-prog-meta {
    font-size: 14px;
    color: #707070;
    margin: 0 0 8px;
}
.yz-prog-grid + .yz-prog-note {
    margin: 12px 0 8px;
    font-size: 13px;
    font-style: italic;
    line-height: 1.45;
    color: #707070;
}
.yz-prog-card .ubtn {
    margin-top: auto;
    align-self: flex-start;
}

.pricelist table {
    width: 100%;
}
.pricelist table td:last-child {
    text-align: right;
    width: 120px;
    white-space: nowrap;
    vertical-align: top;
}

.h1_inner_wrap {
    margin-bottom: 8px !important;
}
.yz-preview-bc {
    margin: 0 0 8px !important;
}

.yz-useful-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 24px;
}
.yz-useful-card {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid var(--yz-border, #dee0e4);
    border-radius: var(--yz-radius, 10px);
    padding: 16px;
    background: var(--yz-blue-100, rgba(58, 149, 191, 0.1));
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}
.yz-useful-card .yz-useful-ico {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--yz-blue, #3a95bf);
}
.yz-useful-card span {
    font-weight: 600;
    color: var(--yz-blue, #3a95bf);
}

.yz-fig {
    margin: 0 0 16px;
}
.yz-fig img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.yz-fig--side {
    float: right;
    width: 42%;
    max-width: 360px;
    margin: 0 0 12px 16px;
}
.yz-split {
    display: block;
    margin: 0 0 16px;
    overflow: hidden;
}
.yz-split > .yz-fig {
    float: right;
    width: 240px;
    max-width: 36%;
    margin: 0 0 8px 20px;
}
.yz-split > .yz-fig img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    height: auto;
}
.yz-split > .yz-split__text > p:first-child {
    margin-top: 0;
}
.yz-split--lg > .yz-fig {
    width: 52%;
    max-width: 460px;
}
.yz-banner-hero {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    margin: 12px 0 0;
    border-radius: 8px;
    object-fit: contain;
}
.yz-photo-wide {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 220px;
    margin: 12px 0 16px;
    border-radius: 8px;
    object-fit: cover;
}
.yz-banner-hero.yz-photo-wide {
    max-width: 100%;
    height: 220px;
    object-fit: cover;
    margin: 12px 0 0;
}
.yz-fig .yz-photo-wide {
    margin: 0;
}

.uslugi-banner_wrap {
    margin-top: 0 !important;
}

.uslugi-banner_wrap#hero {
    margin-bottom: 8px !important;
    padding-bottom: 0 !important;
    gap: 16px;
}
.uslugi-banner_wrap#hero .uslugi-banner_content {
    gap: 16px;
}
.uslugi-banner_wrap#hero .yz-banner-hero.yz-photo-wide {
    margin: 8px 0 0;
}
.uslugi-banner_wrap#hero + p {
    margin-top: 10px;
}

.yz-cta-mini {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin: 16px 0 24px;
    padding: 14px 16px;
    border: 1px solid var(--yz-border, #dee0e4);
    border-radius: var(--yz-radius, 10px);
    background: var(--yz-blue-100, rgba(58, 149, 191, 0.1));
    box-sizing: border-box;
}
.yz-cta-mini p {
    margin: 0;
    flex: 1 1 220px;
    text-align: left !important;
}
.yz-cta-mini .ubtn {
    flex: 0 0 auto;
}
.yz-preview-leadform {
    margin: 24px 0;
}

@media (max-width: 900px) {
    .yz-prog-grid,
    .yz-prog-grid--3 {
        grid-template-columns: 1fr;
    }
    .main-inner .main-aside,
    .main-inner .main-base {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }
    .yz-fig--side,
    .yz-split > .yz-fig {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 16px;
        order: 2;
    }
    .yz-split {
        display: flex;
        flex-direction: column;
    }
    .yz-split > .yz-split__text {
        order: 1;
    }
    .yz-banner-hero.yz-photo-wide,
    .yz-photo-wide {
        height: 160px;
    }
}

/* Только ветка /-11-11-11/: баннер услуги по левому краю колонки */
.uslugi-banner_wrap {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    align-items: flex-start !important;
    align-self: stretch !important;
}

.uslugi-banner_wrap .uslugi-banner_header,
.uslugi-banner_wrap .uslugi-banner_content,
.uslugi-banner_wrap .uslugi-banner_btn {
    width: 100% !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

.uslugi-banner_wrap .uslugi-banner_list ul {
    width: auto !important;
    max-width: 100%;
    margin-left: 0 !important;
}

/* Только ветка /-11-11-11/: фото + рейтинг слева, текст и кнопки справа */
.specgrid .personcard.flat {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    column-gap: 12px;
}

.specgrid .personcard.flat > .yz-11-card-media {
    display: flex;
    flex-direction: column;
    flex: 0 0 163px;
    width: 163px;
}

.specgrid .personcard.flat .personcard-side {
    float: none !important;
    width: 100%;
    overflow: visible;
}

.specgrid .personcard.flat .personcard-side img.personcard-photo {
    margin-top: 0;
}

.specgrid .personcard.flat > .personcard-base {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    margin-left: 0 !important;
    width: auto !important;
    max-width: 100%;
    min-width: 0;
}
.specgrid .personcard.flat > .personcard-base > .personcard-name { order: 1; }
.specgrid .personcard.flat > .personcard-base > .personcard-role { order: 2; }
.specgrid .personcard.flat > .personcard-base > .personcard-info { order: 3; }
.specgrid .personcard.flat > .personcard-base > .specpanel-price { order: 4; }
.specgrid .personcard.flat > .personcard-base > .more_bottom-specgr:has(.stazhinfo) { order: 5; }
.specgrid .personcard.flat > .personcard-base > .appointment-card { order: 6; }
.specgrid .personcard.flat > .personcard-base > .more_bottom-specgr:not(:has(.stazhinfo)) { order: 7; }

.specgrid .personcard.flat .yz-11-card-head {
    min-width: 0;
}

.specgrid .personcard.flat .appointment-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    margin-bottom: 8px;
}

.specgrid .personcard.flat .appointment-card > .btn--blue,
.specgrid .personcard.flat .appointment-card > .btn_write_doc {
    margin-top: 0;
}

.specgrid .personcard.flat .yz-11-card-head .specpanel-price {
    margin-bottom: 2px;
}

.specgrid .personcard.flat .yz-11-card-head .more_bottom-specgr {
    grid-area: unset;
    display: block;
    margin: 0;
}

.specgrid .personcard.flat .yz-11-card-head .stazhinfo {
    padding-left: 0;
    background-image: none;
    line-height: 1.3;
    margin: 0;
}

.specgrid .personcard.flat .yz-11-card-media > .rating,
.specgrid .personcard.flat > .rating {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 6px 0 0;
    margin-top: 0;
    gap: 4px;
}

.specgrid .personcard.flat > .rating .rating__value {
    width: 100%;
}

.specgrid .personcard.flat > .rating .rating__value .row {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
}

.specgrid .personcard.flat > .rating .rating__value .val {
    margin-left: 0;
    white-space: nowrap;
    width: auto;
}

.specgrid .personcard.flat > .rating .rating__value .value {
    font-size: 18px;
}

.specgrid .personcard.flat > .rating .col_stars .button {
    display: none;
}

/* Слайдер врачей → сетка 2 колонки компактных карточек */
.specgrid .spec-slider.swiper,
.specgrid .spec-slider.yz-11-doctors-grid {
    overflow: visible;
}

.specgrid .spec-slider .swiper-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
}

.specgrid .spec-slider .swiper-slide,
.specgrid .spec-slider .swiper-slide-active,
.specgrid .spec-slider .swiper-slide-next {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
}

.specgrid .spec-slider .swiper-slide-duplicate {
    display: none !important;
}

.specgrid .spec-slider .swiper-navigation,
.specgrid .d-spec-nav {
    display: none !important;
}

.specgrid .spec-slider .personcard.flat {
    grid-template-columns: 120px minmax(0, 1fr);
    column-gap: 12px;
    padding: 12px 12px 12px 0;
    box-sizing: border-box;
}

.specgrid .spec-slider .personcard.flat > .yz-11-card-media {
    flex: 0 0 120px;
    width: 120px;
}

.specgrid .spec-slider .personcard.flat .personcard-side,
.specgrid .spec-slider .personcard.flat .personcard-side img.personcard-photo {
    width: 120px;
    max-width: 120px;
}

.specgrid .spec-slider .personcard.flat .yz-11-card-media > .rating {
    width: 100% !important;
    max-width: 100%;
    padding: 6px 0 0;
    margin-top: 0;
}

.specgrid .spec-slider .personcard-info {
    display: none;
}

.specgrid .spec-slider .personcard.flat > .rating .col_stars .button {
    display: none;
}

.specgrid .spec-slider .specpanel-price span {
    white-space: nowrap;
    display: inline-block;
}

@media (max-width: 768px) {
    .specgrid .spec-slider .swiper-wrapper {
        grid-template-columns: 1fr;
    }

    .specgrid .spec-slider .specpanel-price {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        line-height: 1.3;
    }
}

/* Карточки врачей в компактной сетке: заранее резервируем место под ФИО
   и должность, чтобы цена и кнопка «Запись на прием» стояли на одной
   высоте у всех карточек ряда независимо от длины текста. */
.specgrid .spec-slider .personcard.flat > .personcard-base > .personcard-name {
    height: 44px;
    overflow: hidden;
    line-height: 1.2;
    box-sizing: content-box;
}

.specgrid .spec-slider .personcard.flat > .personcard-base > .personcard-name a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.specgrid .spec-slider .personcard.flat > .personcard-base > .personcard-role {
    height: 32px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    box-sizing: content-box;
}

/* doctorcard=2 на /-11-11-11/: не компактная карточка ветки */
.specgrid .spec-slider.yz-dc2-slider .personcard-info {
    display: block !important;
}
.specgrid .spec-slider.yz-dc2-slider .more_bottom-specgr {
    display: block !important;
}
.specgrid .spec-slider.yz-dc2-slider .yz-dc2-mid > .more_bottom-specgr {
    display: flex !important;
}
.specgrid .spec-slider.yz-dc2-slider .personcard.flat {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
}
.specgrid .spec-slider.yz-dc2-slider .personcard.flat .personcard-side,
.specgrid .spec-slider.yz-dc2-slider .personcard.flat .personcard-side img.personcard-photo {
    width: auto;
    max-width: none;
}
.specgrid .spec-slider.yz-dc2-slider .personcard.flat > .rating .col_stars .button {
    display: block !important;
}

/* Карточки в ряду одной высоты; слот «Показать полностью» всегда занимает место */
.specgrid .spec-slider.yz-dc2-slider .swiper-slide,
.specgrid .spec-slider.yz-dc2-slider .swiper-slide-active,
.specgrid .spec-slider.yz-dc2-slider .swiper-slide-next {
    align-self: stretch !important;
}
.specgrid .spec-slider.yz-dc2-slider .specgrid-itm {
    height: 100% !important;
}
.specgrid .spec-slider.yz-dc2-slider .specgrid-itm > .personcard {
    flex: 1 1 auto;
}
.specgrid .spec-slider.yz-dc2-slider .yz-dc2-mid {
    flex: 1 1 auto;
}
.specgrid .spec-slider.yz-dc2-slider .yz-dc2-more {
    visibility: hidden;
    pointer-events: none;
    min-height: 1.3em;
}
.specgrid .spec-slider.yz-dc2-slider .yz-dc2-more.is-on {
    visibility: visible;
    pointer-events: auto;
}

/* Конструктор посадочных: только внутри .yz-landing */
.yz-landing .yz-banner-hero {
    height: auto;
}
