* {
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.hero {
  width: 100%;
  height: 100vh;
  background-image: #f3f7fe;
  padding: 10px 3%;
  display: flex;
  position: relative;
  justify-content: space-around;
  align-items: center;
}

.hero h1 {
  font-size: 75px;
  position: relative;
  z-index: 2;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px #000;
  cursor: pointer;
  transition: transform 0.5s;
}

.hero h1:hover {
  -webkit-text-fill-color: #000;
  transform: translateY(-10px);
}
.img-box {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 65%;
  background-image: url(images/background.png);
  background-size: cover;
  background-position: center;
  transition: background-image 1s;
}

.hero h1:nth-child(1):hover ~ .img-box{
  background-image: url(images/Candy.png);
  background-size: cover;
  background-position: center;
}

.hero h1:nth-child(2):hover ~ .img-box{
  background-image: url(images/Cherry.png);
  background-size: cover;
  background-position: center;
}
.hero h1:nth-child(3):hover ~ .img-box{
  background-image: url(images/Melon.png);
  background-size: cover;
  background-position: center;
}