/* Шрифты: Nunito — замена Circe Rounded (если есть лицензия, подключите Circe Rounded через @font-face в wwwroot/fonts) */
:root {
    --font-heading: 'Nunito', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --color-hero-bg: #75b0ff;
    --color-hero-title: #fff;
    --color-hero-subtitle: #5b5b5b;
    --color-nav: #333;
    --color-nav-hover: #0195d3;
}

html {
    scroll-padding-top: 96px;
}

html, body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
}

/* Длинное слово не должно раздвигать колонку сетки и давать горизонтальный скролл */
h1, h2, h3 {
    overflow-wrap: anywhere;
}

/* ---- Шапка (как в Figma: контент не от края, те же отступы 30px) ---- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.main-header__inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75rem 12px 12px 12px;
    gap: 1rem;
}

.main-header__logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Логотип TomaticLogo.png */
.main-header__logo {
    display: block;
    height: 44px;
    width: auto;
    max-height: 44px;
    max-width: 140px;
    object-fit: contain;
    vertical-align: middle;
}

.main-header__nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-header__nav a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-nav);
    text-decoration: none;
}

.main-header__nav a:hover {
    color: var(--color-nav-hover);
}

.main-header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.main-header__burger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-nav);
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.main-header__burger[aria-expanded="true"] .main-header__burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.main-header__burger[aria-expanded="true"] .main-header__burger-line:nth-child(2) {
    opacity: 0;
}

.main-header__burger[aria-expanded="true"] .main-header__burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.main-header__nav-wrap {
    margin-left: auto;
}

.main-header__trailing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.main-header__lang {
    display: inline-flex;
    align-items: center;
}

.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.lang-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.25;
    letter-spacing: normal;
    color: var(--color-nav);
    padding: 0;
    margin: 0;
    user-select: none;
}

.lang-switcher__toggle::-webkit-details-marker {
    display: none;
}

.lang-switcher__toggle::marker {
    content: "";
}

.lang-switcher__toggle-text {
    line-height: 1.25;
}

.lang-switcher__toggle:hover,
.lang-switcher[open] .lang-switcher__toggle {
    color: var(--color-nav-hover);
}

