/* Общие стили для квиза */
* {
    box-sizing: border-box;
}

/* Секция квиза */
.quiz-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f1ff 100%);
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Встроенный квиз на главном экране */
.quiz-embedded {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 0;
    margin-top: 20px;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.quiz-title {
    color: #1A47A3;
    font-weight: 700;
    font-size: 20px;
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 20px 0;
}

.quiz-container-embedded {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    max-width: none;
}

.quiz-container-embedded .kviz {
    padding: 20px;
}

/* Адаптация для главного экрана */
.main-screen-quiz .tit {
    font-size: 18px;
    margin-bottom: 20px;
}

.main-screen-quiz .kviz_form {
    min-height: 400px;
}

.main-screen-quiz .radio_but label {
    padding: 12px 15px;
    font-size: 13px;
}

.main-screen-quiz .btn_gold {
    padding: 12px 25px;
    font-size: 14px;
}

.kviz {
    padding: 40px;
}

/* Шаги и прогресс */
.step_line {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.step {
    font-size: 16px;
    font-weight: 600;
    color: #1A47A3;
    white-space: nowrap;
}

.line_progress_right {
    flex: 1;
    margin-left: 20px;
}

.line_progress {
    height: 8px;
    background: #e9edf5;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.yellow_line {
    height: 100%;
    background: linear-gradient(90deg, #1A47A3, #2c5aa0);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.cleaner {
    clear: both;
}

/* Заголовки */
.tit {
    font-size: 24px;
    font-weight: 700;
    color: #1A47A3;
    margin-bottom: 30px;
    line-height: 1.3;
    text-align: center;
}

/* Варианты ответов */
.line {
    margin-bottom: 40px;
}

.line_radio {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.column {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.column_last {
    flex: 2;
}

/* Радио кнопки */
.radio_but {
    position: relative;
}

.radio_but input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio_but label {
    display: block;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
}

.radio_but label:hover {
    background: #f0f4f8;
    border-color: #1A47A3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 71, 163, 0.15);
}

.radio_but input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #1A47A3, #2c5aa0);
    color: white;
    border-color: #1A47A3;
    box-shadow: 0 4px 12px rgba(26, 71, 163, 0.3);
}

.radio_but input[type="radio"]:checked + label::before {
    content: '✓';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
}

/* Кнопки навигации */
.btn_wrap {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.btn_gold {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #1A47A3, #2c5aa0);
    color: white;
    text-decoration: none;
    border-radius: 0;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn_gold:hover {
    background: linear-gradient(135deg, #0d2d5a, #1A47A3);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn_gold:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn_gold span {
    display: block;
}

/* Поля ввода */
.form-text-phone,
.form-text-name {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #1A47A3;
    background: white;
    box-shadow: 0 0 0 0.2rem rgba(26, 71, 163, 0.25);
}

.form-control::placeholder {
    color: #999;
}

/* Текст описания */
.catalo_tit {
    margin: 20px 0;
    text-align: center;
}

.catalo_tit p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.its_free {
    text-align: center;
    color: #28a745;
    font-size: 12px;
    font-weight: 500;
    margin-top: 10px;
}

/* Скрытые формы */
.kviz_form {
    display: block;
}

.kviz_form[style*="display: none"] {
    display: none !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .quiz-container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .kviz {
        padding: 20px;
    }
    
    .tit {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .line_radio {
        flex-direction: column;
        gap: 15px;
    }
    
    .column {
        min-width: auto;
    }
    
    .btn_wrap {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn_gold {
        width: 100%;
        text-align: center;
    }
    
    .step_line {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .line_progress_right {
        margin-left: 0;
    }
    
    /* Мобильная адаптация для главного экрана */
    .main-screen-quiz {
        margin-top: 30px;
    }
    
    .quiz-embedded {
        margin-top: 20px;
    }
    
    .quiz-title {
        font-size: 18px;
    }
    
    .main-screen-quiz .tit {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .kviz {
        padding: 15px;
    }
    
    .tit {
        font-size: 18px;
    }
    
    .radio_but label {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .btn_gold {
        padding: 12px 25px;
        font-size: 14px;
    }
}
