/* ==========================================================================
   CNP Guatemala - Diagnóstico Digital CNP
   Estilos CSS para la Experiencia de Diagnóstico Interactivo
   Diseño Mobile-First, Compatible con Modo Oscuro y Modo Claro
   ========================================================================== */

.diagnostic-section {
    position: relative;
    padding: 6rem 0;
    background: radial-gradient(circle at 50% 10%, rgba(0, 210, 255, 0.05) 0%, transparent 60%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.diagnostic-container {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

/* Card principal del diagnóstico */
.diagnostic-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    position: relative;
    transition: var(--transition-smooth);
}

.diagnostic-wrapper:hover {
    border-color: rgba(0, 210, 255, 0.2);
}

/* Barra de Progreso Superior */
.diagnostic-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.diagnostic-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--electric-blue), var(--cyber-green));
    width: 0%;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.5);
}

/* Cabecera del Cuestionario */
.diagnostic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.diagnostic-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 210, 255, 0.08);
    color: var(--electric-blue);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(0, 210, 255, 0.15);
}

.diagnostic-category-tag {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Pantalla de Introducción (Intro) */
.diagnostic-intro {
    padding: 3.5rem 2.5rem;
    text-align: center;
}

.diagnostic-intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 255, 102, 0.1);
    color: var(--cyber-green);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 255, 102, 0.2);
}

.diagnostic-intro-title {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.diagnostic-intro-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.2rem auto;
    line-height: 1.6;
}

.diagnostic-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.diagnostic-benefit-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1.2rem 1.4rem;
    border-radius: 12px;
}

.diagnostic-benefit-icon {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--electric-blue);
}

.diagnostic-benefit-item h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.diagnostic-benefit-item p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Área de Contenido de Pregunta */
.diagnostic-body {
    padding: 2.5rem 2rem;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.diagnostic-question-wrapper {
    animation: fadeInSlide 0.3s ease-out;
}

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

.diagnostic-question-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.diagnostic-question-helper {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.8rem;
}

/* Lista de Opciones */
.diagnostic-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.diagnostic-option-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.45;
    width: 100%;
}

.diagnostic-option-card:hover {
    background: rgba(0, 210, 255, 0.04);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.diagnostic-option-card:focus-visible {
    outline: 2px solid var(--electric-blue);
    outline-offset: 2px;
}

.diagnostic-option-card.selected {
    background: rgba(0, 210, 255, 0.08);
    border-color: var(--electric-blue);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 210, 255, 0.12);
}

.diagnostic-option-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.diagnostic-option-card.selected .diagnostic-option-radio {
    border-color: var(--electric-blue);
    background: var(--electric-blue);
}

.diagnostic-option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-deep);
    opacity: 0;
    transition: opacity 0.2s;
}

.diagnostic-option-card.selected .diagnostic-option-radio::after {
    opacity: 1;
}

/* Pie y Navegación */
.diagnostic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-diag-back {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.65rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-diag-back:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* ==========================================================================
   Pantalla de Resultados del Diagnóstico
   ========================================================================== */

.diagnostic-results-view {
    padding: 2.8rem 2.2rem;
    animation: fadeInSlide 0.4s ease-out;
}

.diagnostic-results-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.results-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--cyber-green);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
}

.results-headline {
    font-size: 1.9rem;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.results-context {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 660px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Sección de Oportunidades */
.diagnostic-opportunities-section {
    margin-bottom: 2.5rem;
}

.opportunities-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.opportunities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.opportunity-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--electric-blue);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    transition: var(--transition-smooth);
}

.opportunity-card:hover {
    border-color: var(--border-hover);
    border-left-color: var(--cyber-green);
    background: rgba(0, 210, 255, 0.02);
}

.opportunity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.6rem;
}

.opportunity-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.opportunity-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: rgba(255, 51, 102, 0.1);
    color: #ff5577;
    font-weight: 600;
    border: 1px solid rgba(255, 51, 102, 0.2);
}

.opportunity-card-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.9rem;
}

