/**
 * HechosTransformar View Component
 * Estilo de tarjetas para la vista de términos de taxonomía HechosTransformar.
 */

/* ============================================================
   Sección contenedora (fondo gris-teal #eef4f4)
   ============================================================ */
.ht-cards-section {
  background-color: #eef4f4;
  padding: 35px 10px;
}

/* ============================================================
   Grilla de tarjetas (3 columnas)
   ============================================================ */
.ht-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.ht-cards-grid__item {
  display: flex;
}

.ht-cards-grid__item .views-row {
  width: 100%;
}

/* Elementos ocultos (del 4to en adelante) */
.ht-cards-grid__item--hidden {
  display: none;
}

/* Cuando se activa "ver todos" */
.ht-cards-grid__item--hidden.ht-cards-grid__item--visible {
  display: flex;
}

/* ============================================================
   Tarjeta individual
   ============================================================ */
.ht-card {
  background-color: #ffffff;
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 103%;
  height: -webkit-fill-available;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

/* ============================================================
   Imagen de la tarjeta (arriba)
   ============================================================ */
.ht-card__image {
  width: 100%;
  height: 153px;
  overflow: hidden;
}

.ht-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ht-card__image picture,
.ht-card__image figure {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

/* ============================================================
   Cuerpo de la tarjeta
   ============================================================ */
.ht-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 21.5px;
}

/* ============================================================
   Título de la tarjeta
   ============================================================ */
.ht-card__title {
  color: #686868;
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.ht-card__title .field-content {
  display: block;
}

/* ============================================================
   Acciones / Enlace "Leer más"
   ============================================================ */
.ht-card__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.ht-card__link {
  color: #2AD2C9 !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.ht-card__link:hover,
.ht-card__link:focus {
  color: #e87722;
  text-decoration: underline;
}

.ht-card__link:visited {
  color: #555555;
}

/* ============================================================
   Botón "Ver todas las infografías"
   ============================================================ */
.ht-cards-show-more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.ht-cards-show-more__button {
  display: inline-block;
  background-color: transparent;
  color: #2AD2C9;
  border: 2px solid #2AD2C9;
  padding: 12px 40px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.01em;
}

.ht-cards-show-more__button:hover,
.ht-cards-show-more__button:focus {
  background-color: #2AD2C9;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(42, 210, 201, 0.35);
}

/* Ocultar botón cuando ya se mostraron todos */
.ht-cards-show-more--hidden {
  display: none;
}

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 900px) {
  .ht-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .ht-cards-grid {
    grid-template-columns: 1fr;
  }

  .ht-cards-section {
    padding: 24px 16px;
  }
}
