/* Стили страницы услуги (/services/{slug}) */

.service-hero .breadcrumbs {
    margin-bottom: 28px
}

.service-hero__content .lead {
    margin-bottom: 0
} 

.service-hero__art {
    min-height: 0;
    background: #eef8fb;
    overflow: hidden
}

.service-hero__art img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 410px;
    object-fit: cover
}

.service-hero__badge {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 28px rgba(23, 52, 86, .12);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2
}

.service-hero__badge-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    color: var(--teal);
    flex-shrink: 0
}

.service-hero__badge-icon svg {
    width: 100%;
    height: 100%
}

.service-highlights {
    padding: 8px 0 36px
}

.service-highlights__list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none
}

.service-highlights__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 0;
    width: fit-content;
    min-width: 0
}

.service-highlights__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(22, 167, 160, .12);
    color: var(--teal);
    flex-shrink: 0
}

.service-highlights__icon svg,
.service-highlights__icon img {
    width: 28px;
    height: 28px; 
    display: block
}

.service-highlights__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0
}

.service-highlights__text strong {
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25
}

.service-highlights__text span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35
}

.service-symptoms__lead {
    margin: -8px 0 36px
}

.service-symptoms__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px 40px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none
}

.service-symptoms__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 0
}

.service-symptoms__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(22, 167, 160, .12);
    color: var(--teal);
    font-size: 15px;
    font-weight: 700;
    line-height: 1
}

.service-symptoms__item strong {
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.02em
}

.service-symptoms__item p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    max-width: 28ch
}

.service-treats {
    background: var(--bg);
    padding-top: 72px;
    padding-bottom: 72px
}

.service-treats__lead {
    margin: -8px 0 36px
}

.service-treats__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none
}

.service-treats__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--card);
    box-shadow: 0 8px 24px rgba(26, 80, 120, .05)
}

.service-treats__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(22, 167, 160, .12);
    color: var(--teal);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0
}

.service-treats__text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding-top: 2px
}

.service-treats__text strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.02em
}

.service-treats__text p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5
}

.service-process__lead { 
    margin: -8px 0 48px;
    max-width: 100%;
}

.service-process__steps {
    --process-num-size: 44px;
    --process-line-thickness: 2px;
    --process-gap-x: 24px;
    --process-gap-y: 28px;
    /* Насколько линия заходит под кружок с каждой стороны */
    --process-line-inset: 10px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
    margin: 0 0 36px;
    padding: 0;
    list-style: none;
    position: relative
}

.service-process__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    min-width: 0
}

/* Горизонтальные сегменты между шагами (десктоп): заходят под оба кружка */
.service-process__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: calc(var(--process-num-size) / 2 - var(--process-line-thickness) / 2);
    left: calc(50% + var(--process-num-size) / 2 - var(--process-line-inset));
    width: calc(100% + var(--process-gap-x) - var(--process-num-size) + var(--process-line-inset) * 2);
    height: var(--process-line-thickness);
    background: var(--line);
    z-index: 0;
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
    pointer-events: none
}

.service-process__step.is-line-drawing::after {
    opacity: 1;
    animation: service-process-draw-x var(--service-process-segment-ms, .75s) ease-out forwards
}

.service-process__num {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--process-num-size);
    height: var(--process-num-size);
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    transition: background-color .2s ease
}

.service-process__num.is-hit {
    animation: service-process-num-hit .4s ease
}

.service-process__step strong {
    position: relative;
    z-index: 2;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25
}

.service-process__step p {
    position: relative;
    z-index: 2;
    margin: 0;
    max-width: 18ch;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45
}

.service-process__note {
    padding: 24px 28px;
    border-radius: var(--r);
    background: rgba(22, 167, 160, .08);
    border: 1px solid rgba(22, 167, 160, .12)
}

.service-process__note strong {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3
}

.service-process__note p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

@keyframes service-process-draw-x {
    from {
        transform: scaleX(0)
    }

    to {
        transform: scaleX(1)
    }
}

@keyframes service-process-draw-y {
    from {
        transform: translateX(-50%) scaleY(0)
    }

    to {
        transform: translateX(-50%) scaleY(1)
    }
}

@keyframes service-process-draw-x-left {
    from {
        transform: scaleX(0)
    }

    to {
        transform: scaleX(1)
    }
}

