* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f6f8;
    color: #2c3e50;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* BARRA SUPERIOR DE NAVEGACIÓN ESTÁNDAR NOSCE™ */
.test-navbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: #0f172a !important;
    padding: 12px 24px !important;
    color: #f8fafc !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    width: 100% !important;
}

.test-navbar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.brand-title {
    color: #38bdf8 !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

.brand-sub {
    color: #94a3b8 !important;
    font-size: 0.85rem !important;
}

.btn-return-hub {
    display: inline-flex !important;
    align-items: center !important;
    background-color: #0284c7 !important;
    color: #ffffff !important;
    border: 1px solid #38bdf8 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
}

.btn-return-hub:hover {
    background-color: #0369a1 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4) !important;
}

main {
    max-width: 1150px;
    margin: 30px auto;
    padding: 30px;
    background-color: #ffffff;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
}

header {
    text-align: center;
    padding: 20px 20px 30px 20px;
    border-bottom: 3px solid #2c3e50;
}

h1 {
    color: #1a252f;
    font-weight: 900;
    font-size: 2.2em;
    letter-spacing: 0.3px;
    margin: 10px 0;
}

.subtitulo {
    color: #2980b9;
    font-weight: 700;
    font-size: 1.15em;
    margin-bottom: 20px;
}

.instrucciones {
    background-color: #fdfefe;
    border-left: 5px solid #2980b9;
    padding: 15px 20px;
    border-radius: 4px;
    text-align: left;
    max-width: 950px;
    margin: 0 auto;
}

.instrucciones h2 {
    color: #2c3e50;
    font-size: 1.25em;
    margin-top: 0;
}

#progreso-container {
    margin: 20px auto 35px auto;
    max-width: 600px;
    text-align: center;
}

#progreso-texto {
    font-weight: 700;
    color: #34495e;
    display: inline-block;
    margin-bottom: 8px;
}

#progreso-barra-fondo {
    background-color: #eaeded;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

#progreso-barra-llena {
    background-color: #27ae60;
    height: 100%;
    width: 12.5%;
    transition: width 0.3s ease-in-out;
}

#bloques-dinamicos-container {
    display: block;
    width: 100%;
}

.bloque-test {
    width: 100%;
    margin-bottom: 20px;
}

.afirmacion-card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.nomenclatura-tag {
    background-color: #34495e;
    color: white;
    font-size: 0.8em;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 3px;
    margin-right: 12px;
    display: inline-block;
}

.afirmacion-texto {
    font-size: 1.1em;
    font-weight: 500;
    margin: 0 0 15px 0;
    color: #2c3e50;
    text-align: left;
}

.likert-container {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.likert-option {
    flex: 1;
    text-align: center;
}

.likert-option input[type="radio"] { 
    display: none !important; 
}

.likert-option label {
    display: block;
    background-color: #f8f9f9;
    border: 2px solid #d5dbdb;
    padding: 12px 4px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82em;
    font-weight: 700;
    color: #7f8c8d;
    text-align: center;
    transition: all 0.12s ease-in-out;
    user-select: none;
}

.likert-option input[type="radio"]:checked + label {
    background-color: #2980b9;
    border-color: #1f618d;
    color: white;
    box-shadow: 0 3px 8px rgba(41, 128, 185, 0.3);
}

.navegacion-bloques {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.navegacion-bloques button {
    padding: 12px 35px;
    font-size: 1.05em;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#btn-bloque-anterior { background-color: #95a5a6; color: white; }
#btn-bloque-siguiente { background-color: #27ae60; color: white; margin-left: auto; }

#btn-calcular-riesgo {
    background-color: #1a252f;
    color: white;
    border: 3px solid #2c3e50;
    padding: 22px 60px;
    font-size: 1.45em;
    font-weight: 900;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    max-width: 650px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
    transition: all 0.15s ease;
}
#btn-calcular-riesgo:hover { background-color: #2c3e50; transform: scale(1.01); }

/* SECCIÓN DE BRÚJULAS CONCEPTUALES */
.grid-modelos-explicativos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
    margin-bottom: 25px;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
}

.card-explicativa-brujula-completa {
    background-color: #fff;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    text-align: center;
}

/* RESALTE Y NITIDEZ DE TÍTULOS Y BAJADAS */
.titulo-explicativo-destacado {
    margin-top: 0;
    font-size: 1.1em;
    font-weight: 900;
    color: #0f172a !important;
    border-bottom: 1.5px solid #2980b9;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.bajada-grafico-centro-nitida {
    font-size: 0.85em;
    font-weight: 700;
    color: #1e293b !important;
    margin-bottom: 14px;
    line-height: 1.45;
    text-align: left;
}

.brujula-imagen-fija-wrapper {
    width: 100%;
    max-width: 380px;
    height: auto;
    margin: 0 auto;
}

.img-brujula-fija {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.resultados-container {
    margin-top: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #d5dbdb;
    border-radius: 12px;
}

.introduccion-modelo {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #e5e8e8;
    text-align: left;
    margin-bottom: 20px;
}

.introduccion-modelo h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 1.05em;
    color: #2c3e50;
}

.introduccion-modelo p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.5;
}

