/* ============================================================
   Text Columns section (layout "text_columns")
   Design ref: What We Treat 2x2 text grid (light-grey, large serif
   headings) + Family Service teal two-column feature (caramel eyebrow,
   cream serif heading, cream body with inline underlined link).

   A grid of text blocks. tc_bg -> band colour, tc_columns -> desktop
   column count. Mobile = single column; tablet keeps 2 columns.
   ============================================================ */

.text-columns {
	padding-block: var(--section-padding);
}

/* --- Band variants --- */
.text-columns--light-grey {
	background: var(--color-light-grey);
}

.text-columns--cream {
	background: var(--color-cream-light);
}

.text-columns--teal {
	background: var(--color-teal);
}

/* --- Grid --- */
.text-columns__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-xl);
}

/* --- Block --- */
.text-columns__block {
	max-width: 34rem;
}

/* Single-block section (e.g. after a block was removed): one centred column,
   content centred - so it reads as an intentional feature, not a lonely
   half-width column. Higher specificity so it beats the 2/3-column rules at
   every breakpoint. */
.text-columns.text-columns--single .text-columns__grid {
	grid-template-columns: 1fr;
	justify-items: center;
}

.text-columns--single .text-columns__block {
	/* 72rem to match the site's other centred bands (cta_band / text_band) */
	max-width: 72rem;
	margin-inline: auto;
	text-align: center;
}

.text-columns__block .eyebrow {
	display: block;
	margin-bottom: 0.75rem;
}

.text-columns__heading {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.75rem;
	line-height: 1.2;
	color: var(--color-heading);
	margin: 0 0 var(--space-md);
}

.text-columns__text {
	color: var(--color-text);
	font-size: var(--text-body);
	line-height: 1.6;
}

.text-columns__text > :last-child {
	margin-bottom: 0;
}

.text-columns__text p {
	margin: 0 0 var(--space-sm);
}

.text-columns__text a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.text-columns__text a:hover,
.text-columns__text a:focus-visible {
	color: var(--color-accent);
}

/* --- Teal variant: cream heading + cream body --- */
.text-columns--teal .text-columns__heading {
	color: var(--color-text-on-dark);
}

.text-columns--teal .text-columns__text {
	color: var(--color-text-on-dark);
}

.text-columns--teal .text-columns__text a {
	color: var(--color-text-on-dark);
}

.text-columns--teal .text-columns__text a:hover,
.text-columns--teal .text-columns__text a:focus-visible {
	color: var(--color-caramel-light);
}

/* --- Tablet: keep 2 columns, never collapse to mobile stretched --- */
@media (min-width: 768px) {
	.text-columns__grid {
		grid-template-columns: repeat(2, 1fr);
		column-gap: 3.5rem;
		row-gap: var(--space-xl);
	}
}

/* --- Desktop --- */
@media (min-width: 1024px) {
	.text-columns--2 .text-columns__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.text-columns--3 .text-columns__grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.text-columns__grid {
		column-gap: 5.5rem;
		row-gap: 7.5rem;
		/* the design insets this section's content a little more than the intro */
		padding-inline: var(--space-md);
	}

	.text-columns__heading {
		font-size: 2.25rem;
		line-height: 1.15;
	}

	.text-columns--teal .text-columns__heading {
		font-size: 2.125rem;
	}
}
