/* ============================================
   BASE STYLES & CSS VARIABLES
   ============================================ */

/* Global Elements */

h2 {
    margin-bottom: 100px;
}

/* Container */
section,
header {
    min-width: 0;
}

/* ============================================
   HEADER
   ============================================ */

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* ============================================
   MODAL
   ============================================ */

/* Main */
.main {
    min-height: calc(100vh - 140px);
    margin-top: 8px; /* Отступ для фиксированного header */
}

/* Hero */
.hero {
    background: #fff;
    color: #2c3e50;
    padding: 10px 0;
}

.hero-grid {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.hero-left {
    flex: 1 1 520px;
    min-width: 280px;
    max-width: 720px;

}

.eyebrow {
    color: #7b8694;
    font-weight: 400;
    font-style: normal;
    font-size: clamp(16px, 2.2vw, 26px);
    line-height: 100%;
    letter-spacing: 0;
    margin-bottom: -5px;
    padding-bottom: 10px;
}

.hero-title {
    font-weight: 500;
    font-size: clamp(28px, 4.6vw, 50px);
    letter-spacing: 0;
    line-height: 1.15;
    margin-bottom: 2.25rem;
    width: auto;
    max-width: 100%;
}

.hero-title-secondary {
    color: #9AC355;
    font-weight: 600;
    font-style: normal;
    font-size: clamp(26px, 4.2vw, 50px);
    line-height: 100%;
    letter-spacing: 0;
    margin-top: .75rem;
    padding-top: 10px;
}

.animated-text {
    opacity: 1; /* Исходное состояние: видимый */
    transition: opacity 0.5s ease-in-out; /* Плавный fade: 0.5s, ease-in-out для естественности */
    display: inline-block; /* Чтобы не ломал layout */
}

/* Состояние "затухания" перед сменой */
.animated-text.fade-out {
    opacity: 0; /* Исчезает плавно */
}

/* Опционально: лёгкое масштабирование для "волны" (scale 0.95 при fade out) */
.animated-text.fade-out {
    transform: scale(0.95); /* "Сжатие" для динамики */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.animated-text {
    transform: scale(1); /* Возврат к нормальному */
}

/* Hero tabs */
.hero-tabs {
    display: flex;
    flex-direction: row;
    background: var(--color-primary);
    border-radius: 0 10px 20px 20px;
    padding: 0.5rem 0.5rem 0.75rem;
    max-width: 480px;
    width: min(480px, 95%);
    position: relative;
    z-index: 3;
    box-sizing: border-box;
}

.tabs-header {
    display: flex;
    gap: 15px;
    padding: 20px 0 0;
    justify-content: flex-start; /* Изменено: теперь flex-start для равномерного заполнения */
    max-width: 480px;
    width: min(480px, 95%);
    position: relative;
    top: 10px;
    will-change: contents;
}

.tab-btn {
    font-weight: 300;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: 0;
    padding: 1rem 1.25rem;
    border: 0;
    border-radius: 15px 15px 0 0px; /* применено как в prof.css */
    background: #f1f2f5;
    color: black;
    cursor: pointer;
    position: relative;
    z-index: 0; /* Кнопка на самом низком слое */
    transition: none;
    flex: 1;
    height: 60px;
    box-sizing: border-box;
    will-change: transform;
}

.tab-btn.active {
    background: #9ac355;
    color: #ffffff;
    position: relative;
}

.client.active::after {
    content: "";
    position: absolute;
    top: 0;
    right: -49px;
    height: 50px;
    width: 50px;
    border-bottom-left-radius: 15px;
    box-shadow: 0 20px 0 0 #9ac355;
}

.psychologist.active::after {
    content: "";
    position: absolute;
    top: 0;
    left: -49px;
    height: 50px;
    width: 50px;
    border-bottom-right-radius: 15px;
    box-shadow: 0 30px 0 0 #9ac355;
}

.client.active::after,
.psychologist.active::after {
    z-index: -1;
    pointer-events: none;
}

/* Адаптация для планшетов (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1280px) {
    .tabs-header {
        width: 95%;
    }

    .tabs-panel.active {
        display: flex;
        width: 100%;
    }
}

.tabs-panel {
    background: #9AC355;
    border-radius: 16px;
    padding: 1.25rem 1rem 1.25rem;
    margin-top: 0;
    text-align: start;
}

.tabs-panel.active {
    display: block;
}

.tabs-panel[hidden] {
    display: none;
}

.tabs-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.tabs-sub {
    color: #000000;
    margin-bottom: 0.9rem;
}

.hero-tabs .tabs-cta.btn {
    background: #ffffff;
    color: #1f1f1f;
    border-radius: 12px;
    font-size: 20px;
    padding: 0.95rem 14px;
    width: 280px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 80px 0;
    border: none;
    line-height: 1;
}
.hero-tabs .tabs-cta.btn-create {
    width: auto;
    margin: .5rem 50px 0;
}
.hero-tabs .tabs-cta.btn:hover {
    background: #BEF574;
    color: white;
    transform: none;
}

.hero-tabs .tabs-cta.btn:focus-visible {
    outline: 3px solid rgba(0, 0, 0, 0.25);
}

.hero-img-frame {
    flex: 0 1 590px;
    min-width: 240px;
    max-width: 590px;
    align-self: center;
}

.hero-img-placeholder {
    width: 100%;
    height: auto;
    display: block;
}

/* Ensure hero image is fluid */
.hero-img-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-title--tablet {
    display: none;
}

/* ===================== */
/* БАЗА offcanvas меню   */
/* ===================== */
.mobile-nav {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2000;
}

.logo-desktop {
    display: block;
}

/* === Tablet-only patch: 768px — 1024px === */
@media (max-width: 1280px) {

    .logo-desktop {
        display: none;
    }

    .hero-title--desktop {
        display: none;
    }

    .hero-title--tablet {
        display: inline-block; /* или block — в зависимости от места */
    }

    /* при необходимости подправь отступы/выравнивание */
    .hero-title-placeholder {
        text-align: center;
        margin-top: 0px;
        font-weight: 600;
        font-style: SemiBold;
        font-size: 40px;
        line-height: 100%;
        letter-spacing: 0%;
        text-align: center;
    }

    .hero-grid {
        justify-content: center;
    }

    .hero-left {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        flex: 1 1 520px;
        min-width: 280px;
        max-width: 720px;
        gap: 100px;
    }

    .hero-left-text {
        display: flex;
        flex-direction: column;
    }

    /* Скрываем картинку на планшетах (по id и по обёртке) */
    #heroImage,
    .hero-img-frame {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .main-tabs {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 450px;
    }

    /* Центрируем табы по центру экрана */
    .hero-tabs {
        display: flex;
        flex-direction: row;
        background: #9AC355;
        border-radius: 0 10px 10px 10px;
        padding: 0.5rem 0.5rem 0.75rem;
        max-width: 480px;
        width: min(480px, 95%);
    }

    .hero-title {
        font-weight: 600;
        font-style: SemiBold;
        font-size: 40px;
        line-height: 100%;
        letter-spacing: 0%;
        text-align: center;
    }

    .eyebrow {
        font-weight: 400;
        font-style: Regular;
        font-size: 20px;
        line-height: 100%;
        letter-spacing: 0%;
        text-align: center;
    }

    /* Заголовок табов/строка кнопок — центрируем их содержимое */
    .tabs-header {
        display: flex;
        gap: 12px;
        padding: 20px 0 0;
    }

    .tabs-panel {
        width: 100%;
    }

    .tabs-btn-block {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero-tabs .tabs-cta.btn {
        min-width: 280px;
        max-width: 280px;
        white-space: nowrap;
        box-sizing: border-box;
    }
    .hero-tabs .tabs-cta.btn-create {
        min-width: auto;
        max-width: none;
    }

    /* Убедимся, что заголовок геро и eyebrow выровнены по центру */
    .hero-left,
    .hero-title,
    .eyebrow,
    .hero-title-secondary {
        text-align: center;
    }
}

.why-choose-us {
    padding: 50px 100px;
}

.why-choose-us-title {
    font-weight: 500;
    font-size: 42px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: start;
}

.why-choose-us-text {
    font-weight: 400;
    font-size: 28px;
    line-height: 150%; /* или 1 */
    letter-spacing: 0%;
    text-align: center;
}

.why-choose-us-text-strong {
    font-weight: 600;
    font-size: 28px;
    line-height: 100%; /* или 1 */
    letter-spacing: 0;
    text-align: center;
}

/* Why-choose-us layout: 1; then 2 shifted right on next row; then 3 left */
.why-choose-us-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: 5px 150px;
    align-items: center;
    justify-items: center;
    padding-bottom: 60px;
}

.container.why-choose-us-container {
    background-image: url('../images/chooseBackground.svg');
    background-size: cover; /* Опционально: масштабирует изображение, чтобы покрыть весь блок */
    background-position: center; /* Опционально: центрирует изображение */
    background-repeat: no-repeat; /* Опционально: предотвращает повторение изображения */
    padding: 40px;
    border-radius: 20px;
}

.why-choose-us-feature:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.why-choose-us-feature:nth-child(2) {
    grid-column: 2;
    grid-row: 2;
}

.why-choose-us-feature:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
}
.why-choose-us-feature:nth-child(4) {
    grid-column: 2;
    grid-row: 4;
}
@media (min-width: 650px) and (max-width: 1024px) {
    .why-choose-us {
        margin-top: 40px;
        padding: 40px 20px;
    }

    .container.why-choose-us-container {
        border-radius: 25px;
        overflow: hidden;
        background-position: center center;
        background-size: cover;
        padding: 40px 30px;
        margin: 0;
    }

    .why-choose-us-title {
        font-weight: 600;
        font-style: SemiBold;
        font-size: 22px;
        line-height: 100%;
        letter-spacing: 0;
        margin: 0;
        margin-bottom: 40px;
        text-align: start;
    }

    .why-choose-us-features {
        gap: 20px;
    }

    .why-choose-us-feature {
        max-width: 100%;
        text-align: center;
    }

    .why-choose-us-text {
        font-size: 18px;
        line-height: 140%;
        text-align: center;
    }

    .why-choose-us-text-strong {
        font-size: 18px;
        line-height: 120%;
        text-align: center;
    }

    /* сбрасываем индивидуальные nth-child, чтобы все шли подряд */
    .why-choose-us-feature:nth-child(1),
    .why-choose-us-feature:nth-child(2),
    .why-choose-us-feature:nth-child(3) {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Большие планшеты и маленькие десктопы (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    .why-choose-us {
        margin-top: 40px;
        padding: 50px 40px;
    }

    .container.why-choose-us-container {
        border-radius: 30px;
        overflow: hidden;
        background-position: center center;
        background-size: cover;
        padding: 50px 40px;
        margin: 0;
    }

    .why-choose-us-title {
        font-weight: 600;
        font-style: SemiBold;
        font-size: 28px;
        line-height: 100%;
        letter-spacing: 0;
        margin: 0;
        margin-bottom: 50px;
        text-align: start;
    }
    .why-choose-us-title h2 {
        margin-top: 75px;
    }

    .why-choose-us-features {
        /*display: grid;
        grid-template-columns: 1fr;*/
        gap: 20px 60px;
        /*justify-items: center;*/
    }

    .why-choose-us-feature {
        max-width: 100%;
        text-align: center;
    }

    .why-choose-us-text {
        font-size: 20px;
        line-height: 140%;
        text-align: center;
    }

    .why-choose-us-text-strong {
        font-size: 20px;
        line-height: 120%;
        text-align: center;
    }

    /* сбрасываем индивидуальные nth-child, чтобы все шли подряд */
    .why-choose-us-feature:nth-child(1),
    .why-choose-us-feature:nth-child(2),
    .why-choose-us-feature:nth-child(3) {
        grid-column: auto;
        grid-row: auto;
    }
}

.promo {
    background-color: #fff;
    display: flex;
    justify-content: center;
}

.container.promo-container {
    background-image: url('/images/discount-first-consult.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    margin: 50px 120px;
    padding: 50px 40px;
    gap: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    width: 100%;
    position: relative;
}

.promo-title {
    font-style: normal;
    font-size: 48px;
    text-align: center;
    font-family: Montserrat;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
}

.promo-title.discount {
    font-weight: 600;
    /* font-style: Semi Bold;  Semi Bold is not a valid value, so omit or use normal */
    font-size: 48px;
    /* leading-trim: NONE;  Not a standard CSS property, so omit */
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;
    color: #9AC355;
}

.promo-desc {
    font-family: Montserrat;
    font-weight: 400;
    font-style: Regular;
    font-size: 32px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    margin-bottom: 130px;
}

.promo-deadline-text {
    font-weight: 400;
    font-size: 20px;
    line-height: 100%;
    text-align: center;
    position: absolute;
    right: 50px;
    bottom: 50px;
    transform: rotate(15deg);
}

.promo-select-btn {
    width: 340px;
    height: 64px;
    max-width: 340px;
    max-height: 64px;
    border-radius: 10px;
    border: none;
    background-color: #9AC355;
    color: white;
    font-size: 24px;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;
    font-weight: 100;
    margin-top: 100px;
}

.promo-select-btn:hover {
    background-color: #BEF574;
}

@media (min-width: 768px) and (max-width: 1280px) {
    .container.promo-container {
        margin: 40px 30px;
        padding: 50px 130px;
        background-position: center center;
    }

    .promo-title {
        font-size: 34px;
    }

    .promo-desc {
        font-size: 24px;
    }

    .promo-select-btn {
        margin-top: 200px;
    }

    .promo-deadline-text {
        font-size: 16px;
        right: 20px;
        bottom: 100px;
    }
}

.benefits-section {
    background-color: #F1F2F5;
    padding: 120px 120px;
}

.container.benefits-container {
    position: relative;
}

.benefits-title {
    font-family: Montserrat;
    font-weight: 600;
    font-style: SemiBold;
    font-size: 48px;
    line-height: 100%;
    letter-spacing: 0%;

    margin-bottom: 100px;
}

.benefits-hints-image1 {
    position: absolute;
    right: 170px;
}

.benefits-hints-image2 {
    position: absolute;
    bottom: 300px;
    left: 70px;
}

.benefits-hints-image3 {
    position: absolute;
    bottom: 50px;
    right: 100px;
}

.benefit-item {
    display: flex;
    background-color: white;
    align-items: center;
    width: 391px;
    height: auto;
    border-radius: 20px;
    padding: 32px;
    gap: 28px;
}

.benefit-img {
    width: 60px;
    height: 60px;
}

.benefit-text {
    font-family: Montserrat;
    font-weight: 400;
    font-style: Regular;
    font-size: 22px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    vertical-align: middle;

}

/* Benefits staggered layout */
/*
  .benefits-list — это контейнер для карточек преимуществ (benefit-item).
  Здесь используется CSS Grid для размещения карточек в 3 колонки с отступами между ними.
  align-items: start — выравнивает карточки по верхнему краю.
*/
.benefits-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 0px;
    align-items: start;
}

/* 
    Схема ступеньки:
    1 (col 1, row 1)
        2 (col 2, row 2)
            3 (col 3, row 3)
        4 (col 2, row 4)
    5 (col 1, row 5)
        6 (col 2, row 6)
*/

.benefits-list .benefit-item {
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    grid-column: auto;
    grid-row: auto;
}

/* 1 */
.benefits-list .benefit-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

/* 2 */
.benefits-list .benefit-item:nth-child(2) {
    grid-column: 2;
    grid-row: 2;
}

/* 3 */
.benefits-list .benefit-item:nth-child(3) {
    grid-column: 3;
    grid-row: 3;
}

/* 4 */
.benefits-list .benefit-item:nth-child(4) {
    grid-column: 2;
    grid-row: 4;
}

/* 5 */
.benefits-list .benefit-item:nth-child(5) {
    grid-column: 1;
    grid-row: 5;
}

/* 6 */
.benefits-list .benefit-item:nth-child(6) {
    grid-column: 2;
    grid-row: 6;
}

@media (min-width: 768px) and (max-width: 1280px) {

    .benefits-section {
        margin: 0;
        padding: 30px 0;
    }

    .benefits-title {
        font-size: 34px;
        margin-bottom: 50px;
    }


    .benefits-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 3 колонки равной ширины */
        grid-template-rows: repeat(3, auto); /* 3 строки с автоматической высотой */
        gap: 20px; /* Отступ между элементами, настройте по необходимости */
        align-items: center;
        justify-items: center;
    }

    /* Элемент 1: 1-й столбец, 1-я строка */
    .benefits-list .benefit-item:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    /* Элемент 2: 2-й столбец, 1-я строка */
    .benefits-list .benefit-item:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    /* Элемент 3: 1-й столбец, 2-я строка */
    .benefits-list .benefit-item:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
    }

    /* Элемент 4: 2-й столбец, 2-я строка */
    .benefits-list .benefit-item:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
    }

    /* Элемент 5: 1-й столбец, 3-я строка */
    .benefits-list .benefit-item:nth-child(5) {
        grid-column: 1;
        grid-row: 3;
    }

    /* Элемент 6: 2-й столбец, 3-я строка */
    .benefits-list .benefit-item:nth-child(6) {
        grid-column: 2;
        grid-row: 3;
    }

    .benefit-item {
        width: 100%;
        height: 100px;
    }

    .benefits-hints-image1 {
        display: none;
    }

    .benefits-hints-image2 {
        display: none;
    }

    .benefits-hints-image3 {
        display: none;
    }
}

.how-to-choose-section {
    background-color: #FFFFFF;
    padding: 50px 120px;
}

.how-to-choose-title {
    font-family: Montserrat;
    font-weight: 600;
    font-style: SemiBold;
    font-size: 48px;
    line-height: 100%;
    letter-spacing: 0%;
    margin-bottom: 50px;
}

/* Toggle buttons (Я определился / Помощь менеджера) */
.choose-toggle {
    display: flex;
    background: #F1F2F5;
    display: flex;
    justify-content: center;
    border-radius: 10px;
    width: 100%;
}

.choose-toggle-btn {
    border: 0;
    border-radius: 10px;
    background: #F1F2F5;
    color: rgba(0, 0, 0, 0.55);
    width: 100%;
    font-weight: 500;
    font-size: 32px;
    padding: 30px 20px;
    line-height: 100%;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, opacity .2s ease;
    white-space: nowrap;
}

.choose-toggle-btn.active {
    background: #9AC355;
    color: white;
}

.choose-toggle-btn:focus-visible {
    outline: 3px solid rgba(0, 0, 0, .15);
    outline-offset: 2px;
}

.choose-psychologist-card {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%;
    height: 512px;
    border-radius: 20px;
    background-color: #9AC355;
    position: relative; /* Явно, чтобы z-index работал в контексте */
    overflow: hidden; /* Ключевой фикс: обрезаем любые переполнения изображения, чтобы оно не "вылазило" за границы карточки */
    pointer-events: none; /* Делаем всю карточку "прозрачной" для кликов — мышь проходит сквозь, не блокируя кнопки выше */
}

.choose-card-img {
    pointer-events: none;
    position: relative;
    z-index: 0;
    width: 100%; /* Ограничиваем ширину */
    height: auto; /* Адаптируем высоту */
    max-width: 100%; /* Не выходит за карточку */
    max-height: 100%; /* Не выходит по высоте */
    object-fit: contain; /* Масштабирует изображение внутри границ без искажений и обрезки */
}

/* Дополнительно: поднимаем toggle-кнопки выше в стеке, чтобы они были "над" карточкой */
.choose-toggle {
    position: relative;
    z-index: 10; /* Высокий z-index для кнопок */
}

/* Если .how-to-choose-content — flex-контейнер (столбец), убедитесь в этом: */
.how-to-choose-content {
    display: flex;
    flex-direction: column; /* Вертикальное размещение: кнопки сверху, карточка снизу, без наложений */
    gap: 20px; /* Отступ между элементами, чтобы визуально не сливались */
    align-items: center; /* Центрируем всё по горизонтали */
}

.choose-select-btn {
    width: 340px;
    height: 64px;
    border-radius: 10px;
    border: none;
    background-color: #9AC355;
    color: white;
    padding: 16px 20px;
    font-weight: 500;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;

    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.choose-select-btn:hover {
    background-color: #BEF574;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    outline: none;
}

@media (min-width: 768px) and (max-width: 1240px) {
    .how-to-choose-section {
        padding: 60px 20px;
    }

    .how-to-choose-title {
        font-size: 34px;
    }

    .choose-toggle {
        padding: 0px;
        width: 100%;
    }

    .choose-toggle-btn {
        font-size: 24px;
        padding: 16px 12px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        text-align: center;
        line-height: 1.2;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .choose-psychologist-card {
        height: auto;
        min-height: 400px;
        padding: 20px;
    }

    .choose-card-img {
        width: 100%;
        height: auto;
        max-height: 450px;
        object-fit: contain;
    }
}

/* Дополнительная адаптация для больших планшетов и маленьких десктопов */
@media (min-width: 1025px) and (max-width: 1280px) {
    .choose-psychologist-card {
        height: 450px;
        padding: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .choose-card-img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        transform: scale(1.1);
    }
}

/* Дополнительная адаптация для маленьких планшетов */
@media (min-width: 768px) and (max-width: 900px) {
    .choose-toggle-btn {
        font-size: 20px;
        padding: 14px 8px;
        min-height: 55px;
    }
}

/* Reveal on scroll utility */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s ease, transform .6s ease;
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}


.reviews-section {
    background-color: #FFFFFF;
    padding: 50px 120px;
}

.reviews-header-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.reviews-title {
    font-weight: 600;
    font-size: 48px;
    line-height: 100%;
    letter-spacing: 0%;
}

.reviews-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    overflow: hidden;
}

.reviews-choose-psychologist-btn {
    width: 340px;
    height: 64px;
    border-radius: 10px;
    padding: 8px 16px;
    border: none;
    background-color: #9AC355;
    color: white;
    font-weight: 400;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.review-text {
    display: -webkit-box; /* обязательное */
    -webkit-box-orient: vertical; /* обязательное */
    -webkit-line-clamp: 6; /* сколько строк показывать */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
    /* для плавности при разворачивании */
    transition: max-height 220ms ease;
}

.reviews-choose-psychologist-btn:hover,
.reviews-choose-psychologist-btn:focus {
    background-color: #BEF574;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    outline: none;
}

.reviews-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.reviews-list {
    display: flex;
    flex-direction: row;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    /* Скрываем скроллбар на всех браузерах */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE и старый Edge */
}

/* Скрываем скроллбар в webkit браузерах (Chrome, Safari, Edge) */
.reviews-list::-webkit-scrollbar {
    display: none;
}

.review-card-header {
    display: flex;
    flex-direction: row;
    gap: 30px;
    justify-content: center;
    align-items: center;
}

.review-author-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 81px;
}

.review-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 380px;
    min-width: 380px;
    height: 440px;
    border-radius: 20px;
    background-color: #F1F2F5;
    padding: 32px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.review-author-name {
    font-weight: 500;
    font-size: 32px;
    line-height: 100%;

}

.review-author-position {
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
}

.review-read-more-btn {
    font-weight: 600;
    font-size: 20px;
    line-height: 100%;
    text-align: center;
    color: #9AC355;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-top: 40px; /* Добавлено для смещения кнопки вниз */
}

.reviews-navigation {
    display: flex;
    gap: 30px;
}

/* Базовые стили для кнопок (если нет) */
.reviews-nav-btn {
    position: relative; /* Для transform */
    display: inline-block;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* Плавный bounce для всей кнопки */
}

.reviews-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Базовые переходы для SVG-элементов */
.reviews-nav-btn .nav-circle {
    fill: #9AC355; /* Исходный зелёный */
    transition: fill 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* Плавность + scale */
}

.reviews-nav-btn .reviews-arrow {
    stroke: white; /* Исходный белый */
    transition: stroke 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* Плавность + смещение */
}

/* Анимация при нажатии: сжатие + цвет для круга */
.reviews-nav-btn:active:not(:disabled) .nav-circle {
    fill: var(--color-bg, #f8f9fa); /* Цвет на active (фон для "вдавливания") */

}

/* Анимация при нажатии: погружение + цвет для стрелки */
.reviews-nav-btn:active:not(:disabled) .reviews-arrow {
    stroke: var(--color-primary, #ff6b6b); /* Цвет на active */
}

/* Общий эффект для кнопки: лёгкое сжатие с bounce */
.reviews-nav-btn:active:not(:disabled) {
    transform: scale(0.97); /* Вся кнопка "давит" */
}

/* Опционально: bounce-отскок при отпускании (keyframes для "прикола") */
@keyframes buttonBounce {
    0% {
        transform: scale(0.97);
    }
    50% {
        transform: scale(0.94);
    }
    /* Короткий "прыжок" вниз */
    100% {
        transform: scale(1);
    }
    /* Отскок назад */
}

.reviews-nav-btn:active:not(:disabled) {
    animation: buttonBounce 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Активируем bounce только на active */
}

.review-rating-list {
    display: flex;
    justify-content: space-between;
}

.review-avatar {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
}

/* --- Modal base --- */
.review-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none; /* hidden by default */
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
}

/* затемнённый фон */
.review-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 240ms ease;
}

/* Панель модалки */
.review-modal-panel {
    position: relative;
    width: 100%;
    max-width: 920px;
    margin: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    transform: translateY(10px) scale(0.995);
    opacity: 0;
    transition: transform 260ms cubic-bezier(.2, .9, .2, 1), opacity 260ms ease;
    z-index: 2;
    overflow: hidden;
}

/* открытое состояние (JS добавляет .open) */
.review-modal.open {
    display: flex;
}

.review-modal.open .review-modal-backdrop {
    opacity: 1;
}

.review-modal.open .review-modal-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* close button (top-right) */
.review-modal-close {
    position: absolute;
    right: 12px;
    top: 8px;
    z-index: 3;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 28px;
    cursor: pointer;
    padding: 8px;
    color: #333;
    border-radius: 6px;
}

/* body content layout */
.review-modal-body {
    display: flex;
    gap: 24px;
    padding: 28px;
    align-items: flex-start;
}

/* left column: avatar + rating */
.review-modal-left {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.review-modal-avatar {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    background: #f0f0f0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.review-modal-rating {
    display: flex;
    flex-direction: row;
    gap: 6px;
}

/* rating: we clone star icons inside */
.review-modal-rating img {
    width: 22px;
    height: 22px;
    margin-right: 6px;
}

/* right column */
.review-modal-right {
    flex: 1 1 auto;
    min-width: 0;
}

.review-modal-name {
    margin: 0 0 6px 0;
    font-size: 22px;
}

.review-modal-position {
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 14px;
    line-height: 1.2;
}

.review-modal-text {
    color: rgba(0, 0, 0, 0.85);
    line-height: 1.5;
}

/* small screens: full screen modal */
@media (max-width: 767px) {
    .review-modal-panel {
        height: 100%;
        max-width: none;
        margin: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .review-modal-body {
        flex-direction: column;
        padding: 18px;
        gap: 12px;
        overflow: auto;
    }

    .review-modal-left {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .review-modal-avatar {
        width: 84px;
        height: 84px;
    }

    .review-modal-name {
        font-size: 20px;
    }

}

/* block body scroll when modal open */
body.modal-open {
    overflow: hidden;
    padding-right: 0 !important; /* можно добавить компенсатор scrollbar при желании */
}

/* Мобильные и маленькие планшеты (до 499px) */
@media (max-width: 499px) {
    .reviews-section {
        padding: 30px 10px;
    }

    .reviews-title {
        font-size: 18px;
        margin-bottom: 20px;
        text-align: center;
        word-break: break-word;
    }

    .reviews-content {
        overflow: hidden;
        align-items: center;
        gap: 18px;
    }

    .reviews-list {
        display: flex;
        flex-direction: row;
        gap: 14px;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 8px 0 16px 0;
        width: 100%;
    }

    .review-card {
        flex: 0 0 95vw;
        min-width: 220px;
        max-width: 98vw;
        scroll-snap-align: center;
        padding: 18px 8px;
        gap: 12px;
        height: auto;
    }


    /* why-choose-us mobile styles */
    .why-choose-us {
        padding: 20px 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .container.why-choose-us-container {
        border-radius: 24px;
        overflow: hidden;
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
        padding: 24px 16px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-height: auto;
    }

    .why-choose-us-title {
        font-size: 16px;
        margin: 0 0 20px 0;
        text-align: center;
        padding: 0;
        font-weight: 600;
        line-height: 120%;
        word-break: break-word;
        width: 100%;
        box-sizing: border-box;
    }

    .why-choose-us-features {
        display: flex;
        flex-direction: column;
        gap: 16px;
        justify-items: center;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

    .why-choose-us-feature {
        max-width: 100%;
        width: 100%;
        text-align: center;
        padding: 0 8px;
        word-break: break-word;
        box-sizing: border-box;
    }

    .why-choose-us-text {
        font-size: 13px;
        line-height: 140%;
        text-align: center;
        word-break: break-word;
        width: 100%;
        box-sizing: border-box;
    }

    .why-choose-us-text-strong {
        font-size: 14px;
        line-height: 130%;
        text-align: center;
        font-weight: 600;
        word-break: break-word;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Адаптив для разрешений ниже 650px */
@media (max-width: 649px) {
    .why-choose-us {
        padding: 24px 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .container.why-choose-us-container {
        border-radius: 24px;
        overflow: hidden;
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
        padding: 24px 16px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-height: auto;
    }

    .why-choose-us-title {
        font-size: 18px;
        margin: 0 0 20px 0;
        text-align: center;
        padding: 0;
        font-weight: 600;
        line-height: 120%;
        word-break: break-word;
        width: 100%;
        box-sizing: border-box;
    }

    .why-choose-us-features {
        display: flex;
        flex-direction: column;
        gap: 18px;
        justify-items: center;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

    .why-choose-us-feature {
        max-width: 100%;
        width: 100%;
        text-align: center;
        padding: 0 8px;
        word-break: break-word;
        box-sizing: border-box;
    }

    .why-choose-us-text {
        font-size: 14px;
        line-height: 140%;
        text-align: center;
        word-break: break-word;
        width: 100%;
        box-sizing: border-box;
    }

    .why-choose-us-text-strong {
        font-size: 15px;
        line-height: 130%;
        text-align: center;
        font-weight: 600;
        word-break: break-word;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Планшеты средние (500-767px) */
@media (min-width: 500px) and (max-width: 767px) {
    .reviews-section {
        padding: 40px 20px;
    }

    .reviews-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .reviews-content {
        overflow: hidden;
        align-items: center;
    }

    .reviews-list {
        display: flex;
        flex-direction: row;
        gap: 20px;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 10px 0 20px 0;
        width: 100%;
    }

    .review-card {
        flex: 0 0 340px;
        min-width: 340px;
        max-width: 340px;
        height: auto;
        min-height: 400px;
        scroll-snap-align: center;
        padding: 24px;
    }

    .review-card-header {
        gap: 20px;
    }

    .review-avatar-img {
        width: 70px;
        height: 70px;
    }

    .review-author-name {
        font-size: 20px;
    }

    .review-author-position {
        font-size: 12px;
    }

    .review-text {
        font-size: 15px;
        line-height: 140%;
    }

    .review-read-more-btn {
        font-size: 16px;
        margin-top: 20px;
    }

    .reviews-navigation {
        display: none;
    }

    .review-button-block {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }

    .container.why-choose-us-container {
        border-radius: 30px;
        overflow: hidden;
        /* Исправляем обрезание background сверху: */
        background-position: top center; /* всегда показываем верх фона */
        background-size: 100% 100%; /* растягиваем фон по всей высоте и ширине контейнера */
        /* Если скругления всё равно не видно, можно добавить паддинг сверху */
        padding-top: 40px;
        background-color: #F7F7F9;
    }
}

/* Планшеты большие (768-1024px) */
@media (min-width: 768px) and (max-width: 1280px) {
    .reviews-section {
        padding: 60px 20px;
    }

    .container.reviews-container {
        padding: 0px;
    }

    .reviews-content {
        overflow: hidden;
        align-items: flex-start;
        width: 100%;
    }

    .reviews-slider {
        overflow: hidden;
        width: 100%;
    }

    .reviews-list {
        display: flex;
        flex-direction: row;
        gap: 20px;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 10px 0 20px 0;
    }

    .review-card {
        flex: 0 0 360px;
        min-width: 360px;
        max-width: 360px;
        width: 360px;
        height: auto;
        min-height: 420px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .review-author-name {
        font-size: 24px;
    }

    .review-author-position {
        font-size: 13px;
    }

    .review-text {
        font-size: 16px;
        line-height: 140%;
    }

    .review-read-more-btn {
        font-size: 18px;
        margin-top: 20px;
    }

    .review-avatar-img {
        width: 80px;
        height: 80px;
    }

    .reviews-title {
        font-size: 34px;
    }

    .reviews-navigation {
        display: flex;
        gap: 30px;
    }

    .reviews-nav-btn {
        width: 40px;
        height: 40px;
    }

    .review-button-block {
        display: flex;
        justify-content: center;
        width: 100%;
    }
}

.specialists-section {
    background-color: #f8f9fa;
    padding: 40px 0;
}

.specialist-title {
    font-size: 48px;
    line-height: 100%;
    margin-bottom: 10px;
}

.specialist-subtitle {
    font-weight: 400;
    font-size: 24px;
    line-height: 100%;
    margin-bottom: 30px;
    color: rgb(0, 0, 0, 0.5);
}

.specialist-tabs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: start;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    margin-bottom: 40px;
    width: 100%;
}

/* bottom-row занимает всю ширину grid и центрирует свои дети */
.tabs-bottom-row {
    grid-column: 1 / -1; /* занимает все 3 колонки */
    display: flex;
    justify-content: center; /* выравниваем d и e по центру */
    gap: 24px; /* расстояние между D и E */
    padding-top: 6px;
}

.specialist-tab {
    background-color: #9AC355;
    border: none;
    border-radius: 10px;
    padding: 16px 11px;
    font-size: 20px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    box-sizing: border-box;
}

.specialist-tab:hover {
    background-color: white;
    border: 2px solid #9AC355;
    color: #9AC355;
}

.specialist-nav-btn.specialist-nav-btn-prev {
    background: none;
    border: none;
    cursor: pointer;
}

.specialist-nav-btn.specialist-nav-btn-next {
    background: none;
    border: none;
    cursor: pointer;
}

/* Базовые стили для кнопок специалистов (если нет) */
.specialist-nav-btn {
    position: relative; /* Для transform */
    display: none; /*inline-block; */
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* Плавный bounce для всей кнопки */
}

/* Базовые переходы для SVG-элементов */
.specialist-nav-btn .nav-circle {
    fill: #FFFFFF; /* Исходный белый */
    transition: fill 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* Плавность + scale */
}

.specialist-nav-btn .specialist-arrow {
    stroke: black; /* Исходный чёрный */
    transition: stroke 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* Плавность + смещение */
}

/* Анимация при нажатии: сжатие + цвет для круга */
.specialist-nav-btn:active .nav-circle {
    fill: var(--color-primary, #f8f9fa); /* Цвет на active (фон для "вдавливания") */
}

/* Анимация при нажатии: погружение + цвет для стрелки */
.specialist-nav-btn:active .specialist-arrow {
    stroke: var(--color-bg, #333333); /* Цвет на active */
    transform: translateY(2px); /* "Погружение" вниз — стрелка "давит" */
}

/* Общий эффект для кнопки: лёгкое сжатие с bounce */
.specialist-nav-btn:active {
    transform: scale(0.97); /* Вся кнопка "давит" */
}

/* Bounce-отскок при отпускании (keyframes для "прикола") */
@keyframes buttonBounce {
    0% {
        transform: scale(0.97);
    }
    50% {
        transform: scale(0.94);
    }
    /* Короткий "прыжок" вниз */
    100% {
        transform: scale(1);
    }
    /* Отскок назад */
}

.specialist-nav-btn:active {
    animation: buttonBounce 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Активируем bounce только на active */
}

.specialist-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.specialist-cards {
    display: flex;
    overflow-x: hidden;
    overflow-y: visible;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 20px;
    width: 100%;
}

.specialist-card {
    border-radius: 20px;
    overflow: hidden;
    flex: 0 0 calc((100% - 40px) / 3); /* Всегда 3 карточки на десктопе */
    scroll-snap-align: start;
    position: relative;
}

.specialist-card-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.specialist-card-image img {
    width: 80%;
    height: auto;
    display: block;
    border-radius: 0;
}

.heart {
    position: absolute;
    top: 10px;
    right: 50px;
    width: 25px;
    height: 25px;
    cursor: pointer;
}

.heart-path {
    stroke: #A6A6A6; /* Исходный серый контур */
    fill: none; /* Без заливки изначально */
    transition: fill 0.3s ease, stroke 0.3s ease; /* Плавный переход */
}

.heart.active .heart-path {
    fill: #FF3F7F; /* Заливка цветом при активном состоянии */
    stroke: none; /* Контур тоже в цвет (опционально, для жирности) */
}

.specialist-card-name {
    background-color: #9AC355;
    padding: 20px 15px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    border-radius: 20px;
    width: 100%;
    margin-top: -80px;
    position: relative;
    z-index: 1;
}

.specialist-card-name:hover {
    background-color: var(--color-primary-hover);
    text-decoration: none;
    cursor: pointer;
}

.specialist-card-description {
    background-color: white;
    border-radius: 10px 10px 0 0px;
    padding: 15px;
    font-size: 14px;
    color: #333;
}

.specialist-discription {
    font-family: Montserrat;
    font-weight: 400;
    font-style: normal;
    font-size: 18px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    vertical-align: middle;
}

.specialist-card-description p {
    margin: 5px 0;
}

.specialist-card-description ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.specialist-card-description li {
    position: relative;
    padding-left: 15px;
    font-size: 14px;
}

.specialist-card-description li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.adult::before {
    background-color: #BEF574; /* green */
}

.teen::before {
    background-color: #8E74F5; /* purple */
}

.family::before {
    background-color: #F58E74; /* red */
}

@media (min-width: 768px) and (max-width: 1280px) {
    .specialist-title {
        font-size: 34px;
    }

    .specialist-subtitle {
        margin-top: 25px;
        font-size: 18px;
    }

    .specialist-subtitle br {
        display: none;
    }

    .specialist-tabs {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 4 колонки */
        grid-auto-rows: auto;
        width: 100%;
        max-width: 980px; /* по желанию центрировать и ограничить ширину */
        margin: 0 auto 40px;
    }

    .specialist-tabs .tabs-bottom-row {
        display: contents; /* preferred — делает вложенные кнопки прямыми детьми сетки */
    }

    .specialist-tab {
        width: 100%;
        height: 60px; /* Фиксированная высота */
        border: none;
        border-radius: 10px;
        cursor: pointer;
        box-sizing: border-box;
        font-size: 16px;
        padding: 16px 12px; /* Фиксированный padding */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
    }

    .specialist-slider {
        display: flex;
        align-items: center;
        justify-content: space-between; /* кнопки по краям */
        gap: 16px;
    }

    .specialist-cards {
        display: flex;
        flex-direction: row;
        width: 100%;
        max-width: 420px; /* подгони под дизайн; можно 680/720 */
        margin: 0 12px; /* отступы между кнопками и картинками */
        overflow: hidden; /* критично: скрываем лишние карточки */
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory; /* снэп по карточкам */
        -webkit-overflow-scrolling: touch;
        position: relative;
        gap: 0; /* Убираем gap для планшета, чтобы карточки были вплотную */
    }

    .specialist-card {
        flex: 0 0 100%;
        max-width: 100%;
        box-sizing: border-box;
        scroll-snap-align: start;
        transition: transform .28s ease; /* небольшая анимация при hover/active если нужно */
    }

    .specialist-card-name {
        font-size: 24px;
    }

    .specialist-card-description {
        font-size: 18px;
    }

    .specialist-card-description strong {
        font-size: 20px;
    }

    .specialist-card-description li {
        font-size: 18px;
    }

    .specialist-nav-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        border: none;
        background: transparent;
        cursor: pointer;
        padding: 0;
    }

    .specialist-nav-btn:disabled {
        opacity: 0.35;
        cursor: default;
    }
}

.blog-section {
    background-color: white;
    padding: 50px 120px;
}

.blog-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.blog-title {
    font-weight: 600;
    font-style: SemiBold;
    font-size: 48px;
    line-height: 100%;
    letter-spacing: 0%;

    margin: 0;
}

.blog-subtitle {
    font-weight: 400;
    font-style: Regular;
    font-size: 24px;
    line-height: 100%;
    letter-spacing: 0%;
}

.blog-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.blog-list {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 40px;
}

.blog-list-item {
    list-style: none;
}

/* Blog card (плашка статьи) */
.blog-card {
    display: grid;
    grid-template-columns: 1fr 180px;
    background: #F1F2F5;
    grid-template-rows: auto 1fr;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    height: 440px;
}

.blog-card-left {
    display: flex;
    justify-content: center;
    margin: 30px;
    grid-column: 1; /* Первая колонка */
    grid-row: 1; /* Первая строка */
}

.blog-card-center {
    grid-column: 1 / span 2; /* Занимает обе колонки */
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    gap: 30px;
}

.blog-card-title {
    font-family: Montserrat;
    font-weight: 600;
    font-style: SemiBold;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: 0%;

}

.blog-card-excerpt {
    font-size: 18px;
    line-height: 100%;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;

    margin-top: 20px;
    overflow: hidden;
    text-overflow: ellipsis;

    display: -moz-box;
    -moz-line-clamp: 3;
    -moz-box-orient: vertical;
    box-orient: vertical;
}

.blog-card-button {
    margin-top: 0;
    justify-self: center;
    background: none;
    border: none;
    color: #9AC355;
    font-weight: 600;
    font-size: 18px;

    cursor: pointer;
}

.blog-card-media {
    grid-column: 2; /* Вторая колонка */
    grid-row: 1; /* Первая строка */
}

.blog-card-media-icon {
    opacity: 0.9;
}

.blog-more-btn {
    width: 340px;
    height: 64px;
    border-radius: 10px;
    padding: 8px 16px;
    border: none;
    background-color: #9AC355;
    color: white;
    font-weight: 400;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.blog-more-btn:hover,
.blog-more-btn:focus {
    background-color: #BEF574;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    outline: none;
}

@media (min-width: 768px) and (max-width: 1280px) {
    .blog-section {
        padding: 60px 30px;
    }

    .blog-slider {
        position: relative;
        overflow: hidden;
        width: 100%;
    }

    .blog-list {
        display: flex;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        /* Добавьте это: */
        scroll-snap-type: x mandatory;
    }

    .blog-card-left {
        display: flex;
        justify-content: center;
        margin-top: 30px;
        grid-column: 1; /* Первая колонка */
        grid-row: 1; /* Первая строка */
    }

    .blog-card-center {
        grid-column: 1 / span 2; /* Занимает обе колонки */
        grid-row: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 15px;
        gap: 60px;
    }

    .blog-card-media {
        grid-column: 2;
        grid-row: 1;

        /* Выравниваем контейнер по правому краю ячейки */
        justify-self: end;

        /* Если нужно выравнивание по вертикали, например, по центру */
        align-self: center;

        /* Задаем максимальные размеры, если нужно */
        max-width: 180px; /* ширина колонки */
        max-height: 100%;
    }

    .blog-card-media img {
        /* Сохраняем пропорции изображения */
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        display: block;
    }

    .blog-card-media img {
        height: 200px;
    }

    .blog-card {
        display: grid;
        grid-template-columns: 1fr 220px;
        background: #F1F2F5;
        grid-template-rows: auto 1fr;
        border-radius: 20px;
        overflow: hidden;
        width: 100%;
        height: 440px;
    }

    .container.blog-container {
        padding: 0;
    }

    .blog-title {
        font-size: 34px;
    }

    .blog-subtitle {
        font-size: 18px;
    }
}

/* FAQ */
.faq-section {
    background-color: #F1F2F5;
    padding: 0px 120px;
}

.faq-title {
    font-weight: 600;
    font-style: SemiBold;
    font-size: 48px;
    line-height: 100%;
    letter-spacing: 0%;
    color: white;
    margin: 0;
}

.faq-top {
    background: #9AC355;
    height: 326px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    padding-top: 150px;
    gap: 60px;
    margin-left: -50vw;
    margin-right: -50vw;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.faq-topics {
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Выравниваем кнопки по нижнему краю */
    width: 100%;
    gap: 20px;
}

.container.faq-container {
    display: flex;
    flex-direction: column;
    gap: 100px;
}

.faq-topic {
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30%;
    height: 200px; /* Фиксированная высота для равномерного выравнивания */
    gap: 15px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    background-color: white;
    padding: 50px;
    position: relative; /* Для позиционирования псевдоэлемента треугольника */
    border: none; /* Убираем стандартные границы кнопки */
    box-sizing: border-box; /* Учитываем padding в высоте */
}

.faq-topic.active::after {
    content: '';
    position: absolute;
    bottom: -20px; /* Расстояние от низа кнопки до вершины треугольника */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid #ffffff; /* Цвет треугольника совпадает с фоном faq-top */
    z-index: 1; /* Чтобы треугольник был поверх других элементов */
}

.faq-topic:hover {
    transform: translateY(-2px);
}

/* Дополнительно: если нужно анимировать треугольник при смене активного состояния, добавьте transition для ::after */
.faq-topic::after {
    transition: opacity .2s ease;
}

.faq-topic:not(.active)::after {
    opacity: 0;
}

/* Фоновые изображения для кнопок FAQ */
.faq-topic-icon {
    margin-top: 14px;
    width: 96px;
    height: 72px;
    border-radius: 12px;
    display: grid;
    place-items: center;
}

.faq-topic-label {
    font-weight: 500;
    font-style: Medium;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: 0%;
}

.faq-accordion {
    margin-top: 40px;
    margin-bottom: 40px;
    display: grid;
    gap: 16px;
}

.faq-accordion.faq-specialists {

    display: grid;
    gap: 16px;
}

.faq-item {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .06) inset;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 18px 56px 18px 24px;
    font-size: 24px;
    font-weight: 500;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.faq-chevron {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #9AC355;
    position: relative;
    transition: transform .25s ease;
}

.faq-chevron::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 10px;
    height: 10px;
    border: 2px solid #ffffff;
    border-top: 0;
    border-left: 0;
    transform: rotate(45deg);
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    overflow: hidden;
    transition: grid-template-rows .3s ease, height .3s ease;
}

.faq-answer[hidden] {
    display: block;
    height: 0;
}

.faq-answer .faq-answer-inner {
    padding: 0 24px 18px;
    color: #7a7a7a;
    font-weight: 400;
    font-style: Regular;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: 0%;

}

@media (min-width: 768px) and (max-width: 1280px) {
    .faq-section {
        padding: 60px 30px;
    }

    .faq-top {
        padding-left: 30px;
        padding-right: 30px;
    }
}

.help-section {
    padding: 40px 120px;
}

.container.help-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.help-top-head {
    display: flex;
    flex-direction: column;
    gap: 40px;
    justify-content: center;
    align-items: center;
}

.help-title {
    font-family: Montserrat;
    font-weight: 600;
    font-style: SemiBold;
    font-size: 48px;
    line-height: 100%;
    letter-spacing: 0%;
    margin: 0;
}

.help-text {
    font-family: Montserrat;
    font-weight: 400;
    font-style: Regular;
    font-size: 30px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
}

.help-numbers-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 0 auto;
    align-items: start;
    padding: 40px 20px;
}


/* bottom-row занимает всю ширину grid и центрирует свои дети */
.bottom-row {
    grid-column: 1 / -1; /* занимает все 3 колонки */
    display: flex;
    justify-content: center; /* выравниваем d и e по центру */
    gap: 24px; /* расстояние между D и E */
    padding-top: 6px;
}

/* при желании можно задать фиксенную ширину карточек, чтобы они не растягивались */
.help-number-card {
    min-width: 260px;
    max-width: 320px;
}

.help-number-card {
    min-height: 156px;
    max-width: 400px;
    gap: 8px;
    border-radius: 20px;
    padding: 16px;
    background-color: #9AC355;
}

.help-number-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.help-number {
    font-family: Montserrat;
    font-weight: 600;
    font-style: SemiBold;
    font-size: 27px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    color: white;
}

.help-number-discription {
    font-family: Montserrat;
    font-weight: 400;
    font-style: Regular;
    font-size: 24px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    color: white;
}

@media (min-width: 768px) and (max-width: 1280px) {
    .help-section {
        padding: 60px 20px;
    }

    .help-title {
        font-size: 34px;
    }

    .help-text {
        font-size: 24px;
    }

    .help-numbers-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto auto;
        gap: 20px;
    }

    .bottom-row {
        display: contents;
    }

    /* 3 и 4 должны сидеть рядом */
    .help-numbers-list > .help-number-card:nth-child(3) {
        grid-column: 1; /* левая колонка */
        grid-row: 2;
    }

    .bottom-row .help-number-card:nth-child(1) {
        grid-column: 2; /* правая колонка */
        grid-row: 2;
    }

    /* 5-й блок по центру ниже */
    .bottom-row .help-number-card:nth-child(2) {
        grid-column: 1 / 3; /* на всю ширину */
        grid-row: 3;
        justify-self: center;
        width: 80%;
    }

    .help-number {
        font-size: 24px;
    }

    .help-number-discription {
        font-size: 20px;
    }
}

/* Services section */
.services {
    padding-top: 40px;
    background: #F1F2F5;
    padding-bottom: 40px;
}

.services-title {
    font-family: Montserrat;
    font-weight: 600;
    font-style: SemiBold;
    font-size: 48px;
    line-height: 100%;
    letter-spacing: 0%;
    margin-bottom: 15px;
}


.services-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    margin-bottom: 40px;
}

.services-row--clients .services-image {
    order: 1;
}

.services-row--clients .services-card {
    order: 2;
}

/* Reduce horizontal space between image and text for clients row */
.services-row--clients {
    column-gap: 20px;
    grid-template-columns: 1fr 1fr;
}

.services-row--psychologists .services-card {
    order: 1;
}

.services-row--psychologists .services-image {
    order: 2;
}

/* Reduce horizontal space between text and image for psychologists row */
.services-row--psychologists {
    column-gap: 20px;
}

.services-image {
    width: 100%;
    max-width: 600px;
    height: 300px;
}

/* removed empty .services-card ruleset */

.services-card.extra-class {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.services-card-title {
    font-family: Montserrat;
    font-weight: 500;
    font-style: Medium;
    font-size: 28px;
    line-height: 100%;
    letter-spacing: 0%;
    margin-bottom: 20px;
}

.services-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.services-desc {
    font-family: Montserrat;
    font-weight: 400;
    font-style: normal;
    font-size: 24px;
    line-height: 100%;
    letter-spacing: 0%;
    color: rgba(51, 51, 51, 0.5);
    letter-spacing: 2px;
}

.services-subtitle {
    display: block;
    color: #333;
    margin-bottom: 8px;
}

.services-list {
    list-style: disc inside;
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.services-footnote {
    display: block;
    font-weight: 600;
    white-space: normal;
}


.services-btn {
    width: 240px;
    height: 50px;
    margin-bottom: 40px;
    background: #9AC355;
    color: #fffdfd;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 300;
    margin-top: 20px;
}

.services-btn:hover {
    background: #BEF574;
}

.services-btn-wrapper {
    display: none;
}

@media (min-width: 768px) and (max-width: 1280px) {

    .services {
        padding: 40px 30px;
    }

    .services-desc br {
        display: none;
    }

    .services-title {
        font-weight: 600;
        font-style: SemiBold;
        font-size: 34px;
        line-height: 100%;
        letter-spacing: 0%;
    }

    .services-desc {
        font-weight: 400;
        font-size: 18px;
    }

    .services-row--clients {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 20px;
    }


    .services-image {
        width: 100%;
        height: auto;
        margin-left: 60px;
    }

    .services-row {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 20px;
    }

    .services-btn {
        display: none;
    }

    .services-btnTablet {
        width: 340px;
        height: 64px;
        margin-bottom: 40px;
        background: #9AC355;
        color: #fffdfd;
        border: none;
        border-radius: 10px;
        font-size: 16px;
        cursor: pointer;
        font-weight: 300;
        margin-top: 20px;
    }


    .services-btn-wrapper {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .services-row--psychologists .services-image {
        order: -1;
    }

    .services-footnote br {
        display: none;
    }

    .services-btnTablet:hover {
        background: #BEF574;
    }
}

@media (max-width: 767px) {

    .header {
        padding: 1rem 0;
    }

    .logo-desktop {
        display: none;
    }

    .hero-title--desktop {
        display: none;
    }

    .hero-title--tablet {
        display: inline-block; /* или block — в зависимости от места */
    }

    /* при необходимости подправь отступы/выравнивание */
    .hero-title-placeholder {
        text-align: center;
        margin: 0;
        font-weight: 600;
        font-size: 40px;
        line-height: 100%;
        letter-spacing: 0;
    }

    .hero-left {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        flex: 1 1 520px;
        min-width: 280px;
        max-width: 720px;
        gap: 50px;
    }

    .hero-left-text {
        display: flex;
        flex-direction: column;
    }

    /* Скрываем картинку на планшетах (по id и по обёртке) */
    #heroImage,
    .hero-img-frame {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .main-tabs {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: auto;
    }

    /* Центрируем табы по центру экрана */
    .hero-tabs {
        display: flex;
        flex-direction: row;
        background: #9AC355;
        border-radius: 0 10px 10px 10px;
        max-width: 580px;
    }

    .tabs-panel {
        min-width: 300px;
        box-sizing: border-box;
        /* Можно добавить max-height если нужно ограничить */
        max-height: 260px;
        transition: min-height 0.2s;
        /* Если нужно, можно добавить overflow-y: auto; */
    }


    .hero-title {
        font-weight: 600;
        font-size: 24px;
        line-height: 100%;
        text-align: center;
        margin: 0;
    }

    .hero-title-secondary.hero-title--tablet {
        font-size: 24px;
    }

    .tabs-title {
        font-size: 13px;
    }

    .tabs-sub {
        font-size: 10px;
    }

    .eyebrow {
        font-weight: 400;
        font-size: 12px;
        line-height: 100%;
        text-align: center;
    }

    /* Заголовок табов/строка кнопок — центрируем их содержимое */
    .tabs-header {
        display: flex;
        gap: 15px;
        padding: 0;
        width: 95%;
    }

    /* немного уменьшить размер и паддинги кнопок на планшете */
    .tab-btn {
        padding: 0.6rem 0.9rem;
        font-size: 15px;
    }


    .tabs-btn-block {
        display: flex;
    }

    /* CTA внутри табов — центрируем и уменьшаем отступ */
    .hero-tabs .tabs-cta.btn {
        margin: 1rem auto 0;
        font-size: 16px;
        white-space: nowrap; /* Запрещаем перенос текста на мобильных */
    }
    .hero-tabs .tabs-cta.btn-create {
        width: 280px;
        white-space: normal;
        text-align: center;
    }

    /* Убедимся, что заголовок геро и eyebrow выровнены по центру */
    .hero-left,
    .hero-title,
    .eyebrow,
    .hero-title-secondary {
        text-align: center;
    }

    /* Фиксируем размер панели табов, чтобы не прыгала при смене контента */
    /* Почему стоит выбрать нас блок */
    .why-choose-us {
        padding: 30px 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .container.why-choose-us-container {
        border-radius: 24px;
        overflow: hidden;
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
        padding: 24px 16px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-height: auto;
        background-color: #F7F7F9;
    }

    .why-choose-us-title {
        font-weight: 600;
        font-size: 20px;
        margin: 0 0 20px 0;
        text-align: center;
        padding: 0;
        line-height: 120%;
        word-break: break-word;
        width: 100%;
        box-sizing: border-box;
    }

    .why-choose-us-features {
        display: flex;
        flex-direction: column;
        gap: 20px;
        justify-items: center;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

    .why-choose-us-feature {
        max-width: 100%;
        width: 100%;
        text-align: center;
        padding: 0 8px;
        word-break: break-word;
        box-sizing: border-box;
    }

    .why-choose-us-text {
        font-size: 15px;
        line-height: 140%;
        text-align: center;
        word-break: break-word;
        width: 100%;
        box-sizing: border-box;
    }

    .why-choose-us-text-strong {
        font-size: 16px;
        line-height: 130%;
        text-align: center;
        font-weight: 600;
        word-break: break-word;
        width: 100%;
        box-sizing: border-box;
    }


    /* БЛОК для клиентов и психологов */
    .services {
        padding: 30px 16px;
    }

    .services-title {
        font-weight: 600;
        font-size: 20px;
    }

    .services-desc {
        font-weight: 400;
        font-size: 12px;
    }

    .services-desc br {
        display: none;
    }

    .services-row--clients {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 20px;
    }


    .services-image {
        width: 100%;
        height: auto;
    }

    .services-row {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 20px;
    }


    .services-row--psychologists .services-image {
        order: -1;
    }

    .services-card-title {
        font-weight: 500;
        font-size: 16px;
        line-height: 100%;
    }

    .services-subtitle {
        font-weight: 400;
        font-size: 14px;
        line-height: 100%;
    }

    .services-list {
        gap: 10px;
    }

    .services-list li {
        font-weight: 400;
        font-size: 14px;
        line-height: 100%;
    }

    .services-btn {
        display: none;
    }

    .services-btnTablet {
        width: 311px;
        height: 64px;
        margin-bottom: 40px;
        background: #9AC355;
        color: #fffdfd;
        border: none;
        border-radius: 10px;
        font-size: 16px;
        cursor: pointer;
        font-weight: 300;
        margin-top: 20px;
    }


    .services-btn-wrapper {
        display: flex;
        justify-content: center;
        width: 100%;
    }


    /* БЛОК ПРОМО */
    .container.promo-container {
        margin: 20px 15px;
        padding: 30px 20px;
        min-height: 500px;
        border-radius: 16px;
    }


    .promo-title,
    .promo-title.discount {
        font-size: 24px;
    }

    .promo-desc {
        font-size: 16px;
        margin-bottom: 160px;
        /* Убираем <br> на мобильных для естественного переноса */
    }

    .promo-desc br {
        display: none;
    }

    .promo-deadline-wrapper {
        right: 10px;
        bottom: 10px;
        transform: rotate(10deg); /* Меньший угол для лучшей читаемости на маленьком экране */
    }

    .promo-deadline-text {
        font-size: 14px;
        padding: 6px 12px;
        white-space: normal; /* Разрешаем перенос для мобильных */
        line-height: 120%;
        position: absolute;
        top: 100px;
        right: 10px;
    }

    .promo-deadline-text br {
        display: inline; /* Восстанавливаем <br> для даты */
    }

    .promo-select-btn {
        width: 100%;
        max-width: 311px;
        height: 64px;
        font-size: 20px;
        margin-top: 120px; /* Добавляем margin-top для отделения от описания */
    }


    /* БЛОК Benefites */
    .benefits-section {
        display: none;
    }


    /* БЛОК Как подобрать психолога  */
    .how-to-choose-section {
        padding: 30px 20px;
    }

    .how-to-choose-title {
        font-weight: 600;
        font-size: 20px;
        line-height: 100%;
    }

    .how-to-choose-content {
        display: flex;
        width: 100%;;
    }

    .choose-toggle {
        padding: 0px;
        width: 100%; /* На мобильных кнопки занимают всю ширину */
        max-width: 100%;

    }

    .choose-select-btn {
        width: 311px;
    }

    .choose-toggle-btn {
        width: 100%;
        font-weight: 500;
        font-size: 12px; /* Уменьшаем размер шрифта для лучшего размещения */
        cursor: pointer;
        transition: color .2s ease, background .2s ease, opacity .2s ease;
        /* Возвращаем nowrap для мобильных устройств */
        white-space: nowrap; /* Запрещаем перенос текста */
        text-align: center; /* Выравнивание по центру */
        padding: 12px 6px; /* Еще больше уменьшаем горизонтальные отступы */
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 50px; /* Уменьшаем минимальную высоту */
        overflow: hidden; /* Скрываем переполнение текста */
        text-overflow: ellipsis; /* Добавляем многоточие при переполнении */
    }

    .choose-card-img {
        width: 90%;
    }


    /* БЛОК С ОТЗЫВАМИ */
    .reviews-section {
        padding: 30px 20px;
    }

    .reviews-title {
        font-weight: 600;
        font-size: 20px;
        line-height: 100%;
        margin: 0;
        margin-bottom: 50px;
    }

    .reviews-choose-psychologist-btn {
        width: 311px;
    }

    .reviews-navigation {
        display: none;
    }

    .reviews-content {
        overflow: hidden;
        align-items: flex-start;
    }

    .review-button-block {
        display: flex;
        justify-content: center;
        width: 100%;
    }


    .reviews-slider {
        position: relative;
        overflow: hidden;
        width: 100%;
    }

    .reviews-list {
        display: flex;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 20px;
        padding: 10px 0 20px 0;
    }


    .review-card {
        flex: 0 0 auto;
        width: 100%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        box-sizing: border-box;
    }

    .review-author-name {
        font-size: 16px;
    }

    .review-author-position {
        font-size: 12px;
    }

    .review-text {
        font-size: 14px;
    }

    .review-read-more-btn {
        font-size: 14px;
    }


    /*
            БЛОК НАШИ СПЕЦИАЛИСТЫ */
    .specialists-section {
        padding: 30px 20px;
    }

    .container.specialists-container {
        padding: 0px;
    }

    .specialist-title {
        font-weight: 600;
        font-size: 20px;
    }

    .specialist-subtitle {
        font-size: 14px;
    }

    .specialist-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);

        margin-bottom: 40px;
        width: 100%;
    }

    .specialists-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .specialist-tab {
        font-size: 14px;
        padding: 12px 8px;
        flex: 1;
        min-width: calc(50% - 5px); /* 2 колонки с учетом gap */
        box-sizing: border-box;
        height: 50px; /* Фиксированная высота для мобильных */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
    }

    /* bottom-row занимает всю ширину grid и центрирует свои дети */
    .tabs-bottom-row {
        grid-column: 1 / -1; /* занимает все 3 колонки */
        display: flex;
        justify-content: center; /* выравниваем d и e по центру */
        gap: 8px; /* расстояние между D и E */
    }

    .specialist-slider {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        overflow: hidden;
    }

    .heart {
        right: 50px;
        top: 20px;
    }

    .specialist-cards {
        display: flex;
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 20px;
        padding: 0 20px;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE и Edge */
    }

    /* Скрываем скроллбар в webkit браузерах */
    .specialist-cards::-webkit-scrollbar {
        display: none;
    }

    .specialist-nav-btn {
        display: none;
    }


    .blog-section {
        padding: 30px 0px;
    }

    .blog-slider {
        position: relative;
        overflow: hidden;
        width: 100%;
    }

    .blog-more-btn {
        width: 311px;
    }


    .blog-list {
        display: flex;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        /* Добавьте это: */
        scroll-snap-type: x mandatory;
    }

    .blog-list::-webkit-scrollbar {
        display: none;
    }

    .blog-list-item {
        flex: 0 0 100%; /* КАЖДАЯ КАРТОЧКА ЗАНИМАЕТ 100% ШИРИНЫ */
        scroll-snap-align: start;
        scroll-snap-stop: always;
        box-sizing: border-box;

    }

    /* Убедитесь, что карточка занимает всю ширину */
    .blog-card {
        display: grid;
        grid-template-columns: 1fr 180px; /* Две колонки */
        grid-template-rows: auto 1fr; /* Две строки */
        gap: 10px; /* Расстояние между элементами */
        width: 100%;
        height: 440px;
    }

    .blog-card-left {
        display: flex;
        justify-content: start;
        grid-column: 1; /* Первая колонка */
        grid-row: 1; /* Первая строка */
    }

    .blog-card-media {
        grid-column: 2; /* Вторая колонка */
        grid-row: 1; /* Первая строка */
    }

    .blog-card-center {
        grid-column: 1 / span 2; /* Занимает обе колонки */
        grid-row: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 15px;
        gap: 10px;
    }


    .blog-title {
        font-size: 20px;
    }

    .blog-subtitle {
        font-size: 14px;
    }


    .blog-card-title {
        font-weight: 600;
        font-size: 18px;
        line-height: 100%;
    }

    .blog-card-excerpt {
        font-size: 18px;
        color: #666;
        margin: 0 0 16px 0;
        line-height: 1.4;

        /* Обрезка текста на 3 строки с многоточием */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;

        /* Для лучшей совместимости с современными браузерами */
        display: -moz-box;
        -moz-line-clamp: 3;
        -moz-box-orient: vertical;
        box-orient: vertical;

        /* Резервный вариант для браузеров, которые не поддерживают line-clamp */
        max-height: calc(1.4em * 3); /* line-height × количество строк */
    }

    .blog-card-button {
        text-align: start;
        font-size: 18px;
    }


    /* БЛОК С ЧАСТО ЗАДАВАЕМЫМИ ВОПРОСАМИ  */
    .faq-section {
        padding: 30px 20px;
    }

    .faq-title {
        font-size: 20px;
    }


    .faq-top {
        padding-left: 30px;
        padding-right: 30px;
    }

    .faq-topic-label {
        font-size: 16px;
    }

    .faq-topic-icon {
        width: 80px;
        height: 0px;
    }

    .faq-topic {
        width: 100%;
        max-width: 500px;
        height: 180px; /* Фиксированная высота для мобильных */
        padding: 40px;
        flex: 1;
        min-width: 0;
    }

    .faq-topic img {
        width: 60px;
        height: 60px;
    }


    .faq-answer-inner p {
        font-size: 14px;
    }


    .faq-accordion {
        margin: 0;
    }

    .faq-question {
        font-size: 18px;
    }

    .faq-top {
        height: 220px;
        margin-bottom: 40px;
    }

    .faq-topics {
        gap: 10px;
        padding: 0 10px;
    }

    .faq-question,
    .faq-answer a,
    .faq-topic-label,
    .help-number {
        color: black !important;
    }


    /* БЛОК С ПОМОЩЬЮ */
    .help-section {
        padding: 30px 20px;
    }

    .help-title {
        font-size: 24px;
    }

    .help-text {
        font-size: 16px;
    }


    .help-numbers-list {
        display: flex;
        flex-direction: column;
        padding: 0;
    }

    .help-number-card {
        justify-content: center;
        gap: 20px;
    }

    .bottom-row {
        display: flex;
        flex-direction: column;
    }

    .help-number {
        font-size: 20px;
    }

    .help-number-discription {
        font-size: 16px;
    }

    .help-number {
        color: white !important;
        -webkit-tap-highlight-color: transparent;
    }

    /* Для всех номеров телефонов в секции помощи */
    .help-number-card a {
        color: white !important;
        text-decoration: none !important;
    }

    /* Убираем синее подчеркивание у кнопок в FAQ */
    .faq-question:focus,
    .faq-question:active {
        color: inherit !important;
    }

    /* Дополнительная защита для Safari */
    @supports (-webkit-touch-callout: none) {
        .help-number,
        .faq-question,
        .review-read-more-btn {
            -webkit-tap-highlight-color: transparent;
            -webkit-user-select: none;
            user-select: none;
        }


    }


}

@media (max-width: 570px) {
    /* Адаптация кнопок для очень маленьких экранов */
    .choose-toggle {
        width: 100%; /* Кнопки занимают всю доступную ширину */
        padding: 0;
    }

    .choose-toggle-btn {
        font-size: 10px; /* Еще меньше размер шрифта */
        padding: 10px 10px; /* Минимальные отступы */
        min-height: 45px; /* Уменьшаем высоту */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1; /* Кнопки равномерно распределяются */
        max-width: 50%; /* Максимум 50% ширины для каждой кнопки */
    }

    .how-to-choose-content {
        width: 100%;
        padding: 0 10px; /* Добавляем отступы по бокам */
    }
}

@media (max-width: 460px) {
    /* FAQ topic buttons для экранов 460px и меньше */
    .faq-topics {
        gap: 8px;
        padding: 0 5px;
    }

    .faq-topic {
        width: 100%;
        max-width: none;
        height: 160px;
        padding: 30px 20px;
        flex: 1;
        min-width: 0;
    }

    .faq-question {
        font-size: 16px;
    }

    .faq-topic-icon {
        width: 60px;
        height: 60px;
    }

    .faq-topic-label {
        font-size: 14px;
    }

    .faq-topic img {
        width: 50px;
        height: 50px;
    }

    .heart {
        position: absolute;
        top: 10px;
        right: 45px;
        width: 20px;
        height: 20px;
        cursor: pointer;
    }

    .specialist-card {
        flex: 0 0 90%;
        min-width: 260px;
    }
}

@media (max-width: 390px) {
    .review-avatar-img {
        width: 64px;
        height: 64px;
    }

    .review-card-header {
        gap: 10px;
    }

    .review-avatar-rating {
        width: 12px;
        height: 12px;
    }

    .faq-topic-icon {
        width: 50px;
        height: 50px;
    }

    .faq-topic.active {
        border-radius: 20px;
    }

    .faq-question {
        font-size: 13px;
    }


    .faq-answer-inner p {
        font-size: 12px;
    }

    /* Дополнительная адаптация для экранов меньше 390px */
    .choose-toggle-btn {
        font-size: 10px; /* Еще меньше для очень маленьких экранов */
        padding: 8px 2px; /* Минимальные отступы */
        min-height: 40px;
    }

    /* FAQ topic buttons для экранов меньше 390px */
    .faq-topics {
        gap: 5px;
        padding: 0 2px;
    }

    .faq-topic {
        height: 140px;
        padding: 20px 15px;
    }

    .faq-topic-label {
        font-size: 12px;
    }
}
