#main_container {
    background-color: red;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

#wrapper {
    background-color: blue;
    width: 100%;
    height: 100%;
}

@media (max-width: 720px) {
    .gallery-container {
        display: grid;
        grid-template-columns: auto;
        grid-gap: 1px;
      }
      .gallery-container.playbuttons {
        display: flex;
        flex-flow: wrap;
      }
}

@media (min-width: 721px) {
    .gallery-container {
    display: grid;
    grid-template-columns: auto auto auto auto;
    grid-gap: 1px;
    }
    .gallery-container div.thumb-container:last-child:nth-child(odd) {
        grid-column-start:2;
    }

    .gallery-container div.thumb-container {
        grid-column-end: span 2;
    }
    .gallery-container.playbuttons {
        display: flex;
        flex-flow: wrap;
      }
}

.gallery-container div.thumb-container {
    display: grid;
    grid-template-rows: min-content;
}

.gallery-container img.gallery-thumbnail {
    grid-column: 1;
    grid-row: 1;
    cursor: pointer;
}

video.gallery-video {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    margin: auto;
    display:flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: calc(50%);
    left: 50%;
    transform: translate(-50%,-50%) scale(0,0);
    opacity: 0;
    transition: all 300ms ease-in-out;
    background-color: rgba(0,0,0,0.7)
}

img.gallery-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    margin: auto;
    display:flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: calc(50%);
    left: 50%;
    transform: translate(-50%,-50%) scale(0,0);
    opacity: 0;
    transition: all 300ms ease-in-out;
    background-color: rgba(0,0,0,0.7)
}

video.gallery-video:target {
    opacity: 1;
    transform: translate(-50%,-50%) scale(1,1);
    height: 100%;
    width: 100%;
    outline:none;
	z-index: 10000;
}

img.gallery-image:target {
    opacity: 1;
    transform: translate(-50%,-50%) scale(1,1);
    height: 100%;
    width: 100%;
    outline:none;
	z-index: 10000;
}

.gallery-title{
    font-size: 1.5rem;
    font-weight: bold;
    display:none;
}

div.gallery-container div.thumb-container img.gallery-thumbnail-overlay{
    grid-column: 1;
    grid-row: 1;
    height: 25%;
    align-self: end;
    transform: translate(50%,-50%);
    cursor: pointer;
}

/* custom style "playbuttons" */

.gallery-container div.thumb-container.playbuttons {
    display: grid;
    width: 8rem;
    height: 4.5rem;
    margin-right: 1px;
    margin-bottom: 1px;
    grid-template-rows: none;
}

.gallery-container div.thumb-container img.gallery-thumbnail.playbuttons {
    cursor: pointer;
    width: 100%;
    height: 100%;
    object-fit: cover;
    align-self: center;
    justify-self: center;
}

div.gallery-container div.thumb-container img.gallery-thumbnail-overlay.playbuttons{
    height: 75%;
    max-width: 100%;
    opacity: 0.5;
    align-self: center;
    justify-self: center;
    transform: none;
    cursor: pointer;
}

