/* Image Lightbox Styles */

/* Lightbox container */
.scientific-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(5px);
}

/* Lightbox content */
.scientific-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

/* Animation for zooming in */
@keyframes zoom {
    from {transform: scale(0.7); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* Lightbox image */
.scientific-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

/* Close button */
.scientific-lightbox-close {
    position: absolute;
    top: -50px;
    right: -10px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: 10;
}

.scientific-lightbox-close:hover {
    color: #fff;
    background-color: #d32f2f;
    transform: rotate(90deg);
}

/* Add title for the image */
.scientific-lightbox-title {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 16px;
    padding: 8px 0;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0 0 8px 8px;
    font-weight: 500;
}

/* Make scientific material images indicate they are clickable */
.scientific-material-image img {
    cursor: pointer;
    transition: all 0.3s ease;
}

.scientific-material-image img:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

/* Add a subtle zoom icon overlay on images */
.scientific-material-image {
    position: relative;
    overflow: hidden;
}

.scientific-material-image::after {
    content: '🔍';
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    color: #333;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scientific-material-image:hover::after {
    opacity: 1;
}
