/* =========================================
   BADBEAR.MED
   CIRUGÍA PEDIÁTRICA
   ========================================= */


/* ---------- RESET ---------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7fb;
  color: #1f2937;
  min-height: 100vh;
}


/* ---------- VARIABLES ---------- */

:root {
  --blanco: #ffffff;

  --fondo: #f5f7fb;

  --azul-oscuro: #14213d;
  --azul: #2563eb;
  --azul-suave: #eff6ff;

  --gris-900: #111827;
  --gris-700: #374151;
  --gris-600: #4b5563;
  --gris-500: #6b7280;
  --gris-300: #d1d5db;
  --gris-200: #e5e7eb;
  --gris-100: #f3f4f6;

  --verde: #15803d;
  --verde-fondo: #f0fdf4;

  --rojo: #b91c1c;
  --rojo-fondo: #fef2f2;

  --amarillo: #b45309;
  --amarillo-fondo: #fffbeb;

  --sombra:
    0 10px 30px rgba(15, 23, 42, 0.08);

  --radio: 18px;
}


/* ---------- GENERAL ---------- */

button {
  font-family: inherit;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.pantalla {
  width: 100%;
}

.oculto {
  display: none !important;
}


/* =========================================
   HEADER
   ========================================= */

.header {
  width: 100%;
  background: var(--blanco);
  border-bottom: 1px solid var(--gris-200);
  padding: 20px 24px;
}

.header-contenido {
  width: 100%;
  max-width: 1100px;
  margin: auto;
}

.marca h1 {
  color: var(--azul-oscuro);
  font-size: 30px;
  letter-spacing: 1px;
}

.marca p {
  margin-top: 4px;
  color: var(--gris-500);
  font-size: 15px;
}


/* =========================================
   BOTONES GENERALES
   ========================================= */

.boton {
  border: none;
  border-radius: 12px;
  padding: 14px 24px;

  font-size: 16px;
  font-weight: 700;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease;
}

.boton:hover {
  transform: translateY(-1px);
}

.boton:active {
  transform: translateY(0);
}

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

.boton-principal {
  background: var(--azul-oscuro);
  color: var(--blanco);
}

.boton-principal:hover {
  background: #1f3158;
}


/* =========================================
   PANTALLA DE INICIO
   ========================================= */

.inicio {
  flex: 1;
  padding: 60px 20px;
}

.tarjeta-inicio {
  max-width: 760px;
  margin: auto;

  background: var(--blanco);

  padding: 48px;

  border-radius: var(--radio);

  box-shadow: var(--sombra);

  text-align: center;
}

.etiqueta-superior {
  color: var(--azul);
  font-weight: 800;
  font-size: 13px;

  letter-spacing: 1.5px;

  margin-bottom: 12px;
}

.tarjeta-inicio h2 {
  font-size: 34px;
  color: var(--gris-900);

  margin-bottom: 16px;
}

.descripcion-inicio {
  color: var(--gris-600);

  font-size: 17px;
  line-height: 1.7;

  max-width: 580px;
  margin: 0 auto 34px auto;
}


/* ---------- DATOS DEL BANCO ---------- */

.datos-banco {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 14px;

  margin-bottom: 34px;
}

.dato {
  background: var(--gris-100);

  border: 1px solid var(--gris-200);

  border-radius: 14px;

  padding: 18px 10px;
}

.dato-numero {
  display: block;

  color: var(--azul-oscuro);

  font-size: 22px;
  font-weight: 800;

  margin-bottom: 5px;
}

.dato-texto {
  color: var(--gris-500);
  font-size: 13px;
}


/* =========================================
   QUIZ
   ========================================= */

.quiz {
  flex: 1;

  padding: 42px 20px 60px;
}

.tarjeta-quiz {
  width: 100%;

  max-width: 900px;

  margin: auto;

  background: var(--blanco);

  padding: 36px;

  border-radius: var(--radio);

  box-shadow: var(--sombra);
}


/* ---------- CABECERA DEL QUIZ ---------- */

.quiz-superior {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 20px;

  margin-bottom: 18px;
}

.quiz-info {
  display: flex;
  align-items: center;

  flex-wrap: wrap;

  gap: 8px;
}

.tema-pregunta {
  background: var(--azul-suave);

  color: var(--azul);

  border-radius: 999px;

  padding: 7px 12px;

  font-size: 13px;
  font-weight: 700;
}

.dificultad-pregunta {
  background: var(--gris-100);

  color: var(--gris-600);

  border-radius: 999px;

  padding: 7px 12px;

  font-size: 13px;
  font-weight: 700;
}

.contador-pregunta {
  color: var(--gris-500);

  font-size: 14px;
  font-weight: 700;

  white-space: nowrap;
}


/* ---------- PROGRESO ---------- */

.barra-progreso {
  width: 100%;

  height: 8px;

  background: var(--gris-200);

  border-radius: 999px;

  overflow: hidden;

  margin-bottom: 18px;
}

.progreso {
  width: 0%;

  height: 100%;

  background: var(--azul);

  border-radius: 999px;

  transition: width 0.3s ease;
}


/* ---------- MARCADOR ---------- */

.marcador {
  display: flex;

  gap: 20px;

  margin-bottom: 28px;

  color: var(--gris-500);

  font-size: 14px;
}

.marcador strong {
  color: var(--gris-900);
}


/* ---------- TEXTO PREGUNTA ---------- */

.texto-pregunta {
  font-size: 23px;

  line-height: 1.55;

  color: var(--gris-900);

  margin-bottom: 28px;
}


/* =========================================
   OPCIONES
   ========================================= */

.opciones {
  display: flex;
  flex-direction: column;

  gap: 12px;
}

.opcion {
  width: 100%;

  padding: 16px 18px;

  background: var(--blanco);

  color: var(--gris-700);

  border: 2px solid var(--gris-200);

  border-radius: 12px;

  text-align: left;

  font-size: 16px;
  line-height: 1.5;

  cursor: pointer;

  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.opcion:hover {
  border-color: var(--azul);

  background: #f8fbff;
}

.opcion.seleccionada {
  border-color: var(--azul);

  background: var(--azul-suave);

  color: var(--azul-oscuro);

  font-weight: 700;
}


/* ---------- CORRECTA ---------- */

.opcion.correcta {
  border-color: var(--verde);

  background: var(--verde-fondo);

  color: var(--verde);

  font-weight: 700;
}


/* ---------- INCORRECTA ---------- */

.opcion.incorrecta {
  border-color: var(--rojo);

  background: var(--rojo-fondo);

  color: var(--rojo);

  font-weight: 700;
}


/* ---------- OPCIONES BLOQUEADAS ---------- */

.opcion.bloqueada {
  cursor: default;
}

.opcion.bloqueada:hover {
  transform: none;
}


/* =========================================
   BOTÓN RESPONDER
   ========================================= */

.boton-responder {
  margin-top: 28px;

  width: 100%;

  background: var(--azul-oscuro);

  color: var(--blanco);
}

.boton-responder:hover {
  background: #1f3158;
}


/* =========================================
   RESULTADO
   ========================================= */

.resultado {
  margin-top: 30px;

  border-top: 1px solid var(--gris-200);

  padding-top: 28px;
}

.estado-respuesta {
  font-size: 22px;

  font-weight: 800;

  margin-bottom: 12px;
}

.estado-respuesta.correcto {
  color: var(--verde);
}

.estado-respuesta.incorrecto {
  color: var(--rojo);
}


/* ---------- RESPUESTA CORRECTA ---------- */

.respuesta-correcta {
  background: var(--verde-fondo);

  border: 1px solid #bbf7d0;

  color: var(--verde);

  border-radius: 12px;

  padding: 14px 16px;

  margin-bottom: 22px;

  font-weight: 700;
}


/* ---------- EXPLICACIÓN ---------- */

.bloque-explicacion {
  background: var(--gris-100);

  border-radius: 14px;

  padding: 20px;

  margin-top: 18px;
}

.bloque-explicacion h3 {
  color: var(--gris-900);

  font-size: 17px;

  margin-bottom: 10px;
}

.bloque-explicacion p {
  color: var(--gris-600);

  line-height: 1.7;

  font-size: 15px;
}


/* =========================================
   BADBEAR.MED FIJA
   ========================================= */

.badbear-fija {
  margin-top: 18px;

  padding: 20px;

  border-radius: 14px;

  background: var(--amarillo-fondo);

  border: 1px solid #fde68a;
}

.badbear-fija h3 {
  color: var(--amarillo);

  font-size: 16px;

  margin-bottom: 8px;
}

.badbear-fija p {
  color: #78350f;

  font-weight: 700;

  line-height: 1.6;
}


/* ---------- SIGUIENTE ---------- */

.boton-siguiente {
  width: 100%;

  margin-top: 24px;

  background: var(--azul);

  color: var(--blanco);
}

.boton-siguiente:hover {
  background: #1d4ed8;
}


/* =========================================
   RESULTADO FINAL
   ========================================= */

.final {
  flex: 1;

  padding: 60px 20px;
}

.tarjeta-final {
  width: 100%;

  max-width: 720px;

  margin: auto;

  background: var(--blanco);

  border-radius: var(--radio);

  padding: 46px;

  box-shadow: var(--sombra);

  text-align: center;
}

.tarjeta-final h2 {
  color: var(--gris-900);

  font-size: 32px;

  margin-bottom: 30px;
}


/* ---------- PUNTAJE ---------- */

.resultado-principal {
  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 6px;

  margin-bottom: 32px;
}

.puntaje-final {
  color: var(--azul-oscuro);

  font-size: 42px;

  font-weight: 900;
}

.porcentaje-final {
  color: var(--azul);

  font-size: 22px;

  font-weight: 800;
}


/* ---------- RESUMEN ---------- */

.resumen-final {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 12px;

  margin-bottom: 28px;
}

.resultado-dato {
  background: var(--gris-100);

  border-radius: 12px;

  padding: 18px 10px;
}

.resultado-titulo {
  display: block;

  color: var(--gris-500);

  font-size: 13px;

  margin-bottom: 8px;
}

.resultado-dato strong {
  color: var(--gris-900);

  font-size: 24px;
}


/* ---------- MENSAJE FINAL ---------- */

.mensaje-final {
  color: var(--gris-600);

  font-size: 16px;

  line-height: 1.6;

  margin-bottom: 28px;
}


/* ---------- ACCIONES ---------- */

.acciones-finales {
  display: flex;

  justify-content: center;

  gap: 12px;
}


/* =========================================
   FOOTER
   ========================================= */

.footer {
  width: 100%;

  text-align: center;

  padding: 22px;

  color: var(--gris-500);

  font-size: 13px;
}


/* =========================================
   RESPONSIVE TABLET
   ========================================= */

@media (max-width: 768px) {

  .header {
    padding: 17px 18px;
  }

  .marca h1 {
    font-size: 26px;
  }

  .inicio {
    padding: 35px 16px;
  }

  .tarjeta-inicio {
    padding: 32px 22px;
  }

  .tarjeta-inicio h2 {
    font-size: 28px;
  }

  .datos-banco {
    grid-template-columns: 1fr;
  }

  .quiz {
    padding: 25px 14px 45px;
  }

  .tarjeta-quiz {
    padding: 24px 18px;
  }

  .quiz-superior {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .texto-pregunta {
    font-size: 20px;
  }

  .marcador {
    gap: 14px;
  }

  .final {
    padding: 35px 16px;
  }

  .tarjeta-final {
    padding: 32px 20px;
  }

  .resumen-final {
    grid-template-columns: 1fr;
  }

}


/* =========================================
   RESPONSIVE CELULAR
   ========================================= */

@media (max-width: 480px) {

  .marca h1 {
    font-size: 23px;
  }

  .marca p {
    font-size: 13px;
  }

  .tarjeta-inicio {
    padding: 28px 18px;
  }

  .tarjeta-inicio h2 {
    font-size: 25px;
  }

  .descripcion-inicio {
    font-size: 15px;
  }

  .texto-pregunta {
    font-size: 18px;
  }

  .opcion {
    padding: 14px 14px;

    font-size: 15px;
  }

  .marcador {
    flex-direction: column;

    gap: 6px;
  }

  .estado-respuesta {
    font-size: 19px;
  }

  .puntaje-final {
    font-size: 36px;
  }

  .porcentaje-final {
    font-size: 19px;
  }

  .boton {
    width: 100%;
  }

}
/* ==========================================================
   CONFIGURACIÓN DEL BANCO
========================================================== */

.configuracion-banco {
  margin-top: 28px;
  padding: 24px;
  background: #f7f9fc;
  border: 1px solid #e3e8f0;
  border-radius: 18px;
  text-align: left;
}

.configuracion-banco h3 {
  margin: 0 0 20px;
  text-align: center;
  color: #0d1b3d;
}

.configuracion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.campo-config {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.campo-config label {
  font-size: 14px;
  font-weight: 700;
  color: #344054;
}

.campo-config select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: white;
  font-size: 15px;
  color: #101828;
  outline: none;
  cursor: pointer;
}

.campo-config select:focus {
  border-color: #245cff;
  box-shadow: 0 0 0 3px rgba(36, 92, 255, 0.12);
}

.check-mezclar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 14px;
  color: #344054;
  cursor: pointer;
}

.check-mezclar input {
  width: 18px;
  height: 18px;
  accent-color: #245cff;
}

.info-seleccion {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #667085;
}


/* ==========================================================
   MODO
========================================================== */

.modo-pregunta {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #245cff;
  font-size: 12px;
  font-weight: 700;
}


/* ==========================================================
   RESPUESTA REGISTRADA EN MODO EXAMEN
========================================================== */

.estado-respuesta.neutral {
  color: #245cff;
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
}


/* ==========================================================
   BOTÓN SECUNDARIO
========================================================== */

.boton-secundario {
  background: white;
  color: #0d1b3d;
  border: 1px solid #d0d5dd;
}

.boton-secundario:hover {
  background: #f2f4f7;
}


/* ==========================================================
   REVISIÓN DE ERRORES
========================================================== */

.revision-errores {
  margin-top: 30px;
  text-align: left;
}

.revision-errores > h3 {
  margin-bottom: 20px;
  color: #0d1b3d;
}

.revision-item {
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  background: #ffffff;
}

.revision-item h4 {
  margin: 8px 0 16px;
  line-height: 1.5;
  color: #101828;
}

.revision-item p {
  line-height: 1.6;
}

.revision-numero {
  font-size: 12px;
  font-weight: 800;
  color: #d92d20;
  text-transform: uppercase;
}

.revision-correcta {
  color: #067647;
}

.revision-fija {
  margin-top: 15px;
  padding: 14px;
  border-radius: 12px;
  background: #fff8e6;
  color: #6b4f00;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 768px) {

  .configuracion-grid {
    grid-template-columns: 1fr;
  }

  .configuracion-banco {
    padding: 18px;
  }

}
/* ==========================================================
   AVANCE Y NOTA VIGESIMAL
========================================================== */

.progreso-contenedor {
  width: 100%;
}

.progreso-datos {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;

  margin-bottom: 9px;

  font-size: 14px;
  color: #667085;
}

.progreso-datos strong {
  color: #0d1b3d;
  font-size: 15px;
  font-weight: 800;
}

#nota-vigesimal {
  color: #245cff;
}

@media (max-width: 480px) {

  .progreso-datos {
    justify-content: space-between;
    gap: 10px;
  }

}
/* ==========================================================
   IDENTIDAD BADBEAR.MED
========================================================== */

.marca {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-badbear {
  width: 72px;
  height: 72px;

  object-fit: contain;

  flex-shrink: 0;

  transition:
    transform 0.25s ease,
    filter 0.25s ease;
}

.logo-badbear:hover {
  transform: scale(1.06);
}

.marca-texto {
  display: flex;
  flex-direction: column;
}

.marca-texto h1 {
  margin: 0;

  font-size: 28px;
  font-weight: 900;

  letter-spacing: -0.8px;

  color: #0d1b3d;
}

.marca-texto h1 span {
  color: #245cff;
}

.marca-texto p {
  margin: 3px 0 0;

  font-size: 14px;
  font-weight: 600;

  color: #667085;
}


/* ==========================================================
   MÓVIL
========================================================== */

@media (max-width: 600px) {

  .logo-badbear {
    width: 56px;
    height: 56px;
  }

  .marca {
    gap: 12px;
  }

  .marca-texto h1 {
    font-size: 22px;
  }

  .marca-texto p {
    font-size: 12px;
  }

}
/* ==========================================================
   MARCA DE AGUA BADBEAR.MED
========================================================== */

.tarjeta-inicio,
.tarjeta-quiz,
.tarjeta-final {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}


/* Logo de fondo */

.tarjeta-inicio::before,
.tarjeta-quiz::before,
.tarjeta-final::before {

  content: "";

  position: absolute;

  width: 380px;
  height: 380px;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  background-image:
    url("../assets/logo/badbear-logo.png");

  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  opacity: 0.08;

  pointer-events: none;

  z-index: -1;
}


/* En móvil hacemos la marca un poco más pequeña */

@media (max-width: 600px) {

  .tarjeta-inicio::before,
  .tarjeta-quiz::before,
  .tarjeta-final::before {

    width: 260px;
    height: 260px;

  }

}
/* ==========================================================
   HEADER PROFESIONAL BADBEAR.MED
========================================================== */

.header {
  position: sticky;
  top: 0;

  width: 100%;

  z-index: 1000;

  background: rgba(255, 255, 255, 0.96);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-bottom: 1px solid #e4e7ec;

  box-shadow:
    0 4px 18px rgba(16, 24, 40, 0.05);
}


/* CONTENIDO CENTRAL */

.header-contenido {
  max-width: 1200px;

  margin: 0 auto;

  padding: 12px 24px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 30px;
}


/* ==========================================================
   LOGO + MARCA
========================================================== */

.marca {
  display: flex;

  align-items: center;

  gap: 13px;

  flex-shrink: 0;
}


.logo-badbear {
  width: 62px;
  height: 62px;

  object-fit: contain;

  transition:
    transform 0.25s ease;
}


.logo-badbear:hover {
  transform: scale(1.06);
}


.marca-texto h1 {
  margin: 0;

  font-size: 25px;

  line-height: 1;

  font-weight: 900;

  letter-spacing: -0.7px;

  color: #101828;
}


.marca-texto h1 span {
  color: #245cff;
}


.marca-texto p {
  margin: 5px 0 0;

  font-size: 13px;

  font-weight: 600;

  color: #667085;
}


/* ==========================================================
   NAVEGACIÓN
========================================================== */

.nav-badbear {
  display: flex;

  align-items: center;

  gap: 7px;
}


.nav-item {
  position: relative;

  border: none;

  background: transparent;

  padding: 10px 14px;

  border-radius: 10px;

  font-size: 14px;

  font-weight: 700;

  color: #667085;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}


.nav-item:hover {
  background: #f2f4f7;

  color: #101828;
}


.nav-item.activo {
  color: #245cff;

  background: #eef4ff;
}


.nav-item.activo::after {
  content: "";

  position: absolute;

  left: 25%;
  right: 25%;
  bottom: 3px;

  height: 2px;

  border-radius: 999px;

  background: #245cff;
}


/* ==========================================================
   CONTADOR DE PREGUNTAS
========================================================== */

.nav-total {
  margin-left: 10px;

  padding: 8px 13px;

  border-radius: 12px;

  background: #0d1b3d;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  min-width: 76px;
}


.nav-total strong {
  font-size: 17px;

  line-height: 1;

  color: white;
}


.nav-total span {
  margin-top: 3px;

  font-size: 10px;

  font-weight: 700;

  color: #cbd5e1;

  text-transform: uppercase;

  letter-spacing: 0.5px;
}


/* ==========================================================
   ADAPTACIÓN A CELULAR
========================================================== */

@media (max-width: 760px) {

  .header-contenido {
    padding: 10px 14px;

    gap: 10px;
  }


  .logo-badbear {
    width: 48px;
    height: 48px;
  }


  .marca-texto h1 {
    font-size: 19px;
  }


  .marca-texto p {
    font-size: 11px;
  }


  .nav-total {
    display: none;
  }


  .nav-item {
    padding: 8px 9px;

    font-size: 12px;
  }

}


@media (max-width: 520px) {

  .header-contenido {
    flex-direction: column;

    align-items: stretch;
  }


  .marca {
    justify-content: center;
  }


  .nav-badbear {
    justify-content: center;

    border-top: 1px solid #f2f4f7;

    padding-top: 8px;
  }

}
/* ==========================================================
   PROGRESO GLOBAL BADBEAR.MED
========================================================== */

.progreso-global {
  margin-top: 26px;
  padding: 24px;

  background: #ffffff;

  border: 1px solid #e4e7ec;
  border-radius: 20px;

  box-shadow:
    0 10px 30px rgba(16, 24, 40, 0.05);

  text-align: left;
}


.progreso-global-titulo {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 20px;
}


.progreso-global-etiqueta {
  font-size: 11px;
  font-weight: 800;

  letter-spacing: 1px;

  color: #245cff;
}


.progreso-global h3 {
  margin: 4px 0 0;

  color: #101828;

  font-size: 20px;
}


.progreso-global-grid {
  display: grid;

  grid-template-columns:
    repeat(5, 1fr);

  gap: 12px;
}


.estadistica-global {
  padding: 17px 10px;

  border: 1px solid #eaecf0;
  border-radius: 14px;

  background: #f9fafb;

  text-align: center;
}


.estadistica-numero {
  display: block;

  font-size: 22px;
  font-weight: 900;

  color: #0d1b3d;
}


.estadistica-texto {
  display: block;

  margin-top: 5px;

  font-size: 11px;
  font-weight: 700;

  color: #667085;
}


.estadistica-falladas
.estadistica-numero {
  color: #d92d20;
}


.boton-falladas {
  width: 100%;

  margin-top: 18px;

  background: #fff4ed;

  color: #b42318;

  border: 1px solid #ffd6ae;
}


.boton-falladas:hover {
  background: #ffe6d5;
}


.boton-borrar-progreso {
  border: none;

  background: transparent;

  color: #98a2b3;

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
}


.boton-borrar-progreso:hover {
  color: #d92d20;
}


@media (max-width: 900px) {

  .progreso-global-grid {
    grid-template-columns:
      repeat(2, 1fr);
  }

}


@media (max-width: 520px) {

  .progreso-global {
    padding: 18px;
  }

  .progreso-global-titulo {
    flex-direction: column;
    align-items: flex-start;
  }

  .progreso-global-grid {
    grid-template-columns: 1fr 1fr;
  }

}
/* ==========================================================
   ESTADÍSTICAS POR TEMA
========================================================== */

.estadisticas-temas {
  margin-top: 24px;
  padding: 24px;

  background: #ffffff;

  border: 1px solid #e4e7ec;
  border-radius: 20px;

  box-shadow:
    0 10px 30px rgba(16, 24, 40, 0.05);

  text-align: left;
}


.estadisticas-temas-cabecera {
  margin-bottom: 22px;
}


.estadisticas-temas-cabecera h3 {
  margin: 4px 0 5px;

  font-size: 21px;
  color: #101828;
}


.estadisticas-temas-cabecera p {
  margin: 0;

  font-size: 14px;
  color: #667085;
}


/* ==========================================================
   LISTA
========================================================== */

.lista-estadisticas-temas {
  display: flex;
  flex-direction: column;

  gap: 13px;
}


/* ==========================================================
   TARJETA DE CADA TEMA
========================================================== */

.tema-estadistica {
  padding: 18px;

  border: 1px solid #eaecf0;
  border-radius: 16px;

  background: #f9fafb;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}


.tema-estadistica:hover {
  transform: translateY(-2px);

  box-shadow:
    0 8px 20px rgba(16, 24, 40, 0.06);
}


.tema-estadistica-superior {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 18px;
}


.tema-estadistica-nombre {
  font-size: 15px;
  font-weight: 800;

  color: #101828;
}


.tema-estadistica-estado {
  flex-shrink: 0;

  padding: 6px 10px;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 900;

  letter-spacing: 0.4px;
}


/* ==========================================================
   ESTADOS
========================================================== */

.estado-dominado {
  background: #ecfdf3;
  color: #067647;
}


.estado-progreso {
  background: #fffaeb;
  color: #b54708;
}


.estado-reforzar {
  background: #fef3f2;
  color: #b42318;
}


.estado-sin-practicar {
  background: #f2f4f7;
  color: #667085;
}


/* ==========================================================
   DATOS
========================================================== */

.tema-estadistica-datos {
  display: grid;

  grid-template-columns:
    repeat(4, 1fr);

  gap: 10px;

  margin-top: 15px;
}


.tema-dato {
  padding: 10px;

  border-radius: 10px;

  background: white;

  text-align: center;
}


.tema-dato strong {
  display: block;

  font-size: 16px;
  font-weight: 900;

  color: #0d1b3d;
}


.tema-dato span {
  display: block;

  margin-top: 3px;

  font-size: 10px;
  font-weight: 700;

  color: #98a2b3;

  text-transform: uppercase;
}


/* ==========================================================
   BARRA DE RENDIMIENTO
========================================================== */

.tema-barra {
  width: 100%;
  height: 7px;

  margin-top: 14px;

  background: #e4e7ec;

  border-radius: 999px;

  overflow: hidden;
}


.tema-barra-progreso {
  height: 100%;

  border-radius: 999px;

  background: #245cff;

  transition: width 0.4s ease;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 650px) {

  .tema-estadistica-superior {
    align-items: flex-start;
    flex-direction: column;

    gap: 10px;
  }


  .tema-estadistica-datos {
    grid-template-columns:
      repeat(2, 1fr);
  }

}
/* ==========================================================
   BIBLIOTECA / TEORÍA BADBEAR.MED
========================================================== */

.teoria {
  width: 100%;
  padding: 30px 20px 50px;
}


.tarjeta-teoria {
  width: 100%;
  max-width: 1400px;

  margin: 0 auto;

  padding: 26px;

  background: #ffffff;

  border: 1px solid #e4e7ec;
  border-radius: 20px;

  box-shadow:
    0 10px 30px rgba(16, 24, 40, 0.06);
}


/* ==========================================================
   CABECERA DE TEORÍA
========================================================== */

.teoria-cabecera {
  margin-bottom: 22px;
}


.teoria-cabecera h2 {
  margin: 5px 0 6px;

  font-size: 28px;
  font-weight: 900;

  color: #101828;
}


.teoria-cabecera p {
  margin: 0;

  font-size: 14px;

  color: #667085;
}


/* ==========================================================
   VISOR DEL PDF
========================================================== */

.visor-pdf {
  width: 100%;

  height: calc(100vh - 230px);

  min-height: 650px;

  overflow: hidden;

  border: 1px solid #d0d5dd;
  border-radius: 16px;

  background: #f2f4f7;
}


.visor-pdf iframe {
  display: block;

  width: 100%;
  height: 100%;

  border: none;

  background: white;
}


/* ==========================================================
   ADAPTACIÓN MÓVIL
========================================================== */

@media (max-width: 700px) {

  .teoria {
    padding: 16px 10px 30px;
  }


  .tarjeta-teoria {
    padding: 16px;

    border-radius: 16px;
  }


  .teoria-cabecera h2 {
    font-size: 23px;
  }


  .visor-pdf {
    height: 75vh;

    min-height: 500px;
  }

}
/* ==========================================================
   MARCA DE AGUA EN VISOR PDF
========================================================== */

.visor-pdf {
  position: relative;
}


@media (max-width: 700px) {
  .marca-agua-pdf {
    font-size: 24px;
    white-space: normal;
    width: 80%;
  }
}
/* ==========================================================
   MARCAS DE AGUA REPETIDAS EN VISOR PDF
========================================================== */

.visor-pdf {
  position: relative;
}

.marcas-agua-pdf {
  position: absolute;
  inset: 0;

  z-index: 5;
  pointer-events: none;
  user-select: none;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);

  align-items: center;
  justify-items: center;

  padding: 20px;
}

.marcas-agua-pdf span {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 2px;

 color: rgba(13, 27, 61, 0.12);

  transform: rotate(-28deg);

  white-space: nowrap;
  text-align: center;
}

@media (max-width: 900px) {
  .marcas-agua-pdf span {
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .marcas-agua-pdf {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 18px;
  }

  .marcas-agua-pdf span {
    font-size: 18px;
  }
}
/* ==========================================================
   BIBLIOTECA BADBEAR.MED - ÍNDICE + PDF
========================================================== */

.biblioteca-layout {
  display: grid;

  grid-template-columns: 280px 1fr;

  gap: 22px;

  align-items: stretch;
}


/* ==========================================================
   ÍNDICE LATERAL
========================================================== */

.indice-teoria {
  height: calc(100vh - 230px);

  min-height: 650px;

  overflow-y: auto;

  padding: 18px;

  background: #f8fafc;

  border: 1px solid #e4e7ec;
  border-radius: 16px;
}


.indice-teoria h3 {
  margin: 0 0 15px;

  font-size: 18px;
  font-weight: 900;

  color: #101828;
}


/* ==========================================================
   BOTONES DEL ÍNDICE
========================================================== */

.indice-tema {
  width: 100%;

  margin-bottom: 8px;

  padding: 11px 12px;

  border: 1px solid transparent;
  border-radius: 10px;

  background: transparent;

  text-align: left;

  font-size: 13px;
  font-weight: 700;

  color: #475467;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}


.indice-tema:hover {
  background: #eef4ff;

  color: #245cff;

  transform: translateX(3px);
}


.indice-tema.activo {
  background: #245cff;

  color: white;

  border-color: #245cff;
}


/* ==========================================================
   SCROLL DEL ÍNDICE
========================================================== */

.indice-teoria::-webkit-scrollbar {
  width: 7px;
}


.indice-teoria::-webkit-scrollbar-track {
  background: transparent;
}


.indice-teoria::-webkit-scrollbar-thumb {
  background: #d0d5dd;

  border-radius: 999px;
}


/* ==========================================================
   PDF
========================================================== */

.biblioteca-layout .visor-pdf {
  height: calc(100vh - 230px);

  min-height: 650px;

  margin: 0;
}


/* ==========================================================
   TABLET / CELULAR
========================================================== */

@media (max-width: 900px) {

  .biblioteca-layout {
    grid-template-columns: 1fr;
  }


  .indice-teoria {
    height: auto;

    min-height: auto;

    max-height: 280px;
  }


  .biblioteca-layout .visor-pdf {
    height: 75vh;

    min-height: 520px;
  }

}
/* ==========================================================
   LECTOR DE TEORÍA BADBEAR.MED
========================================================== */

.lector-teoria {
  width: 100%;
  min-width: 0;

  border: 1px solid #d0d5dd;
  border-radius: 16px;

  overflow: hidden;

  background: #ffffff;
}


/* ==========================================================
   CONTROLES SUPERIORES
========================================================== */

.lector-controles {
  width: 100%;

  padding: 12px 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  background: #101828;

  color: white;
}


.lector-boton {
  border: none;

  padding: 10px 16px;

  border-radius: 9px;

  background: #245cff;

  color: white;

  font-size: 13px;
  font-weight: 800;

  cursor: pointer;
}


.lector-boton:hover {
  background: #1747d1;
}


.lector-paginacion {
  font-size: 13px;
  font-weight: 600;

  color: #eaecf0;
}


.lector-paginacion strong {
  color: white;

  font-size: 15px;
}


/* ==========================================================
   VISOR DE LA PÁGINA
========================================================== */

.visor-imagen-teoria {
  position: relative;

  width: 100%;

  height: calc(100vh - 290px);
  min-height: 650px;

  overflow: auto;

  padding: 25px;

  background: #252525;
}


/* ==========================================================
   IMAGEN DE LA PÁGINA
========================================================== */

#pagina-teoria {
  display: block;

  width: auto;
  max-width: 100%;

  height: auto;

  margin: 0 auto;

  position: relative;

  z-index: 1;

  box-shadow:
    0 6px 25px rgba(0, 0, 0, 0.35);

  user-select: none;
}


/* ==========================================================
   MARCAS DE AGUA SOBRE LA PÁGINA
========================================================== */

.visor-imagen-teoria .marcas-agua-pdf {
  position: absolute;

  inset: 0;

  z-index: 5;

  pointer-events: none;

  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  grid-template-rows:
    repeat(3, 1fr);

  align-items: center;
  justify-items: center;
}


.visor-imagen-teoria
.marcas-agua-pdf span {

  font-size: 30px;

  font-weight: 900;

  color:
    rgba(13, 27, 61, 0.10);

  transform:
    rotate(-28deg);

  white-space: nowrap;
}


/* ==========================================================
   CELULAR
========================================================== */

@media (max-width: 700px) {

  .lector-controles {
    padding: 10px;

    gap: 8px;
  }


  .lector-boton {
    padding: 8px 10px;

    font-size: 11px;
  }


  .lector-paginacion {
    font-size: 11px;
  }


  .visor-imagen-teoria {
    height: 72vh;

    min-height: 500px;

    padding: 10px;
  }


  .visor-imagen-teoria
  .marcas-agua-pdf span {

    font-size: 17px;
  }

}
.contenedor-imagen-pregunta {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 18px 0 22px;
}

.imagen-pregunta {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 14px;
  display: block;
}
/* ============================================================
   FILTROS - EXÁMENES PASADOS
============================================================ */

.filtros-examenes-pasados {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.filtros-examenes-pasados button {
  border: 1px solid #d7dfed;
  background: #ffffff;
  color: #53627a;

  padding: 10px 16px;

  border-radius: 12px;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  transition: 0.2s ease;
}

.filtros-examenes-pasados button:hover {
  background: #f3f6ff;
  border-color: #2962ff;
  color: #2962ff;
}

.filtros-examenes-pasados
.filtro-examen-activo {
  background: #2962ff;
  border-color: #2962ff;
  color: #ffffff;
}
/* ============================================================
   ESTADÍSTICAS - EXÁMENES PASADOS
============================================================ */

#estadisticas-examenes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;

  margin: 18px 0;

  background: transparent;
  border: none;
  padding: 0;
}

#estadisticas-examenes > strong {
  grid-column: 1 / -1;

  color: #53627a;
  font-size: 14px;
  margin-bottom: 2px;
}

#estadisticas-examenes span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 72px;

  background: #f6f8fc;
  border: 1px solid #e1e6ef;
  border-radius: 14px;

  font-size: 13px;
  color: #65728a;
}

#estadisticas-examenes span strong {
  margin-top: 6px;

  font-size: 20px;
  color: #0d1b3e;
}

@media (max-width: 700px) {

  #estadisticas-examenes {
    grid-template-columns: 1fr;
  }

}
/* =========================================================
   BADBEAR.MED - PALETA MEJORADA Y MARCA DE FONDO MÁS GRANDE
========================================================= */

