/******** Configuración General ********/
body {
  font-family: 'Poppins', Arial, sans-serif !important;
}
/* Color azul para todos los textos */
body,
.text-primary,
.form-label,
.form-control,
.form-select,
input,
select,
option,
label {
  color: #0D20A3 !important;
}
.btn-outline-primary {
  color: #0D20A3 !important;
  border-color: #0D20A3 !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:active {
  background-color: #0D20A3 !important;
  color: #fff !important;
  border-color: #0D20A3 !important;
}
.bg-primary-light {
  background-color: #4aa7ff !important;
  color: #0D20A3 !important; 
}

.bg-success {
  background-color: #3CC6A2 !important;
  color: #0D20A3 !important;
}

.bg-primary {
  background-color: #0D20A3 !important;
  color: #fff !important; 
}

.bg-warning {
  background-color: #febc2a !important;
  color: #0D20A3 !important;
}

.bg-danger {
  background-color: #ff5d11 !important;
  color: #fff !important; 
}

.form-control::placeholder {
  color: #4aa7ff !important;
font-weight: 500;
}

.imagen-con-simbolo {
  width: 100%;
  height: auto;
  max-height: 400px;
  position: relative;
  z-index: 1;
  object-fit: contain;
  object-position: center;
}

p, span, a, li, td, th {
  overflow-wrap: break-word;
  /* word-break: break-word;  */
}

/* Bloque 1 - Header */
.header-matematicas {
  background: #fff;
  padding: 32px 0 0 0;
}

.container-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 32px;
  gap: 48px;
}

.header-left {
  display: flex;
  align-items: flex-end;
}

.logo-header {
  max-width: 280px;
  height: auto;
  margin-right: 24px;
  display: block;
}

.subtitulo-header {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0D20A3;
  line-height: 1.1;
  margin-bottom: 6px;
}

.header-login {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 320px;
  margin-bottom: 6px;
  width: 340px;
}

.login-group {
  width: 100%;
}

.input-login {
  border: 2px solid #0D20A3;
  border-radius: 2px;
  padding: 6px 12px;
  font-size: 1rem;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}

.login-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.login-row .input-login {
  flex: 1 1 auto;
  margin-bottom: 0;
}

.btn-entrar {
  background: #FF5C13;
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 2px;
  padding: 7px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  height: 40px;
  white-space: nowrap;
}

.btn-entrar:hover {
  background: #0D20A3;
}

.login-links {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 4px;
  width: 100%;
}

.link-login {
  color: #49A7FF;
  font-size: 1rem;
  font-style: italic;
  text-decoration: none;
  transition: color 0.2s;
}

.link-login:hover {
  color: #0D20A3;
}

/* TABLET: hasta 991px */
@media (max-width: 991px) {
  .container-header {
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    padding: 0 16px;
  }
  .header-left {
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 12px;
  }
  .header-login {
    align-items: center;
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
    display: none;
  }
  .login-group,
  .login-row,
  .login-links {
    width: 100%;
  }
}

/* MÓVIL: hasta 600px */
@media (max-width: 600px) {
  .header-matematicas {
    padding: 20px 0 0 0;
  }
  .container-header {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 0 8px;
  }
  .header-left {
    /*flex-direction: column;*/
    align-items: center;
    margin-bottom: 8px;
  }
  .logo-header {
    max-width: 140px;
    margin-right: 0;
    margin-bottom: 8px;
  }
  .subtitulo-header {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 0;
  }
  .header-login {
    width: 100%;
    align-items: stretch;
  }
  .input-login,
  .login-row .input-login {
    font-size: 0.95rem;
    padding: 6px 8px;
  }
  .btn-entrar {
    width: 100px;
    padding: 7px 0;
    font-size: 0.95rem;
  }
  .login-links {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 0.95rem;
  }
}

/* Bloque 2 - Categorías */
.categoria {
  min-height: 120px;
  color: #0D20A3;
  font-size: 1.5rem;
  letter-spacing: 1px;
  transition: background 0.25s, color 0.25s;
  cursor: pointer;
  user-select: none;
}

/* Estilos base para los colores de fondo */
.categoria-verde {
  background: #3CC6A2;
}

.categoria-azul {
  background: #49A7FF;
}

.categoria-amarillo {
  background: #FEBC2A;
}

.categoria-naranja {
  background: #FF5C13;
}

