/*-------------------- CASE STUDIES START --------------------*/

.case-studies {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.case-studies_heading {
  margin-bottom: 2rem;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
}

.case-studies_container {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.case-studies_container_item {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
  position: relative;
  overflow: hidden; /* Add this to crop the image */
}

.case-studies_container_item > .relative {
  height: 100%; /* Ensure the relative container takes full height */
}

.case-studies_container_item > .relative > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-studies-content {
  position: relative; /* Change from absolute to relative */
  padding: 1.25rem;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity));
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure it takes full height of parent */
}

.case-studies-content_image {
  height: 5rem;
  margin-bottom: 1rem;
}

.case-studies-content_image img {
  width: 7rem;
  height: auto;
}

.case-studies-content_heading {
  margin-bottom: 1.25rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  font-size: 1.25rem;
  line-height: 1.5; /* Adjust line height for better readability */
  font-weight: 600;
  flex-grow: 1;
}

.case-studies-content_hr {
  margin-bottom: 1rem;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity));
}

.case-studies-content_stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.case-studies-content_stats_heading {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.case-studies-content_stats_body {
  font-size: 0.688rem;
  line-height: 1.3;
}

.case-studies-content_button {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  color: #070425;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.case-studies-content_button_icon {
  border-radius: 9999px;
  padding: 0.5rem;
  background-color: #070425;
  color: white;
}

.case-studies-content_button_icon > img {
  display: block;
}

@media (min-width: 768px) {
  .case-studies_heading {
    margin-bottom: 3rem;
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .case-studies_container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
  }

  .case-studies-content {
    padding: 1.75rem;
  }

  .case-studies-content_image {
    height: 6rem;
  }

  .case-studies-content_image img {
    width: 8rem;
  }

  .case-studies-content_heading {
    margin-bottom: 2rem;
  }

  .case-studies-content_stats {
    gap: 1.5rem;
    margin-bottom: 1.75rem;
  }

  .case-studies-content_stats_heading {
    margin-bottom: 0.5rem;
  }
}

@media (min-width: 1024px) {
  .case-studies {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .case-studies_container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .case-studies-content_image {
    height: 9rem;
  }

  .case-studies-content_heading {
    margin-bottom: 1rem;
  }

  .case-studies-content_hr {
    margin-bottom: 0.5rem;
  }
}

/*-------------------- CASE STUDIES END --------------------*/
