/**
 * Curved Header Section Block Styles
 *
 * @package made-to-thrive-2026-base
 * @since 1.0.0
 */

/* CSS Custom Properties */
:root {
	--curved-header-bg-color: #4C4C3B;
	--curved-header-text-white: #FFFFFF;
	--curved-header-heading-color: #D3B055;
	--curved-header-emphasis-color: #D3B055;
}

/* Main Container */
.curved-header-section {
	width: 100%;
	position: relative;
}

.curved-header-container {
	width: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
}

/* Curved Divider Wrapper */
.curved-header-divider-wrapper {
	width: 100%;
	position: relative;
	z-index: 2;
	max-width: 603px;
	margin: -135px auto -54px;
}

.curved-header-svg {
	width: 100%;
	height: auto;
	display: block;
	color: var(--curved-header-bg-color);
	fill: var(--curved-header-bg-color);
}

/* Ensure custom SVG inherits block background color */
.curved-header-custom-svg {
	color: inherit;
}

/* Ensure SVG text paths are visible with correct color */
.curved-header-custom-svg g[data-name] path,
.curved-header-custom-svg path {
	fill: #4c4c3b !important;
	visibility: visible !important;
}

/* Ensure SVG text paths are visible with correct color */
.curved-header-custom-svg g[data-name] path,
.curved-header-custom-svg path,
.curved-header-custom-svg g path {
	fill: #f8f2df !important;
	visibility: visible !important;
	display: block !important;
}

/* Ensure all SVG groups and paths are visible (opacity will be controlled by GSAP) */
.curved-header-svg g,
.curved-header-custom-svg g,
.curved-header-svg path,
.curved-header-custom-svg path,
.curved-header-svg text,
.curved-header-custom-svg text,
.curved-header-svg tspan,
.curved-header-custom-svg tspan {
	visibility: visible !important;
	display: block !important;
}

/* Remove any mask that might be hiding content */
.curved-header-svg [mask],
.curved-header-custom-svg [mask] {
	mask: none !important;
	-webkit-mask: none !important;
}


.curved-header-svg-wrapper {
	width: 100%;
	position: relative;
	display: block;
	min-height: 100px; /* Ensure it has some height */
	visibility: visible;
	opacity: 1;
}

.curved-header-svg-wrapper svg,
.curved-header-custom-svg {
	width: 100%;
	height: auto;
	display: block;
	max-width: 100%;
	visibility: visible;
	opacity: 1;
}

