/* What is RCV Template Styles */

.what-is-rcv-template {
	/* Ensure consistent spacing and typography */
	--section-padding-y: 6rem;
	--section-padding-x: 4rem;
	--content-spacing: 3rem;
}

/* VIEWPORT OVERFLOW FIX */
/* Target all WordPress container classes to prevent horizontal overflow */
.what-is-rcv-template [class*="wp-container"] {
	box-sizing: border-box;
	max-width: 100vw;
	overflow-x: hidden;
}

/* Specific fix for the problematic layout container */
.what-is-rcv-template .wp-container-core-group-is-layout-44986368,
.what-is-rcv-template [class*="wp-container-core-group-is-layout"] {
	box-sizing: border-box;
	max-width: 100vw !important;
	width: 100% !important;
	margin-left: auto;
	margin-right: auto;
	overflow-x: hidden;
	position: relative;
}

/* Ensure content within containers respects boundaries */
.what-is-rcv-template .wp-container-core-group-is-layout-44986368 > *,
.what-is-rcv-template [class*="wp-container-core-group-is-layout"] > * {
	box-sizing: border-box;
	max-width: 100%;
}

/* Fix for WordPress block groups that may extend beyond viewport */
.what-is-rcv-template .wp-block-group {
	box-sizing: border-box;
	max-width: 100%;
	overflow-x: hidden;
}

/* Ensure consistent max-width using theme.json contentSize */
.what-is-rcv-template .wp-block-group:not(.alignwide):not(.alignfull) {
	max-width: min(1200px, calc(100vw - 2rem));
	margin-left: auto;
	margin-right: auto;
}

/* Handle wide and full width alignments properly */
.what-is-rcv-template .wp-block-group.alignwide {
	max-width: calc(100vw - 2rem);
	margin-left: auto;
	margin-right: auto;
}

.what-is-rcv-template .wp-block-group.alignfull {
	max-width: 100vw;
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
}

/* Hero Section Enhancements */
.what-is-rcv-template .wp-block-group:first-of-type {
	position: relative;
	overflow: hidden;
}

.what-is-rcv-template .wp-block-group:first-of-type::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, var(--wp--preset--color--neutral-white) 0%, var(--wp--preset--color--biscay-lightest) 100%);
	z-index: -1;
}

/* Step Cards Hover Effects */
.what-is-rcv-template .wp-block-group[style*="saffron-lightest"],
.what-is-rcv-template .wp-block-group[style*="biscay-lightest"],
.what-is-rcv-template .wp-block-group[style*="cerise-red-lightest"] {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	cursor: default;
}

.what-is-rcv-template .wp-block-group[style*="saffron-lightest"]:hover,
.what-is-rcv-template .wp-block-group[style*="biscay-lightest"]:hover,
.what-is-rcv-template .wp-block-group[style*="cerise-red-lightest"]:hover {
	transform: translateY(-0.25rem);
	box-shadow: 0 0.625rem 0.938rem rgba(0, 0, 0, 0.1);
}

/* Button Enhancements */
.what-is-rcv-template .wp-block-button .wp-element-button {
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
}

.what-is-rcv-template .wp-block-button .wp-element-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.what-is-rcv-template .wp-block-button .wp-element-button:focus {
	outline: 2px solid var(--wp--preset--color--cerise-red);
	outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 1024px) {
	.what-is-rcv-template {
		--section-padding-y: 4rem;
		--section-padding-x: 2rem;
		--content-spacing: 2rem;
	}
	
	/* Enhanced viewport overflow protection for tablets */
	.what-is-rcv-template [class*="wp-container"] {
		max-width: calc(100vw - 1rem) !important;
		padding-left: min(var(--section-padding-x), 2rem);
		padding-right: min(var(--section-padding-x), 2rem);
	}
	
	.what-is-rcv-template .wp-block-group:not(.alignwide):not(.alignfull) {
		max-width: min(1200px, calc(100vw - 2rem));
		padding-left: var(--section-padding-x);
		padding-right: var(--section-padding-x);
	}
	
	.what-is-rcv-template .wp-block-group[style*="padding"] {
		padding-top: var(--section-padding-y) !important;
		padding-bottom: var(--section-padding-y) !important;
		padding-left: var(--section-padding-x) !important;
		padding-right: var(--section-padding-x) !important;
	}
}