.lang-switcher__chevron {
    display: block;
    width: 0.4rem;
    height: 0.4rem;
    margin-top: -0.1rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.lang-switcher[open] .lang-switcher__chevron {
    margin-top: 0.15rem;
    transform: rotate(225deg);
}

.lang-switcher__menu {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    min-width: 7.5rem;
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 120;
}

.lang-switcher__menu li {
    margin: 0;
}

.lang-switcher__option {
    display: block;
    padding: 0.55rem 0.9rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.25;
    color: var(--color-nav);
    text-decoration: none;
    white-space: nowrap;
}

.lang-switcher__option:hover {
    color: var(--color-nav-hover);
    background: #f5f9ff;
}

/* ---- Hero (контент в контейнере, отступы 30px как в Figma) ---- */
.hero {
    position: relative;
    min-height: 100vh;
    background: var(--color-hero-bg);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: clamp(6rem, 7vw, 7.5rem) 0 3rem;
    box-sizing: border-box;
    isolation: isolate;
}

/* Облако как набор эллипсов, как в Figma */
.hero__clouds {
    position: absolute;
    left: -4%;
    right: -4%;
    bottom: clamp(-24px, -1vw, -8px);
    width: 108%;
    height: clamp(280px, 24vw, 460px);
    pointer-events: none;
    z-index: 12;
    opacity: 1;
}

.hero__cloud-ellipse {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: #fff;
    border: none;
}

.hero__cloud-ellipse--1 {
    left: -2%;
    top: 13.2%;
    width: 33.8%;
    height: 121%;
}

.hero__cloud-ellipse--2 {
    left: 26.3%;
    top: 48.8%;
    width: 21.5%;
    height: 91.8%;
}

.hero__cloud-ellipse--3 {
    left: 45.4%;
    top: 44.9%;
    width: 16.6%;
    height: 62.3%;
}

.hero__cloud-ellipse--4 {
    left: 58.8%;
    top: 53.1%;
    width: 18.3%;
    height: 67.4%;
}

.hero__cloud-ellipse--5 {
    left: 73.9%;
    top: 58.6%;
    width: 11.5%;
    height: 55.3%;
}

.hero__cloud-ellipse--6 {
    left: 82.9%;
    top: 50.7%;
    width: 20.2%;
    height: 77.1%;
}

.hero__title-block,
.hero__subtitle-block,
.hero__cta-block {
    position: relative;
    z-index: 20;
}

.hero__content {
    position: relative;
    z-index: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.92fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
        "hero-title hero-image"
        "hero-subtitle hero-image"
        "hero-cta hero-image";
    gap: 2rem;
    align-items: center;
    width: 100%;
}

.hero__title-block {
    grid-area: hero-title;
    max-width: min(1434px, 100%);
    min-width: 0;
    transform: translateY(clamp(-32px, -2vw, -8px));
}

.hero__subtitle-block {
    grid-area: hero-subtitle;
    max-width: min(1434px, 100%);
    transform: translateY(clamp(-32px, -2vw, -8px));
}

.hero__cta-block {
    grid-area: hero-cta;
    max-width: min(1434px, 100%);
    z-index: 21;
}

.hero__image-wrap {
    grid-area: hero-image;
    align-self: center;
    position: relative;
    z-index: 8;
}

.hero__title-line {
    display: block;
}

.hero__title {
    display: flex;
    flex-direction: column;
    font-family: "Circe Rounded", var(--font-heading), sans-serif;
    font-weight: 400;
    /* ~3.9vw: самая длинная строка («Центр психологического») помещается в левую колонку */
    font-size: clamp(2.5rem, 3.9vw, 6.3125rem);
    font-style: normal;
    line-height: 100%;
    letter-spacing: -3.03px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 1rem;
    max-width: min(1434px, 100%);
    min-width: 0;
}

.hero__subtitle {
    font-size: clamp(1rem, 1.25vw + 0.5rem, 1.5rem);
    color: #fff;
    margin: 0 0 1.5rem;
    line-height: 1.4;
    max-width: 912px;
    /* Читаемость на белых «облаках» внизу hero: ореол в цвет фона + лёгкий контур */
    text-shadow:
        0 0 1px rgba(117, 176, 255, 1),
        0 0 14px rgba(117, 176, 255, 0.95),
        0 0 28px rgba(117, 176, 255, 0.65),
        0 1px 2px rgba(0, 0, 0, 0.22),
        0 2px 8px rgba(0, 0, 0, 0.12);
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    padding: 23px 40px;
    background: rgba(255, 255, 255, 0.92);
    color: #75b0ff;
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.5rem;
    text-decoration: none;
    border-radius: 92px;
    border: 3px solid #75b0ff;
    cursor: pointer;
    line-height: 1.2;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.hero__cta-row {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.hero__cta:hover {
    background: #fff;
    color: #75b0ff;
}

.hero__cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #75b0ff;
    color: #fff;
    text-decoration: none;
    border: 3px solid #75b0ff;
    transition: background-color 0.25s ease, border-color 0.25s ease;
    margin-left: -3px;
}

.hero__cta-arrow:hover {
    background: #5f9ceb;
    color: #fff;
}

.hero__cta-arrow svg {
    width: clamp(1.6rem, 2.5vw, 2.5rem);
    height: clamp(1.6rem, 2.5vw, 2.5rem);
    transform: translateY(-1px) rotate(0deg);
    transition: transform 0.40s ease-in-out;
    transform-origin: center;
    will-change: transform;
}

.hero__cta-note {
    margin: 14px 0 0;
    max-width: 760px;
    font-size: 16px;
    line-height: 1.35;
    color: #5b5b5b;
}

.hero__cta-row:hover .hero__cta {
    background: var(--color-hero-bg);
    color: #fff;
    border-color: var(--color-hero-bg);
}

.hero__cta-row:hover .hero__cta-arrow {
    background: var(--color-hero-bg);
    border-color: var(--color-hero-bg);
}

.hero__cta-row:hover .hero__cta-arrow svg {
    transform: translateY(-1px) rotate(45deg);
}

/* По макету Figma: 931×1017, image -78px -198.158px, size 108.378% 148.802% */
.hero__image-wrap {
    position: relative;
    /* width: auto + stretch учитывает margin-left, иначе блок вылезает за колонку */
    width: auto;
    justify-self: stretch;
    max-width: clamp(420px, 46vw, 931px);
    aspect-ratio: 931 / 1017;
    overflow: hidden;
    margin-left: clamp(0.5rem, 2vw, 2.5rem);
}

/* Позиция как в Figma: -78px -198.158px → в % для масштабирования: -78/931, -198.158/1017 */
.hero__image {
    position: absolute;
    left: -8.378%;
    top: -19.484%;
    width: 108.378%;
    height: 148.802%;
    object-fit: fill;
    object-position: 0 0;
    display: block;
}

/* Декоративные круги — по макету Figma (1:42, 1:43, 1:44) */
.hero__decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    pointer-events: none;
    z-index: 1;
}

/* 1:42 — left 407px, top 805px, 362×362px */
.hero__decoration--1 {
    width: clamp(120px, 14vw, 283px);
    height: clamp(120px, 14vw, 283px);
    left: 26%;
    top: 64%;
}

/* 1:43 — left calc(75%+80px), top -20px, 331×331px */
.hero__decoration--2 {
    width: clamp(48px, 5.2vw, 100px);
    height: clamp(48px, 5.2vw, 100px);
    left: 52%;
    top: 49%;
}

/* 1:43 — left calc(75%+80px), top -20px, 331×331px */
.hero__decoration--3 {
    width: clamp(180px, 17vw, 331px);
    height: clamp(180px, 17vw, 331px);
    right: 7%;
    left: auto;
    top: -3%;
}

/* 1:44 — left calc(50%+125px), top 101px, 255×255px */
.hero__decoration--4 {
    width: clamp(140px, 13vw, 255px);
    height: clamp(140px, 13vw, 255px);
    right: 24%;
    left: auto;
    top: 9%;
}

/* CSS-аналог SVG-кривых (фиксируем относительно hero в процентах) */
.hero__vector--1,
.hero__vector--2,
.hero__vector--3,
.hero__vector--4,
.hero__vector--5 {
    width: 67%;
    height: 46%;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.hero__vector--1::before,
.hero__vector--2::before,
.hero__vector--3::before,
.hero__vector--4::before,
.hero__vector--5::before {
    content: "";
    position: absolute;
    left: -6%;
    top: -44%;
    width: 114%;
    height: 96%;
    border: 4px solid transparent;
    border-bottom-color: #89BCFF;
    border-radius: 50%;
    transform: rotate(11deg);
    transform-origin: center;
    opacity: 1;
}

.hero__vector--1 {
    left: -1%;
    top: 12%;
}

.hero__vector--2 {
    left: 3%;
    top: 16%;
}

.hero__vector--3 {
    left: 8%;
    top: 21%;
}

.hero__vector--4 {
    left: 14%;
    top: 26%;
}

.hero__vector--5 {
    left: 20%;
    top: 31%;
}

/* ---- Hero: отдельная мобильная секция (≤1100px) ---- */
.hero--mobile {
    display: none;
}

.hero--mobile .hero-mobile__clouds {
    position: relative;
    left: -4%;
    right: auto;
    bottom: auto;
    width: 108%;
    height: clamp(120px, 20vw, 170px);
    margin: 12px 0 0;
    flex-shrink: 0;
    pointer-events: none;
    z-index: 1;
}

.hero-mobile__blue {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    padding: clamp(4.5rem, 10vw, 5rem) 0 0;
    background: var(--color-hero-bg);
}

.hero-mobile__head {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.hero-mobile__title {
    font-family: "Circe Rounded", var(--font-heading), sans-serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 5.8vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
}

.hero-mobile__title-line {
    display: block;
}

.hero-mobile__subtitle {
    margin: 0;
    max-width: 34rem;
    font-size: clamp(0.9375rem, 3.6vw, 1.0625rem);
    line-height: 1.5;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.hero-mobile__footer {
    position: relative;
    flex-shrink: 0;
    background: #fff;
    padding: 0 0 clamp(1.5rem, 5vw, 2.25rem);
    margin-top: -1px;
}

.hero-mobile__actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    padding-top: 1.25rem;
}

.hero-mobile__actions .hero__cta-row {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
}

.hero-mobile__actions .hero__cta {
    flex: 1 1 auto;
    justify-content: center;
    padding: 14px 18px;
    font-size: 0.95rem;
    text-align: center;
    min-width: 0;
}

.hero-mobile__actions .hero__cta-arrow {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.hero-mobile__note {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #5b5b5b;
}

/* ---- Общие блоки секций (по макету Figma) ---- */
/* В Figma контент не от края до края: у секций px-[20px]–px-[30px], контент ограничен по ширине */
.container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 30px;
    box-sizing: border-box;
}

.section {
    padding: 80px 0;
}

.section__title[id],
.section[id],
.hero {
    scroll-margin-top: 96px;
}

.section__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 3.875rem);
    line-height: 1.2;
    color: #000;
    margin: 0 0 2rem;
    text-transform: uppercase;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 23px 40px;
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.625rem;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 92px;
    border: 3px solid #75b0ff;
    background: transparent;
    color: rgba(117, 176, 255, 0.9);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn--primary:hover {
    background: rgba(117, 176, 255, 0.15);
}

/* ---- О центре (Figma: Frame 145, двухколоночный блок) ---- */
.section-about {
    background: #fff;
}

.section-about .section__title {
    margin-bottom: 1rem;
}

.about__name {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 3rem);
    font-weight: 300;
    line-height: 1.1;
    color: #000;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
}

.about__tagline {
    font-size: 1.5rem;
    line-height: 1.4;
    color: #000;
    margin: 0 0 1rem;
}

.about__text {
    font-size: 1.5rem;
    line-height: 1.4;
    color: #333;
    max-width: 921px;
    margin: 0 0 1rem;
}

.about__intro {
    font-size: 1.5rem;
    line-height: 1.1;
    color: #fff;
    max-width: 912px;
    margin: 0 0 2rem;
}

.section-about__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 53px);
    align-items: start;
}

