/* Взят из твоего рабочего проекта и немного дополнен */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; line-height: 1.6; color: var(--text-dark); background-color: var(--bg-light); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
header { background-color: var(--bg-white); box-shadow: var(--shadow-sm); padding: 1rem 0; position: fixed; width: 100%; top: 0; z-index: 1000; }
.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.75rem; font-weight: 700; color: var(--primary-color); text-decoration: none; }
.logo span { color: var(--secondary-color); }
header nav { text-align: center; }
header nav ul { list-style: none; display: inline-flex; gap: 2rem; }
header nav a { text-decoration: none; color: var(--text-dark); font-weight: 500; }
.contact-info { display: flex; align-items: center; gap: 1.5rem; }
.phone { font-size: 1.1rem; font-weight: 600; color: var(--text-dark); text-decoration: none; transition: color 0.3s ease; }
.phone:hover { color: var(--secondary-color); }
.lang-switcher { display: flex; gap: 0.5rem; }
.lang-link { color: var(--text-light); text-decoration: none; font-weight: 500; padding: 0.5rem 1rem; border: 1px solid var(--border-color); border-radius: 6px; }
.lang-link.active { color: white; background: var(--primary-color); border-color: var(--primary-color); }
.mobile-menu-toggle { display: none; cursor: pointer; background: none; border: none; }
main { padding-top: 80px; }
.banner { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; text-align: center; padding: 6rem 20px; }
.banner h1 { font-size: 3rem; margin-bottom: 1rem; }
.banner p { font-size: 1.25rem; margin-bottom: 2rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.banner-button { background: var(--accent-color); color: white; border: none; padding: 1rem 2.5rem; font-size: 1.1rem; border-radius: 50px; cursor: pointer; text-decoration: none; }
.section { padding: 5rem 0; }
.section-title { text-align: center; font-size: 2.5rem; color: var(--primary-color); margin-bottom: 3rem; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-card { background-color: var(--bg-white); padding: 2rem; border-radius: 12px; box-shadow: var(--shadow-md); }
.service-card h3 { margin-bottom: 1rem; color: var(--primary-color); font-size: 1.5rem; }
.btn-details { background: transparent; color: var(--secondary-color); padding: 0.75rem 1.5rem; text-decoration: none; border: 2px solid var(--secondary-color); border-radius: 8px; font-weight: 600; display: inline-block; }
.btn-details:hover { background: var(--secondary-color); color: white; }

/* ===== ИСПРАВЛЕННЫЕ СТИЛИ МОДАЛЬНОГО ОКНА ===== */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 2000; /* Увеличен z-index */
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.7); 
    align-items: center; 
    justify-content: center;
    overflow-y: auto; /* Добавлен скролл */
    padding: 20px; /* Отступы для мобильных */
}

.modal-content { 
    background-color: var(--bg-white); 
    padding: 2.5rem; 
    border-radius: 16px; 
    box-shadow: var(--shadow-xl); 
    width: 90%; 
    max-width: 600px; 
    position: relative;
    max-height: 90vh; /* Максимальная высота */
    overflow-y: auto; /* Скролл внутри модального окна */
}

.close-button { 
    color: var(--text-light); 
    position: absolute; 
    top: 1rem; 
    right: 1.5rem; 
    font-size: 2rem; 
    font-weight: bold; 
    cursor: pointer;
    z-index: 2001; /* Поверх содержимого */
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-button:hover {
    background-color: var(--bg-light);
}

/* ===== УЛУЧШЕННЫЕ СТИЛИ ОПРОСНИКА ===== */
.quiz-progress-container { 
    width: 100%; 
    background-color: var(--border-color); 
    border-radius: 10px; 
    margin-bottom: 2rem; 
    overflow: hidden; 
    position: sticky; /* Фиксированный прогресс */
    top: 0;
    z-index: 10;
}

.quiz-progress-bar { 
    height: 8px; 
    width: 0%; 
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); 
    border-radius: 10px; 
    transition: width 0.3s ease; 
}

#quizSteps { 
    position: relative;
    min-height: 300px; /* Минимальная высота */
}

