section,
header {
    min-width: 0;
}

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

   .header {
    background-color: var(--color-bg);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

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

.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); /* Возврат к нормальному */
}

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

/* ===================== */
/* БАЗА offcanvas меню   */
/* ===================== */

.logo-desktop {
    display: block;
}

.main {
    min-height: calc(100vh - 140px);
}

/* Hero */
.hero {
    background: #fff;
    color: #2c3e50;
    padding: 4rem 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;
}



/* Hero tabs */
.hero-tabs {
    display: flex;
    flex-direction: row;
    background: #9AC355;
    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;
    min-height: 200px;
    height: clamp(180px, 32vw, 270px);


}

.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: 8px;
    will-change: contents;
    overflow: visible; /* Важно: чтобы псевдоэлементы не обрезались */
  }

.tab-btn {
    font-weight: 300;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0;
    padding: 1rem 1.25rem;
    border: 0;
    border-radius: 15px 15px 0 0;
    background: #F1F2F5;
    color: black;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: none;
    flex: 1;
    height: 50px;
    white-space: nowrap;
}

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

/* Вогнутый угол справа для первой кнопки "Для себя" */
.client.active::after {
    content: "";
    position: absolute;
    bottom: 8px;
    right: -10px;
    height: 20px;
    width: 10px;
    background: transparent;
    border-bottom-left-radius: 20px;
    box-shadow: 0 10px 0 0 var(--color-primary);
    z-index: 1;
    pointer-events: none;
}

/* Вогнутые углы слева и справа для средней кнопки "Для пары" */
.couple.active::before {
    content: "";
    position: absolute;
    bottom: 8px;
    left: -10px;
    height: 25px;
    width: 10px;
    background: transparent;
    border-bottom-right-radius: 10px;
    box-shadow: 0 10px 0 0 var(--color-primary);
    z-index: 1;
    pointer-events: none;
}

.couple.active::after {
    content: "";
    position: absolute;
    bottom: 8px;
    right: -10px;
    height: 20px;
    width: 10px;
    background: transparent;
    border-bottom-left-radius: 20px;
    box-shadow: 0 10px 0 0 var(--color-primary);
    z-index: 1;
    pointer-events: none;
}

/* Вогнутый угол слева для последней кнопки "Для подростка" */
.teenager.active::before {
    content: "";
    position: absolute;
    bottom: 8px;
    left: -10px;
    height: 25px;
    width: 10px;
    background: transparent;
    border-bottom-right-radius: 20px;
    box-shadow: 0 10px 0 0 var(--color-primary);
    z-index: 1;
    pointer-events: none;
}


  


.tabs-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    background: transparent;
    border-radius: 16px;
    padding: 1.25rem 1rem 1.25rem;
    margin-top: 0;
    width: 100%;
}

