/* Container adjustments for the Classic Editor gallery */
.gallery .gallery-item {
    position: relative !important;
    overflow: hidden;
}

/* Ensure the link or image wrapper spans the container */
.gallery .gallery-icon {
    position: relative;
    margin: 0 !important;
}

/* Create the initial transparent overlay */
.gallery .gallery-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Black overlay with 60% opacity */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1;
    pointer-events: none; /* Allows users to still click the underlying link */
}

/* Trigger the overlay visible state on hover */
.gallery .gallery-item:hover .gallery-icon::before {
    opacity: 1;
}

/* Optional: Smooth transition for the image itself */
.gallery .gallery-icon img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease-in-out;
}


