.teamBlock {
  width: 100%;
  margin: auto;
  padding: 20px; /* Original padding */
  padding-top: 80px;
  padding-bottom: 60px;
  box-sizing: border-box;
  position: relative;
}

.teamBlock_Block {
  margin: auto;
  box-sizing: border-box;
  max-width: 1280px;
  color: #000000;
}

.teamBlock_Column {
  margin: auto;
  width: 100%;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Three columns by default */
  column-gap: 40px;
  row-gap: 80px;
  padding-bottom: 60px;
}

.teamBlock_Block > h3 {
  color: var(--Black);
  font-family: "Work Sans", sans-serif;
  font-size: 40px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  margin: 0;
  margin-top: 60px;
}

.teamBlock_Block > h3 hr {
  width: 50%;
  max-width: 188px;
  height: 2px;
  color: var(--Lime-Green);
  background-color: var(--Lime-Green);
  text-align: start;
  margin: 0;
  margin-top: 20px;
  margin-bottom: 50px;
  border: none;
}

.team-item {
  width: 100%;
  position: relative;
  cursor: pointer;
}

.image-container {
  position: relative;
  width: 100%;
}

.image-container img {
  width: 100%;
  border-radius: 5px;
  aspect-ratio: 38/47;
  object-fit: cover;
  height: auto;
}

.image-container .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 99%;
  background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent black background */
  border-radius: 5px; /* Match the image border radius */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  opacity: 0; /* Initially invisible */
  transition: opacity 0.3s ease; /* Smooth transition */
  z-index: 2; /* Ensure the overlay is above the image */
}

.image-container:hover .overlay {
  opacity: 1; /* Fully visible on hover */
}

.team-item h3 {
  color: var(--Black);
  font-family: "Work Sans", sans-serif;
  font-size: 26px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  margin: 0;
  margin-top: 20px;
}

.team-item p {
  color: var(--Dark-Teal);
  font-family: "Work Sans", sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  margin: 0;
  margin-top: 10px;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .teamBlock_Column {
    grid-template-columns: 1fr 1fr; /* Two columns for medium screens */
    column-gap: 30px; /* Reduce gap for medium screens */
    row-gap: 60px; /* Reduce row gap for medium screens */
  }

  .teamBlock_Block > h3 {
    font-size: 36px; /* Adjust heading font size */
  }

  .team-item h3 {
    font-size: 24px; /* Adjust team item title size */
  }

  .team-item p {
    font-size: 16px; /* Adjust team item subtitle size */
  }
}

@media (max-width: 768px) {
  .teamBlock_Column {
    grid-template-columns: 1fr; /* Single column for small screens */
    column-gap: 20px; /* Further reduce gap for small screens */
    row-gap: 50px; /* Further reduce row gap */
  }

  .teamBlock_Block > h3 {
    font-size: 32px; /* Further adjust heading font size */
    margin-top: 40px; /* Adjust margin-top */
  }

  .team-item h3 {
    font-size: 22px; /* Adjust team item title size */
    margin-top: 15px; /* Adjust margin-top */
  }

  .team-item p {
    font-size: 14px; /* Adjust team item subtitle size */
  }
}

@media (max-width: 480px) {
  .teamBlock {
    padding: 15px; /* Reduce padding for extra small screens */
    padding-top: 50px;
    padding-bottom: 40px;
  }

  .teamBlock_Block > h3 {
    font-size: 28px; /* Further adjust heading font size */
    margin-top: 30px; /* Further adjust margin-top */
  }

  .teamBlock_Block > h3 hr {
    margin-top: 15px; /* Adjust margin-top for hr */
    margin-bottom: 30px; /* Adjust margin-bottom for hr */
  }

  .team-item h3 {
    font-size: 20px; /* Further adjust team item title size */
    margin-top: 10px; /* Further adjust margin-top */
  }

  .team-item p {
    font-size: 12px; /* Further adjust team item subtitle size */
  }

  .image-container .overlay {
    font-size: 16px; /* Adjust overlay text size */
  }
}
