/* ==========================================================================
   САЙТ КЛИНИКИ "ПСИХИАТР ОНЛАЙН" | ТАБЛИЦА СТИЛЕЙ
   
   ОГЛАВЛЕНИЕ:
   01. Переменные и базовые настройки
   02. Глобальные элементы (Анимации, Фоны)
   03. Типографика
   04. UI Компоненты (Кнопки, Бейджи, Инпуты)
   05. Шапка сайта (Header)
   06. Главный экран (Hero)
   07. Секции: С чем помогаем (Bento)
   08. Секции: Как получить рецепт (Steps)
   09. Секции: Наши врачи (Team)
   10. Секции: О нас и принципы (Tabs)
   11. Секции: Выбор специалиста (Accordion)
   12. Секции: Цены (Pricing)
   13. Секции: Форматы связи и Отзывы
   14. Секции: Клинический тест (App)
   15. Секции: Частые вопросы (FAQ)
   16. Подвал (Footer)
   17. Всплывающие окна (Modal)
   18. Чат-бот виджет (Leadbot)
========================================================================== */

/* =========================================
   01. ПЕРЕМЕННЫЕ И БАЗОВЫЕ НАСТРОЙКИ
========================================= */
:root {
    /* Цветовая палитра */
    --bg-light: #F8FAFC; 
    --primary-color: #0284C7; 
    --primary-hover: #0369A1;
    --secondary-color: #0D9488; 
    --text-dark: #0F172A;
    --text-muted: #475569; /* Сделал цвет описаний чуть плотнее */
    
    /* Эффекты карточек */
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.6);
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.03);
    --shadow-hover: 0 15px 40px rgba(2, 132, 199, 0.08);
}

html, body {
    overflow-x: clip; /* Жестко обрезаем горизонтальный скролл на всех устройствах */
    max-width: 100%; /* Запрещаем расширяться больше ширины экрана */
}