.tabs-feature-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.tabs-feature {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.tabs-feature-content {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 5px;

}


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

.tabs-title {
    font-weight: 600;
    font-size: 24px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.tabs-sub {
    font-weight: 400;
    color: #000000;
}

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

.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-TABS
   ============================================ */

/* Планшеты (768px - 1024px) */
@media (max-width: 1280px) {
    .hero-tabs {
        max-width: 500px;
        width: min(500px, 95%);
    }
    
    .tabs-header {
        width: 95%;
    }
    
    .tab-btn {
        font-size: 14px;
        padding: 0.8rem 0.9rem;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    .hero-tabs {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
    }

    .tabs-feature {
        gap: 10px;
    }

    .tabs-feature-content {
        gap: 0px;
    }

    .tabs-feature img {
        width: 40px;
        height: 40px;
    }

    .tabs-header {
        gap: 8px;
        padding: 15px 0 0;
        justify-content: center;
        overflow: visible; /* Важно: чтобы псевдоэлементы не обрезались */
    }
    
    
    
    .tabs-panel {
        padding: 1rem 0.8rem 1rem;
    }
    
    .tabs-title {
        font-size: 18px;
    }
    
    .tabs-sub {
        font-size: 14px;
    }
    
    .hero-tabs .tabs-cta.btn {
        font-size: 18px;
        padding: 0.8rem 1rem;
        margin: 0.5rem 0 0;
        width: 100%;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .tabs-header {
        gap: 4px;
        padding: 12px 0 0;
        overflow: visible; /* Важно: чтобы псевдоэлементы не обрезались */
    }
    
    .tab-btn {
        font-size: 14px;
        padding: 0.6rem 0.5rem;
    }
    
    .tabs-panel {
        padding: 0.8rem 0.6rem 0.8rem;
    }
    
    .tabs-title {
        font-size: 16px;
        margin-bottom: 0.2rem;
    }
    
    .tabs-sub {
        font-size: 13px;
        margin-bottom: 0.7rem;
    }
    
    .hero-tabs .tabs-cta.btn {
        font-size: 16px;
        padding: 0.7rem 0.8rem;
    }
}

/* Экстремально маленькие экраны (до 360px) */
@media (max-width: 360px) {
    .tabs-header {
        gap: 2px;
        padding: 10px 0 0;
        overflow: visible; /* Важно: чтобы псевдоэлементы не обрезались */
    }
    
    .tab-btn {
        font-size: 12px;
        padding: 0.5rem 0.3rem;
        line-height: 1.1;
    }
    
    .tabs-panel {
        padding: 0.6rem 0.4rem 0.6rem;
    }
    
    .tabs-title {
        font-size: 14px;
        margin-bottom: 0.1rem;
    }
    
    .tabs-sub {
        font-size: 12px;
        margin-bottom: 0.5rem;
    }
    
    .hero-tabs .tabs-cta.btn {
        font-size: 14px;
        padding: 0.6rem 0.6rem;
    }
}



.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: 80%; height: auto; display: block; }

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

/* ============================================
   АДАПТИВНЫЕ СТИЛИ ДЛЯ HERO СЕКЦИИ
   ============================================ */

/* Планшеты */
@media (max-width: 1024px) {
    .hero-grid {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        padding-top: 40px;
    }
    
    .hero-left {
        flex: none;
        max-width: 100%;
    }
    
    .hero-img-frame {
        flex: none;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero-grid {
        gap: 20px;
        padding-top: 20px;
    }
    
    .hero-title {
        font-size: clamp(24px, 6vw, 40px);
        margin-bottom: 1.5rem;
    }
    
    .hero-title-secondary {
        font-size: clamp(22px, 5.5vw, 40px);
    }
    
    .eyebrow {
        font-size: clamp(14px, 3vw, 20px);
    }
    
    .hero-img-frame {
        max-width: 300px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero-grid {
        gap: 15px;
        padding-top: 15px;
    }
    
    .hero-title {
        font-size: clamp(20px, 8vw, 32px);
        margin-bottom: 1rem;
    }
    
    .hero-title-secondary {
        font-size: clamp(18px, 7vw, 30px);
    }
    
    .eyebrow {
        font-size: clamp(12px, 4vw, 16px);
    }
    
    .hero-img-frame {
        max-width: 250px;
    }
}



.psychologists-helpYou-section {
    background: #F1F2F5;
    padding: 40px 0;
}

.psychologists-helpYou-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}
.psychologists-helpYou-title {
    font-weight: 500;
    font-size: 48px;
    line-height: 100%;
}

.psychologists-helpYou-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.psychologists-helpYou-content-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.psychologists-helpYou-content-item-text {
    font-weight: 400;
    font-size: 24px;
    line-height: 100%;
    text-align: center;
}

.psychologists-helpYou-content-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 340px;
    min-width: 98px;
    height: 56px;
    min-height: 40px;
    max-height: 64px;
    border-radius: 10px;
    background-color: #9AC355;
    color: white;
    padding: 8px 16px;
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 auto;
    transition: background 0.2s;
}
.psychologists-helpYou-content-btn:hover, .our-services-content-btn:hover {
    background-color: #BEF574;
}

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

    .psychologists-helpYou-title {
        font-size: 34px;
    }

    .psychologists-helpYou-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .psychologists-helpYou-content-item-text {
        font-size: 20px;
    }


}



@media (max-width: 768px) {

    .psychologists-helpYou-title {
        font-size: 20px;
    }

    .psychologists-helpYou-content {
        grid-template-columns: repeat(1, 1fr);
    }

    .psychologists-helpYou-content-item-text {
        font-size: 14px;
    }

    .psychologists-helpYou-content-item img {
        width: 100%;
        height: auto;
    }
}


.our-services-section {
    background: #F1F2F5;
    padding: 40px 0;
}

.our-services-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.our-services-title {
    font-weight: 500;
    font-size: 48px;
    line-height: 100%;
    margin-bottom: 50px;
}

.our-services-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.our-services-content-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 340px;
    min-width: 98px;
    height: 56px;
    min-height: 40px;
    max-height: 64px;
    border-radius: 10px;
    background-color: #9AC355;
    color: white;
    padding: 8px 16px;
    font-size: 1.125rem;
    font-weight: 500;
    transition: background 0.2s;
    margin: 50px auto 0;
}


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

    .our-services-title {
        font-size: 34px;
    }

    .our-services-content {
        grid-template-columns: repeat(1, 1fr);
        justify-items: center;
    }
}