#quizSteps h3 { 
    text-align: center; 
    color: var(--primary-color); 
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.quiz-tooltip { 
    font-size: 0.95rem; 
    color: var(--text-light); 
    text-align: center; 
    margin: 0 0 2rem 0; /* Исправлен отступ */
    background: var(--bg-light); 
    padding: 1rem; 
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

/* ===== ИСПРАВЛЕННЫЕ СТИЛИ КНОПОК ОПРОСНИКА ===== */
.quiz-options { 
    margin-bottom: 2rem; /* Добавлен отступ снизу */
}

.quiz-options button { 
    display: block; 
    width: 100%; 
    padding: 1.25rem; 
    margin-bottom: 1rem; 
    background: var(--bg-light); 
    border: 2px solid var(--border-color); 
    border-radius: 10px; 
    text-align: left; 
    font-size: 1rem; 
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative; /* Для правильного позиционирования */
    z-index: 1; /* Низкий z-index */
}

.quiz-options button:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== ИСПРАВЛЕННЫЕ СТИЛИ НАВИГАЦИИ ===== */
.quiz-navigation { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 2rem;
    position: sticky; /* Фиксированная навигация */
    bottom: 0;
    background: var(--bg-white);
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    z-index: 10;
}

#back-quiz-step { 
    background-color: transparent; 
    border: 2px solid var(--border-color); 
    color: var(--text-dark); 
    padding: 0.875rem 1.75rem; 
    border-radius: 8px; 
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px; /* Минимальная ширина */
}

#back-quiz-step:hover {
    background: var(--bg-light);
    border-color: var(--text-light);
}

/* ===== ИСПРАВЛЕННЫЕ СТИЛИ ПОЛЕЙ ВВОДА ===== */
.quiz-single-input { 
    width: 100%; 
    padding: 1rem; 
    border: 2px solid var(--border-color); 
    border-radius: 10px; 
    font-size: 1rem; 
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

.quiz-single-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.quiz-input-group { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1rem; 
    margin-bottom: 1.5rem;
}

/* ===== ДОБАВЛЕННЫЕ СТИЛИ ДЛЯ FORM-GROUP ===== */
.form-group { 
    display: flex; 
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label { 
    font-size: 0.9rem; 
    margin-bottom: 0.5rem; 
    color: var(--text-dark);
    font-weight: 600;
}

.form-group input { 
    width: 100%; 
    padding: 0.75rem; 
    border: 2px solid var(--border-color); 
    border-radius: 8px; 
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:disabled {
    background-color: var(--bg-light);
    color: var(--text-light);
    cursor: not-allowed;
}

/* ===== ДОБАВЛЕННЫЕ СТИЛИ ДЛЯ CHECKBOX ===== */
.quiz-checkbox-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.quiz-checkbox-container label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.quiz-checkbox-container input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

/* ===== ИСПРАВЛЕННЫЕ СТИЛИ КНОПКИ "ДАЛЕЕ" ===== */
#next-form-step { 
    background: var(--accent-color); 
    color: white; 
    border: none; 
    padding: 1rem 2rem; 
    border-radius: 8px; 
    cursor: pointer; 
    flex-grow: 1;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px; /* Минимальная ширина */
}

#next-form-step:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== СТИЛИ ДЛЯ ФИНАЛЬНОГО ШАГА ===== */
.quiz-final-step {
    text-align: center;
    padding: 2rem 0;
}

.quiz-final-step h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.quiz-final-step p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
}

.quiz-final-step .banner-button {
    display: inline-block;
    width: auto;
    min-width: 200px;
    margin-top: 1rem;
    text-decoration: none;
    text-align: center;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ===== */
@media screen and (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 95%;
        max-height: 95vh;
    }
    
    .quiz-input-group {
        grid-template-columns: 1fr; /* Одна колонка на мобильных */
        gap: 0.75rem;
    }
    
    .quiz-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    #back-quiz-step,
    #next-form-step {
        width: 100%;
        min-width: auto;
    }
    
    .quiz-options button {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    #quizSteps h3 {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .modal-content {
        padding: 1rem;
    }
    
    .quiz-tooltip {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    .form-group input,
    .quiz-single-input {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
}

.about-section { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; max-width: 800px; margin: 0 auto; }
.about-section img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-lg); }
.about-text { flex: 1; }
footer { background: linear-gradient(135deg, var(--primary-color), #1a347d); color: white; padding: 4rem 0 2rem; margin-top: 5rem; }
footer h3 { margin-bottom: 1.5rem; }
footer ul { list-style: none; }
footer li { margin-bottom: 0.75rem; }
footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; }
@media screen and (max-width: 992px) { header nav, .contact-info .phone { display: none; } .mobile-menu-toggle { display: block; } header nav.mobile-open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-white); box-shadow: var(--shadow-lg); } header nav ul { flex-direction: column; gap: 0; } header nav li { width: 100%; text-align: center; } header nav a { padding: 1rem; display: block; border-bottom: 1px solid var(--border-color); } }
@media screen and (max-width: 768px) { .banner h1 { font-size: 2rem; } .services-grid, .footer-content { grid-template-columns: 1fr; } }
@media screen and (max-width: 480px) { .banner h1 { font-size: 1.75rem; } .banner-button { width: 100%; } }
/* ... (Полный CSS код, который был в предыдущем ответе) ... */
/* Основное изменение здесь - это добавление стилей для финального шага квиза */