/* Estilos para el hover y focus */
.categoria-verde:hover,
.categoria-verde:focus,
.categoria-azul:hover,
.categoria-azul:focus,
.categoria-naranja:hover,
.categoria-naranja:focus,
.categoria-amarillo:hover,
.categoria-amarillo:focus {
  background-color: #0D20A3 !important;
  color: #fff !important;
}

.categoria-verde:hover *,
.categoria-verde:focus *,
.categoria-azul:hover *,
.categoria-azul:focus *,
.categoria-amarillo:hover *,
.categoria-amarillo:focus * {
  color: #fff !important;
}

@media (max-width: 767.98px) {
  .categoria {
    min-height: 80px;
    font-size: 1.1rem;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* Bloque 3 - Contenedor */
.contenedor-borde-azul {
  border: 10px solid #0D20A3;
  padding: 1rem;
  box-sizing: border-box;
}

/* Bloque 4 - Footer */
.footer-logo {
  max-width: 60px;
  height: auto;
  display: block;
}
.footer-legal, .footer-copyright {
  font-size: 1rem;
  letter-spacing: 0.5px;
}
@media (max-width: 991.98px) {
  .footer-logo {
    max-width: 48px;
  }
  .footer-legal, .footer-copyright {
    font-size: 0.97rem;
  }
}
@media (max-width: 767.98px) {
  .footer-logo {
    max-width: 36px;
  }
  .footer-legal, .footer-copyright {
    font-size: 0.95rem;
  }
}

/* Bloque Generar cuadernos de matemáticas personalzado */
/* Responsive para Tablet */
@media (min-width: 768px) and (max-width: 991.98px) {
  .contenedor-borde-azul {
    padding: 20px !important;
  }
  .contenedor-borde-azul h2 {
    font-size: 24px !important;
  }
  .contenedor-borde-azul .col-12.col-md-8,
  .contenedor-borde-azul .col-12.col-md-4 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  .contenedor-borde-azul .position-relative {
    margin-top: 30px !important;
  }
  .contenedor-borde-azul img {
    max-width: 100% !important;
    max-height: 300px !important;
    margin: 0 auto !important;
    display: block !important;
  }
  .contenedor-borde-azul .d-flex.flex-column.gap-3 {
    gap: 20px !important;
  }

  .contenedor-borde-azul .d-inline-block {
    width: auto !important;
  }
  .contenedor-borde-azul .btn.btn-matematicas {
    width: auto !important;
    text-align: center !important;
    padding: 10px 20px !important;
    display: inline-block !important;
  }
}

/* Responsive para Móvil */
@media (max-width: 767.98px) {
  .contenedor-borde-azul {
    padding: 1rem !important;
  }
  .contenedor-borde-azul h2 {
    font-size: 1.2rem !important;
  }
  .contenedor-borde-azul .border {
    flex-direction: column !important;
    align-items: flex-start !important;
    min-height: unset !important;
    gap: 0.5rem;
  }
  .contenedor-borde-azul .border > div:last-child {
    align-self: flex-end;
    margin-top: 0.5rem;
  }
  .contenedor-borde-azul .form-control,
  .contenedor-borde-azul .form-select {
    width: 100% !important;
    min-width: 0 !important;
  }
  .contenedor-borde-azul .d-flex.gap-2 {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  .contenedor-borde-azul img {
    max-width: 90vw;
    max-height: 180px;
  }
  .contenedor-borde-azul .position-relative {
    margin-top: 1rem;
  }
  .contenedor-borde-azul .d-inline-block {
    width: 100% !important;
  }
  .contenedor-borde-azul .btn-matematicas {
    width: 100% !important;
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Bordes azules para todos los inputs, selects, checks, radios */
.border-primary,
.form-control,
.form-select,
input[type="checkbox"],
input[type="radio"] {
  border-color: #0D20A3 !important;
}

/* Borde azul y sombra azul al enfocar */
.form-control:focus,
.form-select:focus,
input[type="checkbox"]:focus,
input[type="radio"]:focus {
  border-color: #0D20A3 !important;
  box-shadow: 0 0 0 0.15rem rgba(13,32,163,0.15) !important;
}

/* Checkboxes y radios personalizados Bootstrap 5 */
.form-check-input:checked {
  background-color: #0D20A3 !important;
  border-color: #0D20A3 !important;
}

/* Para los iconos de check y radio en modo checked */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  accent-color: #0D20A3;
}

/* Checkboxes sin el borde gris por defecto */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #0D20A3; 
    width: 16px;
    height: 16px;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

/* Checkbox marcado (tick azul) */
input[type="checkbox"]:checked {
    background-color: #0D20A3;
    border: 1px solid #0D20A3;
}

/* Pseudo-elemento para el "tick" (✓) */
input[type="checkbox"]:checked::before {
    content: '✓'; 
    font-size: 12px;
    color: white; 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
}
.btn-matematicas {
  background-color: #FF5C13;
  color: #fff;
  border-radius: 0;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.6rem 2.2rem;
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s;
  border: none;
  box-shadow: none;
  display: inline-block;
}
.btn-matematicas:hover,
.btn-matematicas:focus {
  background-color: #0D20A3;
  color: #fff;
}

/* Ajuste de texto para páginas */
.texto_ajustado {
max-width: 800px;
margin: 0 auto;
}


.texto_legible {
font-size: 110%;  
}

.texto_legible h1 {
font-size: 180%;
padding-bottom: 1em;
}

.texto_legible h2 {
font-size: 140%;
}

.texto_legible h3 {
font-size: 125%;
}

/************ Informes y estadísticas ************/ 
@media (max-width: 767.98px) {
  .tabla-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .tabla-scroll table {
    min-width: 700px;
  }
  .tabla-borde-azul .btn,
  .tabla-borde-azul .btn-matematicas {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    min-width: 90px; 
    font-size: 1rem; 
  }
}
.tabla-borde-azul th,
.tabla-borde-azul td {
  border: 2px solid #0D20A3 !important;
}
@media (max-width: 991.98px) {
  .botones-menu {
    justify-content: center !important;
  }
}

.tabla-borde-azul thead th {
  background: #4aa7ff !important;
  color: #0D20A3 !important;
  font-weight: bold;
  text-align: center;
}

.tabla-borde-azul td {
  text-align: center;
  vertical-align: middle;
}

/************ menú profesor ************/ 

@media (max-width: 767.98px) {
  .imagen-movil {
    display: block;
    margin: 0 auto;
  }
}

/************ menú profesor ************/ 
@media (max-width: 767.98px) {
  .imagen-movil {
    display: block;
    margin: 0 auto;
  }
}

/************ Profesor virtual de matemáticas ************/ 
.bocadillo {
    line-height: 1.2;
    width: 80%;
    top: 45%;
}
/* Tablet */
@media (min-width: 768px) and (max-width: 991.98px) { 

  /* Contenedor principal */
  .responsive-tablet {
    padding: 20px !important;
  }

  /* Título principal */
  .responsive-tablet h2 {
    font-size: 24px !important;
  }

  /* Columnas */
  .responsive-tablet .col-12.col-md-3,
  .responsive-tablet .col-12.col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* Imagen */
  .responsive-tablet .position-relative {
    margin-top: 30px !important;
  }

  .responsive-tablet img {
    max-width: 80% !important;
    max-height: 400px !important;
    margin: 0 auto !important;
    display: block !important;
  }

  /* Botones */
  .responsive-tablet .btn.btn-matematicas {
    width: 100% !important; 
    text-align: center !important;
    padding: 10px 20px !important;
    display: inline-block !important;
  }

  /* Espaciado entre elementos */
  .responsive-tablet .mb-3 {
    margin-bottom: 20px !important;
  }

  .responsive-tablet .my-5 {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
  }

  /* Ajuste para el bocadillo en tablet */
  .position-relative[style*="width: 60%;"] { 
    width: 85% !important; 
  }
}

/* Media query para móvil */
@media (max-width: 767.98px) {
  /* Ajuste para el bocadillo en móvil */
  .position-relative[style*="width: 60%;"] { 
    width: 98% !important; 
    margin: 0 auto !important; 
  }

  /* Ajuste para el tamaño de la imagen del bocadillo en móvil */
  .position-relative[style*="width: 60%;"] > img.img-fluid {
    max-width: 100% !important; 
    height: auto !important;
  }

  /* Ajuste para los botones en móvil */
  .d-grid.gap-2 {
    width: 100% !important; 
  }

  .d-grid.gap-2 > .btn.btn-matematicas {
    width: 100% !important; 
    display: block;
    font-size: 0.85rem !important; 
  }

  /* Ajuste para el texto del bocadillo en móvil */
  /*.position-relative[style*="width: 60%;"] .position-absolute {
    font-size: 0.75rem !important; 
  }*/
}

/*Otraeducacion.css*/
.algebra_grafica {
padding-top: 2em;
font-size: 50px;
}

.algebra_grafica .ecuacion {
padding-bottom: 1em;
letter-spacing: 10px;
}

#soluciones_interactivas {
display: flex;
padding: 1em 0;
font-size: 25px;	
}

#soluciones_interactivas div {
padding: 0 2em;
}

#soluciones_interactivas input {
text-align: center;	
margin-top: 1em;
width: 2em;
}

#soluciones_interactivas div img {
transform: translateY(10px);
}

