/* tema2-temario.html — grid de subtemas con misma altura por fila */

.page-tema-m3-tema2-temario .tema-m3-tema2-temario-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1.25rem;
  padding: 0.75rem 0.35rem;
  box-sizing: border-box;
}

.page-tema-m3-tema2-temario .tema-m3-tema2-temario-grid.flex-row {
  justify-content: center;
}

/* Sobreescribe .formato-links > a (flex-basis: 0) para anchos de tarjeta estables */
.page-tema-m3-tema2-temario
  .tema-m3-tema2-temario-grid.formato-links
  > a.tema-m3-tema2-temario-link {
  display: flex;
  flex-direction: column;
  flex: 1 1 220px;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 220px;
  max-width: 250px;
  min-width: 200px;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.page-tema-m3-tema2-temario
  .tema-m3-tema2-temario-link
  > .box-form.tema-m3-tema2-temario-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

.page-tema-m3-tema2-temario .tema-m3-tema2-temario-card-img {
  width: 70px;
  height: auto;
  margin: 0 auto 0.75rem;
  padding: 0;
  display: block;
  flex-shrink: 0;
}

.page-tema-m3-tema2-temario .tema-m3-tema2-temario-link .block {
  margin-top: auto;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  text-align: center;
  line-height: 1.25;
}

@media (max-width: 575.98px) {
  .page-tema-m3-tema2-temario
    .tema-m3-tema2-temario-grid.formato-links
    > a.tema-m3-tema2-temario-link {
    min-width: 0;
    flex-basis: 100%;
    max-width: 100%;
  }
}
