* {
    box-sizing: border-box;
}

.image-gallery {
    display: flex;
    justify-content: center;
}

img {
    max-width: 100%;
    vertical-align: top;
}

.inst {
    font-size: 0.75rem;
    display: block;
}


.gallery {
    display: flex;
    margin: 10px auto;
    max-width: 325px;
    position: relative;
    padding-top: 0.6666666667%;
}

.gallery > .thumbs {
    display: flex;
    flex-shrink: 2;
    overflow-x: scroll;
    margin-top: 320px;
}

.gallery__item > label > img {
    min-width: 150px;
}

.gallery__img {
    position: absolute;
    width: 100%;
    max-width: 320px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
}

.gallery__thumb {
    padding-top: 6px;
    margin: 6px;
    display: block;
}

.gallery__selector {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    min-width: 150px;
    min-height: 150px;
}

.gallery__selector:checked + .gallery__img {
    opacity: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery__selector:checked ~ .gallery__thumb > img {
    box-shadow: 0 0 0 3px #0be2f6;
}

@media screen and (min-width: 520px) {
    .gallery {
        display: flex;
        margin: 10px auto;
        max-width: 485px;
        position: relative;
        padding-top: 0.6666666667%;
    }

    .gallery__img {
        position: absolute;
        width: 100%;
        max-width: 450px;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
        top: 0;
        left: 50%;
        transform: translate(-50%, 0);
    }

    .gallery > .thumbs {
        display: flex;
        flex-shrink: 2;
        overflow-x: scroll;
        margin-top: 450px;
    }
}

@media screen and (min-width: 800px) {
    .gallery {
        display: flex;
        margin: 10px auto;
        max-width: 650px;
        position: relative;
        padding-top: 0.6666666667%;
    }

    .gallery__img {
        position: absolute;
        width: 100%;
        max-width: 450px;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
        top: 0;
        left: 50%;
        transform: translate(-50%, 0);
    }

    .gallery > .thumbs {
        display: flex;
        flex-shrink: 2;
        overflow-x: scroll;
        margin-top: 450px;
    }
}

@media screen and (min-width: 1024px) {
    .gallery {
        display: flex;
        margin: 10px auto;
        max-width: 800px;
        position: relative;
        padding-top: 0.6666666667%;
    }
}

@media screen and (min-width: 1200px) {
    .gallery {
        display: flex;
        margin: 10px auto;
        max-width: 1135px;
        position: relative;
        padding-top: 0.6666666667%;
    }

    .inst {
        display: none;
    }
}

@media screen and (min-width: 1600px) {
    .gallery {
        display: flex;
        margin: 10px auto;
        max-width: 1300px;
        position: relative;
        padding-top: 0.6666666667%;
    }
}

@media screen and (min-width: 1920px) {
    .gallery {
        display: flex;
        margin: 10px auto;
        max-width: 1620px;
        position: relative;
        padding-top: 0.6666666667%;
    }
}
