.gallery {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping to new rows */
    gap: 15px; /* Space between images */
    justify-content: flex-start; /* Align images to the start */
}

.gallery-item {
    width: 250px; /* Ensure three images per row, with spacing */
    height: auto;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: transform 0.3s ease-in-out, z-index 0.3s;
    position: relative;
}

.gallery-item:hover {
    transform: scale(1.1); /* Enlarge the image slightly */
    z-index: 5; /* Bring the hovered image to the front */
}
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 80%;
    max-height: 80%;
}

.close-btn, .prev-btn, .next-btn {
    position: absolute;
    color: #fff;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.close-btn {
    top: 10px;
    right: 10px;
}

.prev-btn {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.next-btn {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}