.about__left {
    max-width: 921px;
}

.about__right {
    max-width: 920px;
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(260px, 450px) minmax(260px, 450px);
    gap: 20px;
}

.about__stat-card {
    background: #75b0ff;
    color: #fff;
    padding: 2rem;
    border-radius: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 450px;
    height: 100%;
}

.about__stat-card--img {
    padding: 0;
    overflow: hidden;
    min-height: 0;
}

.about__stat-card--wide {
    grid-column: 1 / -1;
    min-height: 0;
    height: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.about__stat-img {
    width: 100%;
    height: 100%;
    border-radius: 50px;
    object-fit: cover;
    display: block;
}

.about__stat-number {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 10vw, 9.375rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.11em;
}

.about__stat-label {
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

.section-about .about__cta-row {
    margin-top: 1rem;
}

/* «Подробнее о Центре»: на белом фоне не использовать белую заливку hero (выглядит как «двойная» обводка);
   стрелка всегда в одной строке с кнопкой */
.section-about .about__cta.hero__cta-row {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    max-width: 100%;
}

.section-about .about__cta .hero__cta {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    color: rgba(117, 176, 255, 0.9);
}

.section-about .about__cta .hero__cta-arrow {
    flex: 0 0 auto;
}

.section-about .about__cta.hero__cta-row:hover .hero__cta {
    background: var(--color-hero-bg);
    color: #fff;
    border-color: var(--color-hero-bg);
}

.section-about .about__cta.hero__cta-row:hover .hero__cta-arrow {
    background: var(--color-hero-bg);
    border-color: var(--color-hero-bg);
}

.section-about .about__cta.hero__cta-row:hover .hero__cta-arrow svg {
    transform: translateY(-1px) rotate(45deg);
}

/* ---- Почему выбирают нас (Figma: карточки 450px, rounded 50px) ---- */
.section-why {
    background: #fff;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 450px));
    gap: 20px;
    justify-content: center;
}

.why-card {
    background: #edf5ff;
    color: #333;
    border-radius: 50px;
    padding: 60px 32px;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    box-sizing: border-box;
}

.why-card--empty {
    background: #fff;
}

.why-card--accent {
    background: #75b0ff;
    color: #fff;
}

.why-card--accent .why-card__title,
.why-card--accent .why-card__text {
    color: #fff;
}

.why-card__title {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1.25rem, 1.55vw, 2rem);
    line-height: 1.1;
    text-transform: uppercase;
    margin: 0;
    hyphens: auto;
}

.why-card__text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.35;
    text-align: left;
    margin: 0;
}

