*{
    margin: 0;
    border: 0;
    padding: 0;
    list-style: none;
    text-decoration:none;
}
article,aside,details,figcaption,figure,
footer,header,hgroup,nav,section,div{
    display:block;
}

/* Catalogue and search result: one column on mobile, two from 1024px.
   Every box inside a column takes the column width, so the search bar and
   the teacher box share their edges. */
.contenedorIngresos
{
  display: grid;
  gap: 30px 2rem;
  align-items: start;
  width: calc(100% - 2rem);
  max-width: 1020px;
  margin: 30px auto 0;
}

.contenedorIngresos, .contenedorIngresos * {
  box-sizing: border-box;
}

/* Mobile and tablet: the search bar comes before the catalogue, and the
   teacher box only shows once it has a teacher. */
.cuadroResultados {
  order: -1;
}

.datosProfesor:empty {
  display: none;
}

.cuadroResultados #search_content input[type=text] {
  border-radius: 20px;
}

.cuadroResultados #search_content:has(+ .datosProfesor:not(:empty)) input[type=text] {
  border-radius: 20px 20px 0px 0px;
}

@media (min-width: 1024px) {
  .contenedorIngresos {
    grid-template-columns: 1fr 1fr;
  }

  .cuadroResultados {
    order: 0;
  }

  .datosProfesor:empty {
    display: block;
  }

  .cuadroResultados #search_content input[type=text] {
    border-radius: 20px 20px 0px 0px;
  }
}

.resultadosProfesores {
    width: 45%;
    height: 400px;
    margin: 0 auto;
    background: red;
}

.cuadroProfesores, .cuadroResultados {
    min-width: 0;
}

#search_content{
  width: 100%;
  max-width: none;
  list-style-type: none;
  margin: 0;
}

#search_content input[type=text]
{
  border-radius: 20px 20px 0px 0px;
  padding: 8px 13px; 
  background-color: rgba(0, 43, 122, 0.8);
  color: #FFF;
  width: 100%;
  border: 3px groove var(--dorado-oscuro);
  font-size: 15px;
}

/* The scroll track is transparent: a classic (non-overlay) scrollbar
   keeps the dark background, so the box ends on the same edge as the
   search bar above it. */
.datosProfesor
{
    width: 100%;
    height: 408px;
    scrollbar-color: var(--dorado-oscuro) transparent;
    background: rgba(0,0,0,.7);
    color: whitesmoke;
    text-align: justify;
    border-radius: 0px 0px 20px 20px;
    overflow: auto;    
    padding-bottom: 15px;
} 

/* flow-root: the floated name stays inside the band, which grows when the
   name takes more than one line. Same height as before for one line. */
.nombreProfesorBarra {
    display: flow-root;
    width: 100%;
    padding: 10px 0px;
    color: white;
    text-shadow: 1px 1px 0px rgba(0,0,0,.7);
    background-color: rgba(0, 43, 122, 0.8);
    border-top: 3px groove #CEA510;
    border-bottom: 3px groove #CEA510;
}

.nombreProfesor
{
  padding-left: 15px;
  float: left;
  text-align: left;
  font-size: 1em;
  /* Leaves room for the photo on the right. */
  max-width: calc(100% - 120px);
}

.imagenProfesorBarra {
    width: 100px;
    height: 100px;
    background: red;
}

.imagenProfesor
{
    margin-top: 10px;
    width: 80px;
    height: 80px;
}

.nombreProfesorLink
{
  font-size: 1em;
  color: white;
  text-shadow: 1px 1px 1px #000000;
}

.imagenDatosProfesor {
    width: 80px;
    height: 80px;
    border: 5px double #CEA510;
    border-radius: 50%;
    display: block;
    margin: -65px 20px 0 auto;
}

.parrafoDatosProfesor {
    text-align: justify;
}

.h3CuadroProfesores {
    width: 100%;
    color: white;
    text-shadow: 1px 1px 1px #000000;
    border-radius: 20px 20px 0px 0px;
    padding: 9px 0px;
    font-size: 1.4em;
    background-color: rgba(0, 43, 122,.8);
    border: 3px groove #CEA510;
    text-align: center;
}

.aAbecedario {
    color: black;
    padding: 8px 0px;
}

.liAbecedeario {
  color: whitesmoke;
  display: inline-block;
  font-size: 12.5px;
  margin-right: 2px;
  text-shadow: 1px 1px 1px #000000;
}

.liAbecedeario:hover
{
    color: black;
}

.ulAbecedario {
  list-style: outside none none;
  width: 100%;
  background-color: rgba(0, 43, 122, 0.8);
  padding: 10px 7px;
  border-radius: 15px;
  text-align: center;
  font-size: 1.5em;
  line-height: 1.5;
}

/* Cards fill the row: as many 7rem-wide cards as fit. */
.tablasProfesores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  /* With the fixed height, auto rows shrink to fit it and long names spill
     over the next row; max-content rows grow with their tallest card. */
  grid-auto-rows: max-content;
  align-content: start;
  gap: 20px 3%;
  width: 100%;
  background-color: rgba(0,0,0,.7);
  padding: 20px 10px;
  border-radius: 0px 0px 15px 15px;
  height: 369px;
  overflow: auto;
  scrollbar-color: var(--dorado-oscuro) transparent;
}

