﻿.health-guide-content-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1920px;
  width: 100%;
  padding: 0 20px;
  margin-top: 60px;
}

.card {
  background: white;
  overflow: hidden;
  border: 1px solid rgba(233, 238, 241, 1);
}

.card.text-card {
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.08);
}

.card.image-card {
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.08);
}

.card:hover, .card:focus {
  box-shadow: 0px 0px 16px 4px rgba(0, 0, 0, 0.25);
}

.image-card {
  color: white;
  height: 220px;
  display: flex;
  align-items: flex-end;
}

.image-card h3 {
  position: absolute;
  bottom: 20px;
  left: 0;
  font-size: 24px;
  font-weight: 300;
  line-height: 30px;
  z-index: 1;
  padding: 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.5) 77.18%
  );
  z-index: 0;
}

.image-card img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  position: absolute;
  transition: transform 0.4s ease-in-out;
}

.image-card:hover img, .image-card:focus img {
  transform: scale(1.1);
}

.text-card {
  padding: 20px;
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.body-language .text-card h1 {
  text-align: start !important;
}

.text-card h3 {
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 300;
  line-height: 30px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-card p {
  font-size: 16px;
  color: rgba(122, 125, 127, 1);
  line-height: 20px;
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: auto;
}

.text-card button {
  margin-top: 10px;
  padding: 10px;
  border: none;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  border-radius: 5px;
}

.read-more {
  background-color: rgba(240, 243, 241, 1);
  color: rgba(86, 89, 87, 1);
  padding: 3px 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  height: 24px;
  min-width: 114px;
  max-width: max-content;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 100px;
  margin-top: 12px;
  gap: 10px;
}

.read-more img {
  width: 12px;
  height: 12px;
  display: none;
}

.text-card:hover .read-more , .text-card:focus .read-more{
  background-color: rgba(249, 222, 220, 0.3);
  color: rgba(213, 38, 24, 1);
}

.text-card:hover .read-more img, .text-card:focus .read-more img  {
  display: block;
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-5px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.pagination {
  text-align: center;
  margin-top: 40px;
  font-size: 16px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.page-button {
  background: #ffffff;
  color: rgba(34, 39, 42, 1);
  border: 1px solid rgba(233, 238, 241, 1);
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 4px;
}

.ellipsis {
  background: #ffffff;
  color: rgba(34, 39, 42, 1);
  border: 1px solid rgba(233, 238, 241, 1);
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 5px;
  border-radius: 4px;
}

.page-button.active {
  background: rgba(213, 38, 24, 1);
  color: rgba(255, 255, 255, 1);
}

@media (min-width: 769px) and (max-width: 1040px) {
  .text-card h3 {
    max-width: 460px;
  }

  .card.text-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .health-guide-content-container {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }

  .text-card p {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
  }

  .text-card {
    min-height: 220px;
    height: unset;
  }
}