.btn-outline-primary.selected {
background-color: #0D20A3 !important;
color: #fff !important;
border-color: #0D20A3 !important;
}

.error {
color: red !important;	
}

.no_relleno {
background-color: lightyellow;  
}

#piramide_numeros {
text-align: center;
font-size: 30px;
width: 900px;
margin: 0 auto;
}

#piramide_numeros .block {
width: 150px;
height: 80px;
}

#piramide_numeros .block input {
text-align: center;
}

#temporizador_wrapper {
background: #333 none repeat scroll 0 0;
color: #ccc;
font-size: 24px;
}

#lista_billetes .cantidad_en_billetes {
width: 100%;
float: left;
padding-top: 2em;
}

#lista_billetes .cantidad_en_billetes img {
padding-left: 1em;
}

#lista_billetes .cantidad_en_billetes img.moneda200 {
height: 110px;
}

#lista_billetes .cantidad_en_billetes img.moneda100 {
height: 100px;
}

#lista_billetes .cantidad_en_billetes img.moneda50 {
height: 95px;
}

#lista_billetes .cantidad_en_billetes img.moneda20 {
height: 90px;
}

#lista_billetes .cantidad_en_billetes img.moneda10 {
height: 85px;
}

#lista_billetes .cantidad_en_billetes img.moneda5 {
height: 80px;
}

