/* Study this:
https://codepen.io/chaofix/pen/6535aca9fcfa4d0ea8aca690181cc128?editors=0100 */

body {
    height:100%;
    margin:0;
    padding:0;
}
body * {
    box-sizing: border-box;
}
main {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 60px calc(100vh - 60px);
    grid-template-areas:
       "menu"
       "gallery";
    height: 100vh;
}
nav {
    grid-area: menu;
}
.content {
    grid-area: gallery;
}
.cards {
    display: flex;
    flex-wrap: wrap;
    height: 100%;
    margin: 0;
    padding-left: 20px;
    padding-top: 20px;
    list-style: none;
    /* transition-duration: 1000ms;
    transition-property: width, height, margin; */
}
.cards .caption {
    display: none;
}
.cards li {
    width: 25%;
    height: 50%;
    padding-bottom: 20px;
    padding-right: 20px;
    /* transition-duration: 1000ms;
    transition-property: width, height, margin; */
}
.cards.mosaic li {
    width: 10%;
    height: calc((100vh - 60px) / 7);
    padding-bottom: 0px;
    padding-right: 0px;
}
.cards.mosaic {
    height: auto;
    padding: 0px;
}
.cards.eight li {
    width: 12.5%;
    height: calc((100vh - 60px) / 4);
}
.cards.eight {
    height: auto;
}
.cards.six li {
    width: 16.666%;
    height: 33.3333%;
}
.cards.four li {
    width: 25%;
}
.cards.two li {
    width: 50%;
    height: 100%;
}
.image {
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.image:hover {
    opacity: 0.7;
}

/* Media Queries */
@media (max-width: 900px) {
    .cards li{
        width: 50% !important;
        height: 50% !important;
    }
    .cards {
        height: 100% !important;
    }
}

@media (max-width: 550px) {
    .cards li {
        width: 100%  !important;
        height: calc(100vh - 50px)  !important;
        padding: 0px !important;
    }
    .cards {
        padding: 0px !important;
    }
    .image:hover {
        opacity: 1;
    }
    .image {
        height: 100%;
    }
    .cards .caption {
        display: block;
        padding: 20px;
        height: 30% !important;
        margin-top: -30%;
        background: rgba(255, 255, 255, 0.9);
    }
}
