/* ==========================================================================
   БАЗОВЫЕ СТИЛИ И КОНТЕЙНЕРЫ
   ========================================================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.container--narrow { max-width: 900px; }
body.single-uslugi { overflow-x: hidden; }

/* ==========================================================================
   HERO SECTION (Первый экран)
   ========================================================================== */
.service-hero {
    padding: 40px 0 60px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: #7f8c8d;
    flex-wrap: wrap;
}

.breadcrumbs a { color: #7f8c8d; text-decoration: none; transition: color 0.3s; }
.breadcrumbs a:hover { color: #019934; }
.breadcrumbs__separator { opacity: 0.5; }
.breadcrumbs__current { color: #2c3e50; font-weight: 500; }

/* Сетка Hero */
.service-hero__main {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.service-hero__text { max-width: 100%; }
.service-hero__title { margin-bottom: 30px; }

.service-hero__title-main {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
    margin-bottom: 10px;
}

.service-hero__title-subtitle {
    display: block;
    font-size: 1.3rem;
    color: #019934;
    font-weight: 500;
    line-height: 1.4;
}

/* Выгоды */
.landing-benefits {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.landing-benefits__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1.05rem;
    color: #2c3e50;
}

.landing-benefits__item svg {
    width: 22px;
    height: 22px;
    fill: #019934;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Чипы */
.landing-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 25px; }
.landing-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e1e8e4;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.landing-chip svg { width: 16px; height: 16px; fill: #019934; }
.landing-chip--price { background: #019934; border-color: #019934; color: #fff; }
.landing-chip--price svg { fill: #fff; }

.service-hero__phone-wrap {
    font-size: 1.05rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.service-hero__phone-link {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}
.service-hero__phone-link:hover { color: #019934; }

/* ==========================================================================
   ФОРМЫ (Исправлен двойной фон)
   ========================================================================== */
/* Обертка формы в Hero */
.service-hero__form-wrapper {
    background: #fff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e8e4;
}

.hero-form-title { font-size: 1.6rem; color: #2c3e50; margin: 0 0 8px; font-weight: 700; }
.hero-form-subtitle { font-size: 0.95rem; color: #7f8c8d; margin: 0 0 25px; }

/* Общие стили для самой формы (без фона, чтобы не было "коробки в коробке") */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.lead-form__input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
.lead-form__input:focus { outline: none; border-color: #019934; }

.lead-form__consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.8rem;
    color: #7f8c8d;
    line-height: 1.4;
    cursor: pointer;
}
.lead-form__consent input { margin-top: 2px; cursor: pointer; }
.lead-form__consent a { color: #019934; text-decoration: underline; }

.lead-form__submit {
    background: #019934;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.lead-form__submit:hover:not(:disabled) { background: #017a2b; }
.lead-form__message { font-size: 0.95rem; font-weight: 500; text-align: center; }
.lead-form__message.is-success { color: #019934; }
.lead-form__message.is-error { color: #d93025; }

/* ==========================================================================
   НИЖНЯЯ ФОРМА ЗАХВАТА (Исправлено сворачивание на мобильных)
   ========================================================================== */
.landing-lead {
    padding: 60px 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
}

.landing-lead__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* Красивая форма внизу страницы */
.landing-lead .lead-form {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 450px;
    margin: 0 auto;
}

/* ==========================================================================
   ДВЕ КОЛОНКИ: ЦЕНЫ И ВРАЧИ (Для десктопа)
   ========================================================================== */
.service-two-col {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* ==========================================================================
   ПРАЙС-ЛИСТ
   ========================================================================== */
.service-pricing {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    padding: 0;
    margin: 0; /* Убрали маргин, так как теперь это колонка */
}

.service-pricing__header {
    background: #f0f9f4; 
    padding: 20px 30px;
    border-bottom: 1px solid #e1e8e4;
}

.service-pricing__title { font-size: 1.6rem; color: #2c3e50; margin: 0; padding: 0; }
.service-pricing__title::after { display: none; }

.service-pricing__content { padding: 25px 30px 30px; overflow-x: auto; }

.service-price-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.service-price-table th { text-align: left; padding: 15px; background: #f8f9fa; color: #2c3e50; font-weight: 600; border-bottom: 2px solid #019934; }
.service-price-table td { padding: 15px; border-bottom: 1px solid #e9ecef; color: #333; }
.service-price-table th:last-child, .service-price-table td:last-child { text-align: right; }
.service-price { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.price-value { font-size: 18px; font-weight: 700; color: #019934; white-space: nowrap; }
.service-name { font-weight: 500; color: #333; font-size: 15px; line-height: 1.5; }

/* ==========================================================================
   ВРАЧИ НАПРАВЛЕНИЯ
   ========================================================================== */
.landing-doctors { padding: 0; }

.landing-section-title {
    font-size: 1.6rem;
    color: #2c3e50;
    margin: 0 0 20px;
    padding-bottom: 12px;
    position: relative;
    text-align: left;
}

.landing-section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: #019934;
    border-radius: 2px;
}

.landing-doctors__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.landing-doctor {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    align-items: center;
    gap: 20px;
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s, box-shadow 0.3s;
}

.landing-doctor:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1); }

.landing-doctor__photo img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; display: block; }
.landing-doctor__name { margin: 0 0 4px; font-size: 1.1rem; color: #2c3e50; }
.landing-doctor__spec { display: block; color: #019934; font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.landing-doctor__exp { display: block; color: #7f8c8d; font-size: 0.85rem; }

.landing-doctor__btn {
    background: #019934;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.3s;
}
.landing-doctor__btn:hover { background: #017a2b; }

/* ==========================================================================
   ЭТАПЫ, FAQ, SEO-ТЕКСТ, ПОХОЖИЕ УСЛУГИ
   ========================================================================== */
.landing-steps { padding: 60px 0; background: #f8f9fa; }
.landing-steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.landing-step { background: #fff; border-radius: 12px; padding: 31px 20px 24px 70px; position: relative; font-weight: 500; color: #2c3e50; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); }
.landing-step__number { position: absolute; left: 20px; top: 24px; width: 36px; height: 36px; background: #019934; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }

.landing-faq { padding: 60px 0 40px; }
.landing-faq__item { background: #fff; border-radius: 12px; margin-bottom: 12px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); overflow: hidden; }
.landing-faq__question { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; background: none; border: none; cursor: pointer; font-size: 1.05rem; font-weight: 600; color: #2c3e50; text-align: left; }
.landing-faq__question svg { width: 24px; height: 24px; fill: #019934; flex-shrink: 0; transition: transform 0.3s; }
.landing-faq__answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.landing-faq__answer p { padding: 0 24px 18px; margin: 0; color: #555; line-height: 1.7; }
.landing-faq__item.is-open .landing-faq__question svg { transform: rotate(180deg); }
.landing-faq__item.is-open .landing-faq__answer { max-height: 400px; }

.service-content { padding: 20px 0 70px; }
.service-article__content { font-size: 1.1rem; line-height: 1.8; color: #333; }
.service-article__content h2 { font-size: 2rem; color: #2c3e50; margin: 40px 0 20px; }

.related-services { padding: 60px 0; background: #f8f9fa; }
.related-services__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.related-services__title { font-size: 1.8rem; color: #2c3e50; margin: 0; }
.related-services__link { color: #019934; text-decoration: none; font-weight: 500; }
.related-services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.related-service { background: #fff; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); transition: transform 0.3s; }
.related-service:hover { transform: translateY(-5px); }
.related-service__link { display: block; text-decoration: none; color: inherit; }
.related-service__image img { width: 100%; height: 200px; object-fit: cover; }
.related-service__content { padding: 25px; }
.related-service__title { font-size: 1.3rem; color: #2c3e50; margin-bottom: 10px; }
.related-service__more { color: #019934; font-weight: 500; }

/* ==========================================================================
   АДАПТИВНОСТЬ И МОБИЛЬНАЯ ВЕРСИЯ
   ========================================================================== */
.landing-sticky-bar { display: none; }

@media (max-width: 1200px) {
    .service-two-col { grid-template-columns: 1fr; } /* На планшетах складываем в столбик */
    .service-pricing { max-width: 100%; }
    .landing-doctors { padding: 40px 0 0; }
}

@media (max-width: 992px) {
    .service-hero__main { grid-template-columns: 1fr; gap: 40px; }
    .service-hero__form-wrapper { max-width: 500px; margin: 0 auto; width: 100%; }
    
    /* Нижняя форма теперь сворачивается в колонку */
    .landing-lead__inner { grid-template-columns: 1fr; text-align: center; }
    .landing-lead__text { margin-bottom: 20px; }
    .landing-lead .lead-form { text-align: left; }

    .landing-steps__list { grid-template-columns: repeat(2, 1fr); }
    .related-services__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .service-two-col { padding: 0 15px; }
    
    .service-hero { padding: 30px 0 40px; }
    .service-hero__title-main { font-size: 2.2rem; }
    .service-hero__form-wrapper { padding: 25px; }

    /* Врачи на мобильных */
    .landing-doctor { grid-template-columns: 80px 1fr; gap: 15px; padding: 16px; }
    .landing-doctor__photo img { width: 80px; height: 80px; }
    
    /* Уменьшаем кнопку врача и ставим по центру карточки */
    .landing-doctor__btn {
        grid-column: 1 / -1;
        width: auto; 
        max-width: 200px; /* Ограничиваем ширину */
        margin: 10px auto 0; /* Центрируем */
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .landing-steps__list { grid-template-columns: 1fr; }
    .related-services__grid { grid-template-columns: 1fr; }
    .related-services__header { flex-direction: column; gap: 15px; text-align: center; }

    /* Мобильный Sticky Bar */
    .landing-sticky-bar {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 900;
        background: #fff;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        gap: 10px;
    }
    .landing-sticky-bar__call, .landing-sticky-bar__lead {
        flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
        padding: 13px; border-radius: 10px; font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer; text-decoration: none;
    }
    .landing-sticky-bar__call { background: #fff; color: #019934; border: 2px solid #019934; }
    .landing-sticky-bar__call svg { width: 18px; height: 18px; fill: currentColor; }
    .landing-sticky-bar__lead { background: #019934; color: #fff; }

    body.single-uslugi { padding-bottom: 75px; }
    
    /* Прячем плавающие кнопки, чтобы не мешали */
    body.single-uslugi .floating-cta { display: none !important; }
    
    /* ЧАТ-БОТ: Поднимаем ВЫШЕ панели записы (панель ~70px) */
    body.single-uslugi #chatBotToggle { bottom: 95px !important; }
    body.single-uslugi #chatBotWindow { bottom: 100px !important; max-height: calc(100vh - 170px); }
}

@media (max-width: 480px) {
    .service-hero__title-main { font-size: 1.8rem; }
    .service-price-table { min-width: 400px; }
    .service-pricing__content { padding: 15px; }
    .service-pricing__header { padding: 15px 20px; }
    .landing-lead { padding: 40px 0; }
    .landing-lead .lead-form { padding: 20px; }
}


/* ==========================================================================
   ФИНАЛЬНЫЕ ИСПРАВЛЕНИЯ ДЛЯ МОБИЛЬНЫХ
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Уменьшаем отступы у колонок (Прайс и Врачи) */
    .service-two-col {
        padding: 0px; 
        margin: 20px auto;
    }
    
    .service-pricing {
        margin: 0 0 30px;
        border-radius: 12px;
    }

    .service-pricing__content {
        padding: 15px 10px; /* Уменьшили внутренние отступы таблицы */
    }

    /* 2. Поднимаем чат-бот ВЫШЕ панели (Sticky Bar) */
    body.single-uslugi .chat-bot,
    body.single-uslugi #chatBot,
    body.single-uslugi .chatbot {
        bottom: 80px !important; 
    }
    
    body.single-uslugi #chatBotToggle {
        bottom: 120px !important;
    }
    
    body.single-uslugi #chatBotWindow {
        bottom: 180px !important; 
        max-height: calc(100vh - 250px) !important;
    }
}