:root {
  --bb-azul-oscuro: #0f1f4d;
  --bb-azul: #2f65ff;
  --bb-celeste: #66d9ff;
  --bb-rosado: #ff5fa2;

  --bb-rojo: #e53935;
  --bb-naranja: #ff7a00;
  --bb-amarillo: #ffc933;
  --bb-verde: #21b66f;

  --bb-fondo: #f4f7fc;
  --bb-blanco: #ffffff;
  --bb-texto: #13213f;
  --bb-texto-suave: #5a6785;
  --bb-borde: #dbe3f1;

  --bb-sombra: 0 12px 30px rgba(15, 31, 77, 0.08);
  --bb-radio: 22px;
}

/* Fondo general */
body {
  background: linear-gradient(180deg, #f8fbff 0%, #eef3fb 100%);
  color: var(--bb-texto);
}

/* Tarjetas principales */
.tarjeta-inicio,
.tarjeta-quiz,
.tarjeta-final,
.pantalla-progreso .tarjeta,
.pantalla-teoria .teoria-contenedor,
.progreso-global,
.estadisticas-temas {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--bb-borde);
  box-shadow: var(--bb-sombra);
  border-radius: var(--bb-radio);
  position: relative;
  overflow: hidden;
}

/* Marca de agua de fondo más grande */
.tarjeta-inicio::before,
.tarjeta-quiz::before,
.tarjeta-final::before,
.progreso-global::before,
.estadisticas-temas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/logo/badbear-logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 460px;
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}

