/* Опросник на старте - Kapital77.ru */

/* Базовые стили опросника */
.onboarding-quiz {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.onboarding-quiz.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.quiz-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    /* Кайдзен улучшение: более выразительная тень */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(92, 111, 234, 0.1);
    animation: slideUp 0.3s ease;
    z-index: 10002;
    transition: box-shadow 0.3s ease;
}

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

.quiz-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.3;
}

.quiz-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.5;
}

.quiz-question {
    margin: 32px 0;
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    line-height: 1.4;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    padding: 16px 24px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    /* Кайдзен улучшение: более плавные переходы */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
}

/* Кайдзен улучшение: эффект "блеска" при hover */
.quiz-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(92, 111, 234, 0.1), 
        transparent);
    transition: left 0.5s ease;
}

.quiz-option:hover::before {
    left: 100%;
}

.quiz-option:hover {
    background: #e9ecef;
    border-color: var(--color-primary);
    /* Кайдзен улучшение: более заметный hover-эффект */
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(92, 111, 234, 0.25);
}

.quiz-option.selected {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(92, 111, 234, 0.3);
}

.quiz-results {
    margin: 32px 0;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: left;
}

.result-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.result-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-benefits li {
    padding: 12px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #e9ecef;
}

.result-benefits li:last-child {
    border-bottom: none;
}

.quiz-cta {
    margin-top: 32px;
}

.quiz-note {
    font-size: 14px;
    color: #666;
    margin-top: 16px;
    font-style: italic;
}

.quiz-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 10003;
}

.quiz-close:hover {
    color: #333;
}

/* Быстрый опросник (один вопрос) */
.quick-quiz {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.quick-quiz.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-quiz .quiz-content {
    max-width: 500px;
}

.quick-quiz .quiz-options {
    gap: 16px;
}

.quiz-option-yes {
    background: linear-gradient(135deg, #06d6a0 0%, #118ab2 100%);
    color: #fff;
    border-color: #06d6a0;
}

.quiz-option-yes:hover {
    background: linear-gradient(135deg, #05c493 0%, #0f7a9a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 214, 160, 0.3);
}

.quiz-option-partial {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.quiz-option-partial:hover {
    background: #ffe69c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.quiz-option-no {
    background: #f8f9fa;
    border-color: #6c757d;
    color: #495057;
}

.quiz-option-no:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

/* Вопросы в Hero секции */
.hero-questions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
    padding: 24px;
    background: rgba(92, 111, 234, 0.05);
    border-radius: 12px;
}

.question-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.question-icon {
    font-size: 24px;
}

.question-text {
    flex: 1;
    font-size: 16px;
    color: #333;
    margin: 0;
}

.question-answer {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.question-answer:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(92, 111, 234, 0.3);
}

.hero-confirmation {
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.1) 0%, rgba(17, 138, 178, 0.1) 100%);
    border-left: 4px solid #06d6a0;
    border-radius: 8px;
}

.confirmation-text {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

/* Прогресс опросника */
/* Кайдзен улучшение: улучшенный прогресс-бар */
.quiz-progress {
    margin-bottom: 24px;
}

.progress-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    /* Кайдзен улучшение: легкая тень для глубины */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    /* Кайдзен улучшение: более плавный переход */
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    /* Кайдзен улучшение: легкая тень для выразительности */
    box-shadow: 0 0 8px rgba(92, 111, 234, 0.4);
    position: relative;
}

/* Кайдзен улучшение: эффект "блеска" на прогресс-баре */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .quiz-content {
        padding: 24px;
        width: 95%;
    }

    .quiz-title {
        font-size: 22px;
    }

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

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

    .quiz-option {
        padding: 14px 20px;
        font-size: 15px;
    }

    .hero-questions {
        padding: 16px;
    }

    .question-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .question-answer {
        width: 100%;
        text-align: center;
    }
}

