/**
 * Homepage before/after slider sections + mid-page quote strip.
 * Sliders: drag or arrow-keys to wipe (homepage-slider.js).
 */

/* ==========================================================================
   Before/After slider sections
   ========================================================================== */

.ba-section {
	padding: var(--section-padding) 0;
}

.ba-inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 1.25rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: center;
}

.ba-reverse .ba-text {
	order: 2;
}

.ba-reverse .ba-slider {
	order: 1;
}

.ba-title {
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	margin-bottom: 1rem;
	position: relative;
	padding-bottom: 0.75rem;
}

.ba-title::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 56px;
	height: 4px;
	border-radius: 2px;
	background: var(--wp--preset--color--primary);
}

.ba-desc {
	color: var(--wp--preset--color--text);
	font-size: 1.0625rem;
	line-height: 1.6;
	margin-bottom: 1rem;
}

.ba-link a {
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	text-decoration: none;
}

.ba-link a:hover {
	text-decoration: underline;
}

/* Slider widget */
.ba-slider {
	position: relative;
	aspect-ratio: 1 / 1;
	max-width: 520px;
	width: 100%;
	justify-self: center;
	overflow: hidden;
	border-radius: 12px;
	cursor: ew-resize;
	touch-action: pan-y;
	box-shadow: 0 12px 32px rgba(35, 36, 38, 0.16);
}

.ba-slider:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

/* Standalone slider (4th, in place of the old team photo) */
.ba-solo {
	margin: 0 auto;
	max-width: 600px;
}

.ba-slider img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	display: block;
}

.ba-img-after {
	clip-path: inset(0 0 0 30%);
}

.ba-line {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 30%;
	width: 3px;
	background: #ffffff;
	transform: translateX(-50%);
	z-index: 4;
	pointer-events: none;
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
}

.ba-handle {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

@media (max-width: 767px) {
	.ba-inner {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.ba-reverse .ba-text,
	.ba-reverse .ba-slider {
		order: 0;
	}

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

	.ba-title {
		font-size: 1.5rem;
		margin-bottom: 0.75rem;
	}

	.ba-title::after {
		left: 50%;
		transform: translateX(-50%);
	}

	.ba-desc {
		font-size: 1rem;
		margin-bottom: 0.5rem;
	}

	.ba-slider {
		max-width: none;
	}
}

/* ==========================================================================
   Mid-page quote strip (dark band, holds CF7 form 145)
   ========================================================================== */

.quote-strip {
	background: var(--wp--preset--color--contrast);
	padding: var(--section-padding) 0;
}

.quote-strip-inner {
	max-width: 720px;
	margin: 0 auto;
	padding: 0 1.25rem;
	text-align: center;
}

.quote-strip-title {
	color: #ffffff;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	margin: 0 0 0.5rem;
}

.quote-strip-sub {
	color: rgba(255, 255, 255, 0.7);
	font-size: 1.0625rem;
	margin: 0 0 1.5rem;
}

/* CF7 form laid out as one row on desktop, stacked on mobile */
.quote-strip .wpcf7-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	justify-content: center;
}

.quote-strip .wpcf7-form p {
	margin: 0;
	flex: 1 1 150px;
	min-width: 0;
}

/* submit hugs its content; turnstile + response take their own full-width row */
.quote-strip .wpcf7-form p:has( input.wpcf7-submit ) {
	flex: 0 0 auto;
}

.quote-strip .wpcf7-form p:has( .cf-turnstile ),
.quote-strip .wpcf7-form p:has( .wpcf7-turnstile ) {
	flex: 1 0 100%;
	display: flex;
	justify-content: center;
	margin-top: 0.25rem;
}

.quote-strip .wpcf7-form label {
	display: block;
	font-size: 0;
}

.quote-strip .wpcf7-form-control-wrap {
	display: block;
}

.quote-strip .wpcf7-form input.wpcf7-text,
.quote-strip .wpcf7-form input.wpcf7-tel,
.quote-strip .wpcf7-form input.wpcf7-email {
	box-sizing: border-box;
	width: 100%;
	padding: 0.875rem 1rem;
	font-size: 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	background: #ffffff;
	color: var(--wp--preset--color--contrast);
}

.quote-strip .wpcf7-form input::placeholder {
	color: var(--wp--preset--color--text);
	opacity: 0.7;
}

.quote-strip .wpcf7-form input:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px rgba(223, 59, 38, 0.18);
}

.quote-strip .wpcf7-form input.wpcf7-submit {
	padding: 0.875rem 1.75rem;
	font-size: 1rem;
	font-weight: 700;
	color: #ffffff;
	background: var(--wp--preset--color--primary);
	border: none;
	border-radius: 9999px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
	white-space: nowrap;
}

.quote-strip .wpcf7-form input.wpcf7-submit:hover {
	background: var(--wp--preset--color--primary-dark);
	transform: translateY(-2px);
}

.quote-strip .wpcf7-response-output {
	flex: 1 0 100%;
	color: #ffffff;
	margin: 0.5rem 0 0;
}

.quote-strip .wpcf7-spinner {
	margin: 0.5rem auto 0;
}

@media (max-width: 767px) {
	.quote-strip .wpcf7-form {
		flex-direction: column;
	}

	.quote-strip .wpcf7-form p,
	.quote-strip .wpcf7-form input.wpcf7-submit {
		flex: 1 1 auto;
		width: 100%;
	}
}
