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

/*
html{
    font-family: 'Pacifico', cursive, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: black;
    font-size: 24px;
}
*/

.panels{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
/*     min-height: 100vh; */
    height: 650px;
    overflow: hidden;
}

.panel{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    flex: 1;
    transition:
        font-size 0.7s cubic-bezier(0.61,-0.19, 0.7,-0.11),
        flex 0.7s cubic-bezier(0.61,-0.19, 0.7,-0.11);
    background: transparent;
    box-shadow: inset 0 0 0 5px rgba(255,255,255,0.1);
    color: white;
    font-size: 20px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}
.panel.open{
    flex: 5;
    font-size: 12px;
}

.panel > *{
    transition: transform 0.5s;
    width: 100%;
}
.panel > *:first-child{
    transform: translateX(-100%);
}
.panel.open > *:first-child{
    transform: translateX(0);
}

.panel > *:last-child{
    transform: translateX(100%);
}
.panel.open > *:last-child{
    transform: translateX(0);
}

.panel p{
    text-align: left;
/*     text-shadow: 0 0 4px rgba(0, 0, 0, 0.72), 0 0 14px rgba(0, 0, 0, 0.45); */
	font-family: 'GOTHAM-MEDIUM', sans-serif;
    font-size: 16px !important;
    line-height: 28px;
    color:#ffffff !important;
}

.panel p:nth-child(2){
	font-family: 'GOTHAM-MEDIUM', sans-serif;
    font-size: 12px;
    line-height: 28px;
    color: #212529;
}
.panel6 p:nth-child(2){
	font-family: 'GOTHAM-MEDIUM', sans-serif;
    font-size: 12px;
    line-height: 28px;
    color: #212529;
}

.panel1{background-image: url('http://riverdale.thedb.uk/wp-content/uploads/2021/02/riverdale-windows-image-scaled.jpg');}
.panel2{background-image: url('https://riverdale.thedb.uk/wp-content/uploads/2021/02/riverdale-composite-doors.jpg');}
.panel3{background-image: url('https://riverdale.thedb.uk/wp-content/uploads/2021/02/garden-doors-accordion-title-e1782465851975.jpg');}
.panel4{background-image: url('https://riverdale.thedb.uk/wp-content/uploads/2021/02/conseratories-accordion-no-title-e1782465907412.jpg');}
.panel5{background-image: url('https://riverdale.thedb.uk/wp-content/uploads/2021/02/tiled-roof-range-accordion-no-title-e1782465946367.jpg');}
.panel6{background-image: url('https://riverdale.thedb.uk/wp-content/uploads/2021/02/roofline-accordion-no-title-e1782465993986.jpg');}


.panel1{
    background-position-y: 20%;
}
.panel5{
    background-position-y: 80%;
}

@media screen and (min-width: 768px){
    .panel1{
        background-position-y: 30%;
    }
    .panel2{
        background-position-y: 35%;
    }
    .panel5{
        background-position-y: 70%;
    }
}

@media screen and (min-width: 1024px){
    .panels{
        flex-direction: row;
    }
    .panel{
        flex-direction: column;
/*         height: 100vh; */
		height: 650px;
    }
    .panel p{
        flex: 1;
    }
    .panel > *:first-child{
        transform: translateX(0);
        transform: translateY(-100%);
    }
    .panel.open > *:first-child{
        transform: translateY(0);
    }
    
    .panel > *:last-child{
        transform: translateX(0);
        transform: translateY(100%);
    }
    .panel.open > *:last-child{
        transform: translateY(0);
    }
    .panel > * {
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.5s;
        width: 100%;
    }
    .panel.open > *:nth-child(2){
        font-size: 70px;
    }
    .panel.open >  *{
        font-size: 40px;
    }
}