.tarjeta-inicio > *,
.tarjeta-quiz > *,
.tarjeta-final > *,
.progreso-global > *,
.estadisticas-temas > * {
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(47, 101, 255, 0.12);
  box-shadow: 0 6px 18px rgba(15, 31, 77, 0.05);
}

/* Marca */
.marca-texto h1 {
  color: var(--bb-azul-oscuro);
}

.marca-texto h1 span {
  color: var(--bb-azul);
}

.marca-texto p {
  color: var(--bb-texto-suave);
}

/* Navegación */
.nav-item {
  color: var(--bb-texto-suave);
  border-radius: 14px;
  transition: all 0.25s ease;
}

.nav-item:hover {
  background: rgba(255, 122, 0, 0.10);
  color: var(--bb-naranja);
}

.nav-item.activo {
  background: linear-gradient(135deg, rgba(47, 101, 255, 0.14), rgba(255, 95, 162, 0.14));
  color: var(--bb-azul);
  box-shadow: inset 0 -3px 0 var(--bb-azul);
}

.nav-total {
  background: linear-gradient(135deg, var(--bb-azul-oscuro), var(--bb-azul));
  color: white;
  box-shadow: 0 10px 24px rgba(47, 101, 255, 0.25);
}

/* Etiquetas superiores */
.etiqueta-superior,
.progreso-global-etiqueta {
  color: var(--bb-azul);
  letter-spacing: 1px;
  font-weight: 800;
}