.opportunity-first-step {
    background: rgba(0, 210, 255, 0.04);
    border: 1px dashed rgba(0, 210, 255, 0.2);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.45;
}

.opportunity-first-step strong {
    color: var(--electric-blue);
}

/* Tarjeta de Recomendación Estratégica */
.diagnostic-recommendation-box {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 14px;
    padding: 1.8rem;
    margin-bottom: 2.5rem;
}

.rec-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--electric-blue);
    margin-bottom: 0.6rem;
}

.rec-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.rec-headline {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.rec-approach {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.diagnostic-disclaimer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    font-style: italic;
}

/* CTAs de Resultados */
.results-actions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.results-actions-buttons {
    display: flex;
    gap: 1rem;
}

.btn-results-lead {
    flex: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, var(--cyber-green) 0%, var(--electric-blue) 100%);
    color: #060913;
    font-weight: 700;
    padding: 1.1rem 1.8rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.98rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-results-lead:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 102, 0.25);
}

.btn-results-wa {
    flex: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    background: rgba(37, 211, 102, 0.1);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.3);
    font-weight: 600;
    padding: 1.1rem 1.8rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.98rem;
    transition: var(--transition-smooth);
}

.btn-results-wa:hover {
    background: rgba(37, 211, 102, 0.18);
    border-color: #25d366;
    transform: translateY(-2px);
}

/* ==========================================================================
   Formulario de Captura de Lead Posterior
   ========================================================================== */

.lead-capture-card {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    animation: fadeInSlide 0.3s ease-out;
}

.lead-capture-header {
    text-align: center;
    margin-bottom: 1.6rem;
}

.lead-capture-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.lead-capture-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.lead-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.lead-form-grid .full-width {
    grid-column: span 2;
}

.lead-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.95rem 1.15rem;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

.lead-input:focus {
    outline: none;
    border-color: var(--electric-blue);
    background: rgba(0, 210, 255, 0.02);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
}

.lead-input::placeholder {
    color: var(--text-muted);
}

/* Select en Lead Capture Form - Modo Oscuro */
select.lead-input,
select.lead-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
    background-color: #0b1120 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300d2ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1.2rem center !important;
    background-size: 16px 16px !important;
    padding-right: 2.8rem !important;
    color: #f3f4f6 !important;
}

select.lead-input:focus,
select.lead-select:focus {
    outline: none !important;
    border-color: var(--electric-blue) !important;
    background-color: #0d1527 !important;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.15) !important;
}

select.lead-input option,
select.lead-select option {
    background-color: #0b1120 !important;
    color: #f3f4f6 !important;
    padding: 12px !important;
}

select.lead-input option:disabled,
select.lead-select option:disabled {
    color: #6b7280 !important;
}

.lead-submit-btn {
    width: 100%;
    background: var(--cyber-green);
    color: #060913;
    font-weight: 700;
    padding: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-smooth);
    margin-top: 0.5rem;
}

.lead-submit-btn:hover {
    background: #00e65c;
    box-shadow: 0 6px 20px rgba(0, 255, 102, 0.3);
}

.lead-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Confirmación de éxito */
.lead-success-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    animation: fadeInSlide 0.35s ease-out;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.2rem auto;
    border-radius: 50%;
    background: rgba(0, 255, 102, 0.1);
    color: var(--cyber-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 1px solid rgba(0, 255, 102, 0.3);
}

/* ==========================================================================
   Adaptaciones Tema Claro (Light Theme)
   ========================================================================== */

body.light-theme .diagnostic-section {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-theme .diagnostic-wrapper {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.06);
}

body.light-theme .diagnostic-header {
    border-color: #e2e8f0;
    color: #475569;
}

body.light-theme .diagnostic-step-badge {
    background: rgba(0, 150, 220, 0.08);
    color: #0284c7;
    border-color: rgba(2, 132, 199, 0.2);
}

