#modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.9);
    overflow:auto;
    text-align:center
}

/* Modal image */
#modal::before {
    content: "";
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}
#modal img{
    display: inline-block;
    vertical-align: middle;
    max-width: 95%;
    height: auto;
    margin: 20px 0;
    border-radius: 10px;
}

table #projectview {
  border-collapse: separate;
  border-spacing: 20px; /* horizontal and vertical spacing */
}

/* Modal image */
.modal-content {
    display: block;
    margin: auto;
    max-width: 80%;
    max-height: 80%;
}

/* Close button */
.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}

/* Hover effect */
.image-box img {
    cursor: pointer;
    transition: 0.3s;
}

.image-box img:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

/* Fullscreen overlay */
#lightbox {
    display: flex;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    background: rgba(0,0,0,0.95);

    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show flex when active */
#lightbox.active {
    /*display: flex;*/
    visibility: visible;
    opacity: 1;
}

/* Large image */
#lightbox-img {
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: none;
    border-radius: 5px;
    box-shadow: 0 0 20px #000;
    opacity: 0;
    transition: all 0.3s ease;
    object-fit: contain;
    transform: scale(0.95);
}

/* Caption */
#lightbox-caption {
    color: #fff;
    margin-top: 10px;
}

/* Close button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* Image hover effect */
.image-box img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
    transition: 0.3s;
}

.image-box img:hover {
    transform: scale(1.05);
    opacity: 0.8;
}