@keyframes service-process-num-hit {

    0%,
    100% {
        transform: scale(1);
        background: var(--teal)
    }

    45% {
        transform: scale(1.14);
        background: #0f8f89
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-process__step:not(:last-child)::after {
        opacity: 1;
        transform: scaleX(1);
        animation: none
    }

    .service-process__num.is-hit {
        animation: none
    }
}

@media (max-width: 900px) {
    .service-hero__art img {
        min-height: 280px
    }

    .service-highlights__list {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line)
    }

    .service-highlights__item {
        width: 100%;
        padding: 18px 0;
    }

    .service-highlights__item+.service-highlights__item {
        border-top: 1px solid var(--line)
    }

    .service-symptoms__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px
    }

    .service-symptoms__item p {
        max-width: none
    }

    .service-treats {
        padding-top: 48px;
        padding-bottom: 48px
    }

    .service-treats__list {
        grid-template-columns: 1fr
    }

    .service-process__steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 24px
    }

    .service-process__step:nth-child(1) {
        grid-column: 1;
        grid-row: 1
    }

    .service-process__step:nth-child(2) {
        grid-column: 2;
        grid-row: 1
    }

    .service-process__step:nth-child(3) {
        grid-column: 2;
        grid-row: 2
    }

    .service-process__step:nth-child(4) {
        grid-column: 1;
        grid-row: 2
    }

    .service-process__step:nth-child(5) {
        grid-column: 1;
        grid-row: 3
    }

    .service-process__step {
        gap: 5px
    }

    .service-process__step p {
        max-width: 18ch;
        padding-bottom: 0;
        border-bottom: 0
    }

    /* Сброс десктопных сегментов, зигзаг: 1→2 / 2↓3 / 3←4 / 4↓5 */
    .service-process__step:not(:last-child)::after {
        content: none;
        animation: none
    }

    /* 1 → 2 */
    .service-process__step:nth-child(1)::after {
        content: "";
        position: absolute;
        top: calc(var(--process-num-size) / 2 - var(--process-line-thickness) / 2);
        left: calc(50% + var(--process-num-size) / 2 - var(--process-line-inset));
        width: calc(100% + var(--process-gap-x) - var(--process-num-size) + var(--process-line-inset) * 2);
        height: var(--process-line-thickness);
        background: var(--line);
        z-index: 0;
        transform: scaleX(0);
        transform-origin: left center;
        opacity: 0;
        pointer-events: none
    }

    /* 2 → 3 */
    .service-process__step:nth-child(2)::after {
        content: "";
        position: absolute;
        top: calc(var(--process-num-size) - var(--process-line-inset));
        left: 50%;
        width: var(--process-line-thickness);
        height: calc(100% + var(--process-gap-y) - var(--process-num-size) + var(--process-line-inset) * 2);
        background: var(--line);
        transform: translateX(-50%) scaleY(0);
        transform-origin: top center;
        z-index: 0;
        opacity: 0;
        pointer-events: none
    }

    /* 3 ← 4 */
    .service-process__step:nth-child(3)::after {
        content: "";
        position: absolute;
        top: calc(var(--process-num-size) / 2 - var(--process-line-thickness) / 2);
        left: auto;
        right: calc(50% + var(--process-num-size) / 2 - var(--process-line-inset));
        width: calc(100% + var(--process-gap-x) - var(--process-num-size) + var(--process-line-inset) * 2);
        height: var(--process-line-thickness);
        background: var(--line);
        z-index: 0;
        transform: scaleX(0);
        transform-origin: right center;
        opacity: 0;
        pointer-events: none
    }

    /* 4 → 5 */
    .service-process__step:nth-child(4)::after {
        content: "";
        position: absolute;
        top: calc(var(--process-num-size) - var(--process-line-inset));
        left: 50%;
        width: var(--process-line-thickness);
        height: calc(100% + var(--process-gap-y) - var(--process-num-size) + var(--process-line-inset) * 2);
        background: var(--line);
        transform: translateX(-50%) scaleY(0);
        transform-origin: top center;
        z-index: 0;
        opacity: 0;
        pointer-events: none
    }

    .service-process__step:nth-child(1).is-line-drawing::after {
        opacity: 1;
        animation: service-process-draw-x var(--service-process-segment-ms, .75s) ease-out forwards
    }

    .service-process__step:nth-child(2).is-line-drawing::after {
        opacity: 1;
        animation: service-process-draw-y var(--service-process-segment-ms, .75s) ease-out forwards
    }

    .service-process__step:nth-child(3).is-line-drawing::after {
        opacity: 1;
        animation: service-process-draw-x-left var(--service-process-segment-ms, .75s) ease-out forwards
    }

    .service-process__step:nth-child(4).is-line-drawing::after {
        opacity: 1;
        animation: service-process-draw-y var(--service-process-segment-ms, .75s) ease-out forwards
    }

    @media (prefers-reduced-motion: reduce) {

        .service-process__step:nth-child(1)::after,
        .service-process__step:nth-child(3)::after {
            opacity: 1;
            transform: scaleX(1);
            animation: none
        }

        .service-process__step:nth-child(2)::after,
        .service-process__step:nth-child(4)::after {
            opacity: 1;
            transform: translateX(-50%) scaleY(1);
            animation: none
        }
    }
}

