/* blocks/single-column-section
 *
 * Centered heading, then flexible-content rows in editor order: iconed cards
 * and paragraph text, interchangeable and repeatable.
 *
 * The cards are a wrapping flex row — no gap, the spacing is margin on each
 * column, so the width is calc(100% / N - both margins). N comes from each
 * row's own `--cols` (its repeater count), capped at 4 per line, and the media
 * queries clamp it further: 4 → 3 → 2 → 1.
 */

.section-single-column {
	--card-margin: 12px;
	--card-border: #e2e2e2;
	padding: 80px 20px;
	text-align: center;
}

.section-single-column .section-head {
	margin-bottom: 40px;
}

.section-single-column .section-title {
	margin: 0;
}

/* --- Cards -------------------------------------------------------------- */
.section-single-column .columns-grid {
	--cols: 3;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	margin-left: calc(var(--card-margin) * -1);
	margin-right: calc(var(--card-margin) * -1);
}

.section-single-column .column {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: calc(100% / min(var(--cols), 4) - var(--card-margin) * 2);
	margin-left: var(--card-margin);
	margin-right: var(--card-margin);
	margin-bottom: calc(var(--card-margin) * 2);
	padding: 30px 22px 34px;
	border: 1px solid var(--card-border);
	background-color: var(--white);
	transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), border-color .3s;
}

.section-single-column .column:hover {
	transform: translateY(-6px);
	border-color: var(--secondary-color);
}

.section-single-column .column-icon {
	transition: border-color .3s, background-color .3s;
}

.section-single-column .column:hover .column-icon {
	border-color: var(--secondary-color);
}

@media (prefers-reduced-motion: reduce) {
	.section-single-column .column {
		transition: border-color .3s;
	}

	.section-single-column .column:hover {
		transform: none;
	}
}

.section-single-column .column-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin-bottom: 22px;
	border: 1px solid var(--card-border);
	border-radius: 50%;
	flex: 0 0 auto;
}

.section-single-column .column-icon img {
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.section-single-column .column-title {
	margin-bottom: 14px;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--primary-color);
}

.section-single-column .column-content,
.section-single-column .column-content p {
	font-size: 16px;
	line-height: 1.6;
}

.section-single-column .column-content p + p {
	margin-top: 10px;
}

/* --- Content rows ------------------------------------------------------- */
.section-single-column .content {
	max-width: 1180px;
	margin-inline: auto;
}

.section-single-column .content.text-center { text-align: center; }
.section-single-column .content.text-left { text-align: left; }

.section-single-column .content p + p {
	margin-top: 16px;
}

/* Row spacing. The cards already carry a bottom margin, so only the gaps a
 * .content row introduces need adding — in either order. */
.section-single-column .content + .content { margin-top: 22px; }
.section-single-column .content + .columns-grid { margin-top: 34px; }
.section-single-column .columns-grid + .content { margin-top: 22px; }

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 1024px) {
	.section-single-column {
		padding: 60px 20px;
	}

	.section-single-column .column {
		width: calc(100% / min(var(--cols), 3) - var(--card-margin) * 2);
	}
}

@media (max-width: 767px) {
	.section-single-column {
		padding: 50px 20px;
		--card-margin: 8px;
	}

	.section-single-column .section-head {
		margin-bottom: 28px;
	}

	.section-single-column .column {
		width: calc(100% / min(var(--cols), 2) - var(--card-margin) * 2);
		padding: 24px 16px 26px;
	}

	.section-single-column .column-icon {
		width: 60px;
		height: 60px;
		margin-bottom: 16px;
	}

	.section-single-column .column-icon img {
		width: 32px;
		height: 32px;
	}

	.section-single-column .column-title {
		font-size: 18px;
	}

	/* Long paragraphs read better left-aligned on a narrow screen. */
	.section-single-column .content,
	.section-single-column .content.text-center {
		text-align: left;
	}

	.section-single-column .content p {
		font-size: 17px;
	}

	.section-single-column .content + .columns-grid { margin-top: 24px; }
}

@media (max-width: 479px) {
	.section-single-column .column {
		width: calc(100% - var(--card-margin) * 2);
	}
}

/* ======================================================================
 * Page-specific variants (set via the block's "Additional CSS class").
 * ==================================================================== */

/* --- Home: intro paragraphs + "Our Expertise" list (.home-intro) ------- */
.section-single-column.home-intro .content {
	max-width: 1040px;
}

.section-single-column.home-intro .content + .content {
	margin-top: 44px;
}

.section-single-column .expertise-title {
	margin-bottom: 22px;
	font-size: 28px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--primary-color);
	text-align: center;
}

.section-single-column .expertise-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.section-single-column .expertise-list li {
	position: relative;
	padding: 14px 18px 14px 50px;
	border: 1px solid var(--card-border);
	border-left: 4px solid var(--secondary-color);
	background-color: var(--white);
	font-size: 17px;
	line-height: 1.45;
	font-weight: 500;
	color: var(--primary-color);
	text-align: left;
}

/* Check mark drawn in CSS so there is no icon file to manage. */
.section-single-column .expertise-list li:before {
	content: '';
	position: absolute;
	left: 20px;
	top: 50%;
	width: 7px;
	height: 13px;
	border: solid var(--secondary-color);
	border-width: 0 3px 3px 0;
	transform: translateY(-65%) rotate(45deg);
}

/* --- Home: closing mission text (.home-mission) ----------------------- */
.section-single-column.home-mission .content {
	max-width: 900px;
}

.section-single-column.home-mission .content a,
.section-single-column.services-custom .content a {
	color: var(--primary-color);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--secondary-color);
	text-underline-offset: 3px;
}

.section-single-column.home-mission .content a:hover {
	color: var(--secondary-color);
}

/* --- Services: service cards (.services-group) ------------------------ */
.section-single-column.services-group .column {
	align-items: flex-start;
	text-align: left;
	border-top: 4px solid var(--secondary-color);
}

.section-single-column.services-group .column-title {
	font-size: 19px;
}

/* A group with a single service shouldn't stretch one card edge to edge. */
.section-single-column.services-group .columns-1 .column {
	max-width: 640px;
}

.section-single-column.services-custom .content {
	max-width: 900px;
}

@media (max-width: 767px) {
	.section-single-column .expertise-list {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.section-single-column .expertise-title {
		font-size: 24px;
	}

	.section-single-column .expertise-list li {
		font-size: 16px;
	}
}

/* Geophysical Services has 10 cards: two per row gives five even rows instead
 * of 4/4/2 with one very tall card dragging its row. */
@media (min-width: 768px) {
	.section-single-column.services-group .columns-10 .column {
		width: calc(50% - var(--card-margin) * 2);
	}
}