#lista_billetes .cantidad_en_billetes img.moneda2 {
height: 60px;
}

#lista_billetes .cantidad_en_billetes img.moneda1 {
height: 58px;
}

#lista_billetes .cantidad_en_billetes img.cent50 {
height: 50px;
}

#lista_billetes .cantidad_en_billetes img.cent20 {
height: 48px;
}

#lista_billetes .cantidad_en_billetes img.cent10 {
height: 46px;
}

#lista_billetes .cantidad_en_billetes img.cent5 {
height: 44px;
}

#lista_billetes .cantidad_en_billetes img.cent2 {
height: 42px;
}

#lista_billetes .cantidad_en_billetes img.cent1 {
height: 40px;
}

.operacion {
margin: 1em 0;
text-align: right;
font-family: Courier;
}

.operacion .operandos {
border-bottom: 1px solid;
margin-left: auto;
}

.operacion .division_intermedios {
margin-left: inherit;	
}

#division_intermedios .operandos {
margin-left: 0;
}

.operacion .resultado {
padding-top: 0;
}

.page_interactiva {
display: grid;
grid-template-columns: auto auto auto;  
}

input.number {
text-align: right;
font-size: 100%;
width: 1em;
}

.box_imagen_texto {
border: 1px solid black;
border-radius: 5px;
background: #efefef;
padding: 1em;
text-align: justify;
display: flex;
}

.box_img, .imagen_enunciado .imagen {
width: 100px;
padding-bottom: 0;
margin-bottom: 0;
text-align: left;
}

.box_texto, .imagen_enunciado .enunciado {
width: 60%;
float: left;
text-align: left;
color: black;
}

.box_espacio {
width: 20%;
float: left;
color: #ccc;
font-size: 48px;
text-align: center;
}

.pagina_interactivo {
display: none;
}

.pagina_actual {
display: block;
}

.ejercicio_texto {
margin-top: 20px;
margin-bottom: 40px;
width: 100%;
display: flex;
}

.ejercicio_texto_enunciado {
width: 80%;
float: left;
text-align: left;
}

.ejercicio_texto_solucion {
width: 20%;
float: left;
color: #F6F386;
font-size: 28px;
text-align: center;
}

table.interactivo input {
text-align: center;	
}

table.interactivo input.error,
#soluciones_interactivas input.error {
font-size: inherit;
}

/*Angel: Esto está copiado desde imprimir/tamplates/style.css*/
table.color th {
background: #F6F386;
color: black;
}

table.color td {
background: #F6F386;
color: black;
text-align: right;	
border: 1px solid #ccc;
}

table.borde_rojo {
border: 6px solid red !important;	
}

table.cuadrado,
table.cuadrado_grande {
width: auto;	
}

table.cuadrado td {
width: 70px;
height: 70px;
font-size: 22px;
}

