.img-thumbnail {
    padding:0.15em;
        background:none;        
        width: 100%;
        height: auto;
        object-fit: cover;
        transition: transform 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
.img-thumbnail:hover {
        transform: scale(1.05);
    }

/* Limit Popup Size to 80% of Viewport */
.mfp-img {
    max-width: 80vw;
    max-height: 80vh;
    border-radius: 10px;
}

/* Position Close Button Inside the Popup */
.mfp-close {
    color: #fff;
    font-size: 4em;
    position: absolute;
    top: -0.25em !important;
     
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    padding: 10px 15px !important;
    cursor: pointer;  /* Ensures pointer cursor */
    z-index: 1050;
    text-align: center;
    line-height: 1;   /* Prevents shifting when clicked */
    box-sizing: content-box; /* Consistent sizing */
    transition: none; /* Prevents any movement on click */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8); /* Add shadow for depth */
    outline: 2px solid rgba(255, 255, 255, 0.8); /* Light outline stroke */
}

/* Remove :active shift for consistent positioning */
.mfp-close:active {
    top: 20px; /* Ensures no shift */
}

/* Glowing Border for Popup */
.mfp-content {
    box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.8), 0 0 30px 15px rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    overflow: hidden;
}

/* Popup Entrance Animation */
.mfp-fade.mfp-bg { opacity: 0; transition: all 0.3s ease-out; }
.mfp-fade.mfp-bg.mfp-ready { opacity: 0.9; }
.mfp-fade.mfp-wrap { transform: scale(0.8); opacity: 0; transition: all 0.3s ease-out; }
.mfp-fade.mfp-wrap.mfp-ready { transform: scale(1); opacity: 1; }
.mfp-fade.mfp-wrap.mfp-removing { transform: scale(0.8); opacity: 0; }

.mfp-arrow { color: #fff; font-size: 24px; line-height: 50px; background: rgba(0, 0, 0, 0.5); border-radius: 50%; cursor: pointer; }
