/* ==========================================================================
   СТИЛИ ИНТЕРАКТИВНОГО КВИЗА (QUIZ.CSS)
   Плавные переходы, карточки выбора, прогресс-бар, калькулятор, форма лида
   ========================================================================== */

.quiz-section {
    padding: 60px 0 100px 0;
    position: relative;
    z-index: 10;
}

.quiz-wrapper {
    background: linear-gradient(160deg, rgba(26, 31, 41, 0.95) 0%, rgba(18, 21, 28, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    max-width: 980px;
    margin: 0 auto;
}

.quiz-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 50%, #f59e0b 100%);
}

/* ==========================================================================
   ПРОГРЕСС-БАР И ШАПКА КВИЗА
   ========================================================================== */

.quiz-header {
    margin-bottom: 35px;
}

.quiz-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.quiz-step-counter {
    font-weight: 700;
    color: var(--accent-emerald);
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-step-counter svg {
    animation: rotate 4s linear infinite;
}

.quiz-bonus-badge {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, var(--accent-emerald) 0%, #34d399 100%);
    border-radius: var(--radius-pill);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

/* ==========================================================================
   КОНТЕЙНЕР ШАГОВ (STEPS CONTAINER)
   ========================================================================== */

.quiz-step {
    display: none;
    animation: fadeInStep 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.quiz-step.active {
    display: block;
}

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

.step-question-title {
    font-size: 26px;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.step-question-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* ==========================================================================
   СЕТКА ВАРИАНТОВ ОТВЕТОВ (OPTIONS GRID)
   ========================================================================== */

.options-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 35px;
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Карточка варианта ответа */
.option-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
    user-select: none;
}

.option-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.option-card.selected {
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--accent-emerald);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
    transform: translateY(-3px);
}

/* Изображение в карточке */
.option-thumb {
    width: 100%;
    height: 130px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.option-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.option-card:hover .option-thumb img {
    transform: scale(1.06);
}

/* Иконка вместо фото */
.option-icon-large {
    font-size: 42px;
}

.option-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.option-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.option-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.custom-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.option-card.selected .custom-radio {
    border-color: var(--accent-emerald);
    background: var(--accent-emerald);
}

.custom-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition-fast);
}

.option-card.selected .custom-radio::after {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   ПОЛЗУНОК РАЗМЕРА КУХНИ (SLIDER)
   ========================================================================== */

.slider-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.slider-value-display {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 800;
    color: var(--accent-emerald);
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.slider-value-display span {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
}

.custom-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    margin-bottom: 20px;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-emerald);
    cursor: pointer;
    box-shadow: 0 0 15px var(--accent-emerald-glow);
    border: 3px solid #ffffff;
    transition: transform 0.1s ease;
}

.custom-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.slider-presets {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.preset-btn:hover,
.preset-btn.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-emerald);
    color: var(--text-accent);
}

/* ==========================================================================
   ВЫБОР ПОДАРКОВ (GIFT CARDS)
   ========================================================================== */

.gift-card {
    background: linear-gradient(145deg, rgba(35, 42, 56, 0.5) 0%, rgba(20, 25, 35, 0.7) 100%);
    border: 2px dashed rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.gift-card:hover {
    border-color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.08);
    transform: translateY(-2px);
}

.gift-card.selected {
    border-style: solid;
    border-color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.12);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.25);
}

.gift-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.gift-details h4 {
    font-size: 15px;
    margin-bottom: 2px;
    color: #ffffff;
}

.gift-details p {
    font-size: 12px;
    color: #fbbf24;
    font-weight: 600;
}

/* ==========================================================================
   ЭКРАН АНИМАЦИИ РАСЧЕТА (CALCULATING LOADER)
   ========================================================================== */

.quiz-loader-screen {
    text-align: center;
    padding: 50px 20px;
    display: none;
}

.quiz-loader-screen.active {
    display: block;
}

.spinner-ring {
    width: 70px;
    height: 70px;
    border: 4px solid rgba(16, 185, 129, 0.15);
    border-top-color: var(--accent-emerald);
    border-radius: 50%;
    margin: 0 auto 24px auto;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-status-text {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.loader-subtext {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==========================================================================
   ФИНАЛЬНЫЙ ЭКРАН (ЛИД-ФОРМА)
   ========================================================================== */

.final-lead-step {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    align-items: start;
}

.lead-result-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.summary-heading {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent-emerald);
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 20px;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.summary-list li span:first-child {
    color: var(--text-secondary);
}

.summary-list li span:last-child {
    font-weight: 700;
    color: var(--text-primary);
}

.summary-price-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.2) 100%);
    border: 1px solid var(--accent-emerald);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.est-price-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.est-price-val {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
}

/* Форма ввода контактов */
.lead-form-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.messenger-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.messenger-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.messenger-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.messenger-btn.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-emerald);
    color: #ffffff;
}

.input-field {
    width: 100%;
    background: rgba(15, 17, 21, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 16px;
    color: #ffffff;
    font-family: var(--font-main);
    outline: none;
    transition: var(--transition-fast);
}

.input-field:focus {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.form-privacy-note {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

.form-privacy-note a {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* ==========================================================================
   НАВИГАЦИЯ КВИЗА (КНОПКИ НАЗАД / ДАЛЕЕ)
   ========================================================================== */

.quiz-footer-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.btn-quiz-prev {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-quiz-prev:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.btn-quiz-next {
    padding: 14px 32px;
    font-size: 16px;
}

/* ==========================================================================
   АДАПТИВНОСТЬ КВИЗА
   ========================================================================== */

@media (max-width: 900px) {
    .quiz-wrapper {
        padding: 24px 18px;
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .final-lead-step {
        grid-template-columns: 1fr;
    }
    
    .step-question-title {
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .option-thumb {
        height: 110px;
    }
    
    .quiz-footer-nav {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .btn-quiz-prev,
    .btn-quiz-next {
        width: 100%;
        justify-content: center;
    }
    
    .slider-value-display {
        font-size: 30px;
    }
}
