* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  display: flex;
  width: max-widht;
  height: 100vh;
  cursor: pointer;
}

.img-container {
  position: relative;
  width: 50%;
  height: 100vh;
  overflow: hidden;
}

.img-container img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  object-position: center;
}

.img-container:nth-child(1) img {
  object-position: left;
}

.img-container:nth-child(2) img {
  object-position: right;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.img-container:hover .overlay {
  opacity: 1;
}

.overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .container {
    flex-wrap: wrap;
  }

  .img-container {
    width: 100%;
    height: 50vh;
  }

  .img-container:nth-child(1) {
    order: 2;
  }

  .overlay {
    opacity: 1;
  }
}
