body {
    margin: 0;
}

/* apply a natural box layout model to all elements, but allowing components to change */

html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

.image-grid {
    width: 100%;
    overflow: hidden;
}

.image__cell {
    float: left;
    position: relative;
    aspect-ratio: 1 / 1;
}

.image--basic {
}

.basic__img {
    width: 100%;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit:cover;
}

.image__cell.is-collapsed .image--basic {
    cursor: pointer;
}

.image__cell.is-expanded .image--expand {
    max-height: 10000px;
}

.image--expand {
    position: relative;
    box-sizing: content-box;
    overflow: hidden;
    max-height: 0;
    transition: max-height .3s ease-in-out,margin-bottom .1s .2s;
}

.expand__close {
    position: absolute;
    top: 2rem;
    right: 1rem;
    font-size: 1.5rem;
    text-decoration: none;
}

.expand__close:before {
    content: 'ⓧ';
}

.expand__close:hover {
}

.expand__info {
    position: absolute;
    top: 5rem;
    right: 1rem;
    font-size: 1.5rem;
    text-decoration: none;
}

.expand__info:before {
    content: 'ⓘ';
}

.expand__info:hover {
}

.image--large {
    width:auto;
    height:auto;
    display: block;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

@media only screen and (max-width: 550px) {
    .image__cell {
        width: 50%;
    }
    
    .image__cell:nth-of-type(2n+2) .image--expand {
        margin-left: -100%;
    }
    
    .image__cell:nth-of-type(2n+3) {
        clear:left;
    }
    
    .image--expand {
        width: 200%;
    }
}

@media only screen and (min-width: 551px) and (max-width: 700px) {
    .image__cell {
        width: 33.33333%;
    }
    
    .image__cell:nth-of-type(3n+2) .image--expand {
        margin-left: -100%;
    }
    
    .image__cell:nth-of-type(3n+3) .image--expand {
        margin-left: -200%;
    }
    
    .image__cell:nth-of-type(3n+4) {
        clear: left;
    }
    
    .image--expand {
        width: 300%;
    }
}

@media only screen and (min-width: 701px) and (max-width: 800px) {
    .image__cell {
        width: 25%;
    }
    
    .image__cell:nth-of-type(4n+2) .image--expand {
        margin-left: -100%;
    }
    
    .image__cell:nth-of-type(4n+3) .image--expand {
        margin-left: -200%;
    }
    
    .image__cell:nth-of-type(4n+4) .image--expand {
        margin-left: -300%;
    }
    
    .image__cell:nth-of-type(4n+5) {
        clear: left;
    }
    
    .image--expand {
        width: 400%;
    }
}

@media only screen and (min-width: 801px) {
    .image__cell {
        width: 20%;
    }
    
    .image__cell:nth-of-type(5n+2) .image--expand {
        margin-left: -100%;
    }
    
    .image__cell:nth-of-type(5n+3) .image--expand {
        margin-left: -200%;
    }
    
    .image__cell:nth-of-type(5n+4) .image--expand {
        margin-left: -300%;
    }
    
    .image__cell:nth-of-type(5n+5) .image--expand {
        margin-left: -400%;
    }
    
    .image__cell:nth-of-type(5n+6) {
        clear: left;
    }
    
    .image--expand {
        width: 500%;
    }
}
