.services-card-widget {
  display: flex;
  flex-wrap: wrap;
  /* Allows items to wrap to the next row */
  justify-content: center;
  /* Centers items horizontally */
  gap: 0;
  /* Adds spacing between items */
  max-width: 100%;
  /* Optional: limit the total width */
  margin: 0 auto 0;
  /* Center the container itself */
  align-items: stretch;
}

.services-card-widget .services-card {
  flex: 1 1 25%;
  /* Each item takes up 1/3 of the container's width */
  max-width: 25%;
  /* Ensures a maximum of three columns */
  box-sizing: border-box;
  /* Includes padding and border in size calculations */
  text-align: center;
  /* Centers content inside the item */
  padding: 0;
  transition: all 0.4s ease-in-out;
  position: relative;
  overflow: hidden;
}

.services-card-widget .services-card img {
  width: 100%;
}

.services-overlay-1 {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  padding: 40px 35px;
  opacity: 1;
  /* Initially visible */
  visibility: visible;
  transition: opacity 0.4s ease, transform 0.4s ease;
  /* Smooth transition */
}

.services-overlay-2 {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  padding: 40px 35px;
  background: rgba(151, 30, 11, 0.80);
  backdrop-filter: blur(3.5px);
  opacity: 0;
  /* Initially hidden */
  visibility: hidden;
  transform: translateY(100%);
  /* Start with a downward translation */
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
  /* Smooth sliding and fade-in */
}

.services-card-widget .services-card:hover .services-overlay-1 {
  opacity: 0;
  /* Fade out */
  visibility: hidden;
  /* Hide */
  transform: translateY(-100%);
  /* Slide up */
}

.services-card-widget .services-card:hover .services-overlay-2 {
  opacity: 1;
  /* Fade in */
  visibility: visible;
  /* Show */
  transform: translateY(0);
  /* Slide up to its original position */
}

.services-card-widget .services-card:hover .services-overlay-2 h3 {
  color: #FFF;
  font-family: "ddt", sans-serif;
  font-size: 32px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.96px;
  text-transform: capitalize;
}

.services-card-widget .services-card:hover .services-overlay-2 p {
  overflow: hidden;
  color: #FFF;
  text-overflow: ellipsis;
  font-size: 17px;
  font-style: normal;
  font-weight: 400;
  line-height: 28px;
  /* 164.706% */
  letter-spacing: 0.51px;
  text-align: left;
}

.services-overlay {
  background: rgba(0, 0, 0, 0.25);
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

.service-learn-more {
  color: #FFF;
  font-size: 15.469px;
  font-style: normal;
  font-weight: 400;
  line-height: 13.125px;
  /* 84.848% */
  letter-spacing: 0.464px;
  text-transform: uppercase;
  position: absolute;
  right: 20px;
  bottom: 22px;
}

.services-card-widget a.services-card:hover {
  border-radius: 0;
  background: #FFF;
  box-shadow: 9px 13px 20px 0px rgba(0, 0, 0, 0.15);
}

.services-card-widget .services-card h3 {
  color: #FFF;
  text-align: center;
  font-family: "ddt", sans-serif;
  font-size: 32px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.96px;
  text-transform: capitalize;
  margin-bottom: 0;
}

.services-card-widget .services-card p {
  overflow: hidden;
  color: #FFF;
  text-overflow: ellipsis;
  font-size: 17px;
  font-style: normal;
  font-weight: 400;
  line-height: 28px;
  /* 164.706% */
  letter-spacing: 0.51px;
  text-align: left;
}
@media only screen and (max-width: 1200px) {
  .services-card-widget .services-card h3{
    font-size: 24px;
  }
}
@media only screen and (max-width: 960px) {
  .services-card-widget .services-card {
  	flex: 1 1 50%;
  	max-width: 50%;
  }
  .services-card-widget .services-card h3{
    font-size: 32px;
  }
}
@media only screen and (max-width: 560px) {
  .services-card-widget .services-card {
  	flex: 1 1 100%;
  	max-width: 100%;
  }
  .services-card-widget .services-card.scrolled h3 {
    text-align: left;
  }
  .services-card-widget .services-card.scrolled .services-overlay-1 {
    opacity: 0;
    /* Fade out */
    visibility: hidden;
    /* Hide */
    transform: translateY(-100%);
    /* Slide up */
  }

  .services-card-widget .services-card.scrolled .services-overlay-2 {
    opacity: 1;
    /* Fade in */
    visibility: visible;
    /* Show */
    transform: translateY(0);
    /* Slide up to its original position */
  }

}
