.thumbnail {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.thumbnail:hover {
    transform: translateY(-0.3vw);
    box-shadow: 0 1vw 2vw rgba(0, 0, 0, 0.3);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
    z-index: 1000;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.enlarged-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 1vw;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s, transform 0.4s;
    box-shadow: 0 0 1.5vw rgba(255, 255, 255, 0.8);
}

.overlay.active .enlarged-img {
    opacity: 1;
    transform: scale(1);
}