/**
 * SEE 9 Nov 2026: centre hero quote forms on mobile and stop reCAPTCHA overflow.
 * Pages use an Elementor text-editor hero with inline styles
 * (column justify-content:flex-end; min-width:320px; card max-width:380px; padding:28px).
 * Some pages also expose .hero-form-col / .hero-form-card.
 * Desktop (768px+) is unchanged.
 */
@media (max-width: 767px) {
	/* Right-aligned form column → centred, no 320px floor */
	.hero-form-col,
	div[style*="justify-content"][style*="flex-end"]:has(.quote-form_wrapper),
	div[style*="justify-content"][style*="flex-end"]:has(.gform_wrapper) {
		justify-content: center !important;
		min-width: 0 !important;
		width: 100% !important;
		flex: 1 1 100% !important;
		box-sizing: border-box !important;
	}

	/* White card → full width with tighter padding */
	.hero-form-card,
	div[style*="max-width"][style*="380px"]:has(.quote-form_wrapper),
	div[style*="max-width"][style*="380px"]:has(.gform_wrapper) {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: auto !important;
		margin-right: auto !important;
		padding: 12px !important;
		box-sizing: border-box !important;
		min-width: 0 !important;
	}

	/* Gravity Forms wrapper (grey orbital shell) */
	.quote-form_wrapper,
	.gform_wrapper.quote-form_wrapper {
		min-width: 0 !important;
		max-width: 100% !important;
		width: 100% !important;
		box-sizing: border-box !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.quote-form_wrapper .gform_body,
	.quote-form_wrapper .gform_footer,
	.quote-form_wrapper form {
		min-width: 0 !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
	}

	/* Keep the 304px reCAPTCHA inside the card without scaling */
	.quote-form_wrapper .ginput_recaptcha,
	.quote-form_wrapper iframe[title*="reCAPTCHA"],
	.quote-form_wrapper .gfield--type-captcha {
		max-width: 100% !important;
		overflow: hidden;
	}
}
