.modal {
    display: none; /* Hidden by defaul */
    position: fixed; /* Stay in place */
    z-index: 10; /* Sit on top */

    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0, 0, 0); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.8); /* Black w/ opacity */
}

.modal-header {
    padding: 2px 16px;
    display: block;
    height: 4rem;
}

.modal-body {
    padding: 2px 16px;
    display: block;
    overflow: hidden;
    background-color: slategrey;

    border-radius: 5px;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 4px;
    width: 80%;

    animation-name: animatetop;
    animation-duration: 0.4s;

    max-width: 1024px;
}

@media (max-width: 1200) {
    .modal-content {
        max-width: 700px;
    }
}

@keyframes animatetop {
    from {
        top: -300px;
        opacity: 0;
    }
    to {
        top: 0;
        opacity: 1;
    }
}

.close {
    display: block;

    color: #aaa;
    float: right;
    font-size: 2.5rem;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.modal-content img {
    max-height: 100%;
    cursor: pointer;
    transition: 0.3s;
    object-fit: contain;
    flex-grow: 0.5;
}
.modal-content img:hover {
    opacity: 0.7;
}

.caption {
    font-size: 1rem;
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
}