/* ---- Руководитель (Figma: bg #75b0ff, rounded 80px, 2 колонки) ---- */
.section-leader {
    background: #fff;
    padding: 40px 0;
}

.section-leader__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: center;
    max-width: 1864px;
    margin: 0 auto;
    padding: 40px;
    background: #75b0ff;
    border-radius: 80px;
}

.leader__photo {
    width: 100%;
    max-width: 879px;
    height: auto;
    min-height: 740px;
    object-fit: cover;
    border-radius: 59px;
}

.leader__quote {
    font-size: 1.75rem;
    line-height: 1.4;
    color: #fff;
    margin: 0 0 1.5rem;
    font-style: italic;
}

.leader__name {
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.42;
    color: #fff;
    text-align: right;
}

/* ---- Услуги (Figma: карточки 450×450, rounded 50px, gap 20px) ---- */
.section-services {
    background: #fff;
    padding: 152px 30px 150px;
}

.section-services .section__title {
    font-size: clamp(2rem, 4vw, 3.875rem);
    margin-bottom: 80px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    justify-content: center;
}

.service-card {
    background: #75b0ff;
    color: #fff;
    border-radius: 50px;
    min-height: 450px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Пустые слоты по макету Figma (1:72, 1:80) — сохраняем место в сетке */
.service-card--empty {
    background: #fff;
    pointer-events: none;
}

.service-card--with-img .service-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50px;
}

.service-card--with-img .service-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(117, 176, 255, 0.9);
    padding: 1.25rem 1rem;
    border-radius: 0 0 50px 50px;
}

.service-card__content {
    padding: 2rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card__title {
    font-family: var(--font-heading);
    font-size: clamp(1.125rem, 1.45vw, 1.5rem);
    hyphens: auto;
    font-weight: 700;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    text-align: center;
    width: 100%;
}

.service-card__desc {
    font-size: 1.125rem;
    line-height: 1.4;
    margin: 0 0 0.75rem;
    flex: 1;
}

.service-card__price {
    font-size: 1.875rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.04em;
    margin: 0;
}

/* Для карточки "Логопедический массаж":
   по умолчанию показываем только заголовок, детали раскрываем на hover */
.service-card--hover-reveal .service-card__content {
    max-height: 86px;
    overflow: hidden;
    transition: max-height 0.7s cubic-bezier(0.22, 1, 0.36, 1), padding 0.7s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.35s ease;
}

.service-card--hover-reveal .service-card__title {
    margin-bottom: 0;
}

.service-card--hover-reveal .service-card__desc,
.service-card--hover-reveal .service-card__price {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    transform: translateY(12px);
    transition: max-height 0.38s ease, opacity 0.2s ease, transform 0.24s ease, margin 0.22s ease;
}

.service-card--hover-reveal:hover .service-card__content {
    max-height: 320px;
}

.service-card--hover-reveal:hover .service-card__desc,
.service-card--hover-reveal:hover .service-card__price {
    max-height: 180px;
    opacity: 1;
    margin-top: 0.75rem;
    transform: translateY(0);
    transition: max-height 0.95s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.65s ease 0.06s, transform 0.72s cubic-bezier(0.16, 1, 0.3, 1), margin 0.55s ease;
}

.service-card--hover-reveal.service-card--expanded .service-card__content {
    max-height: 320px;
}

.service-card--hover-reveal.service-card--expanded .service-card__desc,
.service-card--hover-reveal.service-card--expanded .service-card__price {
    max-height: 180px;
    opacity: 1;
    margin-top: 0.75rem;
    transform: translateY(0);
}

/* ---- Специалисты (Figma: 450×450, rounded 50px, средняя карточка #edf5ff, border 2px #75b0ff) ---- */
.section-specialists {
    background: #fff;
}

.specialists-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    justify-content: center;
    max-width: 1890px;
    margin: 0 auto;
}

.specialist-card {
    background: transparent;
    border-radius: 50px;
    overflow: visible;
    min-height: 0;
    position: relative;
}

.specialist-card--text {
    background: #edf5ff;
    border: 2px solid #75b0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.specialist-card__photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50px;
    display: block;
}

