/* hub_fancy_heading — estilos propios (Epic Widgets). */

.ld-fancy-heading { position: relative; }
.ld-fancy-heading > ul,
.ld-fancy-heading > ol { margin: 0; padding: 0; list-style-position: inside; }

.ld-fh-element {
	display: inline-block;
	position: relative;
	margin-top: 0;
	margin-bottom: .5em;
	vertical-align: middle;
	transition: color .3s ease;
}
/* Más específico que .elementor-heading-title{margin:0} de Elementor (que carga después);
   sigue por debajo de los márgenes guardados (ld_inner_margin) en el CSS de cada página. */
.ld-fancy-heading > .ld-fh-element { margin-top: 0; margin-bottom: .5em; }
.ld-fh-element > :last-child { margin-bottom: 0; }
.ld-fh-element small { display: inline-block; }
.ld-fh-element.ws-nowrap { white-space: nowrap; }

/* Clases de heading usadas dentro del título no deben re-escalar el texto. */
.ld-fh-element .h1, .ld-fh-element .h2, .ld-fh-element .h3,
.ld-fh-element .h4, .ld-fh-element .h5, .ld-fh-element .h6 {
	margin: 0;
	font-size: 1em;
	font-weight: inherit;
	letter-spacing: normal;
	text-transform: inherit;
}

/* ---------- Texto con degradado ---------- */
.ld-gradient-heading {
	-webkit-background-clip: text !important;
	background-clip: text !important;
	-webkit-text-fill-color: transparent !important;
}
.ld-gradient-heading .split-unit,
.ld-gradient-heading .split-inner,
.ld-gradient-heading .lqd-highlight,
.ld-gradient-heading .lqd-highlight-txt {
	background: inherit;
	-webkit-background-clip: text;
	background-clip: text;
}

