/*!
 * foundation26 – Text & image (content-text-image); structure only, no .card, surfaces come from Appearance
 * © 2026 Atelier 26 AG – part of digiscapes®. All rights reserved. digiscapes® and brandscapes® are registered trademarks.
 */

/* === Surface === */
/* p-* (!important) wins over this padding */
.content-text-image[class*="bg-"],
.content-text-image[class*="shadow-"] {
    padding: var(--bs-gutter-y) var(--bs-gutter-x);
}

/* === Stack === */
.content-text-image {
    display: flex;
    flex-direction: column;
    gap: var(--bs-gutter-y);
}

.content-text-image.text-image-type-bottom {
    flex-direction: column-reverse;
}

/* === Image === */
.content-text-image .text-image-img {
    margin: 0;
}

.content-text-image .text-image-img :is(picture, img, svg) {
    display: block;
    width: 100%;
}

/* === Row, Row Reverse === */
.content-text-image .text-image-grid {
    row-gap: var(--bs-gutter-y); /* .row never applies --bs-row-gap; acts only between wrapped lines */
}

/* === Vertical Alignment === */
/* align-items, not align-content: the row has a single line */
.content-text-image .text-image-grid,
.content-text-image.text-image-style-top .text-image-grid {
    align-items: flex-start;
}

.content-text-image.text-image-style-center .text-image-grid {
    align-items: center;
}

.content-text-image.text-image-style-bottom .text-image-grid {
    align-items: flex-end;
}

/* min-width: 0 lets long words wrap */
.content-text-image .text-image-grid > .text-image-body {
    flex: 1 1 0;
    min-width: 0;
}

/* === Text === */
.content-text-image .text-image-body > :last-child {
    margin-bottom: 0;
}