.specialist-card__name {
    font-family: var(--font-heading);
    font-size: 2.625rem;
    font-weight: 400;
    letter-spacing: -0.06em;
    color: #2d2a2a;
    margin: 0 0 0.25rem;
}

.specialist-card__role {
    font-size: 1.125rem;
    color: #2d2a2a;
    line-height: 1.4;
    margin: 0;
}

.specialist-card__about {
    font-size: 1.125rem;
    line-height: 1.4;
    color: #000;
    text-align: justify;
    margin: 0;
    hyphens: auto;
}

.specialist-card__about p {
    margin: 0 0 1rem;
}

.specialist-card__about p:last-child {
    margin-bottom: 0;
}

/* Карточки со снимком: квадрат 1:1; имя снизу фото; описание по hover / focus-within */
.specialist-card--caption-on-photo {
    align-self: start;
    overflow: hidden;
    border-radius: 50px;
    width: 100%;
    max-width: 100%;
    outline: none;
}

.specialist-card--caption-on-photo:focus-visible {
    box-shadow: 0 0 0 3px rgba(117, 176, 255, 0.85);
}

.specialist-card--caption-on-photo .specialist-card__media {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50px;
    overflow: hidden;
    isolation: isolate;
}

.specialist-card--caption-on-photo .specialist-card__photo {
    grid-row: 1;
    grid-column: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: unset;
    border-radius: 0;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
}

.specialist-card--caption-on-photo .specialist-card__caption {
    --specialist-caption-ease: cubic-bezier(0.33, 1, 0.32, 1);

    grid-row: 1;
    grid-column: 1;
    z-index: 1;
    position: relative;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    box-sizing: border-box;
    padding: 1rem 1.25rem 1.35rem;
    text-align: center;
    /* Центр градиента чуть ниже низа блока + ниже эллипс — светлая зона не уходит высоко на фото */
    background: radial-gradient(
        ellipse 112% 46% at 50% 108%,
        rgba(237, 245, 255, 0.96) 0%,
        rgba(237, 245, 255, 0.4) 36%,
        transparent 62%
    );
}

/* Плавное усиление подложки: opacity интерполируется, в отличие от transition между градиентами */
.specialist-card--caption-on-photo .specialist-card__caption::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        ellipse 116% 52% at 50% 112%,
        rgba(237, 245, 255, 0.98) 0%,
        rgba(237, 245, 255, 0.52) 38%,
        transparent 66%
    );
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.55s var(--specialist-caption-ease);
}

.specialist-card--caption-on-photo:hover .specialist-card__caption::after,
.specialist-card--caption-on-photo:focus-within .specialist-card__caption::after {
    opacity: 1;
}

.specialist-card--caption-on-photo .specialist-card__name,
.specialist-card--caption-on-photo .specialist-card__role {
    position: relative;
    z-index: 1;
    color: #2d2a2a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
    max-width: 100%;
}

.specialist-card--caption-on-photo .specialist-card__name {
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    letter-spacing: -0.04em;
    margin: 0;
}

.specialist-card--caption-on-photo .specialist-card__role {
    font-size: clamp(0.75rem, 1.2vw, 0.95rem);
    line-height: 1.35;
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(0.5rem);
    transition:
        max-height 0.6s var(--specialist-caption-ease),
        opacity 0.5s var(--specialist-caption-ease) 0.04s,
        transform 0.55s var(--specialist-caption-ease),
        margin 0.5s var(--specialist-caption-ease);
}

.specialist-card--caption-on-photo:hover .specialist-card__role,
.specialist-card--caption-on-photo:focus-within .specialist-card__role {
    max-height: 18rem;
    opacity: 1;
    transform: translateY(0);
    margin-top: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
    .specialist-card--caption-on-photo .specialist-card__caption::after {
        transition: none;
    }

    .specialist-card--caption-on-photo .specialist-card__role {
        transition: none;
        transform: none;
    }

    .specialist-card--caption-on-photo:hover .specialist-card__role,
    .specialist-card--caption-on-photo:focus-within .specialist-card__role {
        max-height: none;
    }
}

/* ---- FAQ (Figma: border #0195d3, вопрос 24px) ---- */
.section-faq {
    background: #fff;
}

.section-faq__grid {
    display: grid;
    grid-template-columns: minmax(0, 910px) minmax(0, 920px);
    gap: 20px;
    align-items: start;
}

.faq__list {
    width: 100%;
}

.faq__intro {
    font-size: 1.5rem;
    line-height: 1.1;
    color: #000;
    margin: 0 0 2rem;
    max-width: 100%;
}

.faq-item {
    border: none;
    border-top: 1px solid #0195d3;
    margin: 0;
    overflow: hidden;
    background: #fff;
}

.faq-item:last-child {
    border-bottom: 1px solid #0195d3;
}

.faq-item__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1.15rem 1.25rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    color: #000;
    text-align: left;
    background: #fff;
    border: none;
    cursor: pointer;
    list-style: none;
}

.faq-item__question::-webkit-details-marker {
    display: none;
}

.faq-item__question::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid #0195d3;
    color: #0195d3;
    font-size: 20px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-item__question::after {
    content: "−";
    transform: rotate(180deg);
}

.faq-item__question::before {
    content: none;
}

.faq__visual {
    border-radius: 50px;
    overflow: hidden;
    align-self: start;
}

