/* ============================================
   RVOLUCION — DIAGNOSTIC MODAL
   Reskin completo sobre la identidad de marca.
   ⚠️ Solo APARIENCIA: no se cambió ningún nombre de clase/id.
   Las clases de estado (.active/.selected/.show/.critical/...) se
   conservan; solo cambia su aspecto.
   ============================================ */

/* ----------------------------------------------------------------
   Redefinición de variables que el modal hereda de head.php.
   Las sobreescribimos con la paleta Rvolucion para que TODO el
   modal use los colores de marca sin tocar cada regla suelta.
   ---------------------------------------------------------------- */
.modal-overlay {
    --d-ink:        #06080d;
    --d-ink-2:      #0b0e16;
    --d-ink-3:      #11151f;
    --d-line:       #1b2030;
    --d-fire:       #ff5722;
    --d-fire-bright:#ff7a18;
    --d-fire-soft:  #ff9a4d;
    --d-cyan:       #2ce8f5;
    --d-cyan-deep:  #0bb8d4;
    --d-lime:       #c6f24e;
    --d-white:      #f3f6fb;
    --d-gray:       #8b93a7;
    --d-grad-main:  linear-gradient(120deg, #ff5722 0%, #ff7a18 35%, #2ce8f5 100%);
    --d-grad-fire:  linear-gradient(135deg, #ff5722, #ff9a4d);
    --d-grad-cyan:  linear-gradient(135deg, #2ce8f5, #0bb8d4);

    /* Sobre-escribe las variables globales SOLO dentro del modal */
    --bg-card: rgba(11, 14, 22, 0.85);
    --text-primary: #f3f6fb;
    --text-muted: #8b93a7;
    --gradient-primary: var(--d-grad-main);
    --glow-cyan: 0 0 40px rgba(255, 87, 34, 0.28);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 5, 9, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background:
        radial-gradient(120% 80% at 80% -10%, rgba(255,87,34,0.10), transparent 55%),
        radial-gradient(120% 90% at -10% 110%, rgba(44,232,245,0.08), transparent 55%),
        var(--bg-card);
    backdrop-filter: blur(30px);
    border: 1px solid var(--d-line);
    border-radius: 24px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6),
                inset 0 1px 0 rgba(255,255,255,0.04);
    transform: scale(0.9);
    transition: transform 0.3s;
    position: relative;

    scrollbar-width: thin;
    scrollbar-color: rgba(255, 87, 34, 0.45) transparent;
}

.modal-container::-webkit-scrollbar {
    width: 8px;
}

.modal-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
                rgba(255, 87, 34, 0.6) 0%,
                rgba(44, 232, 245, 0.5) 100%);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: inset 0 0 6px rgba(255, 87, 34, 0.3);
}

.modal-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
                rgba(255, 87, 34, 0.8) 0%,
                rgba(44, 232, 245, 0.7) 100%);
    background-clip: padding-box;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--d-line);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 87, 34, 0.12);
    border-color: rgba(255, 87, 34, 0.4);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--d-white);
}

/* ----------------------------------------------------------------
   LOGO RVOLUCION en la cabecera (nuevo)
   El <img>/<span> se agrega en nav.php dentro de .modal-container,
   antes de .progress-container. Si la imagen falla, cae al texto.
   ---------------------------------------------------------------- */
.modal-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.2rem 3rem 0;
}

.modal-logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.modal-logo-text {
    font-family: var(--font-display, 'Chivo', sans-serif);
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    color: var(--d-white);
}

.modal-logo-text .rmark {
    display: inline-block;
    background: var(--d-grad-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Step indicator (círculo "Paso X de 6") */
.step-indicator {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--d-grad-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--d-ink);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 25px rgba(255, 87, 34, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.step-indicator::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--d-ink);
    z-index: -1;
}

.step-indicator-text {
    position: relative;
    z-index: 1;
    background: var(--d-grad-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    text-align: center;
}

/* Progress bar */
.progress-container {
    padding: 1.6rem 3rem 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--d-grad-main);
    border-radius: 10px;
    transition: width 0.4s ease;
    box-shadow: 0 0 12px rgba(255, 87, 34, 0.5);
}

.progress-text {
    font-family: var(--font-mono, 'Chivo Mono', monospace);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-align: center;
    text-transform: uppercase;
}

/* Modal content */
.modal-content {
    padding: 2rem 3rem 3rem;
}

.step-container {
    display: none;
}

.step-container.active {
    display: block;
    animation: fadeInStep 0.4s ease-out;
}

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

.step-header {
    margin-bottom: 2.5rem;
}

.step-number {
    font-family: var(--font-mono, 'Chivo Mono', monospace);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--d-fire);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.step-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--d-white);
    margin-bottom: 0.5rem;
}

