/*
 * Page layout building blocks used in the content files:
 * .container, .section, .grid, .split and text helpers.
 */

.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--wide {
	max-width: calc(var(--container-wide) + 2 * var(--gutter));
}

.container--narrow {
	max-width: calc(var(--container-narrow) + 2 * var(--gutter));
}

/* A horizontal band of the page with vertical spacing. */
.section {
	padding-block: var(--section-padding);
}

.section--flush-top {
	padding-top: 0;
}

.section--flush-bottom {
	padding-bottom: 0;
}

/* Columns: .grid.grid--2 = two columns, .grid--3 = three (one column on phones). */
.grid {
	display: grid;
	gap: var(--space-l);
}

@media (min-width: 768px) {
	.grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

/* Picture and text side by side; .split--reverse puts the picture on the right. */
.split {
	display: grid;
	gap: var(--space-l);
	align-items: center;
}

.split__media img {
	width: 100%;
	border-radius: 4px;
}

.split + .split {
	margin-top: var(--space-xl);
}

@media (min-width: 900px) {
	.split {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.split--reverse > :first-child {
		order: 2;
	}
}

/* Buttons next to each other. */
.actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-s);
	margin-top: var(--space-m);
}

.actions--center {
	justify-content: center;
}

.text-center {
	text-align: center;
}

.lead {
	font-size: var(--font-size-lead);
	line-height: 1.5;
}

/* Justified text only on wider screens; on phones it would leave large gaps between words. */
@media (min-width: 768px) {
	.text-justify {
		text-align: justify;
	}
}