.faq__image {
    width: 100%;
    height: 626px;
    object-fit: cover;
    display: block;
    border-radius: 50px;
}

.faq-item__answer {
    padding: 0 1.25rem 1.25rem;
}

.faq-item__answer p {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.35;
    color: #000;
}

/* ---- Контакты: компактная карточка (вариант B) ---- */
.section-contacts {
    background: #fff;
}

.section-contacts .section__title {
    margin: 0 0 2rem;
}

.contacts-card {
    background: #edf5ff;
    border: 2px solid #75b0ff;
    border-radius: 40px;
    overflow: hidden;
}

.contacts-card__map {
    width: 100%;
    height: clamp(400px, 42vw, 520px);
    border-bottom: 2px solid #75b0ff;
    background: #dbeafe;
    overflow: hidden;
}

.contacts-card__map-frame {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

.contacts-card__map-fallback {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
}

.contacts-card__map-fallback img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contacts-card__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 2px solid #75b0ff;
}

.contacts-card__cell {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    min-height: 100%;
}

.contacts-card__cell:not(:last-child) {
    border-right: 2px solid #75b0ff;
}

.contacts-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #75b0ff;
    color: #fff;
}

.contacts-card__icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.contacts-card__cell-body {
    min-width: 0;
}

.contacts-card__label {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0195d3;
    margin: 0 0 0.35rem;
}

.contacts-card__text {
    font-size: 1.0625rem;
    line-height: 1.45;
    color: #2d2a2a;
    margin: 0;
}

.contacts-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.125rem 1.5rem;
    background: linear-gradient(135deg, #75b0ff 0%, #0195d3 100%);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.contacts-card__cta:hover {
    filter: brightness(1.05);
    color: #fff;
}

.contacts-card__cta:active {
    transform: scale(0.995);
}

.contacts__phone a,
.contacts__email a {
    font-size: 1.5rem;
    color: #000;
    text-decoration: none;
}

.contacts__bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    max-width: 780px;
}

.contacts__channels,
.contacts__social {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contacts__phone,
.contacts__email {
    margin: 0;
}

.contacts__social span {
    font-size: 1.5rem;
    color: #000;
}

/* ---- Виджет «Мы на связи» ---- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.contact-widget__backdrop {
    position: fixed;
    inset: 0;
    z-index: 899;
    background: transparent;
}

.contact-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.contact-widget--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.contact-widget__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

.contact-widget--open .contact-widget__actions {
    max-height: 280px;
    opacity: 1;
    pointer-events: auto;
}

.contact-widget__action {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(1, 149, 211, 0.35);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-widget__action svg {
    width: 26px;
    height: 26px;
}

.contact-widget__action--phone {
    background: #0195d3;
    color: #fff;
}

.contact-widget__action--brand {
    background: transparent;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.contact-widget__action--brand img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

.contact-widget__action:active {
    transform: scale(0.95);
}

.contact-widget__main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #75b0ff 0%, #0195d3 100%);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(1, 149, 211, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-widget__main:active {
    transform: scale(0.98);
}

.contact-widget--open .contact-widget__main {
    box-shadow: 0 4px 16px rgba(1, 149, 211, 0.3);
}

.contact-widget__main-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.contact-widget__main-icon svg {
    width: 22px;
    height: 22px;
}

/* ---- Футер (Figma: текст #eef2f5 на синем фоне) ---- */
.footer {
    background: #75b0ff;
    padding: 1.5rem 0;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer__copy {
    font-size: 1.3125rem;
    color: #eef2f5;
}

.footer__link {
    font-size: 1.125rem;
    color: #eef2f5;
    text-decoration: none;
}

.footer__link:hover {
    text-decoration: underline;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.localization-smoke {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 0.45rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
    color: var(--color-nav);
    background: #d6e9ff;
    border-bottom: 1px solid rgba(117, 176, 255, 0.55);
}

body:has(.localization-smoke) .main-header {
    top: 2.15rem;
}

.admin-page h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin: 0 0 1rem;
}

.admin-page p {
    margin: 0 0 0.75rem;
    line-height: 1.5;
    color: var(--color-hero-subtitle);
}

.admin-page code {
    font-size: 0.9em;
    color: var(--color-nav);
    background: rgba(117, 176, 255, 0.16);
    padding: 0.1rem 0.35rem;
    border-radius: 0.3rem;
}

.admin-page__toast-demo {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(117, 176, 255, 0.35);
}

.admin-page__toast-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.admin-page__toast-actions .btn {
    font-size: 1rem;
    padding: 0.65rem 1.25rem;
}

/* ---- Toast notifications (app-toast: avoid Bootstrap .toast { display:none }) ---- */
.toast-host {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(22rem, calc(100vw - 2.5rem));
    pointer-events: none;
}

.app-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 2px solid var(--color-hero-bg);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(51, 51, 51, 0.12);
    animation: app-toast-in 0.22s ease-out;
}

.app-toast--info {
    border-color: var(--color-hero-bg);
}

.app-toast--success {
    border-color: #3aa76d;
}

.app-toast--warning {
    border-color: #e0a800;
}

.app-toast--error {
    border-color: #d64545;
}

.app-toast__message {
    margin: 0;
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--color-nav);
}

