* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  width: 100%;
  background-color: #333;
  display: grid;
  place-items: center;
}

img {
  width: 35%;
  height: 100%;
  object-fit: cover;

  transition: 0.5s;
  transform: perspective(800px) rotateY(25deg);

}

.container {
  max-width: 800px;
  max-height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.container:hover img {
  opacity: 0.5;
}

.container:hover img:hover {
  transform: perspective(800px) rotateY(0deg) scale(1.2);
  opacity: 1;
  z-index: 10;
  cursor: pointer;
}