* {
  box-sizing: border-box;
}

::selection {
  background-color: #4EC6DE;
}

.tabbed {
  width: 65%;
  margin: 50px auto;
}

.tabbed > input {
  display: none;
}

.tabbed > label {
  display: block;
  float: left;
  padding: 10px 20px;
  margin: 0px 10px;
  cursor: pointer;
  transition: background-color .3s;
}

.tabbed > label:hover,
.tabbed > input:checked + label {
  background: rgba(31, 205, 255, 0.45);
}

.tabs {
  clear: both;
  perspective: 600px;
}

.tabs > div {
  width: 100%;
  position: absolute;
  border: 2px solid rgba(31, 205, 255, 0.45);
  padding: 10px 30px 40px;
  line-height: 1.4em;
  opacity: 0;
  transform: rotateX(-20deg);
  transform-origin: top center;
  transition: opacity .3s, transform 1s;
  z-index: 0;
}

#tab-nav-1:checked ~ .tabs > div:nth-of-type(1),
#tab-nav-2:checked ~ .tabs > div:nth-of-type(2),
#tab-nav-3:checked ~ .tabs > div:nth-of-type(3),
#tab-nav-4:checked ~ .tabs > div:nth-of-type(4),
#tab-nav-5:checked ~ .tabs > div:nth-of-type(5) {
  transform: rotateX(0);
  opacity: 1;
  z-index: 1;
  height: 275px;
}

@media screen and (max-width: 991px) {
  .tabbed {
    width: 90%;
  }

  .tabbed > label {
  display: block;
  float: left;
  padding: 12px 20px;
  margin-right: 2px;
  cursor: pointer;
  transition: background-color .3s;
  }

  .tabs > div {
    width: 100%;
    position: absolute;
    border: 2px solid rgba(31, 205, 255, 0.45);
    line-height: 1.4em;
    opacity: 0;
    transform: rotateX(-20deg);
    transform-origin: top center;
    transition: opacity .3s, transform 1s;
    z-index: 0;
  }
  
  #tab-nav-1:checked ~ .tabs > div:nth-of-type(1),
  #tab-nav-2:checked ~ .tabs > div:nth-of-type(2),
  #tab-nav-3:checked ~ .tabs > div:nth-of-type(3),
  #tab-nav-4:checked ~ .tabs > div:nth-of-type(4),
  #tab-nav-5:checked ~ .tabs > div:nth-of-type(5) {
    transform: rotateX(0);
    opacity: 1;
    z-index: 1;
  }
}
@media screen and (max-width: 1229px) {
  #tab-nav-1:checked ~ .tabs > div:nth-of-type(1),
  #tab-nav-2:checked ~ .tabs > div:nth-of-type(2),
  #tab-nav-3:checked ~ .tabs > div:nth-of-type(3),
  #tab-nav-4:checked ~ .tabs > div:nth-of-type(4),
  #tab-nav-5:checked ~ .tabs > div:nth-of-type(5) {
    transform: rotateX(0);
    opacity: 1;
    z-index: 1;
    height: 305px;
  }
}
@media screen and (max-width: 650px) {
  #tab-nav-1:checked ~ .tabs > div:nth-of-type(1),
  #tab-nav-2:checked ~ .tabs > div:nth-of-type(2),
  #tab-nav-3:checked ~ .tabs > div:nth-of-type(3),
  #tab-nav-4:checked ~ .tabs > div:nth-of-type(4),
  #tab-nav-5:checked ~ .tabs > div:nth-of-type(5) {
    transform: rotateX(0);
    opacity: 1;
    z-index: 1;
    height: 405px;
  }
}
@media screen and (max-width: 565px){
  #tab-nav-1:checked ~ .tabs > div:nth-of-type(1),
  #tab-nav-2:checked ~ .tabs > div:nth-of-type(2),
  #tab-nav-3:checked ~ .tabs > div:nth-of-type(3),
  #tab-nav-4:checked ~ .tabs > div:nth-of-type(4),
  #tab-nav-5:checked ~ .tabs > div:nth-of-type(5) {
    transform: rotateX(0);
    opacity: 1;
    z-index: 1;
    height: 505px;
  }
}
@media screen and (max-width: 460px){
  #tab-nav-1:checked ~ .tabs > div:nth-of-type(1),
  #tab-nav-2:checked ~ .tabs > div:nth-of-type(2),
  #tab-nav-3:checked ~ .tabs > div:nth-of-type(3),
  #tab-nav-4:checked ~ .tabs > div:nth-of-type(4),
  #tab-nav-5:checked ~ .tabs > div:nth-of-type(5) {
    transform: rotateX(0);
    opacity: 1;
    z-index: 1;
    height: 605px;
  }
}