.app-toast__close {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--color-hero-subtitle);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.app-toast__close:hover {
    color: var(--color-nav);
    background: rgba(117, 176, 255, 0.16);
}

@keyframes app-toast-in {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .toast-host {
        top: auto;
        bottom: 5.5rem;
        right: 1rem;
        left: 1rem;
        width: auto;
    }
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Произошла ошибка."
    }

/* ---- Статусные страницы (ошибка / 404) ---- */
.status-page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background:
        linear-gradient(165deg, #dcecff 0%, #f5f9ff 42%, #ffffff 100%);
    color: var(--color-nav);
}

.status-page__atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.status-page__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
}

.status-page__glow--1 {
    width: min(52vw, 420px);
    height: min(52vw, 420px);
    top: -12%;
    right: -8%;
    background: rgba(117, 176, 255, 0.45);
}

.status-page__glow--2 {
    width: min(40vw, 320px);
    height: min(40vw, 320px);
    bottom: 8%;
    left: -10%;
    background: rgba(1, 149, 211, 0.18);
}

.status-page__glow--3 {
    width: min(28vw, 220px);
    height: min(28vw, 220px);
    top: 42%;
    right: 18%;
    background: rgba(117, 176, 255, 0.22);
}

.status-page__header {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    padding: 1.25rem 0 0;
}

.status-page__header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-page__content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 34rem;
    margin: 0 auto;
    padding-top: 1.5rem;
    padding-bottom: 5.5rem;
    box-sizing: border-box;
}

.status-page__eyebrow {
    margin: 0 0 0.65rem;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-nav-hover);
}

.status-page__title {
    margin: 0 0 0.85rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.35rem, 3.2vw, 1.85rem);
    line-height: 1.25;
    color: #1a1a1a;
    text-transform: uppercase;
}

.status-page__text {
    margin: 0 0 1.5rem;
    max-width: 26rem;
}

.status-page__text p {
    margin: 0;
    font-size: clamp(0.95rem, 1.6vw, 1.0625rem);
    line-height: 1.55;
    color: var(--color-hero-subtitle);
}

.status-page__meta {
    margin: 0 0 1.5rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #6b7280;
}

.status-page__meta code {
    font-size: 0.9em;
    color: var(--color-nav);
    background: rgba(117, 176, 255, 0.16);
    padding: 0.15rem 0.45rem;
    border-radius: 0.35rem;
}

.status-page__cta {
    margin-top: 0.25rem;
    justify-content: center;
}

.status-page__cta .hero__cta {
    font-size: 1rem;
    padding: 0.85rem 1.5rem;
}

.status-page__cta .hero__cta-arrow {
    width: 52px;
    height: 52px;
}

.status-page__cta .hero__cta-arrow svg {
    width: 1.25rem;
    height: 1.25rem;
}

.status-page__hint {
    margin: 1.15rem 0 0;
    font-size: 0.9375rem;
    color: var(--color-hero-subtitle);
}

.status-page__hint a {
    color: var(--color-nav-hover);
    font-weight: 600;
    text-decoration: none;
}

.status-page__hint a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .status-page__header {
        padding-top: 1rem;
    }

    .status-page__content {
        max-width: 22rem;
        padding-inline: 1.25rem;
        padding-bottom: 6.5rem;
    }

    .status-page__title {
        font-size: 1.25rem;
    }

    .status-page__text p {
        font-size: 0.9375rem;
    }

    .status-page__cta {
        flex-wrap: nowrap;
        transform: scale(0.92);
        transform-origin: center;
    }

    .status-page__cta .hero__cta {
        font-size: 0.9375rem;
        padding: 0.75rem 1.25rem;
    }

    .status-page__cta .hero__cta-arrow {
        width: 46px;
        height: 46px;
    }

    .status-page__hint {
        font-size: 0.875rem;
    }
}

/* ---- Политика конфиденциальности ---- */
.privacy-page {
    padding-top: 6rem;
}

.privacy-page__content {
    max-width: 820px;
}

.privacy-page__content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 2rem 0 0.75rem;
}

.privacy-page__content p,
.privacy-page__content li {
    font-size: 1.125rem;
    line-height: 1.5;
    color: #333;
}

.privacy-page__content ul {
    padding-left: 1.25rem;
    margin: 0 0 1rem;
}

.privacy-page__updated {
    color: #666;
    font-size: 1rem;
}

.privacy-page__back {
    margin-top: 2.5rem;
}

.privacy-page__back a {
    color: #0071c1;
}

/* ---- Адаптив: планшет и мобильный ---- */
/* Узкий десктоп: 4 колонки карточек уже не помещают заголовки */
@media (max-width: 1280px) {
    .why-grid,
    .services-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .why-card--empty,
    .service-card--empty {
        display: none;
    }
}

@media (max-width: 1200px) {
    .section-about__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .about__left,
    .about__right {
        max-width: none;
    }
}

@media (max-width: 1100px) {
    .container {
        padding-inline: 20px;
    }

    .main-header .container,
    .main-header__inner {
        padding-top: 0.75rem;
        padding-bottom: 12px;
        padding-inline: 20px;
    }

    .hero--desktop {
        display: none !important;
    }

    .hero--mobile {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        min-height: auto;
        padding: env(safe-area-inset-top, 0px) 0 0;
        overflow: hidden;
        isolation: isolate;
        background: var(--color-hero-bg);
    }

    .hero-mobile__blue {
        padding-top: calc(clamp(4.5rem, 10vw, 5rem) + env(safe-area-inset-top, 0px));
    }
}