.step-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Form elements */
.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    color: var(--d-white);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

/* Tooltip system */
.tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 87, 34, 0.18);
    border: 1px solid rgba(255, 87, 34, 0.4);
    color: var(--d-fire);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
}

.tooltip-content {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 14, 22, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 87, 34, 0.3);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    min-width: 280px;
    max-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 1000;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(255, 87, 34, 0.3);
}

.tooltip-trigger:hover .tooltip-content {
    opacity: 1;
    pointer-events: all;
    bottom: calc(100% + 15px);
}

.tooltip-title {
    font-weight: 700;
    color: var(--d-fire);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.tooltip-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Option cards */
.option-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--d-line);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.option-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 87, 34, 0.35);
}

.option-card.selected {
    background: rgba(255, 87, 34, 0.1);
    border-color: var(--d-fire);
    box-shadow: 0 0 30px rgba(255, 87, 34, 0.2);
}

.option-card .checkmark {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.option-card.selected .checkmark {
    background: var(--d-fire);
    border-color: var(--d-fire);
}

.option-card.selected .checkmark svg {
    opacity: 1;
}

.checkmark svg {
    width: 14px;
    height: 14px;
    stroke: var(--d-ink);
    opacity: 0;
    transition: opacity 0.3s;
}

.option-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--d-white);
    margin-bottom: 0.3rem;
}

.option-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Slider input */
.slider-container {
    padding: 1rem 0;
}

.slider-value {
    text-align: center;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--d-grad-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.slider-input {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--d-grad-fire);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 87, 34, 0.5);
}

.slider-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--d-fire);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 87, 34, 0.5);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Text input */
.text-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--d-line);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: var(--d-white);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s;
}

.text-input:focus {
    outline: none;
    border-color: var(--d-fire);
    box-shadow: 0 0 20px rgba(255, 87, 34, 0.2);
}

/* Navigation buttons */
.modal-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
}

.btn-back {
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--d-line);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--d-white);
}

.btn-next {
    background: var(--d-grad-fire);
    color: var(--d-white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
    box-shadow: var(--glow-cyan);
    transition: all 0.3s;
    flex: 1;
    max-width: 200px;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(255, 87, 34, 0.5);
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   RESULTS / SCORE / LOADING
   ============================================ */
.results-container {
    text-align: center;
}

.loading-animation {
    margin: 3rem 0;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    border: 4px solid rgba(255, 87, 34, 0.12);
    border-top: 4px solid var(--d-fire);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.score-display {
    margin: 3rem 0;
    display: none;
}

.score-display.show {
    display: block;
    animation: fadeIn 0.6s ease-out;
}

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

.score-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    position: relative;
}

.score-number {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 200px;
    background: var(--d-grad-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--d-white);
    margin-bottom: 1rem;
}

.score-status {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* Estados de score: se conservan los nombres; ajustamos a la paleta.
   critical = fuego/rojo cálido · warning = naranja suave · good = lima */
.score-status.critical {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ff6b5e;
}

.score-status.warning {
    background: rgba(255, 154, 77, 0.12);
    border: 1px solid rgba(255, 154, 77, 0.35);
    color: var(--d-fire-soft);
}

.score-status.good {
    background: rgba(198, 242, 78, 0.12);
    border: 1px solid rgba(198, 242, 78, 0.35);
    color: var(--d-lime);
}

.score-insights {
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--d-line);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.insight-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--d-white);
    margin-bottom: 1.5rem;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.insight-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.insight-icon {
    flex-shrink: 0;
    font-size: 1.5rem;
}

.insight-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.insight-text {
    color: var(--text-muted);
    line-height: 1.6;
}

.insight-impact {
    color: var(--d-lime);
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
    padding-left: 1rem;
}

.cta-section {
    margin-top: 3rem;
}

/* ============================================
   CHAT INTERNO (asistente del diagnóstico)
   ============================================ */
.chat-interface {
    display: none;
    margin-top: 2rem;
}

.chat-interface.show {
    display: block;
    animation: fadeIn 0.6s ease-out;
}

.typing-indicator .typing-dots {
    display: inline-flex;
    gap: 4px;
}

.typing-indicator .typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator .typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-indicator .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.7; }
    30% { transform: translateY(-10px); opacity: 1; }
}

