@import url("https://fonts.googleapis.com/css2?family=Birthstone&display=swap");

* {
  box-sizing: border-box;
}

body {
  font-family: "Birthstone", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  background-color: #ffbd8a;
}

.container {
  display: flex;
  width: 90vw;
  min-width: 480px;
}

.panel {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 80vh;
  border-radius: 0;
  cursor: pointer;
  flex: 0.5;
  margin: 10px;
  position: relative;
  transition: flex 0.5s ease-in, outline-color 0.3s ease-in 0.4s;
  border: #222222 solid 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  outline-color: transparent;
}

.caption {
  color: #444;
  font-size: 2.5rem;
  position: absolute;
  bottom: calc(80px - 1.25rem);
  left: 80px;
  right: 80px;
  margin: 0;
  opacity: 0;
}

.caption a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}
.caption a:hover {
  color: #fff;
}

.panel.active {
  flex: 5;
  outline-offset: -60px;
  outline: 50px solid #fff;
  cursor: default;
}

.panel.active .caption {
  opacity: 1;
  transition: opacity 0.3s ease-in 0.4s;
}
@media (max-width: 800px) {
  .container {
    width: 95vw;
  }
  .panel:nth-of-type(4),
  .panel:nth-of-type(5) {
    display: none;
  }
  .panel.active {
    outline-offset: -50px;
    outline: 40px solid #fff;
  }
  .caption {
    font-size: 2rem;
    bottom: calc(70px - 1rem);
    left: 70px;
    right: 70px;
  }
}