/* Ensure SVG paths are visible */
.curved-header-custom-svg path {
	fill: #F8F2DF !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Temporarily show SVG even if mask isn't working - remove after testing */
.curved-header-svg-wrapper svg {
	opacity: 1 !important;
	visibility: visible !important;
}

.curved-header-custom-svg g {
	opacity: 1 !important;
	visibility: visible !important;
}

/* Curved Text */
.curved-header-text {
	font-size: 30px;
	font-weight: 400;
	fill: #F8F2DF;
	text-transform: uppercase;
	letter-spacing: 0.15rem;
	font-family: 'Article', sans-serif;
	font-style: initial;
	opacity: 1;
}

/* Screen Reader Text */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* Content Section */
.curved-header-content-section {
	width: 100%;
	background-color: var(--curved-header-bg-color);
	padding: 1px 20px 70px;
	position: relative;
	z-index: 1;
	/* Clip overflow only on the bottom edge */
	overflow: visible;
	/* Use clip-path to allow overflow at top but clip at bottom */
	/* polygon: top-left, top-right, bottom-right, bottom-left */
	/* Allow overflow above by extending top points upward */
	clip-path: polygon(0 -1000px, 100% -1000px, 100% 100%, 0 100%);
}

.curved-header-content-section::before {
	content: '';
	position: absolute;
	top: -156px;
	left: 0;
	right: 0;
	height: 138.496px; /* Match SVG height (613.799 x 138.496) */
	background-color: var(--curved-header-bg-color);
	/* Arch path matching SVG dimensions: peaks at ~10% from top */
	z-index: 0;
	width: 743px;
	height: 511px;
	border-radius: 50%;
	margin: auto;
}

.curved-header-content-wrapper {
	max-width: 700px;
	margin: 0 auto;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 1;
}

/* Main Heading */
.curved-header-heading {
	margin: 0 0 20px;
	font-size: 35px;
	line-height: 41px;
	font-weight: 100;
	text-transform: uppercase;
	color: #C1B588!important;
	font-family: 'Sunrider';
	text-align: center;
	max-width: 600px;
}

/* Description */
.curved-header-description {
	margin: 0 0 25px;
	font-size: 16px;
	line-height: 22px;
	color: var(--curved-header-text-white);
	font-family: 'p22-mackinac-pro';
	text-align: center;
	max-width: 100%;
}

.curved-header-description p {
	margin: 0 0 15px;
}

.curved-header-description p:last-child {
	margin-bottom: 0;
}

/* Emphasis Line */
.curved-header-emphasis {
	margin: 0 0 20px;
	font-size: clamp(20px, 2.5vw, 28px);
	line-height: 1.3;
	font-style: italic;
	text-transform: uppercase;
	color: var(--curved-header-emphasis-color);
	text-align: center;
}

.curved-header-emphasis.script-style {
	font-family: 'Palmer Lake Print', serif;
	color: #C1B588!important;
	font-size: 29px;
	font-style: inherit;
	letter-spacing: -0.01rem;
	line-height: 39px;
}

/* Closing Line */
.curved-header-closing {
	margin: 0;
	font-size: 16px;
	line-height: 22px;
	color: var(--curved-header-text-white);
	font-family: 'p22-mackinac-pro';
	text-align: center;
}

/* Responsive Design - Tablet (768px - 1024px) */
@media (max-width: 1024px) {
	.curved-header-content-section {
		padding: 50px 20px;
	}

	.curved-header-content-wrapper {
		max-width: 800px;
	}
}

/* Responsive Design - Mobile (max-width: 767px) */
@media (max-width: 768px) {
.curved-header-content-section::before {
    content: '';
    position: absolute;
    top: -85px;
    left: 0;
    right: 0;
    background-color: var(--curved-header-bg-color);
    z-index: 0;
    width: 440px;
    height: 242px;
    border-radius: 50%;
    margin: auto;
}
.curved-header-svg-wrapper {
    width: 400px;
    position: relative;
    display: block;
    min-height: 90px;
    visibility: visible;
    opacity: 1;
    margin: -28px auto 26px;
}
}

/* Extra Small Devices (max-width: 480px) */
@media (max-width: 600px) {
	.curved-header-content-section {
		padding: 30px 15px;
	}

	.curved-header-heading {
		margin-bottom: 20px;
		font-size: 25px;
		line-height: 23px;
		margin: 20px auto 10px;
		padding: 0 10px;
	}

	.curved-header-description {
		margin-bottom: 20px;
	}

	.curved-header-emphasis {
		margin-bottom: 15px;
	}
}
@media (max-width:550px) {
	    .curved-header-svg-wrapper {
        width: 300px;
        position: relative;
        display: block;
        min-height: 65px;
        visibility: visible;
        opacity: 1;
        margin: -28px auto 26px;
    }
	    .curved-header-content-section::before {
        content: '';
        position: absolute;
        top: -52px;
        left: 0;
        right: 0;
        background-color: var(--curved-header-bg-color);
        z-index: 0;
        width: 382px;
        height: 248px;
        border-radius: 50%;
        margin: auto;
    }
}
/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.curved-header-text {
		fill: var(--curved-header-text-white);
		stroke: var(--curved-header-text-white);
		stroke-width: 0.5px;
	}

	.curved-header-heading,
	.curved-header-emphasis {
		text-decoration: underline;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	/* Animation will be disabled by JavaScript */
}

/* Print Styles */
@media print {
	.curved-header-section {
		page-break-inside: avoid;
	}

	.curved-header-svg {
		display: none;
	}

	.curved-header-content-section {
		background-color: #ffffff;
		padding: 20px;
		border: 1px solid #000000;
	}

	.curved-header-heading,
	.curved-header-emphasis {
		color: #000000;
	}

	.curved-header-description,
	.curved-header-closing {
		color: #000000;
	}
}

/* Support for block wrapper color classes */

.curved-header-section.has-text-color .curved-header-heading,
.curved-header-section.has-text-color .curved-header-emphasis,
.curved-header-section.has-text-color .curved-header-description,
.curved-header-section.has-text-color .curved-header-closing {
	color: inherit;
}

.curved-header-section.has-text-color .curved-header-text {
	fill: currentColor;
}

/* Focus styles for accessibility */
.curved-header-content-wrapper:focus-within {
	outline: 2px solid var(--curved-header-text-white);
	outline-offset: 4px;
	border-radius: 4px;
}

/* Ensure SVG scales properly on all devices */
.curved-header-svg {
	min-height: 230px;
}

@media (max-width: 768px) {
	.curved-header-svg {
		min-height: 60px;
	}
}

@media (max-width: 600px) {
	.curved-header-svg {
		min-height: 50px;
	}
}

