<style>
/* General Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f0f0f0;
}

/* Gallery Styling */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.gallery-item {
    width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* Popup Styling */
.popup {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

/* .popup-content {
    margin: auto;
    display: block;
    width: 70%;
    max-width: 70%;
    border-radius: 15px;
} */

/* Initial styling for the popup content */
.popup-content {
    margin: auto;
    display: block;
    width: 70%;
    max-width: 70%;
    border-radius: 15px;
    transform: scale(0.5); /* Start smaller for zoom-in effect */
    opacity: 0;
    animation: zoomIn 0.5s ease forwards;
}

/* Zoom In Animation (For Opening) */
@keyframes zoomIn {
    from {
        transform: scale(0.5); /* Start smaller */
        opacity: 0;
    }
    to {
        transform: scale(1); /* End at normal size */
        opacity: 1;
    }
}

/* Zoom Out Animation (For Closing) */
@keyframes zoomOut {
    from {
        transform: scale(1); /* Start at normal size */
        opacity: 1;
    }
    to {
        transform: scale(0.5); /* Shrink */
        opacity: 0;
    }
}

/* Zoom Next Animation (For Transition to Next Image) */
@keyframes zoomNext {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9); /* Slight zoom out */
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* JavaScript to handle adding/removing classes */
.hidden {
    display: none;
    animation: zoomOut 0.5s ease forwards;
}




.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}
</style>