body {
  background: #fcfcfc;
  font-family:  "Nunito", sans-serif;
  margin: 0;
  padding: 0;
}
.jerq-wrapper {
  display: flex;
  max-width: 1400px;
  margin: 2.5em auto 0 auto;
  gap: 2.2em;
  justify-content: center;
  align-items: flex-start;
}
.jerq-aside {
  width: 340px;
  min-width: 220px;
}
#docentes-title {
  text-align: center;
  color: #16552b88;
  font-size: 30px;
}
.jerq-category-box {
  background: #fff;
  border-radius: 17px;
  box-shadow: 0 4px 12px rgba(44,44,44,0.07);
  padding: 2.1em 2em 2em 2em;
  border: 2px solid #f0f2f8;
}
.jerq-category-box h4 {
  color: #453b27;
  font-size: 1.22em;
  font-weight: 700;
  margin-bottom: 1.7em;
  letter-spacing: 0.02em;
  border-bottom: 2.5px solid #384159;
  display: inline-block;
  padding-bottom: 0.2em;
}
#jerq-categorias {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}
#jerq-categorias li {
  margin-bottom: 0.8em;
}
#jerq-categorias li:last-child {
  margin-bottom: 0;
}
.jerq-cat-link {
  color: #29346c;
  font-weight: 500;
  font-size: 1.11em;
  text-decoration: none;
  border-radius: 7px;
  padding: 0.46em 0.7em;
  display: inline-block;
  transition: background .14s, color .14s;
  cursor: pointer;
}
.jerq-cat-link.selected, .jerq-cat-link:hover {
  background: #eafdb4;
  color: #000000;
}
.jerq-cat-link.jerq-todos {
  color: black;
}
.jerq-lista {
  flex: 1;
  min-width: 340px;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 1.2em;
}
.jerq-docente-card {
  background: #fff;
  border-radius: 23px;
  box-shadow: 0 5px 24px rgba(70,100,144,0.07);
  padding: 1.6em 2.1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
}

.jerq-docente-info {
  display: flex;
  flex-direction: column;
  gap: 0.12em;
}
.jerq-docente-nombre {
  color: #1a2a5b;
  font-size: 1.18em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.11em;
  letter-spacing: 0.01em;
}
.jerq-docente-categoria {
  color: #406091;
  font-size: 1.03em;
  font-weight: 400;
  margin-bottom: 0;
  margin-top: 0;
}
.jerq-botones {
  display: flex;
  gap: 0.7em;
}
.jerq-btn {
  background: #3ca001c2;
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  padding: 0.35em 1.2em;
  font-size: 1em;
  cursor: pointer;
  transition: background .13s;
  letter-spacing: 1px;
  text-decoration: none;
  display: inline-block;
}
.jerq-btn:hover {
  background: #264614ce;
}
.jerq-paginacion {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 18px;
  flex-wrap: wrap;
}
.jerq-pag-btn {
  padding: 5px 14px;
  border-radius: 7px;
  border: 1px solid #3ca001c2;
  background: #f8fafc;
  color: #264614ce;
  cursor: pointer;
  font-weight: 600;
  transition: background .2s, color .2s;
}
.jerq-pag-btn.activo,
.jerq-pag-btn:hover:not([disabled]) {
  background: #3ca001c2;
  color: #fff;
  border-color: #264614ce;
}
.jerq-pag-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#jerq-categorias-select {
  width: 100%;
  font-size: 1.1em;
  padding: 0.42em 0.6em;
  border-radius: 7px;
  border: 1.5px solid #bbb;
  margin-top: 0.9em;
  margin-bottom: 1.5em;
  background: #f4f7fa;
  color: #556c29;
  outline: none;
  display: none; /* por defecto */
}
.jerq-docente-imagen {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  margin-right: 1.2em;
}
.jerq-docente-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

@media (max-width: 1100px) {
  .jerq-wrapper {
    flex-direction: column;
    gap: 1.7em;
    padding: 0 1em;
    align-items: stretch;
  }
  .jerq-aside {
    width: 100%;
    min-width: 0;
    margin-bottom: 1em;
  }
  .jerq-category-box {
    padding: 1.2em 1.2em 1.1em 1.2em;
    border-radius: 13px;
  }
  .jerq-lista {
    max-width: 100%;
  }
}
@media (max-width: 650px) {
   #jerq-categorias-select {
    display: block;
  }
  #jerq-categorias {
    display: none;
  }
  .jerq-docente-card {
    padding: 1em 0.5em;
    border-radius: 13px;
    flex-direction: column;
    gap: 0.7em;
    align-items: flex-start;
  }
  .jerq-lista {
    padding-left: 0;
  }
}
/* Tablet: Menú lateral arriba, lista al 100% */
@media (max-width: 1100px) {
  .jerq-wrapper {
    flex-direction: column;
    gap: 1.7em;
    padding: 0 1em;
    align-items: stretch;
  }
  .jerq-aside {
    width: 100%;
    min-width: 0;
    margin-bottom: 1em;
  }
  .jerq-category-box {
    padding: 1.2em 1.2em 1.1em 1.2em;
    border-radius: 13px;
  }
  .jerq-lista {
    max-width: 100%;
  }
}

/* Móviles: Cards más compactas, flex en columna */
@media (max-width: 650px) {
  
  .jerq-title {
    font-size: 1.25em;
    margin-top: 0.7em;
    margin-bottom: 1em;
  }
   .jerq-docente-imagen {
    width: 70px;
    height: 70px;
    margin: 0 auto 0.5em auto;
  }
  .jerq-category-box h4 {
    font-size: 1em;
    margin-bottom: 1.1em;
  }
  .jerq-category-box {
    padding: 0.7em 0.6em;
    border-radius: 9px;
  }
  .jerq-docente-card {
    padding: 0.7em 0.2em;
    border-radius: 10px;
    flex-direction: column;
    gap: 0.6em;
    align-items: flex-start;
    min-height: 60px;
  }
  .jerq-docente-nombre {
    text-align: center;
    font-size: 1em;
  }
  .jerq-docente-categoria {
    text-align: center;
    font-size: 0.97em;
  }
  .jerq-botones {
    gap: 0.5em;
    width: 100%;
    justify-content: center;
  }
  .jerq-btn {
    font-size: 0.98em;
    padding: 0.3em 0.6em;
    border-radius: 6px;
  }
}
@media (max-width: 600px) {
 
.jerq-docente-card {
    align-items: center;
    padding: 0.5em 0.05em;
    border-radius: 7px;
  }
}
/* Móviles pequeños: Reduce aún más padding y tamaño de letra */
@media (max-width: 430px) {
  .jerq-docente-card {
    align-items: center;
    padding: 0.5em 0.05em;
    border-radius: 7px;
  }
  .jerq-category-box {
    padding: 0.5em 0.1em;
  }
  .jerq-docente-nombre, .jerq-docente-categoria {
    font-size: 0.97em;
  }
  .jerq-btn {
    font-size: 0.91em;
    padding: 0.18em 0.4em;
  }
}

