.services-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 40px 20px;
  position: relative;
}

.services-top-banner-image {
  position: relative;
  overflow: hidden;      /* Prevent image from spilling out */
  width: 100%;
}

.services-top-banner-image img {
  width: 100%;
  height: auto;
  display: block;
  transform-origin: center center;
  animation: zoom-in 30s forwards;
}

.h2-services {
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 1);
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
  text-align: center;
  width: 100%;
  text-shadow: 0 4px 5px rgb(0, 0, 0);
}

.h2-services::after {
  content: "";
  display: block;
  height: 4px;
  background-color: #bd1c1c;
  margin-top: 8px;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.services-box {
  width: 400px;
  position: relative;
  overflow: hidden;
}

.services-img {
  position: relative;
}

.services-img img {
  width: 100%;
  display: block;
  cursor: pointer;
}

.services-img .overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, .75);
  color: #fff;
  padding: 20px;
  box-sizing: border-box;
  transition: all 0.5s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.services-img .overlay p {
  font-size: 1.325rem;
  color: #9b9b9b;
  text-align: justify;
}

.services-img .overlay a {
	text-decoration: none;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 1);
	color: var(--capacity-red);
}

.services-img:hover .overlay {
  top: 75%; /* pushes overlay down to show bottom 25% */
  height: 25%;
  justify-content: flex-start;
  padding-top: 10px;
}

@media screen and (max-width: 768px) {
  .services-img .overlay {
    top: 75%; /* pushes overlay down to show bottom 25% */
    height: 25%;
    justify-content: flex-start;
    padding-top: 10px;
  }
}
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 2s ease;
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 2s ease;
}

.animate-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 2s ease;
}

.animate-fade {
  opacity: 0;
  transition: opacity 1s ease;
}

.animate-up {
  opacity: 0;
  transform: translateY(120px);
  transition: all 2s ease;
}

.animate-down {
  opacity: 0;
  transform: translateY(-40px);
  transition: all 2s ease;
} 

.animate-left.visible,
.animate-right.visible,
.animate-fade.visible, {
  opacity: 1;
  transform: translateX(0);
}

.animate-up.visible, .animate-down.visible {
  opacity: 1;
  transform: translateY(0);
} 

#block-capacity-plus-ourservicesfrontpageblock {
  background: url("/sites/default/files/black-abstract-background.webp") center center no-repeat;
  background-size: cover;
  position: relative;
  padding: 80px 20px;
  color: #fff;
  overflow: hidden;
}

#block-capacity-plus-ourservicesfrontpageblock::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 1);
  z-index: 0;
  transition: opacity 2s ease;
}

#block-capacity-plus-ourservicesfrontpageblock.visible::before {
  opacity: 0;
}

#block-capacity-plus-ourservicesfrontpageblock > * {
  position: relative;
  z-index: 1;
}

#block-capacity-plus-servicespageourservices {
  background: url("/sites/default/files/black-abstract-background.webp") center center no-repeat;
  background-size: cover;
  position: relative;
  padding: 80px 20px;
  color: #fff;
  overflow: hidden;
}

#block-capacity-plus-servicespageourservices::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 1);
  z-index: 0;
  transition: opacity 2s ease;
}

#block-capacity-plus-servicespageourservices.visible::before {
  opacity: 0;
} 

#block-capacity-plus-servicespageourservices > * {
  position: relative;
  z-index: 1;
}
