/* =====================================================================
   MCW Heading Widget — isolated under .mcw-hd-wrapper
   ===================================================================== */

.mcw-hd-wrapper { display: block; width: 100%; }

.mcw-hd-wrapper .mcw-hd {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
	align-items: var(--mcw-hd-items, center);
	--mcw-hd-items: center;
}

/* ---------------------------------------------------------------------
   EYEBROW
   --------------------------------------------------------------------- */
.mcw-hd-wrapper .mcw-hd__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mcw-primary) !important;
	line-height: 1;
}

/* Pill variant — eyebrow becomes a colored badge */
.mcw-hd-wrapper .mcw-hd--pill .mcw-hd__eyebrow {
	padding: 8px 16px;
	background: var(--mcw-primary-soft);
	border-radius: var(--mcw-radius-pill);
	letter-spacing: 0.12em;
}

.mcw-hd-wrapper .mcw-hd__eyebrow-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	background: currentColor;
	border-radius: 50%;
	position: relative;
}

.mcw-hd-wrapper .mcw-hd__eyebrow-dot::after {
	content: '';
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.35;
	animation: mcw-hd-pulse 1.8s ease-out infinite;
}

@keyframes mcw-hd-pulse {
	0%   { transform: scale(0.7); opacity: 0.45; }
	70%  { transform: scale(2);   opacity: 0; }
	100% { transform: scale(2);   opacity: 0; }
}

/* ---------------------------------------------------------------------
   TITLE
   --------------------------------------------------------------------- */
.mcw-hd-wrapper .mcw-hd__title {
	margin: 0;
	font-size: clamp(1.875rem, 3.6vw, 2.75rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--mcw-text) !important;
	position: relative;
}

/* Highlighted word — accent color only */
.mcw-hd-wrapper .mcw-hd__hl {
	position: relative;
	color: var(--mcw-primary) !important;
	white-space: nowrap;
}

/* Optional soft underline scribble — only when --underline modifier present */
.mcw-hd-wrapper .mcw-hd__hl--underline {
	z-index: 0;
}

.mcw-hd-wrapper .mcw-hd__hl--underline::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.06em;
	height: 0.32em;
	background: rgba(211, 47, 47, 0.22);
	z-index: -1;
	border-radius: 6px;
	transform: skewX(-8deg);
}

/* DOT variant — colored dot before title */
.mcw-hd-wrapper .mcw-hd--dot .mcw-hd__title {
	display: inline-flex;
	align-items: center;
	gap: 14px;
}

.mcw-hd-wrapper .mcw-hd--dot .mcw-hd__title::before {
	content: '';
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--mcw-primary);
	flex-shrink: 0;
	box-shadow: 0 0 0 6px rgba(211, 47, 47, 0.12);
}

/* ---------------------------------------------------------------------
   DECORATIVE UNDERLINE
   --------------------------------------------------------------------- */
.mcw-hd-wrapper .mcw-hd__deco {
	display: block;
	width: 56px;
	height: 4px;
	background: var(--mcw-primary);
	border-radius: 4px;
	margin-top: 4px;
	transform-origin: left center;
	position: relative;
	overflow: hidden;
}

.mcw-hd-wrapper .mcw-hd__deco::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient( 90deg, transparent, rgba(255,255,255,0.6), transparent );
	transform: translateX(-100%);
	animation: mcw-hd-shimmer 3s ease-in-out infinite;
	animation-delay: 0.8s;
}

@keyframes mcw-hd-shimmer {
	0%, 60% { transform: translateX(-100%); }
	100%    { transform: translateX(200%); }
}

/* Underline alignment follows the flex align-items via --mcw-hd-items */
.mcw-hd-wrapper .mcw-hd__deco { align-self: var(--mcw-hd-items, center); }

/* ---------------------------------------------------------------------
   SUBTITLE
   --------------------------------------------------------------------- */
.mcw-hd-wrapper .mcw-hd__subtitle {
	margin: 4px 0 0 0;
	font-size: 17px;
	line-height: 1.6;
	color: var(--mcw-text-muted) !important;
}

/* ---------------------------------------------------------------------
   ANIMATION VARIANTS (override base .mcw-reveal when needed)
   --------------------------------------------------------------------- */
html.mcw-anim-ready .mcw-hd-wrapper .mcw-hd--anim-fade-in .mcw-reveal {
	transform: none;
}

html.mcw-anim-ready .mcw-hd-wrapper .mcw-hd--anim-split .mcw-hd__title {
	overflow: hidden;
	display: inline-block;
}

html.mcw-anim-ready .mcw-hd-wrapper .mcw-hd--anim-split .mcw-hd__title.mcw-reveal {
	clip-path: inset(0 100% 0 0);
	opacity: 1;
	transform: none;
	transition: clip-path 0.9s var(--mcw-ease);
}

html.mcw-anim-ready .mcw-hd-wrapper .mcw-hd--anim-split .mcw-hd__title.mcw-reveal.is-visible {
	clip-path: inset(0 0 0 0);
}

/* ---------------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 640px) {
	.mcw-hd-wrapper .mcw-hd { gap: 10px; }
	.mcw-hd-wrapper .mcw-hd__eyebrow { font-size: 12px; letter-spacing: 0.12em; }
	.mcw-hd-wrapper .mcw-hd__subtitle { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
	.mcw-hd-wrapper .mcw-hd__deco::after,
	.mcw-hd-wrapper .mcw-hd__eyebrow-dot::after { animation: none !important; }
}
