.image-container {
  position: relative;
}

.image-container img {
  display: block;
  transition: opacity 0.5s ease;
}

.image-container:hover img {
  opacity: 0.7;
}

.image-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.image-container:hover::after {
  opacity: 0.7;
}