/* Títulos */
h2, h3 {
  color: var(--bb-azul-oscuro);
}

/* Descripciones */
.descripcion-inicio,
.teoria-cabecera p,
.info-seleccion,
.estadisticas-temas p {
  color: var(--bb-texto-suave);
}

/* Datos del banco / cajas */
.dato,
.estadistica-global,
.bloque-estadistica,
.caja-estadistica,
.estadistica-examen {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--bb-borde);
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(15, 31, 77, 0.04);
}

.dato-numero,
.estadistica-numero {
  color: var(--bb-azul-oscuro);
  font-weight: 800;
}

.estadistica-falladas .estadistica-numero {
  color: var(--bb-rojo);
}

/* Botones principales */
.boton,
.boton-principal,
#btn-iniciar,
#btn-iniciar-examenes,
#btn-practicar-falladas,
#btn-practicar-examenes-falladas,
#btn-responder,
#btn-siguiente {
  background: linear-gradient(135deg, var(--bb-azul-oscuro), var(--bb-azul));
  color: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(15, 31, 77, 0.18);
  transition: all 0.25s ease;
}

.boton:hover,
.boton-principal:hover,
#btn-iniciar:hover,
#btn-iniciar-examenes:hover,
#btn-practicar-falladas:hover,
#btn-practicar-examenes-falladas:hover,
#btn-responder:hover,
#btn-siguiente:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--bb-naranja), var(--bb-rojo));
}