body.light-theme .diagnostic-intro-title,
body.light-theme .diagnostic-question-title,
body.light-theme .results-headline,
body.light-theme .opportunities-title,
body.light-theme .opportunity-card-title,
body.light-theme .lead-capture-title {
    color: #0f172a;
}

body.light-theme .diagnostic-intro-desc,
body.light-theme .diagnostic-question-helper,
body.light-theme .results-context,
body.light-theme .opportunity-card-desc,
body.light-theme .lead-capture-subtitle {
    color: #475569;
}

body.light-theme .diagnostic-benefit-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-theme .diagnostic-benefit-item h4 {
    color: #0f172a;
}

body.light-theme .diagnostic-option-card {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-theme .diagnostic-option-card:hover {
    background: #f0f9ff;
    border-color: #38bdf8;
}

body.light-theme .diagnostic-option-card.selected {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0369a1;
}

body.light-theme .diagnostic-option-radio {
    border-color: #94a3b8;
}

body.light-theme .diagnostic-option-card.selected .diagnostic-option-radio {
    border-color: #0284c7;
    background: #0284c7;
}

body.light-theme .opportunity-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.light-theme .opportunity-first-step {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

body.light-theme .opportunity-first-step strong {
    color: #15803d;
}

body.light-theme .diagnostic-recommendation-box {
    background: #f8fafc;
    border-color: #cbd5e1;
}

body.light-theme .rec-title {
    color: #0f172a;
}

body.light-theme .lead-capture-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.light-theme .lead-input {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-theme .lead-input:focus {
    border-color: var(--electric-blue) !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.08) !important;
}

body.light-theme select.lead-input,
body.light-theme select.lead-select {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230284c7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

body.light-theme select.lead-input option,
body.light-theme select.lead-select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

body.light-theme select.lead-input option:disabled,
body.light-theme select.lead-select option:disabled {
    color: #94a3b8 !important;
}

body.light-theme .btn-diag-back {
    border-color: #cbd5e1;
    color: #475569;
}

body.light-theme .btn-diag-back:hover {
    color: #0f172a;
    border-color: #94a3b8;
}

/* ==========================================================================
   Responsive Breakpoints (Mobile-First)
   ========================================================================== */

@media screen and (max-width: 768px) {
    .diagnostic-section {
        padding: 4rem 0;
    }

    .diagnostic-intro {
        padding: 2.2rem 1.4rem;
    }

    .diagnostic-intro-title {
        font-size: 1.65rem;
    }

    .diagnostic-benefits-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .diagnostic-body {
        padding: 1.8rem 1.2rem;
    }

    .diagnostic-header {
        padding: 1rem 1.2rem;
    }

    .diagnostic-question-title {
        font-size: 1.2rem;
    }

    .diagnostic-option-card {
        padding: 0.95rem 1.1rem;
        font-size: 0.9rem;
    }

    .diagnostic-results-view {
        padding: 2rem 1.2rem;
    }

    .results-headline {
        font-size: 1.5rem;
    }

    .results-actions-buttons {
        flex-direction: column;
    }

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

    .lead-form-grid .full-width {
        grid-column: span 1;
    }
}

/* Sincronización de estilo de lista desplegable (Select) */
.form-select,
select.form-input,
.contact-form select {
    display: block;
    width: 100% !important;
    background-color: #0b1120 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300d2ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1.2rem center !important;
    background-size: 16px 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    padding: 1rem 2.8rem 1rem 1.2rem !important;
    color: #f3f4f6 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    box-sizing: border-box !important;
}

.form-select:focus,
select.form-input:focus,
.contact-form select:focus {
    outline: none !important;
    border-color: var(--electric-blue) !important;
    background-color: #0d1527 !important;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.15) !important;
}

.form-select option,
select.form-input option,
.contact-form select option {
    background-color: #0b1120 !important;
    color: #f3f4f6 !important;
    padding: 12px !important;
}

body.light-theme .form-select,
body.light-theme select.form-input,
body.light-theme .contact-form select {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230284c7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

body.light-theme .form-select option,
body.light-theme select.form-input option,
body.light-theme .contact-form select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

