/* Rehapp Project Specific Layout Styles */
#rehappdescription{
  margin-bottom: 0.7rem;
}

/* Override gallery grid for no gaps between images */
.gallery-container .gallery-grid {
    gap: 0;
}

/* Remove margin between gallery items (for images) */
.gallery-container .gallery-item:has(img) {
    margin-bottom: 0;
}

/* Remove border-radius from all images by default */
.gallery-container .gallery-item img {
    border-radius: 0;
}

/* First video at the top - keep border radius and add bottom margin */
.gallery-container .gallery-item:first-child video {
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* First image after video - round top corners only */
.gallery-container .gallery-item:nth-child(2) img {
    border-radius: 8px 8px 0 0;
}

/* Last image in series - round bottom corners only */
.gallery-container .gallery-item:nth-child(9) img {
    border-radius: 0 0 8px 8px;
}

.gallery-container .gallery-item:nth-child(9) {
    margin-top: 0;
}

/* Increase gap between video and first image on larger screens */
@media screen and (min-width: 1024px) {
    .gallery-container .gallery-item:first-child video {
        margin-bottom: 4rem; /* Increased from 2rem to 4rem for desktop */
    }
}
