* { box-sizing: border-box; margin: 0; padding: 0; }

/* Temario cards */
.temario {
  background: #232a35;
  padding: 32px 5vw 22px 5vw;
}
.temario h2 {
  color: #ffd600;
  margin-bottom: 26px;
  font-size: 1.6rem;
  text-align: center;
}
.temario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 23px;
}
.temario-card {
  background: #222a38;
  border-radius: 12px;
  box-shadow: 0 2px 10px #191e2e55;
  padding: 18px 13px;
  color: #fff;
  cursor: pointer;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  transition: box-shadow .16s, transform .14s;
}
.temario-card:hover, .temario-card:focus {
  box-shadow: 0 0 0 2px #ffd600, 0 4px 14px #3c72e8aa;
  background: #28395a;
  transform: scale(1.025);
}

/* Módulos */
.modulo {
  padding: 38px 6vw 24px 6vw;
  max-width: 1200px;
  margin: 0 auto 26px auto;
  background: #fff1;
  border-radius: 16px;
  box-shadow: 0 2px 24px #17204522;
}
.modulo h2 {
  color: #3c72e8;
  margin-bottom: 17px;
  font-size: 1.3rem;
}
.contenido-flex {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.contenido-flex > div {
  flex: 1 1 310px;
  min-width: 270px;
  background: #293258;
  color: #fff;
  border-radius: 12px;
  padding: 21px 15px 14px 15px;
  box-shadow: 0 2px 12px #1a223833;
  margin-bottom: 17px;
  font-size: .98rem;
}
.contenido-flex h3 {
  color: #ffd600;
  margin-bottom: 8px;
  font-size: 1.08rem;
}
.contenido-flex pre {
  margin: 9px 0 0 0;
  background: #191e2e;
  color: #b4eaff;
  border-radius: 6px;
  padding: 13px 9px;
  font-size: .96rem;
  overflow-x: auto;
  line-height: 1.3;
}
.contenido-flex code {
  background: #112133;
  border-radius: 3px;
  padding: 1px 5px;
}

/* Tablas de estructuras */
.tabla-estructuras {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: .97rem;
  background: #273a53;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px #1a223833;
}
.tabla-estructuras caption {
  text-align: left;
  font-weight: bold;
  color: #ffd600;
  background: #1d2e48;
  padding: 7px 10px;
  font-size: 1rem;
  border-radius: 8px 8px 0 0;
}
.tabla-estructuras th, .tabla-estructuras td {
  padding: 7px 10px;
  border: 1px solid #324e74;
  color: #e0eaff;
}
.tabla-estructuras th {
  background: #1d2e48;
  font-weight: bold;
  color: #ffd600;
}
.tabla-estructuras tr:nth-child(even) { background: #233147; }
.tabla-estructuras tr:hover { background: #334b6b; }

/* Módulo resaltado por scroll */
.modulo-resaltado {
  box-shadow: 0 0 22px 8px #ffd600, 0 0 8px #fff6;
  border: 2px solid #ffd600;
  transition: box-shadow 0.4s, border 0.4s;
}

/* Responsive */
@media (max-width: 850px) {
  .contenido-flex { flex-direction: column; gap: 18px; }
}
@media (max-width: 600px) {
  .temario { padding: 18px 2vw 14px 2vw;}
  .modulo { padding: 13px 2vw 12px 2vw; }
  .contenido-flex > div { padding: 13px 6px 8px 9px; min-width: 0;}
  .temario-card { padding: 14px 8px; font-size: .99rem; }
}
