.single-direction {
    --direction-green: #23716d;
    --direction-green-dark: #1b5349;
    --direction-text: #111122;
    --direction-muted: rgba(17, 17, 34, .75);
    --direction-soft: rgba(35, 113, 109, .1);
    --direction-row: rgba(35, 113, 109, .05);
}

.single-direction__container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.direction-hero {
    position: relative;
    min-height: 575px;
    margin-top: 220px;
    border-radius: 32px;
    overflow: hidden;
    isolation: isolate;
}

.direction-hero__media,
.direction-hero__overlay,
.direction-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.direction-hero__image {
    object-fit: cover;
}

.direction-hero__overlay {
    background: rgba(0, 0, 0, .5);
}

.direction-hero__content {
    position: relative;
    z-index: 2;
    min-height: 575px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 188px;
}

.direction-hero__title {
    margin: 0;
    color: var(--direction-green);
    font-size: 64px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
}

.direction-hero__actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 84px;
}

.direction-hero__button {
    width: 280px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 10px;
    font-size: 18px;
    line-height: 1;
    font-weight: 500;
    text-decoration: none;
    transition: filter .2s ease, background-color .2s ease, color .2s ease;
}

.direction-hero__button--primary {
    color: #fff;
    background: linear-gradient(110deg, #23716d 6.7%, #1b5349 91%);
}

.direction-hero__button--secondary {
    color: var(--direction-text);
    border: 1px solid var(--direction-green);
    background: transparent;
}

.direction-hero__button:hover {
    color: inherit;
}

.direction-hero__button--primary:hover {
    color: #fff;
    filter: brightness(1.06);
}

.direction-hero__button--secondary:hover {
    color: #fff;
    background: var(--direction-green);
}



.dentistry-hero {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.dentistry-hero__title {
    order: 1;
    width: 100%;
    margin-bottom: 44px !important;
    color: #23716d;
    font-size: 64px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.dentistry-hero__image {
    order: 2;
    position: relative;
    width: min(1520px, calc(100% - 40px));
    height: 575px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 32px;
    background: #23716d;
}

.dentistry-hero__image::after {
    position: absolute;
    inset: 0;
    content: "";
    /*background: rgba(0, 0, 0, .5);*/
}

.dentistry-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dentistry-hero__actions {
    order: 3;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: -72px; /* мобильная версия: кнопки наезжают на картинку */
}

.dentistry-hero__actions .dentistry-btn {
    width: 280px;
}

.dentistry-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 10px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: .2s ease;
}

.dentistry-btn--primary {
    color: #fff;
    border: 1px solid #23716d;
    background: linear-gradient(110deg, #23716d 6.7%, #1b5349 91%);
}

.dentistry-btn--outline {
    color: #111122;
    border: 1px solid #23716d;
    background: transparent;
}



.direction-about {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-top: 80px;
}

.direction-about__content {
    width: min(750px, calc(50% - 16px));
}

.direction-about__title,
.direction-advantages__title,
.direction-price__title,
.direction-contacts__title,
.direction-additional__title,
.direction-faq__title {
    margin: 0;
    color: var(--direction-text);
    font-size: 56px;
    line-height: 1.2;
    font-weight: 700;
}

.direction-about__text {
    margin-top: 32px;
    color: var(--direction-muted);
    font-size: 24px;
    line-height: 1.5;
}

.direction-about__text p {
    margin: 0;
}

.direction-about__text p + p {
    margin-top: 16px;
}

.direction-about__media {
    width: 642px;
    height: 447px;
    border-radius: 32px;
    overflow: hidden;
    background: var(--direction-soft);
}

.direction-about__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.direction-advantages {
    position: relative;
    width: 100vw;
    margin-top: 80px;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    background: #fff;
    padding: 114px 0 75px;
}

.direction-advantages__pattern {
    position: absolute;
    inset: -172px -25px;
    background: url("../../images/section-bg.png") center / cover no-repeat;
    opacity: .14;
}

.direction-advantages__inner {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 48px), 1520px);
    margin: 0 auto;
}

.direction-advantages__title {
    max-width: 821px;
}

.direction-advantages__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 43px;
}

.direction-advantages__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-height: 152px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(35, 113, 109, .1);
}

.direction-advantages__icon {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    color: var(--direction-green);
    font-size: 40px;
}

.direction-advantages__body {
    min-width: 0;
}

.direction-advantages__item-title {
    margin: 0;
    color: var(--direction-text);
    font-size: 28px;
    line-height: 1.5;
    font-weight: 500;
}

.direction-advantages__item-text {
    margin: 8px 0 0;
    color: var(--direction-muted);
    font-size: 18px;
    line-height: 1.5;
}

.direction-additional {
    margin-top: 80px;
}

.direction-additional__layout {
    display: grid;
    grid-template-columns: 365px minmax(0, 874px);
    gap: 24px;
    align-items: start;
    margin-top: 43px;
}

.direction-additional__toc {
    position: sticky;
    top: 120px;
    padding: 24px;
    border-radius: 32px;
    background: #fff;
}

.direction-additional__toc-title {
    color: var(--direction-text);
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
}

.direction-additional__toc-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 24px;
}

.direction-additional__toc-list a {
    color: var(--direction-text);
    font-size: 18px;
    line-height: 1.4;
    text-decoration: none;
}

.direction-additional__toc-list a:hover {
    color: var(--direction-green);
}

.direction-additional__content {
    min-width: 0;
}

.direction-additional__item + .direction-additional__item {
    margin-top: 24px;
}

