/**
 * Handwritten Title Block Styles
 *
 * @package made-to-thrive-2026-base
 * @since 1.0.0
 */

/* CSS Custom Properties */
:root {
	--handwritten-title-bg-dark: #69472e;
	--handwritten-title-bg-cream: #faf9f6;
	--handwritten-title-text-gold: #c5a36d;
	--handwritten-title-text-dark: #4c4c3b;
}

/* Main Container */
.handwritten-title {
	width: 100%;
	position: relative;
	padding: 60px 20px;
	overflow: visible;
}

.handwritten-title-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	overflow: visible;
}

/* Curved Title Wrapper */
.handwritten-title-curved-wrapper {
	width: 100%;
	position: relative;
	z-index: 2;
	max-width: 444px;
	margin: -129px auto -136px;
}

.handwritten-title-svg {
	width: 100%;
	height: auto;
	display: block;
	color: var(--handwritten-title-bg-dark);
	fill: var(--handwritten-title-bg-dark);
	min-height: 130px;
}

.handwritten-title-image {
	width: 100%;
	height: auto;
	display: block;
	max-width: 100%;
}

/* Curved Text */
.handwritten-title-text {
	font-size: clamp(14px, 2vw, 24px);
	font-weight: 400;
	fill: var(--handwritten-title-text-gold);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-family: 'Article', sans-serif;
}

/* 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;
}

/* Handwritten Subtitle Wrapper */
.handwritten-title-subtitle-wrapper {
	width: 100%;
	position: relative;
	z-index: 1;
	margin-top: 0;
	text-align: center;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: visible;
	padding: 0 0 0 332px;
	z-index: 3;
}

.handwritten-title-subtitle {
	max-width: 100%;
	width: auto;
	height: auto;
	display: block;
	overflow: visible;
}

.handwritten-title-subtitle path {
	fill: var(--handwritten-title-text-dark);
	stroke: var(--handwritten-title-text-dark);
}

/* Responsive Design - Tablet (768px - 1024px) */
@media (max-width: 1024px) {
	.handwritten-title {
		padding: 50px 20px 80px;
	}

	.handwritten-title-curved-wrapper {
		max-width: 450px;
		margin-top: -120px;
	}

	.handwritten-title-svg {
		min-height: 110px;
	}
}

/* Responsive Design - Mobile (max-width: 767px) */
@media (max-width: 768px) {
.handwritten-title-subtitle-wrapper {
	        padding: 0;
        width: 300px;
        margin: 0 0 0;
        height: 140px;
        position: relative;
}
	.handwritten-title-subtitle {
          max-width: 100%;
        width: auto;
        height: auto;
        display: block;
        overflow: visible;
        position: absolute;
        left: 138px;
        top: 30px;
}
	    .handwritten-title-curved-wrapper {
        max-width: 350px;
        margin-top: -120px;
    }
}

/* Extra Small Devices (max-width: 480px) */
@media (max-width: 480px) {

}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.handwritten-title-text {
		fill: var(--handwritten-title-text-gold);
		stroke: var(--handwritten-title-text-gold);
		stroke-width: 0.5px;
	}

	.handwritten-title-subtitle path {
		stroke-width: 2px;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.handwritten-title-subtitle path {
		/* Animation will be disabled by JavaScript */
		stroke-dasharray: none !important;
		stroke-dashoffset: 0 !important;
	}
}

/* Print Styles */
@media print {
	.handwritten-title {
		background: #ffffff;
		padding: 20px;
		border: 1px solid #000000;
	}

	.handwritten-title-svg {
		display: none;
	}

	.handwritten-title-text {
		fill: #000000;
	}

	.handwritten-title-subtitle path {
		fill: #000000;
		stroke: #000000;
	}
}

/* Support for block wrapper color classes */
.handwritten-title.has-background {
	/* Background color handled by wrapper */
}

.handwritten-title.has-text-color .handwritten-title-text {
	fill: currentColor;
}

.handwritten-title.has-text-color .handwritten-title-subtitle path {
	fill: currentColor;
	stroke: currentColor;
}

/* Focus styles for accessibility */
.handwritten-title-container:focus-within {
	outline: 2px solid var(--handwritten-title-text-gold);
	outline-offset: 4px;
	border-radius: 4px;
}

