.img-text-row {
    display: flex;
    align-items: top;
    gap: 30px;
    margin: 30px 0;
}
.img-text-row--reverse {
    flex-direction: row-reverse;
}
.img-text-row__image {
    flex: 0 0 35%;
}
.img-text-row__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}
.img-text-row__content {
    flex: 1;
}
.img-text-row__content p:last-child {
    margin-bottom: 0;
}

.img-text-row__caption {
    font-style: italic;
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
    margin-bottom: 0;
    text-align: center;
}

/* Centered layout: stacked, image natural size but responsive */
.img-text-row--center {
    display: block;
    text-align: center;
}
.img-text-row--center .img-text-row__image {
    flex: none;
    margin-bottom: 15px;
}
.img-text-row--center .img-text-row__img {
    max-width: 100%;   /* never exceeds container width */
    width: auto;        /* keeps natural size if smaller than container */
    height: auto;        /* preserves aspect ratio */
    display: inline-block;
}
.img-text-row--center .img-text-row__content {
    text-align: left;   /* keep paragraph text readable, not centered */
}

@media (max-width: 768px) {
    .img-text-row,
    .img-text-row--reverse {
        flex-direction: column;
    }
    .img-text-row__image {
        flex: 0 0 auto;
        width: 100%;
    }
}