/* Basic styling for the gallery container */
.nova-gallery-grid {
    position: relative; /* <-- ADD THIS LINE! This is crucial for Masonry's absolute positioning */
    /* The commented lines below are correct as Masonry handles them */
    /* display: grid; */
    /* gap property is set dynamically by Elementor's control. */
    min-height: 1px; /* Helps ensure the container has a height */
}

/* Styling for individual gallery items */
.nova-gallery-item {
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    /* The commented lines below are correct as Masonry handles them, or they're not needed with Masonry */
    /* flex-grow: 1; */
    /* flex-shrink: 0; */
    /* flex-basis: calc(33.333% - 10px); */
    /* margin-bottom: 0; */ /* This comment indicates you've removed explicit margin-bottom, which is good. */

    background-color: #f8f8f8;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
    margin-bottom: 24px;
}

.nova-gallery-item:hover {
    transform: translateY(-5px);
}

/* Image styling */
.nova-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}