/* ---------- Contorno ---------- */
:where(.ld-fh-txt-outline) { -webkit-text-stroke: 2px #000; }
.ld-fh-txt-outline {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	color: transparent;
	-webkit-text-fill-color: transparent;
	opacity: 0;
	pointer-events: none;
	transition: opacity .6s cubic-bezier(.2, .9, .3, 1);
}
.ld-fh-outline-static .ld-fh-element { color: transparent; -webkit-text-fill-color: transparent; }
.ld-fh-outline-static .ld-fh-txt-outline,
.ld-fh-outline:not(.ld-fh-outline-static):hover .ld-fh-txt-outline { opacity: 1; }

/* ---------- Resaltado ---------- */
.ld-fh-element .lqd-highlight {
	display: inline-block;
	position: relative;
	padding: 0 .125em;
	background: inherit;
	color: inherit;
}
.ld-fh-element .lqd-highlight:only-child { padding: 0 .1em; }
.ld-fh-element .lqd-highlight-txt { position: relative; z-index: 1; background: inherit; }
:where(.ld-fh-element .lqd-highlight-inner) {
	left: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	background-color: var(--color-primary, var(--e-global-color-primary, #4452f2));
	color: var(--color-primary, var(--e-global-color-primary, #4452f2));
}
.ld-fh-element .lqd-highlight-inner {
	display: inline-block;
	position: absolute;
	z-index: 0;
	opacity: 0;
	transform-origin: left center;
	transition: transform .85s, opacity .85s, height .45s, bottom .45s;
	transition-timing-function: cubic-bezier(.3, .8, .35, 1);
	pointer-events: none;
}
.ld-fh-element .lqd-highlight-inner svg { display: none; }

/* Clásico: barra bajo el texto */
:where(.lqd-highlight-classic .lqd-highlight .lqd-highlight-inner) { height: .275em; }
.lqd-highlight-grow-left .lqd-highlight .lqd-highlight-inner { opacity: 1; transform: scaleX(0); }
.lqd-highlight-grow-bottom .lqd-highlight .lqd-highlight-inner { opacity: 1; transform: scaleY(0); transform-origin: center bottom; }
.lqd-highlight-fadein .lqd-highlight .lqd-highlight-inner { opacity: 0; }
.ld-fh-element.is-in-view .lqd-highlight .lqd-highlight-inner { opacity: 1; transform: none; }
.lqd-highlight-reset-onhover .lqd-highlight:hover .lqd-highlight-inner { height: 100% !important; bottom: 0 !important; }

/* Pincel */
:where(.lqd-highlight-custom .lqd-highlight .lqd-highlight-inner) {
	height: auto;
	bottom: -.5em;
	background: none;
}
.lqd-highlight-custom .lqd-highlight .lqd-highlight-inner {
	color: inherit;
	opacity: 1;
	transform: none;
}
:where(.lqd-highlight-custom .lqd-highlight .lqd-highlight-brush-svg) {
	position: relative;
	width: 100%;
	height: auto;
	max-height: .475em;
	fill: var(--color-primary, var(--e-global-color-primary, #4452f2));
}
.lqd-highlight-custom-1 .lqd-highlight .lqd-highlight-brush-svg-1,
.lqd-highlight-custom-2 .lqd-highlight .lqd-highlight-brush-svg-1,
.lqd-highlight-custom-2 .lqd-highlight .lqd-highlight-brush-svg-2,
.lqd-highlight-custom-3 .lqd-highlight .lqd-highlight-brush-svg-1,
.lqd-highlight-custom-4 .lqd-highlight .lqd-highlight-brush-svg-1,
.lqd-highlight-custom-5 .lqd-highlight .lqd-highlight-brush-svg-1 { display: block; }
.lqd-highlight-custom-2 .lqd-highlight .lqd-highlight-brush-svg-2 { position: absolute; left: 0; top: 35%; }
.lqd-highlight-custom-3 .lqd-highlight .lqd-highlight-brush-svg,
.lqd-highlight-custom-4 .lqd-highlight .lqd-highlight-brush-svg,
.lqd-highlight-custom-5 .lqd-highlight .lqd-highlight-brush-svg { max-height: none; }
.lqd-highlight-custom .lqd-highlight .lqd-highlight-brush-svg > path {
	clip-path: inset(0 100% 0 0);
	transition: clip-path .85s cubic-bezier(.22, .61, .36, 1);
	transition-delay: inherit;
}
.lqd-highlight-custom.is-in-view .lqd-highlight .lqd-highlight-brush-svg > path { clip-path: inset(0 0 0 0); }

/* ---------- Texto dividido (split) ---------- */
.ld-fh-element .split-unit { display: inline-block; vertical-align: top; }
.ld-fh-element .split-inner { display: inline-block; will-change: transform, opacity; }
.ld-fh-element .lqd-words.split-unit { white-space: nowrap; }
.ld-fh-element .lqd-lines.split-unit { display: block; white-space: nowrap; }
/* Máscara: recorta cada fragmento mientras entra (con holgura para descendentes). */
.mask-text .ld-fh-element:not(.epic-split-done) .split-unit {
	overflow: hidden;
	padding-bottom: .12em;
	margin-bottom: -.12em;
}

/* Evita el parpadeo del texto antes de dividirse; si el JS falla, aparece solo a los 2.5 s. */
@keyframes epic-fh-reveal { to { visibility: visible; } }
body:not(.elementor-editor-active) .lqd-el-has-inner-anim .ld-fh-element[data-split-text]:not(.epic-split-ready) {
	visibility: hidden;
	animation: epic-fh-reveal 0s linear 2.5s forwards;
}

@media (prefers-reduced-motion: reduce) {
	body:not(.elementor-editor-active) .lqd-el-has-inner-anim .ld-fh-element[data-split-text]:not(.epic-split-ready) { visibility: visible; animation: none; }
	.ld-fh-element .lqd-highlight-inner,
	.lqd-highlight-custom .lqd-highlight .lqd-highlight-brush-svg > path { transition: none !important; }
	.ld-fh-element .lqd-highlight .lqd-highlight-inner { opacity: 1; transform: none; }
	.lqd-highlight-custom .lqd-highlight .lqd-highlight-brush-svg > path { clip-path: inset(0 0 0 0); }
}
