.section-heading {
    padding-block-start: 7.75rem;
}

.section-gallery {
    padding-block: 3.25rem 10.75rem;

    .galleries-grid {
        display: grid;
        direction: ltr;
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 240px;
        gap: 1.75rem;

        .img-item {
            display: flex;
            transition: opacity 0.25s ease, transform 0.25s ease;

            &:nth-child(12n+1) {
                grid-column: span 2;
            }

            &:nth-child(12n+5) {
                grid-row: span 2;
            }

            &:nth-child(12n+6) {
                grid-column: span 2;
            }

            &:nth-child(12n+10) {
                grid-column: span 2;
            }

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }
    }
}

@media (max-width: 1023px) {
    .section-heading {
        padding-block-start: 3.5rem;
    }

    .section-gallery {
        padding-block-end: 3.5rem;

        .galleries-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 0.75rem;
            grid-auto-rows: revert;

            .img-item {
                &:nth-child(12n+5) {
                    grid-row: revert;
                }

                &:nth-child(12n+10) {
                    grid-column: revert;
                }

                &:nth-child(12n+11) {
                    grid-column: span 2;
                }

                img {
                    aspect-ratio: 1;
                }
            }
        }
    }
}