@media (max-width: 768px) {
    .our-services-title {
        font-size: 20px;
    }

    .our-services-content {
        grid-template-columns: repeat(1, 1fr);
        justify-items: center;
    }
}





.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: 100%;
    max-width: 340px;
    min-width: 98px;
    height: 56px;
    min-height: 40px;
    max-height: 64px;
    border-radius: 10px;
    border: none;
    background-color: #9AC355;
    color: white;
    font-size: 1.125rem;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;
    font-weight: 100;
    margin-top: 100px;
}

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




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

.how-to-choose-title {
    font-style: SemiBold;
    font-size: 48px;
    line-height: 100%;
    margin-bottom: 50px;
}

.how-to-choose-content{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}


/* Toggle buttons (Я определился / Помощь менеджера) */
.choose-toggle{
    display: flex;
    background: #F1F2F5;
    display: flex;
    justify-content: center;
    border-radius: 10px;
    padding: 6px;
    gap: 6px;
    width: 100%;
    pointer-events: auto !important;
    position: relative;
    z-index: 5;
}

.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 !important;
    transition: color .2s ease, background .2s ease, opacity .2s ease;
    white-space: nowrap;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

.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; /* Center horizontally */
    align-items: center; /* Center vertically */
    gap: 40px;
    width: 100%;
    height: 512px;
    border-radius: 20px;
    background-color: #9AC355;
}

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



.choose-select-btn {
    width: 100%;
    max-width: 340px;
    min-width: 98px;
    height: 56px;
    min-height: 40px;
    max-height: 64px;
    border-radius: 10px;
    border: none;
    background-color: #9AC355;
    color: white;
    padding: 16px 20px;
    font-weight: 500;
    font-size: 1.125rem;
    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,
.choose-select-btn:focus {
    background-color: #BEF574;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    outline: none;
}



.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 16px;
    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;
    border-color: #9AC355;
    color: #9AC355;
}


/* Базовые стили для кнопок специалистов (если нет) */
.specialist-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 для всей кнопки */
}

/* Базовые переходы для 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); /* Вся кнопка "давит" */
}



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

.heart {
    position: absolute;
    top: 10px;
    right: 10px;
    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-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;
}
.sp-ci-wrap {
    position: relative;
}

.specialist-card-image img {
    width: 240px;
    height: 240px;
    display: block;
    border-radius: 20px;
    object-fit: cover;
}

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

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

.specialist-card-name p:first-child {
    line-height: 1;
    margin-bottom: 5px;
}

.specialist-card-name p:last-child {
    line-height: 1;
    font-size: 16px;
    height: 48px;
}

.specialist-card-description {
    position: relative;
    top: -17px;
    background-color: white;
    border-radius: 0 0 20px 20px;
    padding: 15px;
    font-size: 14px;
    color: #333;
    border: 1px solid var(--color-primary);
    height: 120px;
}

.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: 0 10px;
    line-height: 1.3;
}

.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 */
}

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

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

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

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


.review-text {
    display: -webkit-box;            /* обязательное */
    -webkit-box-orient: vertical;    /* обязательное */
    -webkit-line-clamp: 6;           /* сколько строк показывать */
    line-clamp: 6;                   /* стандартное свойство для совместимости */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
    /* для плавности при разворачивании */
    transition: max-height 220ms ease;
  }
.reviews-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    overflow: hidden;
}



.review-button-block {
    display: flex;
    width: var(--block-width);
    height: var(--block-height);
    justify-content: center;
    align-items: center;
}

.reviews-choose-psychologist-btn {
    flex: 1; /* Ключевой фикс: кнопка растягивается на всю ширину блока */
    max-width: var(--button-max-width);
    min-width: var(--button-min-width);
    min-height: var(--button-height); /* Убрали height, чтобы не фиксировать */
    max-height: var(--block-height); /* Ограничиваем высотой блока */
    border-radius: var(--button-border-radius);
    padding: var(--button-padding);
    background-color: #9AC355;
    color: white;
    font-weight: 400;
    font-size: 1.125rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-sizing: border-box; /* Явно, чтобы padding не ломал ширину */
}

