/* ============================================================
   ESTILOS COMPARTIDOS PARA TEST Y SIMULADOR
   ============================================================ */

.test-page-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 140% at 82% -10%, #12507f 0%, var(--navy-900) 46%, #061527 100%);
  padding: 64px 0;
  text-align: center;
  color: white;
}

.test-page-hero .eyebrow {
  color: var(--sky-400);
}

.test-page-hero h1 {
  color: white;
  font-size: clamp(32px, 4vw, 46px);
  margin: 14px 0 18px;
  font-weight: 800;
}

.test-page-hero p {
  color: #9fc8e0;
  max-width: 600px;
  margin: 0 auto;
  font-size: 16.5px;
  line-height: 1.6;
}

.test-container-section {
  padding: 40px 0 60px;
  background: var(--sky-100);
}

.test-container {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  position: relative;
  z-index: 10;
}

/* Barra de progreso */
.test-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.test-progress::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--line);
  transform: translateY(-50%);
  z-index: 1;
}

.test-progress-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 4px;
  background: var(--teal-500);
  transform: translateY(-50%);
  z-index: 2;
  transition: width 0.3s ease;
  width: 0%;
}

.test-step {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 0 10px;
}

.test-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--line);
  color: var(--slate);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s ease;
}

.test-step.active .test-step-circle {
  background: var(--teal-500);
  color: var(--navy-900);
  box-shadow: 0 0 0 4px rgba(63, 191, 196, 0.2);
}

.test-step.completed .test-step-circle {
  background: var(--navy-900);
  color: #fff;
}

.test-step-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--slate);
  text-transform: uppercase;
}

.test-step.active .test-step-label {
  color: var(--navy-900);
}

/* Bloques */
.test-block {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.test-block.active {
  display: block;
}

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

.test-block-title {
  font-size: 24px;
  margin-bottom: 24px;
  color: var(--navy-900);
  border-bottom: 2px solid var(--line);
  padding-bottom: 16px;
}

/* Preguntas y Opciones */
.test-question {
  margin-bottom: 32px;
}

.test-question-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--ink);
}

.test-options-grid {
  display: grid;
  gap: 12px;
}

.test-option-label {
  display: block;
  cursor: pointer;
}

.test-option-input {
  display: none;
}

.test-option-card {
  padding: 16px 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-weight: 600;
  color: var(--slate);
  display: flex;
  align-items: center;
}

.test-option-card:before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--slate-light);
  margin-right: 14px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.test-option-label:not(.is-disabled):hover .test-option-card {
  border-color: var(--sky-400);
  background: var(--sky-100);
  color: var(--navy-900);
}

.test-option-input:checked+.test-option-card {
  border-color: var(--teal-500);
  background: #f0fdfa;
  color: var(--navy-900);
}

.test-option-input:checked+.test-option-card:before {
  border-color: var(--teal-500);
  background: var(--teal-500);
  box-shadow: inset 0 0 0 4px #fff;
}

.test-option-label.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Errores y Navegación */
.test-error {
  color: var(--red-500);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  padding: 12px;
  background: #fff0f3;
  border-radius: 8px;
  display: none;
  align-items: center;
  gap: 8px;
}

.test-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--line);
}

.btn-hidden {
  display: none !important;
}

/* Tarjeta de Resultados */
.test-result-wrapper {
  display: none;
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.5s ease forwards;
}

.test-result-wrapper.active {
  display: block;
}

.test-result-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--teal-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  margin: 0 auto 24px;
  box-shadow: 0 10px 20px rgba(34, 198, 168, 0.3);
}

.test-result-title {
  font-size: 20px;
  color: var(--slate);
  margin-bottom: 8px;
}

.test-result-profile {
  font-size: 36px;
  color: var(--navy-900);
  margin-bottom: 30px;
}

.test-result-level-box {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 10px;
}

.level-basico {
  background: #fff3e0;
  color: #e65100;
}

.level-intermedio {
  background: #e3f2fd;
  color: #1565c0;
}

.level-avanzado {
  background: #e0f2f1;
  color: #00695c;
}

.test-result-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

@media (max-width: 640px) {
  .test-container {
    padding: 24px 16px;
  }
  .test-result-actions {
    flex-direction: column;
  }
}