table.cuadrado_grande td {
width: 140px;
height: 80px;
font-size: 44px;
padding: 30px 0;
}

table.cuadrado_grande td img {
width: 50px;	
height: auto;
}

td.borde_rojo {
border: 3px solid red !important;	
}

td.borde_azul {
border: 3px solid blue !important;		
}

td.borde_verde {
border: 3px solid green !important;		
}

td.borde_negro {
border: 3px solid black !important;		
}

table.row_0_decorated td.row0 {
background: #eee;
}

table.col_0_decorated td.col0 {
background: #eee;
}

table.sudoku {
width: 900px;  
}

table.sudoku td {
width: 100px;
height: 100px;
text-align: center;
font-size: 22px;
}

table.sudoku td input {
height: 80px;
border: 0;
background: inherit;
}

table.sudoku td span {
display: inline-block;
}

table.sudoku td.row0.col0, table.sudoku td.row0.col1, table.sudoku td.row0.col2,
table.sudoku td.row1.col0, table.sudoku td.row1.col1, table.sudoku td.row1.col2,
table.sudoku td.row2.col0, table.sudoku td.row2.col1, table.sudoku td.row2.col2 {
background: #eee;
}

table.sudoku td.row6.col0, table.sudoku td.row6.col1, table.sudoku td.row6.col2,
table.sudoku td.row7.col0, table.sudoku td.row7.col1, table.sudoku td.row7.col2,
table.sudoku td.row8.col0, table.sudoku td.row8.col1, table.sudoku td.row8.col2 {
background: #eee;
}

table.sudoku td.row0.col6, table.sudoku td.row0.col7, table.sudoku td.row0.col8,
table.sudoku td.row1.col6, table.sudoku td.row1.col7, table.sudoku td.row1.col8,
table.sudoku td.row2.col6, table.sudoku td.row2.col7, table.sudoku td.row2.col8 {
background: #eee;
}

table.sudoku td.row6.col6, table.sudoku td.row6.col7, table.sudoku td.row6.col8,
table.sudoku td.row7.col6, table.sudoku td.row7.col7, table.sudoku td.row7.col8,
table.sudoku td.row8.col6, table.sudoku td.row8.col7, table.sudoku td.row8.col8 {
background: #eee;
}

table.sudoku td.row3.col3, table.sudoku td.row3.col4, table.sudoku td.row3.col5,
table.sudoku td.row4.col3, table.sudoku td.row4.col4, table.sudoku td.row4.col5,
table.sudoku td.row5.col3, table.sudoku td.row5.col4, table.sudoku td.row5.col5 {
background: #eee;
}

.operacion {
margin: 1em 0;
text-align: right;
font-family: Courier;
}

.operacion .operandos {
border-bottom: 1px solid;
margin-left: auto;
}

.operacion .division_intermedios {
margin-left: inherit;	
}

#division_intermedios .operandos {
margin-left: 0;
}

.operacion .resultado {
padding-top: 0;
}

#resolucion {
width: 500px;
max-width: 100%;
}

#resolucion {
letter-spacing: 1em;
}

#resolucion .operandos .acarreos {
padding-right: 1em;
}

input.cifra { 
float: right;
width: 28px;
height: 1.5em;
text-align: right;
margin-left: 0.2em;
font-size: 32px;
font-weight: bold;
}

.operando {
width: 100%;
font-size: 38px;
font-weight: bold;
display: flex;
justify-content: end;
}

.operando span {
font-family: Comic Sans MS; 
letter-spacing: 1px;
display: inline-block;
width: 1em;
text-align: center;
margin-left: 0.1em;
font-size: 34px;
}

.operandos .acarreo {
border-radius: 50%;
text-align: center;
color: #006400;
font-size: 32px;
display: inline-block;
width: 1em;
text-align: center;
font-family: Comic Sans MS;
}

.operandos .mellevo {
width: auto;	
}

.resultado .resultado {
border: 0;
border-bottom: 2px solid black;
color: #F6F386;
text-align: center;
display: inline-block;
width: 1em;
font-family: Comic Sans MS;
}

.operandos .acarreo.error,
.resultado .resultado.error {
color: red;	
}

.operacion > .resultado {
position: relative;	
}

.current_focus {
transition: background-color 2s;
animation: focus_yellow 2s linear infinite; 
}

.imagenProfesorContainer {
position: absolute;
right: 0;
text-align: right;
min-width: 20%;
width: auto;
}

.imagenProfesorContainer {
  
}

