@font-face {
    font-family: 'Manrope';
    src: url('../assets/fonts/manrope/manrope-regular.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

/* Native service masthead and immersive hero. Scoped to service templates. */
.single-service {
    --hero-gutter: var(--mikos-gutter);
    --hero-width: var(--mikos-max);
    --hero-ink: #ffffff;
    --hero-blue: #042aa4;
    --hero-nude: #f0e9de;
    --hero-font: 'Manrope', Arial, sans-serif;
}
.single-service .page_content_wrap { padding-top: 0 !important; }
.single-service .page_content_wrap > .content_wrap,
.single-service .page_content_wrap > .content_wrap > .content {
    width: 100% !important;
    max-width: none;
    margin: 0;
    padding: 0;
    float: none;
}
.single-service .page_wrap { overflow-x: clip; }
.service-hero * { box-sizing: border-box; }


.single-service .service-hero a:focus-visible { outline: 2px solid #fff; outline-offset: 6px; }

.single-service .service-hero {
    position: relative;
    isolation: isolate;
    min-height: max(740px, 100svh);
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #171717;
    color: var(--hero-ink);
    font-family: var(--hero-font);
    font-weight: 400;
}
.service-hero__media, .service-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.service-hero__media { z-index: -3; }
.service-hero__media img { object-fit: cover; object-position: 60% center; }
.single-service .service-hero__overlay { position: absolute; inset: 0; z-index: -2; opacity: 1; background-image: linear-gradient(90deg, rgb(0 0 0 / 64%) 0%, rgb(0 0 0 / 42%) 38%, rgb(0 0 0 / 8%) 72%, transparent 100%), linear-gradient(180deg, rgb(0 0 0 / 38%), transparent 28%, transparent 70%, rgb(0 0 0 / 34%)); }
.single-service .service-hero__inner { flex: 1; position: relative; z-index: 1; padding: 114px 0 0; display: flex; flex-direction: column; }
.service-hero__breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 14px; line-height: 1.5; font-weight: 400; }
.single-service .service-hero__breadcrumbs a { color: rgb(255 255 255 / 85%) !important; text-decoration: none !important; border: 0 !important; }
.service-hero__breadcrumbs > span[aria-hidden] { opacity: .6; }
.service-hero__body { padding: clamp(48px, 6.6vh, 90px) 0 clamp(56px, 7.5vh, 96px); margin: auto 0; }
.single-service .service-hero h1.service-hero__title { max-width: 880px; margin: 0 0 28px; font-family: var(--hero-font); font-size: clamp(48px, 5vw, 72px); font-weight: 400; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; color: var(--hero-ink); overflow-wrap: normal; word-break: normal; -webkit-hyphens: none; hyphens: none; }
.single-service .service-hero__title-accent { display: block; font-family: inherit; font-size: 1em; font-style: normal; line-height: inherit; font-weight: 400; letter-spacing: inherit; color: inherit; }
.single-service .service-hero__subtitle { max-width: 600px; color: var(--hero-ink); font-family: inherit; font-size: clamp(16px, 1.35vw, 20px); font-weight: 400; line-height: 1.45; }
.single-service .service-hero__subtitle p { margin: 0; color: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; }
.service-hero__actions { display: flex; align-items: center; gap: 36px; margin-top: 36px; }
.single-service .service-hero__cta { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 28px; min-height: 64px; margin: 0; padding: 18px 30px !important; border-radius: 0; background: var(--hero-blue); color: #fff !important; font-size: 16px; font-weight: 400; line-height: 1.4; text-decoration: none; transition: background .2s, transform .2s; }
.single-service .service-hero__cta span { border: 0; padding: 0; }
.single-service .service-hero__cta::after { display: none; }
.single-service .service-hero__cta:hover { background: #032184; transform: translateY(-2px); }
.service-hero__cta svg { flex-shrink: 0; }
.single-service .service-hero__more { display: inline-flex; align-items: center; gap: 24px; min-height: 44px; color: var(--hero-ink) !important; font-size: 15px; font-weight: 400; text-decoration: none !important; border: 0 !important; }
.service-hero__more span:first-child { padding-bottom: 4px; border-bottom: 1px solid rgb(255 255 255 / 60%); }
.service-hero__more span:last-child { font-size: 25px; }
.service-hero__footer { border-top: 1px solid rgb(255 255 255 / 10%); background: rgb(39 31 23 / 12%); }
.service-hero__facts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 30px 0; }
.service-hero__fact { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 0 28px; }
.service-hero__fact:first-child { padding-left: 0; }
.service-hero__fact:last-child { padding-right: 0; }
.service-hero__fact + .service-hero__fact { border-left: 1px solid rgb(255 255 255 / 10%); }
.single-service .service-hero__fact-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: rgb(255 255 255 / 70%); font-size: 13px; font-weight: 400; line-height: 1.4; }
.single-service .service-hero__fact-text,
.single-service .service-hero__rating-value { margin: 0; color: var(--hero-ink); font-size: 23px; font-weight: 400; line-height: 1.35; }
.single-service .service-hero__rating { text-decoration: none; color: #fff; }
.service-hero__rating-value { display: flex; align-items: center; gap: 14px; }
.service-hero__stars { display: flex; gap: 3px; color: var(--hero-nude); }
.service-hero__stars svg { display: block; }
.single-service .service-hero__rating:hover .service-hero__fact-title { color: #fff; }

.single-service #service_content { scroll-margin-top: 28px; }

.single-service .service-hero__short p + p { margin-top: 14px; }
.single-service .service-hero__short strong { color: inherit; }

@media (min-width: 1800px) {
    .service-hero__media img { object-position: center 58%; }
}

@media (max-width: 767px) {
    .single-service .service-hero { min-height: 850px; }
    .service-hero__media { height: 590px; }
    .service-hero__media img { object-position: 66% top; }
    .single-service .service-hero__overlay { background-image: linear-gradient(180deg, rgb(0 0 0 / 42%) 0%, rgb(0 0 0 / 8%) 23%, rgb(23 23 23 / 86%) 49%, #171717 70%); }
    .single-service .service-hero__inner { padding-top: 94px; }
    .service-hero__breadcrumbs { font-size: 14px; gap: 8px; }
    .service-hero__body { padding: 220px 0 32px; margin: 0; }
    .single-service .service-hero h1.service-hero__title { font-size: clamp(26px, 7.4vw, 52px); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 22px; }
    .single-service .service-hero__subtitle { max-width: 360px; font-size: 16px; line-height: 1.5; }
    .service-hero__actions { flex-wrap: wrap; gap: 12px 24px; margin-top: 26px; }
    .single-service .service-hero__cta { width: 100%; min-height: 58px; padding: 16px 20px !important; font-size: 14px; }
    .single-service .service-hero__more { font-size: 13px; }
    .service-hero__facts { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; gap: 0; }
    .service-hero__fact { padding: 22px 0; }
    .service-hero__fact + .service-hero__fact { border-left: 0; }
    .service-hero__fact:nth-child(even) { padding-left: 20px; border-left: 1px solid rgb(255 255 255 / 10%); }
    .service-hero__fact:nth-child(n+3) { border-top: 1px solid rgb(255 255 255 / 10%); }
    .single-service .service-hero__fact-title { font-size: 11px; }
    .single-service .service-hero__fact-text, .single-service .service-hero__rating-value { font-size: 18px; }
    .service-hero__rating-value { gap: 8px; }
    .service-hero__stars { gap: 1px; }
    .service-hero__stars svg { width: 11px; height: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .single-service .service-hero__cta { transition: none; }
}
.single-service .service-hero__short a { color: #fff !important; text-decoration: underline; text-underline-offset: 4px; }

.single-service .service-hero__rating,
.single-service .service-hero__rating-value {
    border-bottom: 0 !important;
    text-decoration: none !important;
    box-shadow: none;
}

@media (min-width: 992px) {
    .single-service .service-hero h1.service-hero__title { font-size: clamp(46px, 4.6vw, 66px); }
}

/* =========================================================================
   Мобильный hero на светлом фоне.
   Фото сверху плавно уходит в песочный #fff5ea, текст — чернильный.
   Тёмная подложка под текстом больше не используется.
   ====================================================================== */
@media (max-width: 767px) {
    .single-service .service-hero {
        background: var(--mikos-sand);
        color: var(--mikos-ink);
    }
    /* Крошки стоят на тёмном верху фото — текущая страница белая,
       а не чернильная, как остальной текст hero */
    .single-service .service-hero__breadcrumbs,
    .single-service .service-hero__breadcrumbs [aria-current="page"] { color: #fff; }
    /* Фото занимает верх экрана и растворяется в песочном фоне
       до того, как начинается текст. */
    .single-service .service-hero { min-height: 800px; }
    .service-hero__media { height: 430px; }
    .service-hero__media img { object-position: 60% top; }
    .single-service .service-hero__overlay {
        background-image: linear-gradient(
            180deg,
            rgb(0 0 0 / 45%) 0%,
            rgb(0 0 0 / 12%) 15%,
            rgb(255 245 234 / 0%) 26%,
            rgb(255 245 234 / 88%) 44%,
            var(--mikos-sand) 53%,
            var(--mikos-sand) 100%
        );
    }
    .service-hero__body { padding: 320px 0 32px; }
    .single-service .service-hero h1.service-hero__title,
    .single-service .service-hero__title-accent,
    .single-service .service-hero__subtitle,
    .single-service .service-hero__short strong {
        color: var(--mikos-ink);
    }
    .single-service .service-hero__short a {
        color: var(--mikos-blue) !important;
    }
    .single-service .service-hero__more {
        color: var(--mikos-ink) !important;
    }
    .service-hero__more span:first-child {
        border-bottom-color: rgb(35 38 73 / 35%);
    }
    .service-hero__footer {
        background: transparent;
        border-top: 1px solid rgb(35 38 73 / 12%);
    }
    .service-hero__fact + .service-hero__fact,
    .service-hero__fact:nth-child(even),
    .service-hero__fact:nth-child(n+3) {
        border-color: rgb(35 38 73 / 12%);
    }
    .single-service .service-hero__fact-title {
        color: var(--mikos-muted);
    }
    .single-service .service-hero__fact-text,
    .single-service .service-hero__rating-value,
    .single-service .service-hero__rating {
        color: var(--mikos-ink);
    }
    .single-service .service-hero__rating:hover .service-hero__fact-title {
        color: var(--mikos-ink);
    }
    .service-hero__stars {
        color: var(--mikos-gold);
    }
}

/* =========================================================================
   Hero: текст + фото (parts/service/hero.php, .service-hero--split).
   Светлый: белый фон, чернильный текст, синяя кнопка; шапка на странице
   услуги обычная светлая (header.php). Фото выводится целиком и без
   градиентов: рамка берёт пропорции самого снимка (у услуг есть и
   вертикальные 2:3, и горизонтальные до 2:1). ПК: слева текст, справа фото.
   Телефон: фото на всю ширину, текст под ним.
   ====================================================================== */
.single-service .service-hero--split {
    min-height: 0;
    background: #fff;
    color: var(--mikos-ink);
}

.single-service .service-hero--split a:focus-visible { outline-color: var(--mikos-blue); }

.single-service .service-hero--split .service-hero__inner { padding: 32px 0 64px; }

.single-service .service-hero--split .service-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(40px, 5vw, 80px);
    margin-top: 32px;
}

.single-service .service-hero--split .service-hero__body { margin: 0; padding: 0; }

/* Текст — чернильный */
.single-service .service-hero--split .service-hero__breadcrumbs,
.single-service .service-hero--split .service-hero__breadcrumbs [aria-current="page"] { color: var(--mikos-ink); }
.single-service .service-hero--split .service-hero__breadcrumbs a { color: var(--mikos-muted) !important; }
.single-service .service-hero--split .service-hero__breadcrumbs a:hover { color: var(--mikos-blue) !important; }

.single-service .service-hero--split h1.service-hero__title,
.single-service .service-hero--split .service-hero__title-accent { color: #222; font-size: clamp(40px, 4vw, 60px); }
.single-service .service-hero--split .service-hero__subtitle,
.single-service .service-hero--split .service-hero__short strong { color: var(--mikos-ink); }
.single-service .service-hero--split .service-hero__short a { color: var(--mikos-blue) !important; }
.single-service .service-hero--split .service-hero__more { color: var(--mikos-ink) !important; }
.single-service .service-hero--split .service-hero__more span:first-child { border-bottom-color: rgb(35 38 73 / 35%); }

/* Фото целиком: не больше 680px по ширине и ~72% высоты экрана */
.single-service .service-hero--split .service-hero__photo {
    margin: 0;
    justify-self: end;
    line-height: 0;
}

.single-service .service-hero--split .service-hero__photo img {
    position: static;
    display: block;
    width: auto;
    height: auto;
    max-width: min(680px, 46vw);
    max-height: min(640px, 72vh);
    object-fit: contain;
}

/* Полоса фактов — светлая, с тонкими линиями */
.single-service .service-hero--split .service-hero__footer { background: var(--mikos-cream); border-top: 1px solid var(--mikos-line); border-bottom: 1px solid var(--mikos-line); }
.single-service .service-hero--split .service-hero__fact + .service-hero__fact { border-color: var(--mikos-line); }
.single-service .service-hero--split .service-hero__fact-title { color: var(--mikos-muted); }
.single-service .service-hero--split .service-hero__fact-text,
.single-service .service-hero--split .service-hero__rating-value,
.single-service .service-hero--split .service-hero__rating { color: var(--mikos-ink); }
.single-service .service-hero--split .service-hero__rating:hover .service-hero__fact-title { color: var(--mikos-blue); }
.single-service .service-hero--split .service-hero__stars { color: var(--mikos-gold); }

@media (max-width: 1199px) {
    .single-service .service-hero--split .service-hero__photo img { max-width: 44vw; }
    /* Подписи кнопок не переносим — при нехватке места кнопки встают друг под друга */
    .single-service .service-hero--split .service-hero__actions { flex-wrap: wrap; gap: 16px 28px; }
    .single-service .service-hero--split .service-hero__cta,
    .single-service .service-hero--split .service-hero__more { white-space: nowrap; }
}

/* Ссылка «‹ Все услуги» — только на телефоне, вместо крошек */
.single-service .service-hero--split .service-hero__back { display: none; }

/* ---------- Телефон: фото на всю ширину, текст под ним ---------- */
@media (max-width: 767px) {
    .single-service .service-hero--split .service-hero__breadcrumbs { display: none; }
    .single-service .service-hero--split .service-hero__back {
        order: 2;
        display: inline-flex;
        align-self: flex-start;
        align-items: center;
        gap: 6px;
        margin-top: 18px;
        padding: 6px 0;
        color: var(--mikos-blue) !important;
        font-size: 15px;
        font-weight: 500;
        text-decoration: none !important;
        border: 0 !important;
    }
    .single-service .service-hero--split .service-hero__back svg { flex-shrink: 0; margin-left: -3px; }

    .single-service .service-hero--split { background: #fff; min-height: 0; }

    .single-service .service-hero--split .service-hero__inner {
        display: flex;
        flex-direction: column;
        padding: 0 0 32px;
    }

    .single-service .service-hero--split .service-hero__grid { display: contents; }

    .single-service .service-hero--split .service-hero__photo {
        order: 1;
        width: calc(100% + var(--mikos-gutter) * 2);
        margin: 0 calc(var(--mikos-gutter) * -1);
        justify-self: auto;
    }

    .single-service .service-hero--split .service-hero__photo img {
        width: 100%;
        max-width: none;
        max-height: none;
    }

    .single-service .service-hero--split .service-hero__breadcrumbs { order: 2; margin-top: 20px; }
    .single-service .service-hero--split .service-hero__body { order: 3; margin-top: 12px; }

    /* Кнопка записи — компактная, не на всю ширину; «О процедуре» рядом с ней */
    .single-service .service-hero--split .service-hero__actions { gap: 14px 22px; margin-top: 22px; }
    .single-service .service-hero--split .service-hero__cta {
        width: auto;
        min-height: 46px;
        gap: 14px;
        padding: 12px 18px !important;
        font-size: 14px;
    }
    .single-service .service-hero--split .service-hero__cta svg { width: 16px; height: 16px; }
    .single-service .service-hero--split .service-hero__more { gap: 12px; min-height: 36px; font-size: 14px; }
    .single-service .service-hero--split .service-hero__more span:last-child { font-size: 20px; }

    .single-service .service-hero--split h1.service-hero__title,
    .single-service .service-hero--split .service-hero__title-accent { font-size: clamp(28px, 7.4vw, 40px); }

    .single-service .service-hero--split .service-hero__fact + .service-hero__fact,
    .single-service .service-hero--split .service-hero__fact:nth-child(even),
    .single-service .service-hero--split .service-hero__fact:nth-child(n+3) { border-color: var(--mikos-line); }
}

/* Шапка на странице услуги закреплена сверху — якоря («О процедуре», содержание)
   останавливаются под ней, а не за ней */
.single-service #service_content,
.single-service [id^="block-"] { scroll-margin-top: 110px; }
