/* gallery.css – Gallery grid */

/* ══════════════════════════════════════════════
   GALLERY
   ══════════════════════════════════════════════ */

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gallery-gutter);
}

.gallery__item {
    border-radius: var(--gallery-img-radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.gallery__item:hover img {
    transform: scale(1.05);
}

.gallery__item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.gallery__item:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

/* Masonry-ish with row spans */
.gallery--masonry .gallery__item:nth-child(4n + 1) {
    grid-row: span 2;
}

/* Featured Grid */
.gallery--featured {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(3, 1fr);
}

.gallery--featured .gallery__item:first-child {
    grid-row: 1 / -1;
}

/* Span-2 wide item (used in holiday-homes gallery) */
.gallery__item--wide {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

/* 4:3 aspect ratio item */
.gallery__item--4-3 {
    aspect-ratio: 4 / 3;
}

@media (max-width: 1199px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}