.direction-additional__item-title {
    margin: 0;
    color: var(--direction-text);
    font-size: 40px;
    line-height: 1.2;
    font-weight: 600;
}

.direction-additional__item-content {
    margin-top: 24px;
    color: var(--direction-text);
    font-size: 18px;
    line-height: 1.5;
}

.direction-additional__item-content h4 {
    margin: 0 0 16px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
}

.direction-additional__item-content p {
    margin: 0 0 12px;
}

.direction-additional__item-content img {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 337;
    margin-top: 24px;
    border-radius: 24px;
    object-fit: cover;
}

.single-direction__chat {
    position: fixed;
    right: 24px;
    top: 50%;
    z-index: 80;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.single-direction__chat-ring {
    position: absolute;
    border-radius: 50%;
}

.single-direction__chat-ring--outer {
    inset: 0;
    background: rgba(35, 113, 109, .12);
}

.single-direction__chat-ring--inner {
    inset: 10px;
    background: rgba(35, 113, 109, .16);
}

.single-direction__chat-button {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--direction-green);
    color: #fff;
    font-size: 34px;
}

.direction-additional__item {
    scroll-margin-top: 70px; /* высота фиксированной шапки + отступ */
}

@media (max-width: 1199px) {
    .direction-hero {
        margin-top: 120px;
    }

    .direction-about__title,
    .direction-advantages__title,
    .direction-price__title,
    .direction-contacts__title,
    .direction-additional__title,
    .direction-faq__title {
        font-size: 46px;
    }

    .direction-about__content {
        width: calc(50% - 12px);
    }

    .direction-about__media {
        width: calc(50% - 12px);
        height: 360px;
    }

    .direction-additional__layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }

    .single-direction__chat {
        width: 88px;
        height: 88px;
        right: 18px;
    }

    .single-direction__chat-ring--inner {
        inset: 8px;
    }

    .single-direction__chat-button {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .direction-hero {
        min-height: 360px;
        margin-top: 32px;
        border-radius: 20px;
    }

    .direction-hero__content {
        min-height: 360px;
        padding: 24px 16px 20px;
        justify-content: space-between;
    }

    .direction-hero__title {
        font-size: 32px;
        text-align: center;
    }

    .direction-hero__actions {
        width: 100%;
        flex-direction: column;
        gap: 8px;
        margin-top: 0;
    }

    .direction-hero__button {
        width: 100%;
        height: 48px;
        font-size: 16px;
    }

    .direction-about {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        margin-top: 48px;
    }

    .direction-about__content,
    .direction-about__media {
        width: 100%;
    }

    .direction-about__title,
    .direction-advantages__title,
    .direction-price__title,
    .direction-contacts__title,
    .direction-additional__title,
    .direction-faq__title {
        font-size: 30px;
        line-height: 1.2;
    }

    .direction-about__text {
        margin-top: 20px;
        font-size: 16px;
    }

    .direction-about__media {
        height: 260px;
        border-radius: 20px;
    }

    .direction-advantages {
        margin-top: 48px;
        padding: 48px 0;
    }

    .direction-advantages__inner {
        width: calc(100% - 32px);
    }

    .direction-advantages__grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 24px;
    }

    .direction-advantages__item {
        min-height: 0;
        padding: 16px;
        border-radius: 18px;
    }

    .direction-advantages__icon {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
        font-size: 28px;
    }

    .direction-advantages__item-title {
        font-size: 18px;
        line-height: 1.3;
    }

    .direction-advantages__item-text {
        font-size: 15px;
        line-height: 1.45;
    }

    .direction-additional {
        margin-top: 48px;
        padding-bottom: 48px;
    }

    .direction-additional__layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-top: 24px;
    }

    .direction-additional__toc {
        position: static;
        width: 100%;
        padding: 18px;
        border-radius: 20px;
    }

    .direction-additional__toc-title {
        font-size: 22px;
    }

    .direction-additional__toc-list {
        gap: 12px;
        margin-top: 16px;
    }

    .direction-additional__toc-list a {
        font-size: 16px;
    }

    .direction-additional__item-title {
        font-size: 26px;
    }

    .direction-additional__item-content {
        margin-top: 18px;
        font-size: 16px;
    }

    .direction-additional__item-content h4 {
        font-size: 22px;
    }

    .direction-additional__item-content img {
        margin-top: 18px;
        border-radius: 18px;
    }

    .single-direction__chat {
        width: 64px;
        height: 64px;
        right: 10px;
        bottom: 18px;
        top: auto;
    }

    .single-direction__chat-ring--inner {
        inset: 5px;
    }

    .single-direction__chat-button {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .dentistry-hero {
        padding-top: 24px;
        padding-bottom: 42px;
    }

    .dentistry-hero__title {
        margin-bottom: 24px !important;
        font-size: 36px;
    }

    .dentistry-hero__image {
        width: 100%;
        height: 575px;
        border-radius: 16px;
    }

    .dentistry-hero__image img {
        width: auto;
        min-width: 975px;
        max-width: none;
        height: 595px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .dentistry-hero__actions {
        flex-direction: row-reverse;
        gap: 8px;
        margin: 24px 0 0;
    }

    .dentistry-hero__actions .dentistry-btn {
        flex: 1;
        width: auto;
        height: 48px;
        padding: 10px;
        font-size: 18px;
    }
}
@media (min-width: 1024px) {
    .dentistry-hero__actions {
        order: 2;
        margin-top: 0;
        margin-bottom: 44px;
    }
    .dentistry-hero__image {
        order: 3;
    }
}
