.text-cards-grid-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 65px;
}

.text-cards-grid__grid {
  display: grid;
  gap: 24px;
  width: 100%;
  grid-template-columns: 1fr;

  @media (min-width: 768px) and (max-width: 1023px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media (min-width: 1024px) {
    grid-template-columns: repeat(var(--grid-columns, 3), 1fr);
  }
}

.text-cards-grid__card {
  background-color: #ffffff;
  border-radius: var(--wp--custom--border-radius--global);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  transition: all 400ms ease;
  justify-content: space-between;

  @media (min-width: 1024px) {
    min-height: 500px;
  }

  @media (min-width: 1200px) {
    cursor: pointer;

    &:hover {
      background-color: var(--wp--preset--color--primary);
      color: var(--wp--preset--color--white);

      .text-cards-grid__title,
      .text-cards-grid__desc,
      .text-cards-grid__link {
        color: var(--wp--preset--color--white)
      }

      .text-cards-grid__link-icon {
        filter: brightness(9);
      }
    }
  }

  @media (min-width: 1600px) {
    min-height: 570px;
    justify-content: space-between;
  }
}

.text-cards-grid__title {
  font-size: var(--wp--preset--font-size--md);
  
  @media (min-width: 1024px) {
    line-height: 34px;
  }
}

.text-cards-grid__bottom-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.text-cards-grid__desc {
  font-size: var(--wp--preset--font-size--xs);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 90%;
}

.text-cards-grid__link {
  color: var(--wp--preset--color--black);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;

  @media (min-width: 1200px) {
    cursor: pointer;
  }
}

.text-cards-grid__link-icon {
  width: 17px;
  height: 17px;
  filter: brightness(0);
}

.text-cards-grid__action {
  display: flex;
  justify-content: center;
  width: 100%;
}

.text-cards-grid__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  border: 1px solid var(--wp--preset--color--primary);
  border-radius: var(--wp--custom--border-radius--full);
  background-color: transparent;
  color: var(--wp--preset--color--primary);
  text-decoration: none;
  transition: background-color 0.25s cubic-bezier(0.76, 0, 0.24, 1), color 0.25s cubic-bezier(0.76, 0, 0.24, 1), transform 0.25s cubic-bezier(0.76, 0, 0.24, 1), box-shadow 0.25s cubic-bezier(0.76, 0, 0.24, 1);
  box-shadow: 0 0 0 0 rgba(13, 13, 13, 0);
  font-size: var(--wp--preset--font-size--sm);
  min-height: 69px;
  max-height: 69px;

  @media (hover: hover) and (pointer: fine) {
    &:hover {
      background-color: var(--wp--preset--color--primary);
      color: var(--wp--preset--color--white);
      transform: translateY(-4px);
      box-shadow: 0 14px 24px -10px rgba(13, 13, 13, 0.3);
    }
  }
}