.quiz-final-step {
    text-align: center;
}

.quiz-final-step p {
    margin-bottom: 1.5rem; /* Добавляет отступ между текстом и кнопкой */
    font-size: 1.1rem;
    color: var(--text-light);
}

/* ===== СТИЛИ ДЛЯ СЕКЦИИ PROMO-QUIZ ===== */
#promo-quiz {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    border-radius: 16px;
    padding: 3rem 0 2.5rem 0;
    margin: 2.5rem 0;
}

#promo-quiz .container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

#promo-quiz h2 {
    /* Стили как у .section-title */
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

#promo-quiz h2::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
    margin: 0.5rem auto 0 auto;
}

#promo-quiz a,
#promo-quiz .promo-quiz-btn {
    /* Стили как у большой зеленой кнопки из баннера */
    display: inline-block;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

#promo-quiz a:hover,
#promo-quiz .promo-quiz-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

/* Адаптивность для секции promo-quiz */
@media screen and (max-width: 768px) {
    #promo-quiz h2 {
        font-size: 2rem;
    }
    
    #promo-quiz .container {
        padding: 0 1rem;
    }
}

@media screen and (max-width: 480px) {
    #promo-quiz h2 {
        font-size: 1.75rem;
    }
    
    #promo-quiz a,
    #promo-quiz .promo-quiz-btn {
        width: 100%;
        text-align: center;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ КОНТРОЛЯ ПОЗИЦИОНИРОВАНИЯ ===== */
.quiz-content {
    position: relative;
    z-index: 1;
    min-height: 200px;
    padding-bottom: 80px; /* Место для фиксированной навигации */
}

.quiz-content h3 {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
}

.quiz-content .quiz-tooltip {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.quiz-options {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.quiz-options button {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.quiz-input-group {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
}

.quiz-checkbox-container {
    position: relative;
    z-index: 1;
    margin: 1.5rem 0;
}

.quiz-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Исправляем отступы для модального окна */
.modal-content {
    padding-bottom: 100px; /* Место для фиксированной навигации */
}

/* Убираем sticky позиционирование у навигации в CSS, так как теперь используем fixed */
.quiz-navigation {
    position: fixed !important;
    bottom: 0 !important;
}

/* Дополнительные стили для предотвращения наложений */
#quizSteps {
    position: relative;
    overflow: hidden; /* Предотвращаем выход элементов за границы */
}

#quizSteps > * {
    position: relative;
    z-index: 1;
}

/* Стили для мобильных устройств */
@media screen and (max-width: 768px) {
    .quiz-navigation {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .quiz-content {
        padding-bottom: 120px; /* Больше места для вертикальной навигации */
    }
    
    .modal-content {
        padding-bottom: 140px;
    }
}

/* ===== ОТСТУПЫ ДЛЯ КНОПОК В КАРТОЧКАХ ===== */
.service-card .btn-details {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(59,130,246,0.07);
    transition: all 0.2s;
}

.service-card .btn-details:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: translateY(-2px) scale(1.03);
}

/* ===== СТИЛИ ДЛЯ FAQ (details/summary) ===== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem 0;
}

.faq-item {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    padding: 1.2rem 1.5rem;
    transition: box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.faq-item[open] {
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.faq-item summary {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    outline: none;
    padding: 0.2rem 0;
    transition: color 0.2s;
    list-style: none;
}

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

.faq-item summary:after {
    content: '▼';
    float: right;
    font-size: 1rem;
    color: var(--secondary-color);
    margin-left: 1rem;
    transition: transform 0.2s;
}

.faq-item[open] summary:after {
    transform: rotate(-180deg);
}

.faq-item p {
    margin-top: 1rem;
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.6;
    padding-left: 0.5rem;
}