/* ====================================
   QUIZ STYLES - Cartas de Pablo
   ==================================== */

:root {
    /* Main Site Colors matched */
    --primary-gold: #D4A017;
    /* Matched --color-primary from style.css */
    --dark-bg: #0D1B2A;
    /* Matched --color-bg */
    --card-bg: #1B263B;
    /* Matched --color-bg-light */
    --text-white: #ffffff;
    --text-gray: #E0E1DD;
    /* Matched --color-text-muted */
    --border-color: rgba(212, 160, 23, 0.3);
    --success-green: #4CAF50;
    --error-red: #ff4444;
}

/* ========== Body & Layout ========== */
.quiz-body {
    background: radial-gradient(circle at center, #1B263B 0%, #0D1B2A 100%);
    /* Matched .hero background */
    min-height: 100vh;
    padding-top: 80px;
}

/* ========== Progress Bar ========== */
.quiz-progress-container {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 16px 20px;
    z-index: 999;
    border-bottom: 1px solid var(--border-color);
}

.quiz-progress-bar {
    width: 100%;
    max-width: 800px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin: 0 auto 12px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-gold), #f4d03f);
    border-radius: 20px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.quiz-progress-text {
    text-align: center;
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
}

/* ========== Quiz Card ========== */
.quiz-main {
    padding: 160px 20px 80px;
}

.quiz-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 50px 40px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    /* Prevent overlaps */
}

/* ========== Question Slides ========== */
.question-slide,
.chart-slide {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.question-slide.active,
.chart-slide.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate Y(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 12px;
    line-height: 1.3;
}

.question-subtitle {
    color: var(--text-gray);
    font-size: 1rem;
    margin-bottom: 32px;
}

/* ========== Options Grid ========== */
.options-grid {
    display: grid;
    gap: 16px;
    margin-top: 32px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    padding: 20px 24px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: 'Inter', sans-serif;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-gold);
    transform: translateX(8px);
}

.option-btn.selected {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(244, 208, 63, 0.2));
    border-color: var(--primary-gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

/* Number scale specific */
.number-scale {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.scale-btn {
    padding: 24px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

/* ========== Checkbox Grid ========== */
.checkbox-grid {
    gap: 12px;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 18px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-checkbox:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-gold);
}

.option-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: var(--primary-gold);
    cursor: pointer;
}

.option-checkbox input[type="checkbox"]:checked+.checkbox-label {
    color: var(--primary-gold);
    font-weight: 600;
}

.checkbox-label {
    color: var(--text-white);
    font-size: 1.05rem;
    flex: 1;
}

.btn-continue {
    margin-top: 32px;
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
}

.btn-continue:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ========== Info Sections ========== */
.info-section {
    text-align: center;
}

.warning-card,
.success-card {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.1), rgba(255, 68, 68, 0.05));
    border: 2px solid rgba(255, 68, 68, 0.3);
    border-radius: 16px;
    padding: 40px 32px;
}

.success-card {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border-color: rgba(76, 175, 80, 0.3);
}

.warning-icon,
.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.warning-title,
.success-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 24px;
}

.warning-content,
.success-content {
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.warning-content p,
.success-content p {
    margin-bottom: 16px;
}

.warning-content strong {
    color: var(--text-white);
}

.highlight-stat {
    color: var(--primary-gold);
    font-weight: 700;
}

.warning-solution {
    color: var(--text-white);
    font-weight: 600;
}

/* ========== Universities ========== */
.certification-text {
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 24px;
}

.universities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.university-badge {
    background: #ffffff;
    /* White background for logos */
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform 0.3s ease;
}

.university-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.university-badge img {
    /* No filter - show original colors */
    opacity: 1;
    height: 45px;
    width: auto;
    object-fit: contain;
}

.university-badge:hover img {
    opacity: 1;
}

.university-icon {
    font-size: 1.5rem;
}

.university-name {
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ========== Loading Section ========== */
.loading-section {
    min-height: calc(100vh - 140px);
    /* Subtract header height to center nicely */
    display: flex;
    align-items: center;
    /* Center vertically */
    justify-content: center;
    padding: 0 20px 40px;
    /* Reduced top padding */
}

.loading-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
    margin-top: -40px;
    /* Slight visual nudge up */
}

.loading-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 12px;
}

.loading-subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 30px;
    /* Reduced margin */
}

.loading-progress-bar {
    position: relative;
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-bottom: 40px;
    /* Reduced from 50px */
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-gold), #f4d03f);
    border-radius: 20px;
    transition: width 0.1s linear;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}

.loading-percentage {
    position: absolute;
    top: -30px;
    right: 0;
    color: var(--primary-gold);
    font-weight: 700;
    font-size: 1.1rem;
}

