*,
*:before,
*:after {
  box-sizing: inherit;
}

.ds-image-panel .panels {
  height: 600px;
  overflow: hidden;
  display: flex;
  gap: 10px;
}
.ds-image-panel .panel {
  background: #6b0f9c;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.1);
  color: white;
  text-align: center;
  /* transition: font-size 0.7s cubic-bezier(0, 1.09, 1, -2.06), flex 0.7s cubic-bezier(0.61, -0.19, 0.79, -0.17), background 0.2s; */
  transition: font-size 0.7s cubic-bezier(0, 1.09, 1, -2.06), flex 0.3s ease-in-out, background 0.2s;
  font-size: 20px;
  background-size: cover;
  background-position: center;
  flex: 1;
  justify-content: end;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  align-items: flex-start;
}
.ds-image-panel .panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  transition: opacity 0.5s;
  z-index: 1;
}

.ds-image-panel .panel > *:first-child {
  transform: translateY(-100%);
}
.ds-image-panel .panel.open-active > *:first-child {
  transform: translateY(0) rotate(-90deg);
}
.ds-image-panel .panel > *:last-child {
  transform: translateY(100%);
}
.ds-image-panel .panel.open-active > *:last-child {
  transform: translateY(0) rotate(-90deg);
}
.ds-image-panel .panel p {
  text-transform: uppercase;
  font-family: "Amatic SC", cursive;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.72), 0 0 14px rgba(0, 0, 0, 0.45);
  font-size: 1.5em;
  z-index: 11;
  transform: rotate(-180deg);
  writing-mode: vertical-rl;
}
.ds-image-panel .panel p:nth-child(2) {
  font-size: 3em;
  margin-bottom: 0;
}
.ds-image-panel .panel.open {
  flex: 2;
  font-size: 40px;
}

.panel:hover{
  flex: 2;
}


@media only screen and (max-width: 800px) {
  .ds-image-panel .panels {
    flex-direction: column;
  }
  .ds-image-panel .panel p {
    font-size: 1em;
    transform: rotate(0deg);
    writing-mode: horizontal-tb;
	text-align: start;
  }
  .ds-image-panel .panel.open-active > *:first-child {
    transform: translateY(0) rotate(0deg);
  }
  .ds-image-panel .panel.open-active > *:last-child {
    transform: translateY(0) rotate(0deg);
  }
}