/* ==========================================================================
   StalMax.com.ua — Interactive Door Selector Quiz Styles
   ========================================================================== */

.quiz-page-section {
    padding: 36px 0 70px;
    background-color: #f8fafc;
    min-height: 80vh;
}

/* Breadcrumbs */
.quiz-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.quiz-breadcrumbs a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.quiz-breadcrumbs a:hover {
    color: #e65100;
}

.quiz-breadcrumbs .current {
    color: #0f172a;
    font-weight: 600;
}

.quiz-breadcrumbs .separator {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* Quiz Card Container */
.quiz-container-box {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    max-width: 960px;
    margin: 0 auto;
}

/* Header & Progress */
.quiz-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 28px 32px 24px;
    color: #ffffff;
    position: relative;
}

.quiz-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.quiz-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(230, 81, 0, 0.2);
    border: 1px solid rgba(230, 81, 0, 0.4);
    color: #ff9800;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.quiz-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.quiz-subtitle {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* Progress bar */
.quiz-progress-bar-wrap {
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e65100, #ff9800);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.quiz-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Steps Body */
.quiz-body {
    padding: 36px 32px 28px;
}

.quiz-step {
    display: none;
    animation: quizFadeIn 0.3s ease forwards;
}

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

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

.step-question-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.step-question-desc {
    font-size: 0.92rem;
    color: #64748b;
    margin-bottom: 24px;
}

/* Options Grid */
.quiz-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.quiz-options-grid.single-col {
    grid-template-columns: 1fr;
}

/* Option Card Button */
.quiz-option-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: all 0.22s ease;
    user-select: none;
    position: relative;
}

.quiz-option-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.quiz-option-card.selected {
    border-color: #e65100;
    background: #fff8f5;
    box-shadow: 0 6px 18px rgba(230, 81, 0, 0.12);
}

.quiz-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all 0.22s ease;
}

.quiz-option-card.selected .quiz-option-icon {
    background: #e65100;
    color: #ffffff;
}

.quiz-option-content {
    flex-grow: 1;
}

.quiz-option-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quiz-option-hint {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.quiz-check-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.quiz-option-card.selected .quiz-check-indicator {
    background: #e65100;
    border-color: #e65100;
    color: #ffffff;
    font-size: 0.65rem;
}

/* Footer Navigation */
.quiz-nav-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}

.btn-quiz-back {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-quiz-back:hover {
    background: #f8fafc;
    color: #0f172a;
}

.btn-quiz-back:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn-quiz-next {
    background: linear-gradient(135deg, #e65100, #ff6d00);
    border: none;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.3);
    transition: all 0.2s ease;
}

.btn-quiz-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(230, 81, 0, 0.4);
}

.btn-quiz-next:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Results Screen */
.quiz-results-wrap {
    padding-top: 10px;
}

.quiz-results-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.results-banner-icon {
    width: 48px;
    height: 48px;
    background: #22c55e;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.results-banner-text h3 {
    margin: 0 0 4px;
    color: #166534;
    font-size: 1.15rem;
    font-weight: 700;
}

.results-banner-text p {
    margin: 0;
    color: #15803d;
    font-size: 0.9rem;
}

/* Recommended Cards Grid */
.quiz-matched-doors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}

.matched-door-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    transition: all 0.25s ease;
}

.matched-door-card:hover {
    border-color: #e65100;
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.matched-score-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #22c55e;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.matched-img-wrap {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
}

.matched-img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

.matched-door-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
}

.matched-door-category {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 12px;
}

.matched-door-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
    white-space: nowrap;
}

.matched-price-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: #e65100;
    white-space: nowrap;
}

.matched-price-old {
    font-size: 0.9rem;
    color: #94a3b8;
    text-decoration: line-through;
    white-space: nowrap;
}

.matched-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    flex-grow: 1;
}

.matched-perks li {
    font-size: 0.82rem;
    color: #475569;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.matched-perks li i {
    color: #22c55e;
    font-size: 0.75rem;
}

.matched-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-matched-details {
    display: block;
    text-align: center;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-matched-details:hover {
    border-color: #e65100;
    color: #e65100;
}

/* Lead Capture Box */
.quiz-lead-card {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    border-radius: 16px;
    padding: 28px 26px;
    margin-top: 10px;
}

.quiz-lead-header {
    margin-bottom: 20px;
}

.quiz-lead-header h4 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #ffffff;
}

.quiz-lead-header p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

.quiz-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}

.quiz-form-grid .form-control {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #0f172a;
    width: 100%;
}

.quiz-form-grid .form-control:focus {
    border-color: #e65100;
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.2);
}

.btn-quiz-submit {
    background: linear-gradient(135deg, #e65100, #ff6d00);
    border: none;
    color: #ffffff;
    padding: 14px 26px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.98rem;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(230, 81, 0, 0.35);
}

.btn-quiz-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(230, 81, 0, 0.45);
}

.quiz-lead-guarantee {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-lead-guarantee i {
    color: #22c55e;
}

.quiz-restart-wrap {
    text-align: center;
    margin-top: 24px;
}

.btn-quiz-restart {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-quiz-restart:hover {
    color: #e65100;
}

/* Header & Hero Quiz Badges */
.quiz-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.quiz-badge-pill {
    background: #e65100;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: 4px;
    letter-spacing: 0.5px;
    animation: pulseBadge 2s infinite ease-in-out;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.85; }
}

.hero-quiz-badge {
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.hero-quiz-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(230, 81, 0, 0.35);
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-page-section {
        padding: 20px 0 50px;
    }

    .quiz-header {
        padding: 22px 20px;
    }

    .quiz-title {
        font-size: 1.45rem;
    }

    .quiz-body {
        padding: 24px 18px 20px;
    }

    .quiz-options-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .quiz-option-card {
        padding: 16px 14px;
    }

    .quiz-form-grid {
        grid-template-columns: 1fr;
    }

    .btn-quiz-submit {
        width: 100%;
        justify-content: center;
    }

    .quiz-results-banner {
        flex-direction: column;
        text-align: center;
    }
}