.chat-messages {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--d-line);
    border-radius: 16px;
    padding: 1.5rem;
    height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 87, 34, 0.4) transparent;
}

.chat-messages::-webkit-scrollbar { width: 6px; }

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    margin: 8px 0;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--d-fire) 0%, var(--d-cyan) 100%);
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--d-fire-bright) 0%, var(--d-cyan-deep) 100%);
}

.chat-message {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
}

.chat-message.ai { flex-direction: row; }
.chat-message.user { flex-direction: row-reverse; }

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--d-grad-fire);
    color: var(--d-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 0.9rem;
}

.message-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--d-line);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    max-width: 70%;
    color: var(--d-white);
}

.chat-message.user .message-bubble {
    background: rgba(255, 87, 34, 0.1);
    border-color: rgba(255, 87, 34, 0.3);
}

.chat-input-container {
    display: flex;
    gap: 1rem;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--d-line);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: var(--d-white);
    font-size: 1rem;
    font-family: var(--font-body);
}

.chat-input:focus {
    outline: none;
    border-color: var(--d-fire);
}

.btn-send {
    background: var(--d-grad-fire);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    color: var(--d-white);
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

/* ============================================
   RESPONSIVE (cabecera + nav)
   ============================================ */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .modal-logo { padding: 1.5rem 1.5rem 0; }
    .modal-logo-img { height: 32px; }

    .progress-container,
    .modal-content {
        padding: 1.5rem;
    }

    .step-indicator {
        width: 56px;
        height: 56px;
        top: 16px;
        left: 16px;
        font-size: 9px;
    }

    .step-title { font-size: 1.5rem; }

    .modal-nav { flex-direction: column; }

    .btn-next { max-width: none; }

    .tooltip-content {
        min-width: 240px;
        left: 0;
        transform: translateX(-20%);
    }

    .tooltip-content::after { left: 20%; }
}

/* ============================================
   ANÁLISIS FINAL — pérdidas / ganancias / escalabilidad
   ============================================ */
.section-losing {
    background: rgba(239, 68, 68, 0.06);
    border-left: 3px solid #ff6b5e;
}

.losing-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.losing-metric {
    text-align: center;
    padding: 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
}

.metric-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: #ff6b5e;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.losing-explanation {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-top: 1.5rem;
}

.section-gaining {
    background: rgba(198, 242, 78, 0.05);
    border-left: 3px solid var(--d-lime);
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.benefits-list li svg { flex-shrink: 0; margin-top: 0.1rem; }
.benefits-list li strong { color: var(--d-lime); }

.section-scalability {
    background: rgba(44, 232, 245, 0.05);
    border-left: 3px solid var(--d-cyan);
}

.scalability-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.scale-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(44, 232, 245, 0.2);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--d-white);
    transition: all 0.3s ease;
}

.scale-feature:hover {
    background: rgba(44, 232, 245, 0.08);
    border-color: rgba(44, 232, 245, 0.4);
    transform: translateY(-2px);
}

.scale-icon { font-size: 1.5rem; }

.steps-timeline {
    position: relative;
    padding-left: 2rem;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--d-grad-main);
}

.timeline-step {
    position: relative;
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.timeline-step:last-child { margin-bottom: 0; }

.steps-timeline .step-number {
    position: absolute;
    left: -2rem;
    width: 2rem;
    height: 2rem;
    background: var(--d-grad-fire);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--d-ink);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
    z-index: 1;
}

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.step-content strong { color: var(--text-primary); font-size: 1rem; }
.step-content span { color: var(--text-muted); font-size: 0.85rem; }

@media (max-width: 768px) {
    .losing-metrics { grid-template-columns: 1fr; }
    .scalability-features { grid-template-columns: 1fr; }
    .metric-number { font-size: 1.5rem; }
}