/* Grows with long names (cards of a row share the tallest height); long
   words wrap inside the card. */
.col {
    min-height: 120px;
    padding: 0 4px 6px;
    border-radius: 5px;
    background-color: rgba(0, 43, 122, 0.8);
    border: 3px groove #CEA510;
    text-align: center;
    overflow-wrap: anywhere;
}

.listaProf
{
    width:95%;
    height:380px;
    display: none;
}

/* Right edge on the right edge of .contenedorIngresos. */
#txtProf
{
  border-radius: 30px;
  padding: 5px 20px;
  margin-right: max(1rem, (100% - 1020px) / 2);
}

/* Selected letter: gold, like the borders of the boxes. */
.liAbecedearioSelected a
{
  padding: 0 4px;
  border-radius: 5px;
  background-color: var(--dorado);
  color: var(--negro);
  text-shadow: none;
}

/* The e-mails and phones are tables of their own: a fixed 40% label
   column lines them up with the rows above. */
.tablaDatosProfesor
{
  font-size: 1.1em;
  border-collapse: collapse;
  table-layout: fixed;
}

.tablaDatosProfesor th
{
  width: 40%;
}

/* Long e-mails and links wrap instead of widening the box. */
.tablaDatosProfesor td
{
  overflow-wrap: anywhere;
}

.tablaDatosProfesor a
{
    color: #CEA510;
    text-decoration: underline;
}

th, td
{
  text-align: left;
  color: #FFF;
  padding: 5px 10px;
  margin: 0px auto;
  border-bottom: 2px groove rgba(0, 0, 0, 0.4);
}

/* Narrow cells: justified text leaves big gaps, so it starts at 768px. */
@media (min-width: 768px) {
  th, td
  {
    padding: 5px 20px;
  }

  td
  {
    text-align: justify;
  }
}

.divTablaDatosProfesor
{
  overflow: auto;
}

/* Its look is .boton-regresar (base.css); hidden until a teacher is
   shown (busqueda_profesores.js). */
.busqProf
{
    visibility: hidden;
}

.divBotBusq
{
  margin-top: 60px;
}

/* Left edge on the left edge of .contenedorIngresos. */
.divBotBusq .boton-regresar
{
  margin: 0 max(1rem, (100% - 1020px) / 2);
}

.small {
    height: 50px;
    width: 50px;
    border-radius: 35px;
    cursor: pointer;
    margin: 0px 25px 10px -30px;
    -webkit-transition: -webkit-transform 1s ease-in;
    -moz-transition: -moz-transform 1s ease-in;
    -ms-transition: -ms-transform 1s ease-in;
    transition: transform 5s ease-in;
    border: 3px groove #CEA510;
    background-color: rgba(0, 43, 122, 0.8);
    font-size: 1.3em;
    visibility: hidden;
}

/* Expanded teacher box: takes both grid columns while the catalogue is
   hidden. */
.big
{
    grid-column: 1 / -1;
    -webkit-transition: -webkit-transform 1s ease-in;
    -moz-transition: -moz-transform 1s ease-in;
    -ms-transition: -ms-transform 1s ease-in;
    transition: transform 1s ease-in;
    font-size: 13px;
}

#barraBusqNva
{
    border-radius: 20px 20px 0px 0px;
    padding: 8px 13px;
    background-color: rgba(0, 43, 122, 0.8);
    color: #FFF;
    width: 100%;
    border: 3px groove var(--dorado-oscuro);
    font-size: 12px;
}

#barraBusqNva #busqProf input[type=text]
{
    background-color: transparent;
    color: white;
    font-size: 1.3em;
    width: 100%;
}

.tablaDatosProfNva
{
  overflow: auto;
  font-size: .8em;
}

.regresar
{
  visibility: hidden;
  margin: 14px;
  font-size: 1.3em;
  font-weight: bold;
}

/* Mobile: the name starts near the edge, so it needs fewer lines; the old
   75px from 768px. */
.big .datosProfesor .nombreProfesorBarra .nombreProfesor
{
    padding-left: 15px;
    font-size: 1.25em;
    max-width: calc(100% - 160px);
}

@media (min-width: 768px) {
    .big .datosProfesor .nombreProfesorBarra .nombreProfesor
    {
        padding-left: 75px;
    }
}

.big .datosProfesor .imagenDatosProfesor
{
    width: 120px;
    height: 120px;
    border: 5px double #CEA510;
    border-radius: 50%;
    margin: -85px 20px 0 auto;
}

.big .datosProfesor .nombreProfesorBarra 
{
    width: 100%;
    padding: 12px 0px;
    color: white;
    text-shadow: 1px 1px 0px rgba(0,0,0,.7);
    background-color: rgba(0, 43, 122, 0.8);
    border-top: 3px groove #CEA510;
    border-bottom: 3px groove #CEA510;
    line-height: 1.2;
}

.big .datosProfesor .tablaDatosProfesor th
{
  width: 40%;
}

