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

body{    
    background-size: cover;
    background-position: center;
}

.panels{
    margin: 0 auto;
    display: flex;
    width: 100%;
    height: 100vh;
    align-items: center;
}

.panel{
    color: white;
    font-size: 40px;
    text-shadow: 3px 3px black;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-family: arial;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: center;
    transition: all .5s;
    background-position: center;
    border-left: solid 1px rgb(255, 242, 182);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.panel:last-child{
    border-right: solid 1px rgb(255, 242, 182);
}

.panel:hover:after{
    background-color: rgba(0, 0, 0, .25);
}


.panel:after{
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: all .5s;
    background-color: rgba(0, 0, 0, .0);
}

.panel1{
    background-image: url('images/bg.jpg');
}

.panel2{
    background-image: url('images/space2.jpg');
}

.panel3{
    background-image: url('images/space3.jpg');
}

.panel4{
    background-image: url('images/space4.jpg');
}

.panel5{
    background-image: url('images/space5.jpg');
}

.panel6{
    background-image: url('images/space6.jpg');
}

.panel7{
    background-image: url('images/space7.jpg');
}

.panel8{
    background-image: url('images/space8.jpg');
}

.panel > *{
    display: flex;
    align-items: center;
    z-index: 1000;
}

.name{
    flex: 1;
    transition: transform .3s;
    transform: translateY(-100%);
    align-items: flex-end;
}

.image{
    flex: 2;
}

.panel-open-active .name{
    transform: translateY(0);
}

.panel-active{
    flex: 5;
    opacity: 1;
}

.panel-active:after, .panel-active:hover:after{
    background-color: rgba(0, 0, 0, .5);
}

.panel img{
    max-width: 100%;
    transform: scale(.5);
    transition: all .5s;
    max-width: 100%;
}

.panel-active img{
    transform: scale(1);
}

.info{
    flex: 2;
    font-size: 16px;
    flex-direction: column;
    text-align: center;
    transition: transform .3s;
    transform: translateY(100%);
    line-height: 1.5;
}

.panel-open-active .info{
    transform: translateY(0);
}