/* ============================================================
   DIAGNÓSTICO IGE — Estilos compartidos
   Todos los selectores usan .dige- para no colisionar con Impreza
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;900&family=Syne:wght@700;800&family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── Root container ─────────────────────────────────────── */
.dige-root {
    --dige-bg:        #080c14;
    --dige-card-bg:   rgba(255,255,255,0.04);
    --dige-border:    rgba(255,255,255,0.08);
    --dige-text:      #e8eaf0;
    --dige-muted:     #5a6a8a;
    --dige-accent1:   #FF6B35;
    --dige-accent2:   #F7C948;
    --dige-accent3:   #7B2FBE;
    --dige-accent4:   #4ECDC4;
    --dige-accent5:   #1A936F;
    --dige-font-body: 'DM Sans', 'Nunito', sans-serif;
    --dige-font-head: 'Syne', 'DM Serif Display', serif;

    background: var(--dige-bg);
    color: var(--dige-text);
    font-family: var(--dige-font-body);
    border-radius: 20px;
    overflow: hidden;
    min-height: 500px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Neutralise common Impreza/WPBakery overrides */
.dige-root *,
.dige-root *::before,
.dige-root *::after {
    box-sizing: border-box;
}
.dige-root a { text-decoration: none; }
.dige-root button { cursor: pointer; }
.dige-root p { margin: 0; }
.dige-root h2, .dige-root h3 { margin: 0; }

/* ── Screens ────────────────────────────────────────────── */
.dige-screen          { display: none; }
.dige-screen--active  { display: block; }

/* ── Typography helpers ─────────────────────────────────── */
.dige-label-small {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--dige-muted);
    margin-bottom: 8px !important;
}
.dige-title {
    font-family: var(--dige-font-head);
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    color: #f0f4ff;
    line-height: 1.2;
    margin-bottom: 12px !important;
}
.dige-title--sm   { font-size: clamp(18px, 3vw, 24px); }
.dige-title--serif { font-weight: 400; font-family: 'DM Serif Display', serif; }
.dige-title em    { color: #7B8FCC; font-style: italic; }
.dige-subtitle {
    color: #6a7a9a;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px !important;
}
.dige-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #3a4a6a;
    margin: 0 0 12px !important;
}
.dige-footer-note {
    color: #2a3a5a;
    font-size: 12px;
    text-align: center;
    margin-top: 16px !important;
}

