/*
 * Review 08 — Service Area layout stabilisation
 *
 * Scope is deliberately limited to the service-area CPT. The legacy page data
 * stores two-column markup as .half-left / .half-right inside ACF text modules.
 * These classes were not defined in the production theme source, while legacy
 * custom CSS only forced selected modules to display:flex. Define explicit
 * widths and responsive behaviour here so all service-area pages render
 * consistently without altering other page types.
 */

body.single-service-area .text_module .module_content > .half-left,
body.single-service-area .text_module .module_content > .half-right {
	box-sizing: border-box;
	width: 50%;
	min-width: 0;
}

body.single-service-area .text_module .module_content > .half-left {
	float: left;
	padding-right: 28px;
}

body.single-service-area .text_module .module_content > .half-right {
	float: right;
	padding-left: 28px;
}

body.single-service-area .text_module.col-align-center .module_content {
	display: flex !important;
	align-items: center !important;
	flex-wrap: wrap;
}

body.single-service-area .text_module.col-align-center .module_content > .half-left,
body.single-service-area .text_module.col-align-center .module_content > .half-right {
	flex: 0 0 50%;
}

body.single-service-area .text_module.col-align-center .module_content > .clear {
	display: none;
}

body.single-service-area .text_module .module_content > .clear {
	clear: both;
}

body.single-service-area .text_module .half-left img,
body.single-service-area .text_module .half-right img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin-left: 0;
	margin-right: 0;
}

body.single-service-area .text_module iframe {
	max-width: 100%;
}

/*
 * Legacy location-page CTA markup uses .local-btn.btn.btn_link outside the
 * feed component that originally supplied the text colour. Keep the existing
 * button background but force readable CTA text in every interaction state.
 */
body.single-service-area a.local-btn.btn.btn_link,
body.single-service-area a.local-btn.btn.btn_link:visited,
body.single-service-area a.local-btn.btn.btn_link:hover,
body.single-service-area a.local-btn.btn.btn_link:focus,
body.single-service-area a.local-btn.btn.btn_link:active {
	color: #fff !important;
	-webkit-text-fill-color: #fff;
}

@media screen and (max-width: 767px) {
	body.single-service-area .text_module.col-align-center .module_content {
		flex-direction: column;
		align-items: stretch !important;
	}

	body.single-service-area .text_module .module_content > .half-left,
	body.single-service-area .text_module .module_content > .half-right,
	body.single-service-area .text_module.col-align-center .module_content > .half-left,
	body.single-service-area .text_module.col-align-center .module_content > .half-right {
		float: none;
		width: 100%;
		flex: 0 0 100%;
		padding-left: 0;
		padding-right: 0;
	}

	body.single-service-area .text_module .module_content > .half-left + .half-right,
	body.single-service-area .text_module .module_content > .half-right + .half-left {
		margin-top: 24px;
	}
}