/* Botón secundario */
.boton-secundario,
button.secundario {
  background: linear-gradient(135deg, #fff8ea, #fff3d1);
  color: #8a4d00;
  border: 1px solid #ffd88a;
}

/* Selects */
select,
input[type="text"],
input[type="password"] {
  border: 1px solid var(--bb-borde);
  border-radius: 14px;
  background: #fff;
  color: var(--bb-texto);
}

select:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--bb-azul);
  box-shadow: 0 0 0 4px rgba(47, 101, 255, 0.10);
}

/* Opciones de respuesta */
.opcion,
.alternativa,
.opcion-respuesta {
  border: 1px solid var(--bb-borde);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  transition: all 0.2s ease;
}

.opcion:hover,
.alternativa:hover,
.opcion-respuesta:hover {
  border-color: var(--bb-naranja);
  background: rgba(255, 122, 0, 0.05);
}

.opcion.seleccionada,
.alternativa.seleccionada,
.opcion-respuesta.seleccionada {
  border-color: var(--bb-azul);
  background: rgba(47, 101, 255, 0.08);
}

/* Respuesta correcta / incorrecta */
.correcta {
  border-color: var(--bb-verde) !important;
  background: rgba(33, 182, 111, 0.10) !important;
  color: #11653f;
}

.incorrecta {
  border-color: var(--bb-rojo) !important;
  background: rgba(229, 57, 53, 0.10) !important;
  color: #8d1f1c;
}