/* Карточка врача на странице направления */
.service-doctors__list {
    display: grid;
    gap: 24px
}

.service-doctor {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 36px;
    align-items: center;
    padding: 28px;
    border-radius: var(--r);
    background: #eef7fb
}

.service-doctor__media {
    position: relative;
    aspect-ratio: 1;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #f0f8fb, #d7eff5)
}

.service-doctor__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.service-doctor__emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 96px
}

.service-doctor__badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 28px);
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 22px rgba(23, 52, 86, .12);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2
}

.service-doctor__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    flex-shrink: 0
}

.service-doctor__body {
    min-width: 0
}

.service-doctor__label {
    margin: 0 0 10px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase
}

.service-doctor__name {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15
}

.service-doctor__position {
    margin: 0 0 16px;
    color: var(--teal);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35
}

.service-doctor__text {
    margin: 0 0 28px;
    max-width: 42ch;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55
}

.service-doctor__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px
}

.service-doctor__actions .small-btn {
    margin-top: 0;
    border-color: var(--teal);
    color: var(--teal);
    background: transparent
}

@media (max-width: 900px) {
    .service-doctor {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 20px
    }

    .service-doctor__media {
        max-width: 320px
    }

    .service-doctor__name {
        font-size: 24px
    }

    .service-doctor__text {
        max-width: none;
        margin-bottom: 22px
    }

    .service-doctor__actions .btn,
    .service-doctor__actions .small-btn {
        width: 100%;
        justify-content: center
    }
}

/* Цены направления */
.service-prices__list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line)
}

.service-prices__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line)
}

.service-prices__name {
    min-width: 0;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35
}

.service-prices__meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0
}

.service-prices__value {
    color: var(--ink);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
    white-space: nowrap
}

.service-prices__cta {
    min-width: 110px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding: 11px 18px;
    border: 1px solid var(--teal);
    border-radius: 10px;
    background: transparent;
    color: var(--teal);
    font-weight: 700;
    text-decoration: none;
    box-shadow: none;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease
}

.service-prices__cta:hover,
.service-prices__cta:focus-visible {
    border-color: transparent;
    background: linear-gradient(135deg, var(--teal), var(--teal2));
    color: #fff;
    box-shadow: 0 10px 24px rgba(22, 167, 160, .24)
}

.service-prices__actions {
    display: flex; 
    justify-content: center;
    margin-top: 28px
}

@media (max-width: 900px) {
    .service-prices__item {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 18px 0
    }

    .service-prices__name {
        font-size: 16px
    }

    .service-prices__meta {
        justify-content: space-between
    }

    .service-prices__cta {
        min-width: 96px
    }

    .service-prices__actions {
        margin-top: 22px
    }
}

/* FAQ направления */
.service-faq {
    position: relative;
    overflow: hidden
}

.service-faq .wrap {
    position: relative;
    z-index: 1
}

.service-faq__list {
    display: grid;
    gap: 14px;
}

.service-faq__item {
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--card);
    box-shadow: 0 8px 24px rgba(26, 80, 120, .05);
    overflow: hidden
}

.service-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    cursor: pointer;
    list-style: none;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35
}

.service-faq__question::-webkit-details-marker {
    display: none
}

.service-faq__question::marker {
    content: ""
}

.service-faq__icon {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(22, 167, 160, .12)
}

.service-faq__icon::before,
.service-faq__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--teal);
    border-radius: 1px;
    transform: translate(-50%, -50%)
}

.service-faq__icon::before {
    width: 12px;
    height: 2px
}

.service-faq__icon::after {
    width: 2px;
    height: 12px;
    transition: transform .2s ease, opacity .2s ease
}

.service-faq__item[open] .service-faq__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0
}

.service-faq__answer {
    padding: 0 22px 20px
}

.service-faq__answer p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55
}

@media (max-width: 900px) {
    .service-faq__question {
        padding: 16px 18px;
        font-size: 16px
    }

    .service-faq__answer {
        padding: 0 18px 16px
    }
}