@media (max-width: 768px) {
	.what-is-rcv-template {
		--section-padding-y: 3rem;
		--section-padding-x: 1.5rem;
		--content-spacing: 1.5rem;
	}
	
	/* Strict viewport overflow protection for mobile */
	.what-is-rcv-template [class*="wp-container"] {
		max-width: calc(100vw - 0.5rem) !important;
		padding-left: var(--section-padding-x);
		padding-right: var(--section-padding-x);
		overflow-x: hidden;
	}
	
	.what-is-rcv-template .wp-block-group {
		max-width: calc(100vw - 0.5rem) !important;
		overflow-x: hidden;
	}
	
	.what-is-rcv-template .wp-block-group:not(.alignwide):not(.alignfull) {
		max-width: calc(100vw - 3rem);
		padding-left: var(--section-padding-x);
		padding-right: var(--section-padding-x);
	}
	
	/* Stack columns on mobile */
	.what-is-rcv-template .wp-block-columns {
		flex-direction: column;
	}
	
	.what-is-rcv-template .wp-block-column {
		margin-bottom: var(--content-spacing);
		width: 100% !important;
		flex-basis: auto !important;
	}
	
	.what-is-rcv-template .wp-block-column:last-child {
		margin-bottom: 0;
	}
	
	/* Adjust button layout on mobile */
	.what-is-rcv-template .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}
	
	.what-is-rcv-template .wp-block-button {
		width: 100%;
		margin-bottom: 1rem;
	}
	
	.what-is-rcv-template .wp-block-button:last-child {
		margin-bottom: 0;
	}
	
	/* Adjust typography for mobile */
	.what-is-rcv-template h1 {
		font-size: var(--wp--preset--font-size--heading-2) !important;
	}
	
	.what-is-rcv-template h2 {
		font-size: var(--wp--preset--font-size--heading-3) !important;
	}
	
	.what-is-rcv-template h3 {
		font-size: var(--wp--preset--font-size--heading-5) !important;
	}
}

@media (max-width: 480px) {
	.what-is-rcv-template {
		--section-padding-y: 2rem;
		--section-padding-x: 1rem;
		--content-spacing: 1rem;
	}
	
	/* Maximum viewport overflow protection for small mobile */
	.what-is-rcv-template [class*="wp-container"] {
		max-width: calc(100vw - 0.25rem) !important;
		padding-left: var(--section-padding-x);
		padding-right: var(--section-padding-x);
		overflow-x: hidden;
		margin-left: auto;
		margin-right: auto;
	}
	
	.what-is-rcv-template .wp-block-group {
		max-width: calc(100vw - 0.25rem) !important;
		overflow-x: hidden;
	}
	
	.what-is-rcv-template .wp-block-group:not(.alignwide):not(.alignfull) {
		max-width: calc(100vw - 2rem);
		padding-left: var(--section-padding-x);
		padding-right: var(--section-padding-x);
	}
	
	/* Further reduce typography on small mobile */
	.what-is-rcv-template h1 {
		font-size: var(--wp--preset--font-size--heading-3) !important;
	}
	
	.what-is-rcv-template .wp-block-paragraph[style*="font-size:var(--wp--preset--font-size--large)"] {
		font-size: var(--wp--preset--font-size--medium) !important;
	}
}

/* Accessibility Enhancements */
.what-is-rcv-template .wp-block-button .wp-element-button:focus-visible {
	outline: 3px solid var(--wp--preset--color--saffron);
	outline-offset: 2px;
}

.what-is-rcv-template .wp-block-group[style*="border"] {
	border-style: solid;
}

/* Print Styles */
@media print {
	.what-is-rcv-template .wp-block-button {
		display: none;
	}
	
	.what-is-rcv-template .wp-block-group {
		break-inside: avoid;
		page-break-inside: avoid;
	}
	
	.what-is-rcv-template h1,
	.what-is-rcv-template h2,
	.what-is-rcv-template h3 {
		color: #000 !important;
	}
	
	.what-is-rcv-template .wp-block-group[style*="background"] {
		background: transparent !important;
		border: 1px solid #ccc !important;
	}
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.what-is-rcv-template .wp-block-group[style*="border"] {
		border-width: 2px !important;
	}
	
	.what-is-rcv-template .wp-block-button .wp-element-button:focus {
		outline-width: 3px;
	}
}

/* Newsletter Form Styling - Scoped to What is RCV page only */
.what-is-rcv-template .wpforms-container.wpforms-container-full {
	max-width: 100%;
}

.what-is-rcv-template .wpforms-container.wpforms-container-full .wpforms-field-container {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 1rem;
}

.what-is-rcv-template .wpforms-container.wpforms-container-full .wpforms-field-email {
	flex: 1;
	min-width: 0;
}

.what-is-rcv-template .wpforms-container.wpforms-container-full .wpforms-field-row {
	display: flex;
	gap: 1rem;
	flex: 1;
	min-width: 0;
}

.what-is-rcv-template .wpforms-container.wpforms-container-full .wpforms-field-row-block {
	flex: 1;
	min-width: 0;
}

.what-is-rcv-template .wpforms-container.wpforms-container-full .wpforms-submit-container {
	flex-shrink: 0;
}