/* ============================================
   ANÁLISIS DE IA + LOADING
   ============================================ */
.ai-loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    min-height: 400px;
}

.loading-animation { width: 60px; height: 60px; }

.section-ai-analysis {
    background: rgba(255, 87, 34, 0.05);
    border-left: 3px solid var(--d-fire);
}

.ai-analysis-content {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.95rem;
}

.ai-analysis-content p { margin-bottom: 1.5rem; }
.ai-analysis-content p:last-child { margin-bottom: 0; }
.ai-analysis-content strong { color: var(--d-fire); font-weight: 600; }

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 87, 34, 0.1);
    border: 1px solid rgba(255, 87, 34, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--d-fire);
    margin-bottom: 1rem;
}

.ai-badge svg { width: 16px; height: 16px; }

/* Métrica única centrada */
.losing-single-metric {
    text-align: center;
    padding: 2rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 16px;
    margin: 1.5rem 0;
}

.losing-single-metric .metric-number {
    font-size: 3rem;
    font-weight: 700;
    color: #ff6b5e;
    margin-bottom: 0.75rem;
}

.losing-single-metric .metric-label {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   VERSIÓN LIMPIA Y ESPACIADA - NO WEB RESULTS
   ============================================ */
.results-noweb-clean .results-body {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.diagnostic-section {
    position: relative;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid rgba(255, 87, 34, 0.3);
    border-radius: 12px;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 87, 34, 0.1);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.diagnostic-section h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--d-white);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-ai-analysis-clean { border-left-color: var(--d-fire); }

.ai-analysis-content-clean {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 1rem;
}

.ai-analysis-content-clean p { margin-bottom: 1.5rem; }
.ai-analysis-content-clean p:last-child { margin-bottom: 0; }

.section-selected-pack {
    border-left-color: var(--d-cyan);
    background: rgba(44, 232, 245, 0.05);
}

.pack-recommendation-clean {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin: 1.5rem 0;
}

.rec-pack-name { font-size: 1.5rem; font-weight: 700; color: var(--d-white); }
.rec-pack-price { font-size: 1.3rem; color: var(--d-cyan); font-weight: 600; }

.pack-context {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.pack-context strong { color: var(--d-cyan); }

.section-benefits-clean { border-left-color: var(--d-lime); }

.benefits-list-clean {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.benefits-list-clean li {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 0.75rem;
    background: rgba(198, 242, 78, 0.05);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.benefits-list-clean li:hover {
    background: rgba(198, 242, 78, 0.1);
    transform: translateX(5px);
}

.benefits-list-clean li svg { flex-shrink: 0; }
.benefits-list-clean li strong { color: var(--d-lime); }

.section-scalability-clean { border-left-color: var(--d-cyan); }

.scalability-intro {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.scalability-features-clean {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.scale-feature-clean {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(44, 232, 245, 0.2);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--d-white);
    transition: all 0.3s ease;
}

.scale-feature-clean:hover {
    background: rgba(44, 232, 245, 0.08);
    border-color: rgba(44, 232, 245, 0.4);
    transform: translateY(-2px);
}

.scale-feature-clean svg { flex-shrink: 0; }

.scalability-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(198, 242, 78, 0.05);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.scalability-note strong { color: var(--d-lime); }

.section-next-steps-clean { border-left-color: var(--d-fire); }

.steps-timeline-clean {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.timeline-step-clean {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.timeline-step-clean:hover {
    background: rgba(255, 87, 34, 0.05);
    transform: translateX(5px);
}

.step-number-clean {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--d-grad-fire);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--d-ink);
}

.step-content-clean {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.step-content-clean strong { color: var(--text-primary); font-size: 1.05rem; }
.step-content-clean span { color: var(--text-muted); font-size: 0.9rem; }

.no-web-score .score-content svg { width: 48px; height: 48px; }

@media (max-width: 768px) {
    .results-noweb-clean .results-body { gap: 2.5rem; }
    .diagnostic-section { padding: 1.5rem; }
    .pack-recommendation-clean { flex-direction: column; gap: 1rem; text-align: center; }
    .scalability-features-clean { grid-template-columns: 1fr; }
    .benefits-list-clean li { font-size: 0.95rem; }
}
