.image-gallery {
    padding-top:    var(--pad-y-alt);
    padding-bottom: var(--pad-y-alt);
    padding-left:   var(--pad-x);
    padding-right:  var(--pad-x);
    background: var(--color-bg);
}

.image-gallery__inner {
    max-width: var(--site-max-w);
    margin: 0 auto;
}

.image-gallery__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 500px;
}

.image-gallery__eyebrow {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 18px;
    line-height: 24px;
    color: var(--color-accent);
}

.image-gallery__heading {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 48px;
    line-height: 54px;
    color: var(--color-dark);
}

/* ── Photo mosaic — always exactly 6 images (enforced by the ACF
   repeater's min/max): 4 portrait tiles in the top row, 2 landscape
   tiles in the bottom row. ─────────────────────────────────────── */
.image-gallery__grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 40px;
}

.image-gallery__row {
    display: flex;
    gap: 4px;
}

.image-gallery__row--top .image-gallery__item {
    flex: 1 1 0;
    aspect-ratio: 357 / 446;
}

.image-gallery__row--bottom .image-gallery__item {
    flex: 1 1 0;
    aspect-ratio: 2 / 1;
}

.image-gallery__item {
    overflow: hidden;
}

.image-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

@media (max-width: 1366px) {
    .image-gallery__heading {
        font-size: 40px;
        line-height: 46px;
    }
}

@media (max-width: 1024px) {
    .image-gallery__row--top {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
    }

    .image-gallery__row--top .image-gallery__item {
        aspect-ratio: 4 / 3;
    }

    .image-gallery__row--bottom {
        flex-wrap: wrap;
    }

    .image-gallery__row--bottom .image-gallery__item {
        flex: 1 1 calc(50% - 2px);
        aspect-ratio: 4 / 3;
    }

    .image-gallery__grid {
        margin-top: 32px;
    }

    .image-gallery__heading {
        font-size: 32px;
        line-height: 38px;
    }
}

@media (max-width: 767px) {
    .image-gallery__row--top {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
    }

    .image-gallery__row--top .image-gallery__item {
        aspect-ratio: 4 / 3;
    }

    .image-gallery__row--bottom {
        flex-direction: column;
    }

    .image-gallery__row--bottom .image-gallery__item {
        flex: 1 1 auto;
        aspect-ratio: 4 / 3;
    }

    .image-gallery__grid {
        margin-top: 24px;
    }

    .image-gallery__heading {
        font-size: 28px;
        line-height: 34px;
    }
}
