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

body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
}

.container {
  display: flex;
  width: 80vw;
}

.panel {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 80vh;
  border-radius: 50px;
  cursor: pointer;
  flex: 0.5;
  color: #fff;
  margin: 10px;
  position: relative;
  transition: flex 0.7s ease-in;
}

.panel:first-of-type {
  background-position: 50% 30%;
}

.panel:nth-of-type(3) {
  background-position: 80% 10%;
}

.panel:nth-of-type(5) {
  background-position: 50% 10%;
}

.panel h2 {
  position: absolute;
  font-size: 24px;
  bottom: 20px;
  left: 20px;
  opacity: 0;
}

.panel.active {
  flex: 5;
}

.panel.active h2 {
  opacity: 1;
  transition: opacity 0.3s ease-in 0.4s;
}

@media (max-width: 480px) {
  .container {
    width: 100vw;
    padding: 0 5px;
  }

  .panel {
    margin: 0 5px;
  }

  .panel.active {
    flex: 4;
  }

  .panel:nth-of-type(3) {
    background-position: 65% 10%;
  }

  .panel:nth-of-type(4),
  .panel:nth-of-type(5) {
    display: none;
  }
}