.linea_acarreos {
float: right;
width: 100%;
position: relative;
}

.division_divisor {
border-bottom: 1px solid;
border-left: 1px solid;
padding-left: 0.5em;
justify-content: start;
}

.division_intermedios input.cifra {
width: 1em;
text-align: center;
font-size: 32px;
}

.division_dividendo {
text-align: left;
justify-content: start;
padding-left: 24px;
}

.division_dividendo div {
width: 42px;
text-align: center;
}

.division_dividendo div.cifra {
width: 24px;
margin-left: 9px;
margin-right:8px;
text-align: center;
}

#division_cociente {
width: 50%;
}

#division_intermedios {
max-width: 50%;
border-bottom: 0;
margin-left: 0;
}

#division_intermedios .resta {
vertical-align: middle;
font-weight: bold;
font-size: 24px;
}

h4.decorated {
background:#FEBC2A;
text-align: center;
padding: 0.15em 0.175em;
}

.spacer50 {
height: 50px;
}

.spacer100 {
height: 100px;
}

.spacer150 {
height: 150px;  
}

.text-left {
text-align: left;  
}

.text-right {
text-align: right;  
}

.text-center {
text-align: center;  
}

#soluciones_interactivas {
display: grid;
grid-template-columns: repeat(5, 1fr); /* Desktop: 5 columnas */
gap: 1rem;
}

#back_to_top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    width: 50px;
    height: 50px;
    display: none;
    text-decoration: none;
    border-radius: 35px;
    transition: all 0.3s ease;
    color: white;
    padding-top: 0.75em;
    cursor: pointer;
}
#back_to_top a {
    color: #fff !important;
    margin: 0;
    position: relative;
    font-size: 18px;
    transition: all 0.3s ease;
}
#back_to_top:hover {
    background: rgba(0, 0, 0, 0.9);
}
#back_to_top:hover a {
    color: #fff;
    top: 5px;
}

@-webkit-keyframes focus_yellow {
  0%, 49% {
  background-color: yellow;
  }
  50%, 100% {
  background-color: white;
  }
}

.piramide_4 {
margin-left: 375px;  
}

.piramide_3 {
margin-left: 300px;  
}

.piramide_2 {
margin-left: 225px;  
}

.piramide_1 {
margin-left: 150px;  
}

.piramide_0 {
margin-left: 75px;  
}

#cuaderno_interactivo {
max-width: 1200px;
margin: 2.5em auto;  
}

.soluciones .error {
font-size: 14px;
padding-top: 4em; 
}

@media (max-width: 767.98px) {
 
  .algebra_grafica {
  font-size: 25px;
  font-weight: bold; 
  }
  
  .algebra_grafica .ecuacion {
  letter-spacing: 3px;  
  }
  
  .algebra_grafica .ecuacion img {
  height: 25px !important;  
  }
  
  #soluciones_interactivas {
  display: block;  
  }
  
  .list-unstyled .list-group-item,
  .list-group-numbered .list-group-item {
  margin-bottom: 0.5em;  
  }
  
  .operandos .mellevo {
  font-size: 20px;  
  }
  
  #soluciones_interactivas {
  grid-template-columns: 1fr; /* 1 columna */
  }
  
  #back_to_top {
  display: block;
  z-index: 9999px;
  }
  
  #piramide_numeros {
  width: auto;  
  }
  
  #piramide_numeros .block {
  width: 60px;
  height: auto; 
  }
  
  #piramide_numeros .block input {
  font-size: 22px;
  padding: 0;
  margin: 0;
  width: 100%;
  }
  
  .piramide_4 {
  margin-left: 120px;  
  }
  
  .piramide_3 {
  margin-left: 90px;  
  }
  
  .piramide_2 {
  margin-left: 60px;  
  }
  
  .piramide_1 {
  margin-left: 30px;  
  }
  
  .piramide_0 {
  margin-left: 0px;  
  }
  
  table.sudoku {
  width: 350px;  
  font-size: 18px;  
  }
  
  table.sudoku td {
  width: auto;
  height: auto; 
  font-size: 20px;
  }
  
  table.sudoku td input {
  height: auto;  
  margin-top: 0;
  width: 1em;  
  }
 
  table.sudoku td span {
  padding-top: 0;  
  }
}

/* Tablet (entre móvil y escritorio) */
@media (max-width: 1024px) {
  #soluciones_interactivas {
  grid-template-columns: repeat(3, 1fr); /* 3 columnas */
  }
  
}