/* Filtros */
.filtros-examenes-pasados button,
.filtros-temas button,
.filtro-examen-activo {
  border-radius: 14px;
  border: 1px solid var(--bb-borde);
  background: #fff;
  color: var(--bb-texto);
  transition: 0.2s ease;
}

.filtros-examenes-pasados button:hover,
.filtros-temas button:hover {
  border-color: var(--bb-naranja);
  background: rgba(255, 122, 0, 0.08);
  color: var(--bb-naranja);
}

.filtro-examen-activo,
.filtros-examenes-pasados button.activo,
.filtros-temas button.activo {
  background: linear-gradient(135deg, var(--bb-azul), var(--bb-rosado));
  color: #fff;
  border-color: transparent;
}

/* Barra de progreso */
.progreso-barra,
.barra-progreso,
.progress-bar {
  background: #e7edf8;
  border-radius: 999px;
  overflow: hidden;
}

.progreso,
.progreso-relleno,
.progress-fill {
  background: linear-gradient(90deg, var(--bb-verde), var(--bb-amarillo), var(--bb-naranja));
  border-radius: 999px;
}

/* Texto de rendimiento */
#porcentaje-avance,
#global-rendimiento,
#estadisticas-examenes-porcentaje,
.nota-destacada {
  color: var(--bb-verde);
  font-weight: 800;
}

#nota-vigesimal,
#global-nota {
  color: var(--bb-naranja);
  font-weight: 800;
}

/* Mensajes finales */
.mensaje-resultado,
.resultado-mensaje {
  color: var(--bb-texto);
}

/* Badges / chips */
.badge,
.chip,
.tema-badge,
.modo-badge {
  background: linear-gradient(135deg, rgba(255, 201, 51, 0.18), rgba(255, 122, 0, 0.12));
  color: #8a4d00;
  border: 1px solid rgba(255, 201, 51, 0.45);
  border-radius: 999px;
}

/* Imagen de preguntas */
.imagen-pregunta,
.pregunta-imagen img {
  border-radius: 18px;
  border: 3px solid rgba(47, 101, 255, 0.10);
  box-shadow: 0 12px 24px rgba(15, 31, 77, 0.10);
}

/* Footer suave */
.footer,
.pie-pagina {
  color: var(--bb-texto-suave);
}