/* Airbnb/Homey Collage */
.gallery-collage,
.gallery-collage * {
    box-sizing: border-box;
}

.gallery-collage {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3 / 2;
}

.gallery-collage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
}

.gallery-collage-grid {
    display: grid;
    grid-template-areas:
        "hero small1 small2"
        "hero small3 small4";
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: minmax(160px, 1fr) minmax(160px, 1fr);
    gap: 8px;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #f6f7f7;
}

.gallery-collage-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #e9eaeb;
}

.gallery-collage-item img {
    width: 100%;
    height: 100%;
    display: block;
}

.gallery-collage-item-1 {
    grid-area: hero;
}

.gallery-collage-item-2 {
    grid-area: small1;
}

.gallery-collage-item-3 {
    grid-area: small2;
}

.gallery-collage-item-4 {
    grid-area: small3;
}

.gallery-collage-item-5 {
    grid-area: small4;
}

.gallery-collage-view-all {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: #ffffff;
    color: #111111;
    border: 1px solid #e6e6e6;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    transition: background 0.2s ease, transform 0.12s ease;
}

.gallery-collage-view-all:hover {
    background: #f7f7f7;
    transform: translateY(-1px);
}

.gallery-collage-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.45);
    letter-spacing: 0.2px;
}

.gallery-collage-hidden {
    display: none;
}

@media (max-width: 900px) {
    .gallery-collage-grid {
        grid-template-areas:
            "hero hero"
            "small1 small2"
            "small3 small4";
        grid-template-columns: 1fr 1fr;
        grid-template-rows: minmax(220px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr);
    }
}

@media (max-width: 540px) {
    .gallery-collage {
        aspect-ratio: auto;
    }

    .gallery-collage-grid {
        grid-template-areas:
            "hero"
            "small1"
            "small2"
            "small3"
            "small4";
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, minmax(160px, 1fr));
        aspect-ratio: auto;
    }

    .gallery-collage-view-all {
        position: static;
        margin-top: 10px;
        width: 100%;
    }
}
