.viewbox {
    position: fixed; 
    z-index: 10000;
    padding-top: 100px;
    opacity: 0;
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: #808080; 
    background-color: rgb(50 50 50 / 0.60);
    transition: all ease-in-out 0.7s;
}
.viewbox.active {
    opacity: 1;
}

/* Modal Content (Image) */
    .viewbox .content {
        /*position:absolute;*/
        margin: auto;
        /*position: relative;*/
        display: block;
        min-height: 100px;
        /*overflow: hidden;*/
        text-align: center;
        max-width: 80%;
        max-height: 80%;
        /*width: 80%;*/
        /*max-width: 700px;*/
        background-color: #f1f1f1;
        box-shadow: 0 0px 20px rgb(0 0 0 / 0.8);
        border-radius: 6px;
        transition: all ease-in-out 0.7s;
    }
    .viewbox .content img {
        max-width: 100%;
        max-height: 100%;
    }
.viewbox .content .text {
    display: block;
    padding: 30px 10px 10px 10px;
    vertical-align: middle;
    text-align:center;
    height: 100%;
    width: 100%;
    color:#1a1a1a;
    overflow:hidden;
}

/* Caption of Modal Image (Image Text) - Same Width as the Image */
.viewbox .caption {
    margin: auto;
    display: block;
    /*width: 80%;*/
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}
    .viewbox .caption button {
        background-color: #a8a9b1;
        border: none;
        color: black;
        padding: 15px 32px;
        text-align: center;
        text-decoration: none;
        display: inline-block;
        font-size: 16px;
        border-radius: 3px;
        box-shadow: 0 0px 10px rgb(0 0 0 / 0.8);
        cursor: pointer;
    }
.viewbox .caption button:hover {
    background-color: #ccc;
}

/* Add Animation - Zoom in the Modal */
/*.viewbox, .viewbox .content, .viewbox .caption {
    animation-name: zoom;
    animation-duration: 0.5s;
    animation-direction:reverse;
    animation-fill-mode: forwards;
}*/
/*.viewbox.active, .viewbox.active .content, .viewbox.active .caption*/ 
.viewbox .caption 
{
    /*transform: scale(0);*/
    animation-name: zoom;
    animation-duration: 0.9s;
    animation-direction:normal;
    animation-fill-mode: forwards;
}

@keyframes zoom {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* The Close Button */
.viewbox .close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.viewbox .close:hover,
.viewbox .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px) {
    .viewbox .content {
        width: 100%;
        max-width: 100%;
    }
}