/* ── Buttons ────────────────────────────────────────────── */
.dige-btn {
    width: 100%;
    padding: 15px 20px;
    border-radius: 14px;
    font-family: var(--dige-font-head);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border: none;
    transition: all 0.25s;
    display: block;
    text-align: center;
}
.dige-btn--primary {
    background: linear-gradient(135deg, #7B2FBE, #4ECDC4);
    color: #fff;
}
.dige-btn--primary:disabled {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.25);
    cursor: not-allowed;
}
.dige-btn--download {
    background: linear-gradient(135deg, #FF6B35, #F7C948);
    color: #1a1a2e;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(255,107,53,0.25);
}
.dige-btn--ghost {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: rgba(255,255,255,0.5);
    font-family: var(--dige-font-body);
    font-weight: 700;
}
.dige-btn--theory {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 20px;
    padding: 8px 18px;
    color: #7B8FCC;
    font-size: 12px;
    font-family: var(--dige-font-body);
    font-weight: 500;
    width: auto;
}
.dige-btn--ghost-sm, .dige-btn--theory-sm, .dige-btn--download-sm {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    border: none;
    font-family: var(--dige-font-body);
    width: auto;
}
.dige-btn--ghost-sm    { background: none; color: #5a6a8a; border: 1px solid rgba(255,255,255,0.07) !important; }
.dige-btn--theory-sm   { background: rgba(255,255,255,0.04); color: #5a7aaa; border: 1px solid rgba(255,255,255,0.07) !important; }
.dige-btn--download-sm { color: #1a1a2e; }

/* ── Welcome screen ─────────────────────────────────────── */
.dige-welcome-inner {
    max-width: 480px;
    margin: 0 auto;
    padding: 48px 32px;
    text-align: center;
}
.dige-target-icon { font-size: 52px; margin-bottom: 12px; }
.dige-field { margin-bottom: 20px; text-align: left; }
.dige-field-label {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px !important;
}
.dige-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    color: #fff;
    font-size: 16px;
    font-family: var(--dige-font-body);
    outline: none;
    transition: border-color 0.2s;
}
.dige-input:focus { border-color: #7B2FBE; }

/* ── Quiz screen ────────────────────────────────────────── */
#dige-quiz { padding: 28px; max-width: 580px; margin: 0 auto; }
.dige-quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.dige-progress-label { color: rgba(255,255,255,0.35); font-size: 13px; }
.dige-progress-bar-wrap {
    background: rgba(255,255,255,0.07);
    border-radius: 8px;
    height: 6px;
    margin-bottom: 28px;
    overflow: hidden;
}
.dige-progress-bar {
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, #FF6B35, #F7C948);
    transition: width 0.5s ease;
}
.dige-question {
    font-family: var(--dige-font-head);
    color: #fff;
    font-size: clamp(16px, 2.5vw, 20px);
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 24px !important;
}
.dige-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.dige-option {
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border: 1.5px solid rgba(255,255,255,0.09);
    border-radius: 14px;
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    text-align: left;
    transition: all 0.2s;
    font-family: var(--dige-font-body);
    line-height: 1.4;
    width: 100%;
}
.dige-option:hover {
    border-color: rgba(255,107,53,0.4);
    background: rgba(255,107,53,0.06);
}
.dige-option--selected {
    background: linear-gradient(135deg, rgba(255,107,53,0.2), rgba(247,201,72,0.15));
    border-color: rgba(255,107,53,0.65);
    color: #fff;
    font-weight: 700;
    transform: translateX(4px);
    box-shadow: 0 4px 18px rgba(255,107,53,0.15);
}

/* ── Result screen ──────────────────────────────────────── */
.dige-result-inner { max-width: 600px; margin: 0 auto; padding: 32px 28px; }
.dige-result-card {
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.dige-result-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}
.dige-result-emoji { font-size: 38px; }
.dige-result-name  { color: #fff; font-family: var(--dige-font-head); font-size: 22px; font-weight: 800; margin-top: 2px !important; }
.dige-result-tagline { color: rgba(255,255,255,0.85); font-style: italic; font-size: 14px; font-weight: 600; margin-bottom: 10px !important; }
.dige-result-desc  { color: rgba(255,255,255,0.8); font-size: 14px; line-height: 1.65; }
.dige-result-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.dige-result-box   { background: rgba(255,255,255,0.04); border-radius: 12px; padding: 16px; }
.dige-box-label    { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px !important; }
.dige-box-label--gold { color: #F7C948; }
.dige-box-label--teal { color: #4ECDC4; }
.dige-box-item     { color: rgba(255,255,255,0.75); font-size: 13px; margin-bottom: 6px !important; }
.dige-bar-row      { margin-bottom: 12px; }
.dige-bar-meta     { display: flex; justify-content: space-between; margin-bottom: 5px; }
.dige-bar-name     { font-size: 13px; }
.dige-bar-pct      { font-size: 13px; font-weight: 700; }
.dige-bar-wrap     { background: rgba(255,255,255,0.07); border-radius: 6px; height: 8px; overflow: hidden; }
.dige-bar-fill     { height: 100%; border-radius: 6px; transition: width 0.8s ease; }
.dige-secondary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
}
.dige-secondary-emoji { font-size: 22px; }
.dige-secondary-name  { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 2px !important; }
.dige-secondary-tag   { color: rgba(255,255,255,0.4); font-size: 12px; }
.dige-secondary-pct   { margin-left: auto; font-weight: 700; font-size: 13px; }
.dige-result-actions  { margin-top: 20px; }

/* ── Ruta: select screen ────────────────────────────────── */
.dige-ruta-select-inner { max-width: 640px; margin: 0 auto; padding: 48px 28px; text-align: center; }
.dige-profile-list { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.dige-profile-btn {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: border-color 0.2s;
    font-family: var(--dige-font-body);
    width: 100%;
    text-align: left;
}
.dige-profile-badge {
    width: 50px; height: 50px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.dige-profile-btn-name  { color: #f0f4ff; font-weight: 700; font-size: 16px; margin-bottom: 4px !important; }
.dige-profile-btn-meta  { color: #4a5a7a; font-size: 12px; }
.dige-profile-btn-arrow { margin-left: auto; font-size: 18px; }

/* ── Ruta: top bar ──────────────────────────────────────── */
.dige-ruta-topbar {
    position: sticky; top: 0; z-index: 10;
    background: rgba(8,12,20,0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.dige-ruta-topbar-profile { display: flex; align-items: center; gap: 8px; }
.dige-topbar-emoji {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}

/* ── Ruta: content area ─────────────────────────────────── */
.dige-ruta-content { max-width: 720px; margin: 0 auto; padding: 28px 24px; }

/* Hero */
.dige-ruta-hero { margin-bottom: 20px; }
.dige-hero-row  { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.dige-hero-badge {
    width: 60px; height: 60px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0;
}
.dige-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.dige-chip {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    color: #8a9aba;
}

/* Path note */
.dige-path-note {
    background: rgba(232,168,56,0.06);
    border: 1px solid rgba(232,168,56,0.2);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}
.dige-path-note-toggle {
    width: 100%; padding: 12px 16px;
    background: none; border: none;
    display: flex; align-items: center; justify-content: space-between;
    color: #E8A838; font-size: 13px; font-weight: 600;
    font-family: var(--dige-font-body);
}
.dige-path-note-body p {
    padding: 0 16px 14px;
    color: rgba(232,168,56,0.75);
    font-size: 13px;
    line-height: 1.7;
}

/* Phase tabs */
.dige-phase-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.dige-phase-tab {
    flex: 1; padding: 12px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    font-family: var(--dige-font-body);
    text-align: left;
    transition: all 0.2s;
}
.dige-phase-tab--active {
    background: rgba(255,255,255,0.06);
}
.dige-phase-tab-label { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 3px !important; }
.dige-phase-tab-name  { color: #4a5a7a; font-size: 13px; font-weight: 600; margin-bottom: 2px !important; }
.dige-phase-tab-name--active { color: #c0c8e0; }
.dige-phase-tab-period { color: #3a4a6a; font-size: 11px; }

/* Phase header */
.dige-phase-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.dige-phase-title  { font-family: 'DM Serif Display', serif; color: #e0e8ff; font-size: 20px; font-weight: 400; }
.dige-tag-badge {
    border-radius: 20px; padding: 3px 12px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
}

/* Content tabs */
.dige-content-tabs {
    display: flex; gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 18px;
    overflow-x: auto;
}
.dige-content-tab {
    padding: 8px 12px 12px;
    background: none; border: none;
    border-bottom: 2px solid transparent;
    color: #4a5a7a; font-size: 12px; font-weight: 500;
    font-family: var(--dige-font-body);
    white-space: nowrap; margin-bottom: -1px;
    transition: all 0.15s;
}
.dige-content-tab--active { color: #f0f4ff; font-weight: 700; }

/* Tab content cards */
.dige-org-card, .dige-skill-card, .dige-invest-card, .dige-learn-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 12px;
}
.dige-org-row    { display: flex; gap: 14px; align-items: flex-start; }
.dige-org-icon   { font-size: 26px; flex-shrink: 0; }
.dige-org-type   { color: #e0e8ff; font-weight: 700; font-size: 15px; margin-bottom: 4px !important; }
.dige-org-examples { font-size: 12px; margin-bottom: 10px !important; }
.dige-org-why    { background: rgba(255,255,255,0.03); border-radius: 8px; padding: 10px 12px; }
.dige-org-why p  { color: #7a8aaa; font-size: 13px; line-height: 1.6; }
.dige-why-label  { color: #4a5a7a; font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: 1px; }

.dige-skill-row   { display: flex; align-items: center; gap: 14px; }
.dige-skill-icon  { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 17px; }
.dige-skill-name  { color: #d0d8f0; font-weight: 600; font-size: 15px; margin-bottom: 6px !important; }
.dige-skill-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dige-skill-chip  { border-radius: 20px; padding: 2px 10px; font-size: 11px; font-weight: 600; }
.dige-urgency-high { background: rgba(255,107,53,0.1); border: 1px solid rgba(255,107,53,0.3); color: #FF6B35; }
.dige-urgency-med  { background: rgba(90,106,138,0.15); border: 1px solid rgba(90,106,138,0.2); color: #5a6a8a; }

.dige-invest-row  { display: flex; align-items: center; gap: 16px; }
.dige-invest-icon { font-size: 30px; flex-shrink: 0; }
.dige-invest-area { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 5px !important; }
.dige-invest-text { color: #c0c8e0; font-size: 15px; }
.dige-path-tip    { background: rgba(232,168,56,0.05); border: 1px solid rgba(232,168,56,0.15); border-radius: 10px; padding: 12px 14px; margin-top: 8px; color: #E8A838; font-size: 12px; line-height: 1.6; }

.dige-learn-row   { display: flex; align-items: center; gap: 14px; }
.dige-learn-type  { border-radius: 8px; padding: 4px 10px; font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.dige-learn-item  { color: #c0c8e0; font-size: 14px; }

.dige-cap-legend  { background: rgba(78,205,196,0.05); border: 1px solid rgba(78,205,196,0.15); border-radius: 10px; padding: 12px 14px; margin-top: 8px; color: #4ECDC4; font-size: 12px; line-height: 1.6; }

/* ── Theory modal ───────────────────────────────────────── */
.dige-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.dige-modal {
    background: #0e1220;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    max-width: 500px; width: 100%;
    padding: 28px;
    max-height: 85vh; overflow-y: auto;
}
.dige-modal-tabs  { display: flex; gap: 6px; margin-bottom: 20px; }
.dige-modal-tab   {
    flex: 1; padding: 8px 4px;
    background: transparent;
    border-radius: 8px;
    font-size: 18px; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.06);
    font-family: var(--dige-font-body);
    transition: all 0.2s;
}
.dige-modal-theory-label  { font-size: 10px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 5px !important; }
.dige-modal-theory-title  { font-family: 'DM Serif Display', serif; color: #f0f4ff; font-size: 22px; font-weight: 400; margin-bottom: 4px !important; }
.dige-modal-theory-author { color: #4a5a7a; font-size: 12px; margin-bottom: 16px !important; }
.dige-modal-theory-text   { color: #8a9aba; font-size: 14px; line-height: 1.8; margin-bottom: 20px !important; }

/* ── Print styles ───────────────────────────────────────── */
@media print {
    .dige-root { background: #fff !important; color: #111 !important; }
    .dige-ruta-topbar,
    .dige-phase-tabs,
    .dige-content-tabs,
    .dige-btn--ghost,
    .dige-btn--ghost-sm,
    .dige-btn--theory,
    .dige-btn--theory-sm,
    .dige-btn--download,
    .dige-btn--download-sm,
    #dige-btn-restart,
    .dige-result-actions { display: none !important; }
    .dige-result-inner, .dige-ruta-content { padding: 0 !important; }
    .dige-result-card { box-shadow: none !important; border: 1px solid #ddd !important; }
    .dige-bar-name, .dige-bar-pct, .dige-org-type, .dige-skill-name, .dige-invest-text, .dige-learn-item { color: #111 !important; }
    .dige-label-small, .dige-section-label, .dige-footer-note { color: #666 !important; }
    .dige-subtitle, .dige-muted, .dige-org-why p { color: #555 !important; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 500px) {
    .dige-result-grid { grid-template-columns: 1fr; }
    .dige-phase-tabs  { flex-direction: column; }
    .dige-ruta-topbar { flex-wrap: wrap; gap: 8px; }
}