@media (max-width: 1024px) {
    .section-leader__grid,
    .section-faq__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .section-leader__grid {
        padding: 24px;
        border-radius: 40px;
    }

    .leader__photo {
        min-height: auto;
    }

    .why-grid,
    .services-grid,
    .specialists-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .faq__image {
        height: auto;
        max-height: 480px;
    }
}

@media (max-width: 768px) {
    .container {
        padding-inline: 24px;
    }

    .main-header .container,
    .main-header__inner {
        padding-inline: 24px;
    }

    .main-header {
        position: fixed;
    }

    .main-header__inner {
        position: relative;
    }

    .main-header__burger {
        display: flex;
    }

    .main-header__nav-wrap {
        margin-left: 0;
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.25s ease, opacity 0.2s ease;
    }

    .main-header__trailing {
        margin-left: auto;
    }

    .main-header__nav-wrap.is-open {
        max-height: min(80vh, 560px);
        overflow-x: hidden;
        overflow-y: auto;
        opacity: 1;
        pointer-events: auto;
    }

    .main-header__nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0 1rem;
    }

    .main-header__nav a {
        display: block;
        padding: 0.75rem 24px;
    }

    .main-header__lang {
        padding: 0.5rem 24px 0.75rem;
    }

    .main-header__lang .lang-switcher {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .main-header__lang .lang-switcher__menu {
        position: static;
        top: auto;
        right: auto;
        min-width: 0;
        width: 100%;
        margin: 0.35rem 0 0;
        padding: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .main-header__lang .lang-switcher__option {
        padding: 0.65rem 0;
    }

    .hero-mobile__blue {
        padding-top: calc(4.5rem + env(safe-area-inset-top, 0px));
    }

    .section__title {
        font-size: clamp(1.5rem, 5.5vw, 2rem);
        margin-bottom: 1.25rem;
    }

    .about__name {
        font-size: clamp(1.15rem, 4.5vw, 1.5rem);
        line-height: 1.25;
    }

    .about__tagline,
    .about__text {
        font-size: 1rem;
        line-height: 1.5;
    }

    .why-grid,
    .services-grid,
    .specialists-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .why-card {
        min-height: auto;
        padding: 32px 24px;
        border-radius: 32px;
    }

    /* На 320px «ДОБРОЖЕЛАТЕЛЬНАЯ» / «МИОФУНКЦИОНАЛЬНЫЙ» должны влезать целиком */
    .why-card__title {
        font-size: clamp(1.125rem, 5.5vw, 1.375rem);
    }

    .service-card__title {
        font-size: clamp(1rem, 5vw, 1.25rem);
    }

    .service-card {
        min-height: auto;
        border-radius: 32px;
        cursor: pointer;
    }

    /* У карточек с фото всё содержимое absolute — без явной высоты они схлопываются в 0 */
    /* ≈ квадрат, но не ниже 340px: раскрытая подпись — до 320px (max-height у __content).
       aspect-ratio здесь не подходит — вместе с min-height он растягивает карточку в ширину */
    .service-card--with-img {
        min-height: clamp(340px, 90vw, 480px);
    }

    .service-card--with-img .service-card__img {
        border-radius: inherit;
    }

    .service-card--with-img .service-card__content {
        border-radius: 0 0 32px 32px;
    }

    .service-card--hover-reveal {
        -webkit-tap-highlight-color: transparent;
    }

    .specialist-card--caption-on-photo {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .specialist-card--caption-on-photo:hover .specialist-card__caption::after,
    .specialist-card--caption-on-photo:focus-within .specialist-card__caption::after {
        opacity: 0;
    }

    .specialist-card--caption-on-photo:hover .specialist-card__role,
    .specialist-card--caption-on-photo:focus-within .specialist-card__role {
        max-height: 0;
        opacity: 0;
        transform: translateY(0.5rem);
        margin-top: 0;
    }

    .specialist-card--caption-on-photo.specialist-card--expanded .specialist-card__caption::after {
        opacity: 1;
    }

    .specialist-card--caption-on-photo.specialist-card--expanded .specialist-card__role {
        max-height: 18rem;
        opacity: 1;
        transform: translateY(0);
        margin-top: 0.5rem;
    }

    .about__stats {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .about__stat-card {
        min-height: 200px;
    }

    .about__stat-card--wide {
        flex-direction: column;
    }

    .section {
        padding: 48px 0;
    }

    .section-services {
        padding: 64px 0;
    }

    .contacts-card {
        border-radius: 28px;
    }

    .contacts-card__map {
        height: clamp(340px, 70vw, 440px);
    }

    .contacts-card__details {
        grid-template-columns: 1fr;
    }

    .contacts-card__cell:not(:last-child) {
        border-right: none;
        border-bottom: 2px solid #75b0ff;
    }

    .contacts-card__cell {
        padding: 1rem 1.25rem;
    }

    .contacts-card__cta {
        font-size: 1.0625rem;
        padding: 1rem 1.25rem;
    }

    .contact-widget {
        right: 24px;
        bottom: 16px;
    }

    .contact-widget__main-label {
        display: none;
    }

    .contact-widget__main {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