/* ========== Social Carousel ========== */
.social-carousel {
    overflow: hidden;
    position: relative;
    min-height: 150px;
}

.carousel-track {
    position: relative;
}

.carousel-item {
    display: none;
    animation: slideIn 0.5s ease-out;
}

.carousel-item.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-whatsapp {
    background: #0D1B2A;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
}

.whatsapp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-white);
    font-weight: 600;
}

.whatsapp-icon {
    font-size: 1.3rem;
}

.whatsapp-message {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 10px;
}

.whatsapp-time {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ========== Results & Charts ========== */
.results-section {
    padding: 80px 20px;
}

.results-container {
    max-width: 800px;
    margin: 0 auto;
}

.chart-section {
    margin-bottom: 60px;
}

.chart-message-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
}

.chart-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 16px;
}

.chart-description {
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.7;
}

.chart-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 20px;
}

#devotional-chart {
    width: 100%;
    height: 300px;
    display: block;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.legend-dot.red {
    background: #ff4444;
}

.legend-dot.green {
    background: #4CAF50;
}

/* ========== Ladder Chart ========== */
.ladder-chart {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 32px;
    position: relative;
}

.ladder-step {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ladder-step.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.step-bar {
    height: 50px;
    background: linear-gradient(90deg, var(--primary-gold), #f4d03f);
    border-radius: 8px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    padding-left: 16px;
}

.step-label {
    color: var(--text-white);
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
}

.ladder-arrow {
    position: absolute;
    top: 20px;
    right: 32px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.ladder-arrow.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.arrow-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 8px;
    animation: bounce 1s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.arrow-text {
    color: var(--primary-gold);
    font-weight: 700;
    font-size: 0.9rem;
}

/* ========== Offer Section ========== */
.offer-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(0, 0, 0, 0.3));
}

.offer-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-white);
    text-align: center;
    margin-bottom: 12px;
}

.offer-subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 40px;
}

/* ========== Countdown Timer ========== */
.countdown-timer-wrapper {
    text-align: center;
    margin-bottom: 40px;
}

.timer-urgency {
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--primary-gold);
    border-radius: 12px;
    padding: 16px 32px;
}

.timer-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-gold);
    line-height: 1;
}

.timer-label {
    color: var(--text-gray);
    font-size: 0.8rem;
    margin-top: 4px;
    text-transform: uppercase;
}

.timer-separator {
    color: var(--primary-gold);
    font-size: 2rem;
    font-weight: 700;
}

.countdown-timer.timer-urgent {
    animation: pulse-urgent 1s infinite;
}

@keyframes pulse-urgent {

    0%,
    100% {
        border-color: var(--primary-gold);
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    }

    50% {
        border-color: #ff4444;
        box-shadow: 0 0 30px rgba(255, 68, 68, 0.6);
    }
}

.countdown-timer.timer-expired .timer-number {
    color: #888;
}

/* ========== Pricing Card ========== */
.center-card {
    max-width: 500px;
    margin: 0 auto;
}

.price-discount {
    font-size: 2.2rem;
}

.price-normal {
    font-size: 2.2rem;
}

/* ========== FAQs Section ========== */
.faqs-section {
    padding: 80px 20px;
}

.faqs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto 50px;
}

.faq-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px 24px;
    transition: all 0.3s ease;
}

.faq-card:hover {
    border-color: var(--primary-gold);
    transform: translateY(-5px);
}

.faq-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.faq-question {
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.faq-answer {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faqs-cta {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-text {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

/* ========== Utility Classes ========== */
.hidden {
    display: none !important;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .quiz-card {
        padding: 32px 24px;
    }

    .question-title {
        font-size: 1.4rem;
    }

    .option-btn {
        padding: 16px 20px;
        font-size: 0.95rem;
    }

    .number-scale {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .scale-btn {
        padding: 16px;
        font-size: 1.2rem;
    }

    .universities-grid {
        grid-template-columns: 1fr;
    }

    .timer-number {
        font-size: 2rem;
    }

    .offer-title {
        font-size: 1.8rem;
    }

    .faqs-grid {
        grid-template-columns: 1fr;
    }

    .ladder-step {
        flex-direction: column;
        align-items: flex-start;
    }

    .step-bar {
        width: 100% !important;
    }
}

body.quiz-active .author-section,
body.quiz-active .footer {
    display: none !important;
}

/* ========== Diagnosis Result Card ========== */
.diagnosis-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.5s ease-out;
    max-width: 800px;
    margin: 0 auto;
}

.results-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.results-text {
    color: var(--text-gray);
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.results-text p {
    margin-bottom: 16px;
}

.results-text strong {
    color: var(--primary-gold);
    font-weight: 700;
}

.results-cta {
    margin-top: 32px;
}