/* ============================================================
   Tablas de listados (Views) responsive y con mejor aspecto.
   Se aplica solo a tablas de Views (clase cols-N) para no afectar
   tablas dentro del cuerpo de los contenidos.
   ============================================================ */

/* Aspecto de escritorio: encabezado GOV.CO, filas legibles */
table[class*="cols-"] {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
table[class*="cols-"] thead th {
  background: #f7eeee;
  color: #7a1414;
  font-weight: 700;
  border-bottom: 2px solid #ea130e;
  padding: 12px 14px;
  white-space: nowrap;
}
table[class*="cols-"] tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
table[class*="cols-"] tbody tr:hover { background: #fcf6f6; }
table[class*="cols-"] a { color: #c20f0b; }
table[class*="cols-"] a.icon-download { font-size: 18px; }

/* Móvil: cada fila se convierte en una tarjeta apilada (clave/valor) */
@media (max-width: 820px) {
  table.resp-table thead {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  table.resp-table,
  table.resp-table tbody,
  table.resp-table tr,
  table.resp-table td { display: block; width: 100%; }

  table.resp-table tr {
    margin: 0 0 14px;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    background: #fff;
  }
  table.resp-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid #f1f1f1;
    text-align: right;
  }
  table.resp-table tr td:last-child { border-bottom: 0; }
  table.resp-table td::before {
    content: attr(data-label);
    flex: 0 0 40%;
    text-align: left;
    font-weight: 700;
    color: #7a1414;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .02em;
  }
  /* celdas sin etiqueta (acciones/descarga) ocupan todo el ancho centradas */
  table.resp-table td:not([data-label]) { justify-content: center; }
  table.resp-table td:not([data-label])::before { content: none; }
  table.resp-table td a { word-break: break-word; }
}

/* ------------------------------------------------------------
   Paginas de termino de taxonomia: lista de documentos compacta y bonita
   (teaser de los tipos "documento"). Cargado globalmente (responsive_tables).
   ------------------------------------------------------------ */
.view-taxonomy-term .item-list ul { list-style: none; margin: 0; padding: 0; }
.view-taxonomy-term .item-list li { margin: 0 0 10px; }

.ficha-teaser {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; background: #fff; border: 1px solid #eee; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: box-shadow .2s ease, transform .2s ease;
}
.ficha-teaser:hover { box-shadow: 0 10px 24px rgba(0,0,0,.08); transform: translateY(-1px); }
.ficha-teaser .ft-icon {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px; background: linear-gradient(135deg, #ea130e, #ff6a5e);
}
.ficha-teaser .ft-body { flex: 1 1 auto; min-width: 0; }
.ficha-teaser .ft-title {
  display: block; font-weight: 700; font-size: 16px; color: #1f1f1f;
  text-decoration: none; line-height: 1.35; word-break: break-word;
}
.ficha-teaser .ft-title:hover { color: #ea130e; text-decoration: underline; }
.ficha-teaser .ft-date { display: block; margin-top: 3px; font-size: 12.5px; color: #9a9a9a; }
.ficha-teaser .ft-date i { margin-right: 4px; }
.ficha-teaser .ft-go { flex: 0 0 auto; color: #ea130e; font-size: 16px; text-decoration: none; }
.ficha-teaser .ft-go:hover { color: #c20f0b; }
