.two-boxes__item {
  position: relative;
}
.two-boxes__item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: 0.3s;
}
.two-boxes__item:hover::after {
  opacity: 1;
  transition: 0.3s;
}

.two-boxes__item-content {
  position: absolute;
  left: 50%;
  z-index: 3;
  top: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
}
.two-boxes__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: flex;
  aspect-ratio: 5/6;
}
.reusable-two-boxes {
  padding-top: 40px;
  padding-bottom: 40px;
}
.two-boxes-list {
  gap: 40px;
  color: white;
}
.two-boxes-list p {
  color: white !important;
}
.two-boxes__item {
  width: calc(50% - 20px);
}
.two-boxes__item-content {
  max-width: 380px;
  margin-left: auto;
  opacity: 0;
  transition: 0.3s;
  visibility: hidden;
  margin-right: auto;
  width: 100%;
}
.reusable-two-boxes h2,
.reusable-two-boxes p {
  margin-top: 0;
}
.two-boxes__item:hover .two-boxes__item-content {
  opacity: 1;
  transition: 0.3s;
  visibility: visible;
}
.two-boxes__item:hover {
  box-shadow: 0 0 40px 0 rgba(0, 0, 0, 0.25);
  transition: 0.3s;
}
.two-boxes__item {
  transition: 0.3s;
}
@media only screen and (max-width: 767px) {
  .two-boxes__item-content {
    opacity: 1;
    visibility: visible;
    transition: 0.3s;
  }
  .two-boxes__item {
    width: 100%;
  }
  .two-boxes__item::after {
    opacity: 1;
  }
  .two-boxes-list {
    flex-direction: column;
    gap: 24px;
  }
  .reusable-two-boxes > div {
    padding-left: 0;
    padding-right: 0;
  }
}
.two-boxes__item img {
  max-height: 720px;
}
