body {
    max-width: 800px; /* $body_width */
    padding-left:  1.1em; /* $pad $pad */
    padding-right: 1.1em; /* $pad $pad */
}

video,img{
    border: 0;
    max-width:calc(100% + 2.2em); /* + 2*$pad */
    max-height: 95vh;
} 

@-moz-document url-prefix() {
    /* Firefox doesn't respect max-width in certain situations */
    img { width: calc(100% + 2.2em); max-width: -moz-max-content; }
}

.justified-gallery {
    width:calc(100% + 2.2em + 8px); /* + 2*$pad, 8 from the justifiedGallery JS width */
    overflow: hidden;
}

video, img, .justified-gallery {
    display: block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}