.what-is-rcv-template .wpforms-submit {
	background-color: var(--wp--preset--color--cape-cod);
	color: var(--wp--preset--color--neutral-white);
	border: none;
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	font-weight: 500;
	border-radius: 0.75rem;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--poppins);
	min-height: auto;
	line-height: 1.2;
	transition: all 0.3s ease;
}

.what-is-rcv-template .wpforms-submit:hover {
	background-color: var(--wp--preset--color--cape-cod-dark);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.what-is-rcv-template .wpforms-field-medium {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid var(--wp--preset--color--neutral-light);
	border-radius: 0.5rem;
	font-size: 1rem;
	font-family: var(--wp--preset--font-family--poppins);
	background-color: var(--wp--preset--color--neutral-white);
	color: var(--wp--preset--color--neutral-darkest);
}

.what-is-rcv-template .wpforms-field-medium:focus {
	outline: none;
	border-color: var(--wp--preset--color--cape-cod);
	box-shadow: 0 0 0 2px rgba(24, 54, 93, 0.1);
}

.what-is-rcv-template .wpforms-field-label {
	color: var(--wp--preset--color--neutral-darkest);
	font-weight: 500;
	margin-bottom: 0.5rem;
	font-family: var(--wp--preset--font-family--poppins);
}

.what-is-rcv-template .wpforms-field-sublabel {
	color: var(--wp--preset--color--neutral-dark);
	font-size: 0.875rem;
	margin-top: 0.25rem;
	font-family: var(--wp--preset--font-family--poppins);
}

@media (max-width: 768px) {
	.what-is-rcv-template .wpforms-container.wpforms-container-full .wpforms-field-container {
		flex-direction: column;
		align-items: stretch;
	}
	
	.what-is-rcv-template .wpforms-container.wpforms-container-full .wpforms-field-row {
		flex-direction: column;
	}
	
	.what-is-rcv-template .wpforms-container.wpforms-container-full .wpforms-submit-container {
		width: 100%;
	}
	
	.what-is-rcv-template .wpforms-submit {
		width: 100%;
	}
}


/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.what-is-rcv-template .wp-block-group[style*="saffron-lightest"],
	.what-is-rcv-template .wp-block-group[style*="biscay-lightest"],
	.what-is-rcv-template .wp-block-group[style*="cerise-red-lightest"],
	.what-is-rcv-template .wp-block-button .wp-element-button {
		transition: none;
	}
	
	.what-is-rcv-template .wp-block-group[style*="saffron-lightest"]:hover,
	.what-is-rcv-template .wp-block-group[style*="biscay-lightest"]:hover,
	.what-is-rcv-template .wp-block-group[style*="cerise-red-lightest"]:hover,
	.what-is-rcv-template .wp-block-button .wp-element-button:hover {
		transform: none;
	}
	
	.what-is-rcv-template .wpforms-submit:hover {
		transform: none;
	}
}

/* GLOBAL OVERFLOW SAFETY RULES */
/* Additional safeguards to prevent any viewport overflow */
.what-is-rcv-template {
	overflow-x: hidden;
	max-width: 100vw;
	box-sizing: border-box;
}

.what-is-rcv-template * {
	box-sizing: border-box;
}

/* Force any elements that might still overflow to stay within bounds */
.what-is-rcv-template > * {
	max-width: 100%;
	overflow-x: hidden;
}

/* Specific override for any inline styles that might cause overflow */
.what-is-rcv-template [style*="width"] {
	max-width: 100% !important;
}

/* Ensure images don't cause overflow */
.what-is-rcv-template img {
	max-width: 100%;
	height: auto;
}

/* Fix for any embedded content */
.what-is-rcv-template iframe,
.what-is-rcv-template embed,
.what-is-rcv-template object,
.what-is-rcv-template video {
	max-width: 100%;
}

/* Simple Full-Width Solution - Preserve Editor Padding, Enable Full Viewport Width */

/* Enable full-width backgrounds while preserving content padding */
body.page-id-127 .wp-block-group.is-style-fullscreen,
body.page-id-127 .wp-block-group.alignfull {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: none;
}

/* Prevent horizontal overflow while maintaining full-width design */
body.page-id-127 {
	overflow-x: hidden;
}

/* Ensure content within full-width sections respects your editor padding */
body.page-id-127 .wp-block-group.is-style-fullscreen > *,
body.page-id-127 .wp-block-group.alignfull > * {
	max-width: 100%;
	box-sizing: border-box;
}

/* Responsive safety for smaller screens */
@media (max-width: 768px) {
	body.page-id-127 .wp-block-group.is-style-fullscreen,
	body.page-id-127 .wp-block-group.alignfull {
		margin-left: 0;
		margin-right: 0;
		width: 100%;
	}
}