.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 браузерах */
.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;

}

.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-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 для всей кнопки */
}

/* Базовые переходы для 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); /* Вся кнопка "давит" */
}

/* Стили для disabled кнопок */
.reviews-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


.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 при желании */
  }
  




/* FAQ */
.faq-section {
    background-color: #F1F2F5;
}


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

.faq-top {
    background: #9AC355;
    height: 200px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    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: 20px;
}

.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 {
    margin-top: 40px;
    margin-bottom: 40px;
    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%;

}

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

.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: 28px;
    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;
}

/* ============================================
   АДАПТИВНЫЕ СТИЛИ ДЛЯ ПЛАНШЕТОВ (768px - 1280px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1280px) {
    /* Header адаптация для планшетов */
    .logo-desktop {
        display: none;
    }

    .hero-title--desktop { display: none; }
    .hero-title--tablet  { display: inline-block; /* или block — в зависимости от места */ }
  
    /* при необходимости подправь отступы/выравнивание */
    .hero-title-placeholder { text-align: center; margin-top: 15px;
        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;
        overflow: visible; /* Важно: чтобы псевдоэлементы не обрезались */
    }
  
    /* Центрируем табы по центру экрана */
    .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;
        margin: 0;
    }

    .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;
        overflow: visible; /* Важно: чтобы псевдоэлементы не обрезались */
    }

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

    /* Promo секция */
    .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;
    }

    /* How to choose секция */
    .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: 700px;
    }

    /* Specialists секция */
    .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;
      }

      .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; }

    /* Reviews секция */
    .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%;
    }

    /* FAQ секция */
    .faq-section {
        padding: 60px 30px;
    }

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

    /* Help секция */
    .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%;
      }
}

/* ============================================
   АДАПТИВНЫЕ СТИЛИ ДЛЯ МАЛЕНЬКИХ МОБИЛЬНЫХ (до 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;
    }
}

/* ============================================
   АДАПТИВНЫЕ СТИЛИ ДЛЯ СРЕДНИХ ПЛАНШЕТОВ (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;
    }
}

/* ============================================
   АДАПТИВНЫЕ СТИЛИ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ (до 767px)
   ============================================ */

@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-top: 0px;
        font-weight: 600;
        font-size: 40px;
        line-height: 100%;
        text-align: 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: 40px;
        margin-top: 40px;
        margin-bottom: 20px;
    }

    .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;
        overflow: visible; /* Важно: чтобы псевдоэлементы не обрезались */
    }
  
    /* Центрируем табы по центру экрана */
    .hero-tabs {
        display: flex;
        flex-direction: row;
        background: #9AC355;
        border-radius: 0 10px 10px 10px;
        max-width: 580px;
    }

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

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

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

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

    .eyebrow {
        font-weight: 400;
        font-size: 12px;
        line-height: 100%;
        text-align: center;
    }
  
    /* Заголовок табов/строка кнопок — центрируем их содержимое */
    .tabs-header {
        display: flex;
        gap: 10px;
        padding: 0;
        width: 100%;
        overflow: visible; /* Важно: чтобы псевдоэлементы не обрезались */
    }
  
    /* немного уменьшить размер и паддинги кнопок на планшете */
    .tab-btn {
        font-size: 14px;
        width: 100%;
        height: 50px;
        white-space: wrap;
    }



    .tabs-btn-block {
        display: flex;
    }
  
    /* CTA внутри табов — центрируем и уменьшаем отступ */
    .hero-tabs .tabs-cta.btn {
      margin: 1rem auto 0;
      font-size: 16px;
      white-space: nowrap; /* Запрещаем перенос текста на мобильных */
    }
  
    /* Убедимся, что заголовок геро и eyebrow выровнены по центру */
    .hero-left,
    .hero-title,
    .eyebrow,
    .hero-title-secondary {
      text-align: center;
    }



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


    /* БЛОК ПРОМО */
    .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: 340px;
        height: 56px;
        margin-top: 120px; /* Добавляем margin-top для отделения от описания */
    }

    /* БЛОК Как подобрать психолога  */
    .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-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;
    }

    .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-card {
        flex: 0 0 85%;
        min-width: 280px;
        max-width: 340px;
        box-sizing: border-box;
        scroll-snap-align: center;
    }


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

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

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

    .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;
    }

    .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-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: 14px;
   }



   .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;
    }
}

