/* Restoring browser properties */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: white;
}
 
body {
    background-color: rgb(0, 0, 0);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
 
.main_box {
    width: 90%;
    height: 80vh;
    display: flex;
}
 
.img {
    flex: 1;
    height: 100%;
    transform: skew(10deg);
    cursor: pointer;
    margin: 0 0.125em;
    transition: all .3s;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    /*border: 1px solid pink;*/
    position: relative;
}
 
p {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: .75em;
    background-color: rgba(0,0,0,0.6);
    transform: rotate(-90deg);
    transform-origin: 0% 0%;
    transition: all 0.3s;
    text-transform: uppercase;
    white-space: nowrap;
}
.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    opacity: 1;
    border: black solid 12px;
    transition: .5s ease;
    background-color: #000;
  }

  .text {
    color: white;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 5em;
    position: absolute;
    top: 20%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    text-align: center;
    transform: rotate(180deg);
  }

  .img:hover .overlay {
    opacity: 0;
  }
 
.img1 {
    background-image: url("img/raleigh-gallery01.jpg");
}
 
.img2 {
    background-image: url("img/raleighDine.jpg");
}
 
.img3 {
    background-image: url("img/music.jpg");
}
 
.img4 {
    background-image: url("img/explore-rdu.jpg");
}
 
.main_box:hover .img {
    transform: skew(0);
}
 
.img:hover {
    flex: 5;
}
 
.img:hover p {
    background-color: transparent;
    border: .125em solid #fff;
    border-radius: 5px;
    color: rgb(255, 38, 0);
    transform: rotate(0deg);
}