﻿.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 {
  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;
}

.card:hover img {
  transform: scale(1.1);
}

.text-card {
  padding: 20px;
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.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: 20px;
  gap: 10px;
}

.read-more img {
  width: 12px;
  height: 12px;
  display: none;
}

.text-card:hover .read-more {
  background-color: rgba(249, 222, 220, 0.3);
  color: rgba(213, 38, 24, 1);
}

.text-card:hover .read-more img {
  display: block;
  animation: fadeIn 0.4s ease-in-out;
}

.error-message {
  color: #d52618;
}

@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);
}

.popular-articles-content,
.popular-articles-small-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
}

.slider-container {
  margin-top: 20px;
  overflow: hidden;
  position: relative;
}

.slider {
  display: flex;
  gap: 10px;
  transition: transform 0.3s ease;
}

.slider img {
  width: 33%;
  height: 342px;
  flex-shrink: 0;
  object-fit: cover;
}

.popular-articles-image-wrapper h5 {
  font-size: 24px;
  font-weight: 500;
  color: rgba(255, 255, 255, 1);
  padding: 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popular-articles-image-wrapper p {
  font-size: 16px;
  font-weight: 300;
  line-height: 20px;
  color: rgba(249, 250, 251, 1);
  margin: 0 20px 20px 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popular-articles-image-wrapper {
  background-size: cover;
  background-position: center;
  color: white;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  margin-bottom: 20px;
  cursor: pointer;
  overflow: hidden;
}

.popular-articles-image-wrapper img {
  width: 100%;
  height: 100%;
  position: absolute;
  object-fit: cover;
  transition: transform 0.4s ease-in-out;
}

.popular-articles-image-wrapper.large-images:hover img {
  transform: scale(1.1);
}

.popular-articles-image-wrapper.small-images:hover img {
  transform: scale(1.1);
}

.popular-articles-image-wrapper::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;
}

.popular-articles-image-wrapper h5,
.popular-articles-image-wrapper p {
  position: relative;
  z-index: 1;
}

.large-images {
  width: 49%;
  height: 412px;
}

.small-images {
  width: 32%;
  height: auto;
  box-shadow: 0px 0px 16px 4px #00000040;
  height: 342px;
}

.small-images h5 {
  padding-bottom: 24px;
}

.description {
  font-size: 14px;
  margin-top: 10px;
}

.slider-wrapper {
  overflow: hidden;
  position: relative;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease;
}

.slide {
  min-width: 100%;
  box-sizing: border-box;
}

.slider-controls {
  display: flex;
  gap: 16px;
  align-items: center;
}

.slider-prev,
.slider-next {
  cursor: pointer;
  font-size: 24px;
  background-color: #565957;
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 75px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.popular-articles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@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;
  }

  .slider-controls {
    display: none;
  }

  .popular-articles-container h2 {
    padding-left: 20px;
  }

  .popular-articles-image-wrapper h5 {
    font-size: 20px;
    line-height: 24px;
  }

  .popular-articles-image-wrapper p {
    font-size: 14px;
    font-weight: 300;
    line-height: 18px;
  }

  .slider {
    gap: 4px;
  }

  .popular-articles-image-wrapper.small-images.slider {
    margin-bottom: 0;
  }

  .popular-articles-small-cards {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
  }

  .popular-articles-small-cards::-webkit-scrollbar {
    display: none;
  }

  .small-images {
    flex: 0 0 auto;
    width: 80%;
    scroll-snap-align: center;
    height: 206px;
  }

  .large-images {
    margin-left: 20px;
    margin-right: 20px;
    width: 100%;
    height: 300px;
  }

  .contact-form-image-container {
    display: none;
  }
}