.grid-graficos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
}

.card-grafico {
    background-color: #ffffff;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
}

.card-grafico h3 {
    margin-top: 0;
    margin-bottom: 4px;
    font-size: 1.1em;
    color: #2c3e50;
}

.bajada-grafico {
    font-size: 0.85em;
    color: #475569;
    font-weight: 600;
    text-align: left;
    margin-bottom: 12px;
}

.canvas-y-nodos-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 320px;
    margin: 0 auto;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
}

.canvas-wrapper-radar {
    position: relative;
    height: 300px;
    width: 100%;
}

.canvas-wrapper-gauss {
    position: relative;
    height: 240px;
    width: 100%;
}

.canvas-wrapper-barras {
    position: relative;
    height: 220px;
    width: 100%;
    margin-top: 10px;
}

.nodo-axial-centro-radar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background-color: rgba(244, 208, 63, 0.45) !important;
    border: 3px dashed #d4af37 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
    text-align: center;
}

.nodo-axial-centro-radar span {
    font-size: 0.8em;
    font-weight: 900;
    color: #1a252f;
    line-height: 1.1;
}

.nodo-axial-centro-radar small {
    font-size: 0.62em;
    color: #7d6608;
    font-weight: 800;
    margin-top: 2px;
}

.box-pct-externo {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #d5dbdb;
    border-radius: 5px;
    padding: 3px 6px;
    font-size: 0.65em;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    width: 82px;
    z-index: 5;
    pointer-events: none;
}
.box-pct-externo .n-name { color: #566573; }
.box-pct-externo .n-pct { font-size: 1.2em; font-weight: 900; color: #2980b9; }

.bp-wary { top: -4%; left: 50%; transform: translateX(-50%); border-top: 3px solid #2c3e50; }
.bp-prudent { top: 4%; left: 93%; transform: translateX(-50%); border-top: 3px solid #2980b9; }
.bp-deliberate { top: 50%; left: 97%; transform: translateY(-50%); border-top: 3px solid #16a085; }
.bp-composed { bottom: 4%; left: 93%; transform: translateX(-50%); border-top: 3px solid #27ae60; }
.bp-adventurous { bottom: -4%; left: 50%; transform: translateX(-50%); border-top: 3px solid #e74c3c; }
.bp-carefree { bottom: 4%; left: 7%; transform: translateX(-50%); border-top: 3px solid #f1c40f; }
.bp-excitable { top: 50%; left: 3%; transform: translateY(-50%); border-top: 3px solid #e67e22; }
.bp-intense { top: 4%; left: 7%; transform: translateX(-50%); border-top: 3px solid #9b59b6; }

.box-pct-externo.perfil-ganador-resaltado {
    border: 3px solid #d4af37 !important;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.8) !important;
    transform: scale(1.15) !important;
    background-color: rgba(255, 253, 243, 0.98) !important;
    z-index: 500 !important;
}
.box-pct-externo.perfil-ganador-resaltado .n-pct { color: #d4af37 !important; font-size: 1.35em !important; }

#bloque-perfil-texto {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    text-align: left;
    margin-bottom: 20px;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
}

.badge-perfil {
    display: inline-block;
    background-color: #2980b9;
    color: white;
    font-size: 1.25em;
    font-weight: 900;
    padding: 6px 20px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.desc-principal { font-size: 1.05em; color: #34495e; margin-bottom: 20px; line-height: 1.5; }
.grid-detalles { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.box-detalle { padding: 15px; border-radius: 8px; }
.box-fortalezas { background-color: #e8f8f5; border-left: 5px solid #2ecc71; }
.box-limitaciones { background-color: #fdf2e9; border-left: 5px solid #e67e22; }

.box-detalle h4, .box-contexto h4 { margin-top: 0; font-size: 1em; color: #2c3e50; margin-bottom: 8px; }
.box-contexto { background-color: #f4f6f7; padding: 18px; border-radius: 8px; border-left: 5px solid #34495e; }

.lista-metricas-custom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.lista-metricas-custom div {
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e5e8e8;
    font-size: 0.9em;
}

.box-detalle ul { padding-left: 20px; margin: 0; }
.box-detalle li { margin-bottom: 6px; font-size: 0.9em; }

.card-grafico-ancho-completo {
    background-color: #ffffff;
    padding: 22px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    text-align: left;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
}
.card-grafico-ancho-completo h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.15em;
    border-bottom: 2px solid #f4f6f9;
    padding-bottom: 8px;
}

.glosario-perfiles-completo {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    text-align: left;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
}

.glosario-perfiles-completo h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1em;
    color: #2c3e50;
}

.glosario-grid-ancho {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.glosario-item {
    padding: 10px;
    border-radius: 6px;
    background-color: #fcfdfd;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.bar-wary { border-top: 4px solid #2c3e50; }
.bar-intense { border-top: 4px solid #9b59b6; }
.bar-prudent { border-top: 4px solid #2980b9; }
.bar-excitable { border-top: 4px solid #e67e22; }
.bar-deliberate { border-top: 4px solid #16a085; }
.bar-composed { border-top: 4px solid #27ae60; }
.bar-carefree { border-top: 4px solid #f1c40f; }
.bar-adventurous { border-top: 4px solid #e74c3c; }
.bar-axial { border-top: 4px solid #7f8c8d; }

.glosario-item h5 { margin: 0 0 4px 0; font-size: 0.85em; font-weight: 900; color: #2c3e50; }
.glosario-item p { margin: 0; font-size: 0.78em; color: #566573; line-height: 1.35; }

.hidden { display: none !important; }

.pdf-reporte-contenedor {
    background-color: #ffffff;
    padding: 10px;
    box-sizing: border-box;
}

.reporte-titulo-pdf {
    font-size: 1.35em;
    font-weight: 900;
    color: #111;
    margin: 0 0 15px 0;
    border-bottom: 2px solid #111;
    padding-bottom: 5px;
    text-transform: uppercase;
    text-align: left;
}

.pdf-pagina-bloque {
    box-sizing: border-box;
    width: 100%;
    clear: both;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
}

.break-seccion-hoja {
    page-break-before: always !important;
    break-before: page !important;
}

.btn-finalizar { background-color: #6c757d; color: white; border: none; padding: 12px 30px; font-weight: bold; border-radius: 50px; cursor: pointer; }
.btn-descargar-pdf { background-color: #dc3545; color: white; border: none; padding: 12px 30px; font-weight: bold; border-radius: 50px; cursor: pointer; }

footer { 
    text-align: center; 
    margin-top: 40px; 
    padding: 20px 0; 
    border-top: 1px solid #eaeded; 
    font-size: 0.85em; 
    color: #95a5a6; 
}

@media print {
    .test-navbar {
        display: none !important;
    }
    body * {
        visibility: hidden !important;
    }
    header, footer, #progreso-container, #test-riesgo-form, .boton-container-final {
        display: none !important;
    }
    #resultados, #pdf-report-content, #pdf-report-content * {
        visibility: visible !important;
    }
    #resultados {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
    }
    .pdf-pagina-bloque {
        page-break-after: always !important;
        break-after: page !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        height: auto !important;
        padding-top: 10px !important;
    }
    .break-seccion-hoja {
        page-break-before: always !important;
        break-before: page !important;
    }
}