/* Contenedor principal */
#grid-results {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- GRID RESPONSIVO ----------- */
.tarjetas-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
  margin-top: 32px;
}

/* Tarjeta general */
.tarjeta-item {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.tarjeta-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

/* Imagen destacada con altura fija */
.tarjeta-imagen {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3; /* ajusta si prefieres más rectangular: 16/9 o cuadrado: 1/1 */
  object-fit: contain; /* o "cover" si quieres recorte */
  object-position: center;
  background-color: #f0f0f0;
  border-bottom: 1px solid #eee;
}

/* Contenido */
.tarjeta-contenido {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Título */
.tarjeta-titulo {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  line-height: 1.4;
  color: #222;
}

.tarjeta-titulo a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tarjeta-titulo a:hover {
  color: #0a58ca;
  text-decoration: underline;
}

/* Texto descriptivo */
.tarjeta-texto {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 16px;
}

/* Etiqueta de tipo */
.tarjeta-tipo {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 10px;
  align-self: flex-start;
  text-transform: capitalize;
  margin-top: auto;
}

/* Enlaces a conotrad */
.tarjeta-conotrad-wrapper {
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tarjeta-conotrad-wrapper a {
  font-size: 0.8rem;
  color: #0a58ca;
  text-decoration: none;
  white-space: nowrap;
}

.tarjeta-conotrad-wrapper a:hover {
  text-decoration: underline;
}
