/* Section 5 (Furniture Gallery) */
#service-section-5 {
    padding: var(--section-pad-y) var(--section-pad-x);
}

#service-section-5 .s5__head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 16px;
    margin-bottom: 28px;
}

#service-section-5 .s5__heading {
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.18;
    margin: 0;
}

#service-section-5 .s5__cta {
    background: #E53935;
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 800;
    white-space: nowrap;
    align-self: end;
}

#service-section-5 .s5__cta:hover {
    filter: brightness(0.95);
}

/* Grid layout:
   [1] [2] [3]
   [4] [5] [6]
   with specific spans to mimic two large centers like design */
#service-section-5 .s5__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 4px;
    gap: 20px;
}

#service-section-5 .s5__item {
    overflow: hidden;
    border-radius: 6px;
    min-height: 0;
}

#service-section-5 .s5__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placement to match the 6-tile design (L: big + two small, C: tall portrait, R: big + one bottom wide) */
#service-section-5 .s5__item--1 {
    grid-column: 1 / span 4;
    grid-row: 1 / span 12;
}

/* top-left large */
#service-section-5 .s5__item--2 {
    grid-column: 5 / span 4;
    grid-row: 1 / span 24;
}

/* center tall spanning two rows */
#service-section-5 .s5__item--3 {
    grid-column: 9 / span 4;
    grid-row: 1 / span 12;
}

/* top-right large */
#service-section-5 .s5__item--4 {
    grid-column: 1 / span 2;
    grid-row: 13 / span 12;
}

/* bottom-left small 1 */
#service-section-5 .s5__item--5 {
    grid-column: 3 / span 2;
    grid-row: 13 / span 12;
}

/* bottom-left small 2 */
#service-section-5 .s5__item--6 {
    grid-column: 9 / span 4;
    grid-row: 13 / span 12;
}

/* right column bottom wide */

/* Heights are controlled via grid-auto-rows and the explicit grid-row spans above. */

@media (max-width: 1024px) {
    #service-section-5 .s5__grid {
        grid-auto-rows: auto !important;
    }

    #service-section-5 .s5__item {
        aspect-ratio: 4 / 3;
    }

    #service-section-5 .s5__head {
        display: flex;
        flex-direction: row;
        grid-template-columns: 1fr;
    }

    #service-section-5 .s5__cta {
        justify-self: start;
    }

    #service-section-5 .s5__grid {
        grid-template-columns: 1fr 1fr;
    }

    #service-section-5 .s5__item {
        grid-column: auto / span 1;
        grid-row: auto / span 1;
    }

    #service-section-5 .s5__item--1,
    #service-section-5 .s5__item--2 {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 640px) {
    /*#service-section-5 .s5__grid {*/
    /*    grid-template-columns: 1fr;*/
    /*}*/

    /*#service-section-5 .s5__item {*/
    /*    aspect-ratio: 4 / 3;*/
    /*}*/

    #service-section-5 .s5__head {
        flex-wrap: wrap;
    }
}