/* ── TWO COLUMNS TEXT BLOCKS ──
   Two text blocks 50/50, each with its own background (full bleed, no gap). */

.two-col-text-blocks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
}

.two-col-text-side {
    display: flex;

    /* Same vertical rhythm as the flex container; side padding = site gutter */
    padding: var(--size--120) var(--size--container);
    box-sizing: border-box;
}

/* Width of the optional logo: one column of the site's 12-column grid
   (content width = viewport minus the side gutters). Min size for small screens. */
.two-col-text-blocks {
    --two-col-logo-w: max(3.5rem, calc((100vw - 2 * var(--size--container)) / 12));
    --two-col-logo-gap: var(--size--40);
}

/* Centred block inside each side: [logo] [text]. Text stays left-aligned. */
.two-col-text-inner {
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    gap: var(--two-col-logo-gap);
}

/* With a logo the block gets wider by the logo + gap, so the text keeps its width */
/* .two-col-text-inner.has-logo {
    max-width: calc(40rem + var(--two-col-logo-w) + var(--two-col-logo-gap));
} */

.two-col-text-logo {
    flex: 0 0 var(--two-col-logo-w);
    width: var(--two-col-logo-w);
    align-self: flex-start;

    img {
        display: block;
        height: auto;
    }
}

/* Text column: title, text, buttons (buttons pushed to the bottom) */
.two-col-text-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--size--30);
}

/* Buttons sit at the bottom of each box, so both sides' buttons line up
   (both boxes share the row height). The flex gap keeps space above them. */
.two-col-text-side .two-col-text-buttons {
    margin-top: auto;
}

.two-col-text-side .textfield {
    p {
        margin-bottom: 0.7em;
        &:last-child {
            margin-bottom: 0;
        }
    }
    ul {
        margin-bottom: 0.7em;
        font-size: var(--type-18);
        line-height: 1.4;
        &:last-child {
            margin-bottom: 0;
        }
    }
}

/* Two text columns under the description */
.two-col-text-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--size--20, 1.25rem);
    width: 100%;
}
.two-col-text-columns .textfield:empty {
    display: none;
}

/* Outlined second button (same as the flex container blocks) */
/* Drawn as an inset shadow (not a border) so it adds no height and the
   buttons of both sides line up exactly. */
.two-col-text-side .hyper-btn.second-button {
    border: 0;
    box-shadow: inset 0 0 0 1px var(--color-white);
}

/* ── TABLET / MOBILE: stack the two sides ── */
@media (max-width: 991px) {
    .two-col-text-blocks {
        grid-template-columns: 1fr;
    }

    .two-col-text-side {
        min-height: 0;
        padding: var(--size--52) var(--size--container);
    }

    .two-col-text-inner,
    .two-col-text-inner.has-logo {
        max-width: none;
    }

    .two-col-text-blocks {
        --two-col-logo-gap: var(--size--24);
    }
}

@media (max-width: 479px) {
    .two-col-text-side {
        padding-top: var(--size--40);
        padding-bottom: var(--size--40);
    }
}