html {
    scroll-behavior: smooth;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Nunito', sans-serif; /* Или Manrope, какой ты выбрал */
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    position: relative;
    font-weight: 400;
    width: 100%; /* Дополнительная страховка от расползания */
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* =========================================
   02. ГЛОБАЛЬНЫЕ ЭЛЕМЕНТЫ
========================================= */
/* Декоративные пятна на фоне */
.bg-blob {
    position: absolute; filter: blur(80px); z-index: -1; opacity: 0.4; border-radius: 50%;
}
.blob-1 { width: 400px; height: 400px; background: #bae6fd; top: -100px; left: -100px; }
.blob-2 { width: 500px; height: 500px; background: #ccfbf1; top: 40%; right: -200px; }

/* Анимация появления при скролле */
.fade-in {
    opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
    opacity: 1; transform: translateY(0);
}

/* =========================================
   03. ТИПОГРАФИКА
========================================= */
h1, h2, h3, h4, h5, .logo {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
}

/* Глобальные стили для заголовков секций */
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 38px; margin-bottom: 15px; }
.section-header p { 
    font-size: 18px; 
    color: var(--text-muted); 
    max-width: 600px; 
    margin: 0 auto; 
    font-weight: 500; /* Плотный текст описания секций */
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* =========================================
   04. UI КОМПОНЕНТЫ
========================================= */
/* Кнопки */
.btn-primary {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff; padding: 16px 32px; border: none; border-radius: 100px;
    font-size: 16px; font-weight: 500; cursor: pointer;
    transition: all 0.3s ease; box-shadow: 0 10px 20px rgba(2, 132, 199, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 25px rgba(2, 132, 199, 0.3); }

.btn-outline {
    font-family: 'Nunito', sans-serif;
    background: transparent; color: var(--primary-color);
    border: 2px solid var(--primary-color); padding: 10px 24px; border-radius: 100px;
    font-weight: 600; cursor: pointer; transition: 0.3s;
}
.btn-outline:hover { background: var(--primary-color); color: #fff; }

.btn-text { 
    color: var(--text-dark); text-decoration: none; font-weight: 600; font-size: 16px; transition: 0.3s; 
}
.btn-text:hover { color: var(--primary-color); }

/* Бейджи */
.badge { 
    background: #E0F2FE; color: var(--primary-color); 
    padding: 6px 14px; border-radius: 30px; font-size: 13px; font-weight: 600; 
}

/* ================= 05. ШАПКА САЙТА (HEADER) ================= */
.header { position: sticky; top: 0; z-index: 100; background: rgba(248, 250, 252, 0.85); backdrop-filter: blur(16px); border-bottom: 1px solid var(--glass-border); }
.header-container { display: flex; justify-content: space-between; align-items: center; height: 80px; gap: 20px; }
.logo { font-size: 24px; letter-spacing: -0.5px; font-weight: 700; }
.logo span { color: var(--primary-color); }

/* Контакты в шапке */
.header-contacts { display: flex; align-items: center; gap: 24px; }
.phone { font-family: 'Nunito', sans-serif; font-weight: 600; color: var(--text-dark); text-decoration: none; font-size: 16px; transition: 0.3s; }
.phone:hover { color: var(--primary-color); }

/* ================= АДАПТИВНОСТЬ ================= */
.mobile-only { display: none; }
@media (max-width: 1024px) { .desktop-only { display: none !important; } .mobile-only { display: flex; } }

/* ================= КНОПКА БУРГЕРА ================= */
.burger-menu { display: flex; flex-direction: column; justify-content: space-between; width: 32px; height: 22px; background: transparent; border: none; cursor: pointer; z-index: 101; padding: 0; transition: transform 0.3s ease; }
.burger-menu span { display: block; width: 100%; height: 2px; background-color: var(--text-dark, #333); border-radius: 2px; transition: 0.3s; }
.burger-menu:hover span { background-color: var(--primary-color); }
.burger-menu:hover { transform: scale(1.05); }

/* ================= МЕГА-МЕНЮ ================= */
.mega-menu { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s ease, visibility 0.4s ease; background-color: #f3f4f6; }
.mega-menu.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.mega-menu__wrapper { width: 100%; height: 100vh; padding: 20px; display: flex; flex-direction: column; }
.mega-menu__inner { background-color: #ffffff; border-radius: 30px; flex-grow: 1; overflow-y: auto; padding: 40px; display: flex; flex-direction: column; transform: translateY(20px) scale(0.98); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.mega-menu.is-active .mega-menu__inner { transform: translateY(0) scale(1); }
.mega-menu__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 50px; }
.logo--dark { color: var(--text-dark, #333); }
.mega-menu__close { width: 48px; height: 48px; border-radius: 50%; background-color: var(--primary-color, #8b5cf6); color: white; border: none; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: transform 0.3s ease; }
.mega-menu__close:hover { transform: scale(1.1) rotate(90deg); }
.mega-menu__close svg { width: 24px; height: 24px; }
.mega-menu__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; flex-grow: 1; }
.mega-menu__col--main { display: flex; flex-direction: column; }
.mega-menu__title { font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.2; margin-bottom: 30px; font-weight: 700; }
.highlight-primary { color: var(--primary-color, #8b5cf6); }
.mega-menu__contacts { margin-top: auto; color: #666; font-family: 'Nunito', sans-serif; }
.mega-phone { display: block; font-size: 1.5rem; font-weight: 700; color: var(--primary-color, #8b5cf6); text-decoration: none; }
.mega-menu__subtitle { font-size: 1.25rem; margin-bottom: 20px; font-weight: 700; }
.mega-menu__list { list-style: none; padding: 0; margin: 0; }
.mega-menu__list li { margin-bottom: 12px; }
.mega-menu__list a { color: #666; font-size: 1rem; text-decoration: none; transition: color 0.3s; font-family: 'Nunito', sans-serif; }
.mega-menu__list a:hover { color: var(--primary-color, #8b5cf6); }
.mega-menu__big-links { display: flex; flex-direction: column; gap: 20px; }
.mega-menu__big-links a { font-size: 1.5rem; font-weight: 700; text-decoration: none; color: var(--text-dark, #333); transition: color 0.3s; }
.mega-menu__big-links a:hover { color: var(--primary-color, #8b5cf6); }

/* Адаптив внутри самого мега-меню */
@media (max-width: 768px) { .mega-menu__grid { grid-template-columns: 1fr; gap: 40px; } .mega-menu__inner { padding: 30px 20px; } .mega-menu__contacts { margin-top: 30px; } }

/* =========================================
   06. ГЛАВНЫЙ ЭКРАН (HERO)
========================================= */
.hero { padding: 80px 0 120px 0; position: relative; }
.hero-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.hero-subtitle {
    display: inline-block; background: #E0F2FE; color: var(--primary-color);
    padding: 8px 16px; border-radius: 30px; font-size: 14px; font-weight: 600; margin-bottom: 24px;
}
.hero-text h1 { font-size: 52px; line-height: 1.1; margin-bottom: 24px; }
.hero-text p { font-size: 18px; color: var(--text-muted); margin-bottom: 40px; font-weight: 400; line-height: 1.7; }
.hero-buttons { display: flex; align-items: center; gap: 24px; margin-bottom: 40px; }
.hero-trust { display: flex; gap: 20px; font-size: 14px; color: var(--text-muted); font-weight: 500; }

.hero-image-block { position: relative; text-align: right; }
.hero-img {
    width: 100%; max-width: 500px; aspect-ratio: 1 / 1; object-fit: cover;
    border-radius: 32px; box-shadow: 0 25px 50px rgba(0,0,0,0.1); 
}

.floating-badge {
    position: absolute; bottom: 30px; left: -20px;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    padding: 16px 24px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px;
}
.pulse-dot { width: 12px; height: 12px; background: #10B981; border-radius: 50%; animation: pulse 2s infinite; }

/* =========================================
   07. СЕКЦИЯ: BENTO GRID (Симптомы)
========================================= */
.bento-section { padding: 100px 0; position: relative; }
.bento-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.bento-card {
    background: var(--card-bg); backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border); border-radius: 32px;
    padding: 40px; box-shadow: var(--shadow-soft);
    transition: transform 0.4s ease, background 0.4s ease;
}
.bento-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.9); }
.bento-icon { font-size: 32px; margin-bottom: 20px; }
.bento-card h3 { font-size: 24px; margin-bottom: 12px; color: var(--primary-color); }
.bento-card p { color: var(--text-muted); font-weight: 400; font-size: 15px; }

/* =========================================
   08. СЕКЦИЯ: КАК ПОЛУЧИТЬ РЕЦЕПТ
========================================= */
.recipe-section { padding: 100px 0; background: #fff; }
.recipe-section .steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.recipe-section .step-card {
    background: var(--bg-light); padding: 40px 30px;
    border-radius: 32px; border: 1px solid var(--glass-border); transition: 0.3s ease;
}
.recipe-section .step-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(2, 132, 199, 0.05); }
.recipe-section .step-num {
    font-family: 'Rubik', sans-serif; font-size: 48px; font-weight: 700;
    color: #bae6fd; margin-bottom: 15px; line-height: 1;
}
.recipe-section .step-card h4 { font-size: 20px; margin-bottom: 12px; }
.recipe-section .step-card p { color: var(--text-muted); font-size: 15px; font-weight: 500; }

/* =========================================
   09. СЕКЦИЯ: НАШИ ВРАЧИ (TEAM)
========================================= */
.team-section { padding: 100px 0; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; }

.team-card {
    background: #fff; border-radius: 32px; overflow: hidden;
    box-shadow: var(--shadow-soft); transition: 0.3s; border: 1px solid var(--glass-border);
}
.team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.team-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.team-info { padding: 30px; }
.team-info h3 { font-size: 24px; margin-bottom: 12px; }
.team-tags { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.team-tags .tag { background: #F1F5F9; color: var(--text-muted); padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 500; }
.team-info p { color: var(--text-muted); font-size: 15px; font-weight: 500; margin-bottom: 24px; }
.team-info button { width: 100%; }

/* =========================================
   10. СЕКЦИЯ: О НАС И ПРИНЦИПЫ (TABS)
========================================= */
.about-tabs-section { padding: 100px 0; }
.tabs-wrapper {
    background: #fff; border: 1px solid var(--glass-border);
    border-radius: 32px; padding: 50px; box-shadow: 0 15px 40px rgba(0,0,0,0.02);
}

.tabs-nav { display: flex; justify-content: center; gap: 16px; margin-bottom: 50px; flex-wrap: wrap; }
.tab-btn {
    background: var(--bg-light); color: var(--text-muted);
    border: 2px solid transparent; padding: 14px 32px; border-radius: 100px;
    font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 500; cursor: pointer; transition: 0.3s ease;
}
.tab-btn:hover { color: var(--primary-color); background: rgba(2, 132, 199, 0.05); }
.tab-btn.active {
    background: #fff; color: var(--primary-color); border-color: var(--primary-color); box-shadow: 0 4px 15px rgba(2, 132, 199, 0.1);
}

.tabs-content { position: relative; }
.tab-pane { display: none; animation: fadeInTab 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; }
.tab-pane.active { display: block; }
@keyframes fadeInTab { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.tab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.tab-text h3 { font-size: 32px; margin-bottom: 24px; }
.tab-text p { font-size: 16px; color: var(--text-muted); font-weight: 500; margin-bottom: 20px; line-height: 1.8; }
.tab-text p strong { color: var(--primary-color); font-weight: 600; }
.tab-list { list-style: none; margin-top: 30px; }
.tab-list li { font-size: 16px; margin-bottom: 14px; font-weight: 500; }

.tab-img-wrapper { text-align: right; }
.tab-img { width: 100%; max-width: 480px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 32px; box-shadow: 0 20px 40px rgba(0,0,0,0.08); }

.advantages-mini { margin-top: 30px; display: flex; flex-direction: column; gap: 20px; }
.adv-mini-item {
    display: flex; align-items: flex-start; gap: 20px;
    background: var(--bg-light); padding: 24px; border-radius: 20px; border: 1px solid var(--glass-border);
}
.adv-mini-icon { font-size: 36px; line-height: 1; }
.adv-mini-item strong { display: block; font-size: 18px; margin-bottom: 6px; font-family: 'Rubik', sans-serif; }
.adv-mini-item span { font-size: 14px; color: var(--text-muted); line-height: 1.5; font-weight: 400; }

/* =========================================
   11. СЕКЦИЯ: ВЫБОР СПЕЦИАЛИСТА (ACCORDION)
========================================= */
.specialization-section { padding: 100px 0; background: #fff; }
.spec-accordion { display: flex; gap: 20px; height: 480px; width: 100%; }

.spec-card {
    flex: 1; background: var(--bg-light); border: 1px solid var(--glass-border);
    border-radius: 32px; overflow: hidden; position: relative; cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.4s ease; box-shadow: var(--shadow-soft);
}
.spec-card.active {
    flex: 3.5; background: linear-gradient(135deg, rgba(2, 132, 199, 0.05), rgba(13, 148, 136, 0.05));
    border-color: rgba(2, 132, 199, 0.2);
}

.spec-icon {
    position: absolute; top: 30px; width: 70px; height: 70px; background: #fff;
    display: flex; align-items: center; justify-content: center; border-radius: 20px;
    font-size: 35px; box-shadow: 0 10px 20px rgba(0,0,0,0.05); z-index: 5; transition: all 0.5s ease;
}
.spec-card:not(.active) .spec-icon { left: 50%; transform: translateX(-50%); }
.spec-card.active .spec-icon { left: 30px; transform: translateX(0) scale(1.05); }

.spec-title-vertical {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%) rotate(180deg);
    writing-mode: vertical-rl; font-family: 'Rubik', sans-serif; font-size: 24px; font-weight: 700;
    color: var(--text-muted); white-space: nowrap; transition: opacity 0.3s ease; pointer-events: none;
}
.spec-card.active .spec-title-vertical { opacity: 0; }

.spec-content {
    position: absolute; top: 30px; left: 130px; width: 450px;
    opacity: 0; visibility: hidden; transform: translateX(20px); transition: all 0.4s ease; z-index: 2;
}
.spec-card.active .spec-content { opacity: 1; visibility: visible; transform: translateX(0); transition-delay: 0.2s; }

.spec-content h3 { font-size: 32px; margin-bottom: 15px; }
.spec-details p { font-size: 15px; color: var(--text-muted); margin-bottom: 15px; font-weight: 500; }
.spec-details ul { list-style: none; margin-bottom: 25px; }
.spec-details li { font-size: 14px; margin-bottom: 10px; font-weight: 500; }

/* =========================================
   12. СЕКЦИЯ: ЦЕНЫ (PRICING)
========================================= */
.pricing-section { padding: 100px 0; background: var(--bg-light); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; align-items: center; }

.pricing-card {
    background: #fff; border-radius: 24px; padding: 40px 30px; text-align: center;
    border: 1px solid var(--glass-border); box-shadow: var(--shadow-soft); position: relative; transition: 0.3s;
}
.pricing-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.pricing-card.popular {
    background: linear-gradient(to bottom, #ffffff, #f0f9ff);
    border: 2px solid var(--primary-color); padding: 50px 30px; box-shadow: 0 20px 40px rgba(14, 165, 233, 0.15); z-index: 2;
}

.pricing-card h3 { font-size: 24px; margin-bottom: 8px; }
.pricing-desc { font-size: 14px; color: var(--text-muted); font-weight: 500; margin-bottom: 24px; min-height: 42px; }

.price { font-family: 'Rubik', sans-serif; font-size: 36px; font-weight: 700; color: var(--primary-color); margin-bottom: 24px; line-height: 1; }
.price-old { font-size: 16px; color: #94a3b8; text-decoration: line-through; margin-bottom: 5px; }

.badge-popular, .badge-discount {
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    color: #fff; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.badge-popular { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); }
.badge-discount { background: #f59e0b; }

.pricing-features { list-style: none; margin-bottom: 30px; text-align: left; }
.pricing-features li { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.pricing-card button { width: 100%; }

/* =========================================
   13. ФОРМАТЫ СВЯЗИ И ОТЗЫВЫ
========================================= */
.formats-section { padding: 100px 0 50px 0; background: #fff; }
.formats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.format-card {
    background: var(--bg-light); padding: 40px 30px; border-radius: 24px;
    border: 1px solid var(--glass-border); text-align: center; transition: 0.3s ease;
}
.format-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); }
.format-icon { font-size: 48px; margin-bottom: 20px; line-height: 1; }
.format-card h3 { font-size: 20px; margin-bottom: 12px; }
.format-card p { font-size: 15px; color: var(--text-muted); font-weight: 500; }

.reviews-section { padding: 50px 0 100px 0; background: #fff; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.review-card {
    background: #fff; padding: 40px 30px; border-radius: 24px; border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft); display: flex; flex-direction: column; justify-content: space-between;
}
.review-stars { color: #F59E0B; font-size: 20px; margin-bottom: 15px; letter-spacing: 2px; }
.review-text { font-size: 15px; color: var(--text-muted); font-style: italic; font-weight: 500; margin-bottom: 24px; flex-grow: 1; }
.review-author { font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 16px; border-top: 1px solid #E2E8F0; padding-top: 15px; }
.review-author span { display: block; font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 500; color: var(--primary-color); margin-top: 4px; }

/* =========================================
   14. КЛИНИЧЕСКИЙ ТЕСТ (ПРИЛОЖЕНИЕ)
========================================= */
.inline-test-section { padding: 100px 0; background: #F0F9FF; }
.test-split-wrapper { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: center; }

.test-text-content .badge { display: inline-block; margin-bottom: 20px; }
.test-text-content h2 { font-size: 40px; line-height: 1.2; margin-bottom: 20px; }
.test-text-content p { font-size: 16px; color: var(--text-muted); font-weight: 600; margin-bottom: 40px; line-height: 1.6; }

.test-benefits-list { list-style: none; display: flex; flex-direction: column; gap: 24px; }
.test-benefits-list li { display: flex; align-items: flex-start; gap: 16px; }
.benefit-icon-box {
    width: 48px; height: 48px; background: #fff; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); flex-shrink: 0;
}
.benefit-text strong { display: block; font-size: 16px; margin-bottom: 4px; font-weight: 700; }
.benefit-text span { font-size: 14px; color: var(--text-muted); font-weight: 600; }

.test-app-card {
    background: #ffffff; border-radius: 32px; padding: 50px;
    box-shadow: 0 25px 50px rgba(2, 132, 199, 0.15); border: 1px solid rgba(2, 132, 199, 0.1);
    position: relative; min-height: 480px; display: flex; flex-direction: column; justify-content: center;
}

.test-header { margin-bottom: 30px; }
.test-step { font-size: 14px; color: var(--text-muted); font-weight: 600; display: block; margin-bottom: 12px; }
.test-progress { width: 100%; height: 8px; background: #F1F5F9; border-radius: 10px; overflow: hidden; }
.test-progress-bar { height: 100%; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); width: 0%; transition: width 0.4s ease; }
.test-q-title { font-size: 24px; line-height: 1.4; margin-bottom: 30px; }

.test-options { display: flex; flex-direction: column; gap: 12px; }
.test-option-btn {
    background: #fff; border: 2px solid #E2E8F0; padding: 16px 24px; border-radius: 16px;
    font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 600; color: var(--text-dark);
    text-align: left; cursor: pointer; transition: all 0.2s ease;
}
.test-option-btn:hover { background: #F0F9FF; border-color: var(--primary-color); transform: translateY(-2px); }

.test-choice-btn { display: flex; align-items: center; gap: 16px; padding: 20px 24px; }
.choice-icon { font-size: 32px; line-height: 1; }
.choice-text strong { display: block; font-size: 16px; margin-bottom: 4px; font-weight: 600;}
.choice-text span { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.test-result-header { text-align: center; margin-bottom: 30px; }
.test-result-header h3 { font-size: 32px; margin-bottom: 15px; }
.test-r-desc { font-size: 16px; font-weight: 500; line-height: 1.6; }
.test-disclaimer {
    background: #FEF2F2; border-left: 4px solid #EF4444; padding: 16px 20px;
    border-radius: 0 12px 12px 0; font-size: 13px; color: #991B1B; margin-bottom: 30px; line-height: 1.5; font-weight: 500;
}
.test-lead-form { background: #F8FAFC; padding: 24px; border-radius: 20px; border: 1px solid var(--glass-border); }
.test-lead-form p { font-size: 14px; color: var(--text-muted); font-weight: 400; margin-bottom: 20px; text-align: center; }

/* =========================================
   15. ЧАСТЫЕ ВОПРОСЫ (FAQ)
========================================= */
.faq-section { padding: 100px 0; background: var(--bg-light); }
.faq-container { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

.faq-item {
    background: #fff; border-radius: 20px; border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02); overflow: hidden; transition: 0.3s ease;
}
.faq-item.active { border-color: rgba(2, 132, 199, 0.3); box-shadow: 0 10px 25px rgba(2, 132, 199, 0.08); }

.faq-question {
    width: 100%; text-align: left; padding: 24px 30px; font-size: 18px;
    font-family: 'Nunito', sans-serif; font-weight: 600; background: transparent;
    border: none; color: var(--text-dark); cursor: pointer; display: flex;
    justify-content: space-between; align-items: center; transition: color 0.3s;
}
.faq-question:hover { color: var(--primary-color); }
.faq-icon { font-size: 28px; font-weight: 300; color: var(--primary-color); transition: transform 0.4s ease; line-height: 1; }
.faq-item.active .faq-icon { transform: rotate(45deg); color: #ef4444; }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; background: #fff; }
.faq-answer p { padding: 0 30px 24px 30px; color: var(--text-muted); font-size: 15px; font-weight: 400; margin: 0; }

/* =========================================
   16. ПОДВАЛ (FOOTER)
========================================= */
.footer { background: #0f172a; color: #f8fafc; padding: 80px 0 40px 0; border-top-left-radius: 40px; border-top-right-radius: 40px; }
.footer-cta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 30px; margin-bottom: 40px; }
.cta-text h2 { font-size: 32px; margin-bottom: 10px; color: #fff; }
.cta-text p { color: #94a3b8; font-size: 16px; font-weight: 400; }
.highlight-text { color: var(--secondary-color); font-weight: 600; }
.cta-buttons { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.btn-call-animated {
    font-family: 'Nunito', sans-serif; background: #10b981; color: #fff; padding: 16px 28px; 
    text-decoration: none; border-radius: 100px; font-weight: 600; display: flex; align-items: center; gap: 10px; 
    transition: all 0.3s ease; animation: pulse-green 2s infinite;
}
.btn-call-animated:hover { background: #059669; transform: translateY(-2px); }

.footer-divider { border: none; height: 1px; background: rgba(255, 255, 255, 0.08); margin: 40px 0; }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 40px; }
.logo-light { color: #fff; margin-bottom: 16px; }
.logo-light span { color: var(--secondary-color); }
.brand-desc { color: #94a3b8; font-size: 14px; max-width: 320px; font-weight: 400; }

.footer-nav h4, .footer-contacts-list h4 { color: #fff; font-size: 18px; margin-bottom: 24px; }
.footer-nav ul, .footer-contacts-list ul { list-style: none; }
.footer-nav li, .footer-contacts-list li { margin-bottom: 12px; }
.footer-nav a { color: #cbd5e1; text-decoration: none; transition: 0.3s; font-size: 15px; font-weight: 400; }
.footer-nav a:hover { color: var(--primary-color); }
.footer-phone-link { color: #fff !important; font-size: 20px; font-weight: 600; text-decoration: none; }
.footer-contacts-list li { color: #cbd5e1; font-size: 14px; font-weight: 400; }

.footer-legal { display: flex; flex-direction: column; gap: 24px; padding-top: 20px; }
.legal-text { font-size: 12px; color: #64748b; line-height: 1.6; font-weight: 400; }
.legal-text p { margin-bottom: 10px; }
.warning-text { border: 1px solid #334155; padding: 16px; text-align: center; font-family: 'Rubik', sans-serif; font-weight: 500; letter-spacing: 1px; color: #94a3b8; margin-top: 20px; border-radius: 12px; font-size: 14px; }
.copyright { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #64748b; flex-wrap: wrap; gap: 15px; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 20px; }
.privacy-link { color: #64748b; text-decoration: underline; transition: 0.3s; font-weight: 400; }
.privacy-link:hover { color: #fff; }

/* =========================================
   17. ВСПЛЫВАЮЩИЕ ОКНА И ФОРМЫ (MODAL)
========================================= */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(8px); z-index: 1000;
}
.modal-content {
    background: #fff; max-width: 420px; margin: 10vh auto; padding: 40px;
    border-radius: 32px; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}
.close { position: absolute; top: 20px; right: 25px; font-size: 32px; color: var(--text-muted); cursor: pointer; line-height: 1; }
.modal-content h3 { font-size: 24px; margin-bottom: 10px; }
.modal-content p { color: var(--text-muted); margin-bottom: 24px; font-size: 14px; font-weight: 400; }

form input {
    width: 100%; padding: 16px 20px; margin-bottom: 16px;
    border: 1px solid #e2e8f0; border-radius: 16px;
    font-family: 'Nunito', sans-serif; font-weight: 500; font-size: 15px;
    background: #f8fafc; outline: none; transition: 0.3s;
}
form input:focus { border-color: var(--primary-color); }
form button { width: 100%; }

/* =========================================
   18. ЧАТ-БОТ ВИДЖЕТ
========================================= */
.chat-widget { position: fixed; bottom: 30px; right: 30px; z-index: 999; display: flex; flex-direction: column; align-items: flex-end; }
.fab-main {
    width: 65px; height: 65px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white; font-size: 30px; border: none; cursor: pointer; box-shadow: 0 10px 25px rgba(2, 132, 199, 0.4); transition: transform 0.3s; display: flex; align-items: center; justify-content: center;
}
.fab-main:hover { transform: scale(1.1); }

.chat-window {
    width: 340px; height: 450px; background: #fff; border-radius: 24px; box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    margin-bottom: 20px; display: flex; flex-direction: column; overflow: hidden; opacity: 0; visibility: hidden;
    transform: translateY(20px) scale(0.95); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 1px solid var(--glass-border);
}
.chat-widget.open .chat-window { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.chat-header { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); padding: 16px 20px; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.chat-title { font-family: 'Rubik', sans-serif; font-weight: 500; display: block; font-size: 16px; }
.chat-status { font-size: 12px; display: flex; align-items: center; gap: 6px; opacity: 0.9; }
.pulse-dot-small { width: 8px; height: 8px; background: #4ADE80; border-radius: 50%; animation: pulse 2s infinite; }
.chat-close { background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; line-height: 1; opacity: 0.8; transition: opacity 0.3s; }
.chat-close:hover { opacity: 1; }

.chat-body { flex: 1; padding: 20px; overflow-y: auto; background: #F8FAFC; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 85%; padding: 12px 16px; border-radius: 16px; font-size: 14px; font-weight: 400; line-height: 1.5; word-wrap: break-word; animation: fadeInMsg 0.3s ease; }
@keyframes fadeInMsg { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.bot-msg { background: #fff; color: var(--text-dark); align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); border: 1px solid rgba(0,0,0,0.05); }
.user-msg { background: var(--primary-color); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; box-shadow: 0 2px 10px rgba(2, 132, 199, 0.2); }
.typing-indicator { font-style: italic; color: var(--text-muted); font-size: 13px; align-self: flex-start; margin-left: 10px; display: none; font-weight: 400;}

.chat-footer { padding: 12px; background: #fff; border-top: 1px solid #E2E8F0; display: flex; gap: 10px; }
#chatInput { font-family: 'Nunito', sans-serif; font-weight: 400; flex: 1; border: none !important; background: #F1F5F9 !important; padding: 12px 16px !important; border-radius: 100px !important; margin: 0 !important; font-size: 14px; }
.chat-send { background: var(--primary-color); color: #fff; border: none; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: 0.3s; }
.chat-send:hover { background: var(--secondary-color); transform: scale(1.05); }

/* =========================================
   19. МЕДИА-ЗАПРОСЫ (АДАПТИВ)
========================================= */
@media (max-width: 992px) {
    .bento-grid, .pricing-grid, .team-grid, .formats-grid, .reviews-grid, .recipe-section .steps-grid { grid-template-columns: 1fr; }
    .hero-wrapper, .about-wrapper, .tab-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-buttons, .hero-trust { justify-content: center; }
    .hero-image-block, .tab-img-wrapper { text-align: center; margin-top: 20px; }
    .floating-badge { left: 50%; transform: translateX(-50%); bottom: 20px; }
    .pricing-grid { max-width: 400px; margin: 0 auto; }
    .pricing-card.popular { padding: 40px 30px; }
    .about-content p { text-align: left; }
    .footer-main { grid-template-columns: 1fr 1fr; }
    
    /* Адаптив Аккордеона (Врачи) */
    .spec-accordion { flex-direction: column; height: auto; }
    .spec-card { height: 100px; flex: none !important; transition: height 0.5s ease; }
    .spec-card.active { height: 480px; }
    .spec-icon { top: 15px !important; left: 20px !important; transform: none !important; }
    .spec-title-vertical { writing-mode: horizontal-tb; transform: none !important; bottom: auto; top: 35px; left: 110px; font-size: 20px; }
    .spec-content { left: 0; top: 100px; width: 100%; padding: 0 30px; }

    /* Адаптив Теста */
    .test-split-wrapper { grid-template-columns: 1fr; gap: 40px; }
    .test-text-content { text-align: center; }
    .test-benefits-list li { text-align: left; justify-content: center; }
    .test-app-card { padding: 30px 20px; min-height: auto; }
}

@media (max-width: 768px) {
    .header-contacts .badge, .header-contacts .btn-outline { display: none; }
    .hero { padding: 80px 0; }
    .hero-text h1 { font-size: 40px; }
    .bento-card { padding: 30px; border-radius: 24px; }
    .footer { padding: 60px 0; }
    .footer-cta { flex-direction: column; text-align: center; }
    .cta-buttons { justify-content: center; }
    .footer-main { grid-template-columns: 1fr; text-align: center; }
    .brand-desc { margin: 0 auto; }
    .copyright { flex-direction: column; text-align: center; }
    .warning-text { font-size: 10px; }
    
    /* FAQ и Тест адаптив */
    .faq-question { padding: 20px; font-size: 16px; }
    .faq-answer p { padding: 0 20px 20px 20px; }
}

@media (max-width: 480px) {
    .spec-card.active { height: 550px; }
    .chat-window { position: fixed; top: 0; left: 0; width: 100%; height: 100%; margin: 0; border-radius: 0; z-index: 1000; }
    .test-text-content h2 { font-size: 32px; }
    .test-q-title { font-size: 20px; }
    .test-option-btn { font-size: 14px; padding: 14px 16px; }
    .test-choice-btn { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ==========================================
   СТИЛИ ИНДИКАТОРА ПРОГРЕССА
   ========================================== */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px; /* Толщина полоски */
    background: transparent;
    z-index: 99999; /* Чтобы была поверх всего, даже меню */
}

.reading-progress-bar {
    height: 100%;
    background: var(--primary-blue); /* Цвет полоски */
    width: 0%;
    transition: width 0.1s ease-out; /* Плавность хода */
}