/**
 * GSAP Ducktoy — botón «volver arriba» y precargador.
 *
 * Las medidas y colores configurables llegan como CSS en línea desde
 * Site_Features. Aquí solo va lo fijo.
 */

/* Volver arriba */

.wcf-scroll-to-top {
	position: fixed;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(15px);
	transition: all 0.2s linear;
}

.wcf-scroll-to-top.show-scroll-to-top {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.wcf-scroll-to-top:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.wcf-scroll-to-top.scroll-to-circle {
	border-radius: 50%;
}

.wcf-scroll-to-top svg {
	width: 1em;
	height: 1em;
}

.wcf-scroll-to-top .gsapdt-progress {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.wcf-scroll-to-top .gsapdt-progress path {
	fill: none;
	stroke: #1f2029;
	stroke-width: 4;
}

/* Precargador */

body.wcf-preloader-active {
	overflow: hidden !important;
}

.wcf-preloader {
	position: fixed;
	inset: 0;
	z-index: 9999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	/* Red de seguridad: si el script de retirada no llega a ejecutarse, el
	   precargador no puede dejar la web tapada. */
	animation: gsapdt-preloader-failsafe 0s linear 8s forwards;
}

@keyframes gsapdt-preloader-failsafe {
	to {
		visibility: hidden;
		opacity: 0;
	}
}

/*
 * Diseños del precargador. Los mismos 18 que ofrece Animation Addons Pro, con
 * su tamaño, colores y ritmo, reescritos desde cero. --color y --color2 son los
 * colores principal y secundario de Ajustes del sitio.
 */

.gsapdt-pl {
	position: relative;
	box-sizing: border-box;
}

.gsapdt-pl *,
.gsapdt-pl *::before,
.gsapdt-pl *::after,
.gsapdt-pl::before,
.gsapdt-pl::after {
	box-sizing: border-box;
}

@keyframes gsapdt-spin {
	to { transform: rotate(360deg); }
}

/* Whirlpool: tres anillos finos concéntricos, girando a distinta velocidad. */
.gsapdt-pl--whirlpool,
.gsapdt-pl--whirlpool::before,
.gsapdt-pl--whirlpool::after {
	border: 1px solid var(--color2, #ccc);
	border-left-color: transparent;
	border-radius: 50%;
	animation: gsapdt-spin 2.3s linear infinite;
}
.gsapdt-pl--whirlpool { width: 31px; height: 31px; }
.gsapdt-pl--whirlpool::before,
.gsapdt-pl--whirlpool::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
}
.gsapdt-pl--whirlpool::before { width: 43px; height: 43px; margin: -22px 0 0 -22px; animation-duration: 1.15s; }
.gsapdt-pl--whirlpool::after { width: 55px; height: 55px; margin: -28px 0 0 -28px; }

/* Floating circles: ocho puntos en corro que se encienden en cadena. */
.gsapdt-pl--floating-circles { width: 48px; height: 48px; }
.gsapdt-pl--floating-circles span {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	margin: -4px 0 0 -4px;
	border-radius: 50%;
	background: #fff;
	transform: rotate(calc(var(--i) * 45deg)) translateY(-20px);
	animation: gsapdt-fade-dot 0.672s linear infinite;
	/* Retardos negativos: el precargador dura menos de un segundo y no puede
	   pasarlo esperando a que empiece la animación. */
	animation-delay: calc(var(--i) * 0.084s - 0.672s);
}
@keyframes gsapdt-fade-dot {
	from { background-color: var(--color2, #000); }
	to   { background-color: #fff; }
}

/* Eight spinning: dos anillos en forma de 8 recorridos por un arco. */
.gsapdt-pl--eight-spinning {
	width: 72px;
	height: 39px;
	animation: gsapdt-spin 6.9s linear infinite;
}
.gsapdt-pl--eight-spinning span {
	position: absolute;
	top: 0;
	width: 39px;
	height: 39px;
	border: 6px solid var(--color2, #e5e5e5);
	border-radius: 50%;
}
.gsapdt-pl--eight-spinning span:first-child { left: 0; }
.gsapdt-pl--eight-spinning span:last-child { right: 0; }
.gsapdt-pl--eight-spinning span::after {
	content: "";
	position: absolute;
	inset: -6px;
	border: 6px solid transparent;
	border-top-color: var(--color, #574357);
	border-radius: 50%;
	animation: gsapdt-spin 1.15s linear infinite, gsapdt-eight-blink 2.3s linear infinite;
}
.gsapdt-pl--eight-spinning span:last-child::after {
	animation-direction: reverse, normal;
	animation-delay: 0s, -1.15s;
}
@keyframes gsapdt-eight-blink {
	0%, 49% { opacity: 1; }
	50%, 100% { opacity: 0; }
}

/* Double torus: anillo de borde doble abierto por arriba. */
.gsapdt-pl--double-torus {
	width: 49px;
	height: 49px;
	border: 4px double var(--color, #000);
	border-top-color: transparent;
	border-radius: 50%;
	animation: gsapdt-spin 0.96s linear infinite;
}

/* Tube tunnel: un aro que crece desde el centro. */
.gsapdt-pl--tube-tunnel {
	width: 49px;
	height: 49px;
	border: 4px solid var(--color, #000);
	border-radius: 50%;
	animation: gsapdt-grow 1.035s linear infinite;
}
@keyframes gsapdt-grow {
	0%   { transform: scale(0); }
	90%  { transform: scale(0.7); }
	100% { transform: scale(1); }
}

/* Speeding wheel: aro con dos arcos opuestos girando rápido. */
.gsapdt-pl--speeding-wheel {
	width: 49px;
	height: 49px;
	border: 3px solid transparent;
	border-top-color: var(--color, #000);
	border-bottom-color: var(--color, #000);
	border-radius: 50%;
	animation: gsapdt-spin 0.575s linear infinite;
}

/* Loading: dos círculos grandes que laten alternados. */
.gsapdt-pl--loading { display: flex; width: 97px; }
.gsapdt-pl--loading span {
	flex: none;
	width: 49px;
	height: 49px;
	border-radius: 50%;
	background: var(--color, #ff5954);
	animation: gsapdt-pulse 1.15s ease-in-out infinite;
}
.gsapdt-pl--loading span + span {
	margin-left: -10px;
	background: var(--color2, #00a8ce);
	animation-delay: 0.58s;
}
@keyframes gsapdt-pulse {
	70% { transform: scale(0.5); }
}

/* Dot loading: una fila de puntos que avanza hacia la derecha. */
.gsapdt-pl--dot-loading { display: flex; gap: 0; width: 97px; }
.gsapdt-pl--dot-loading span {
	flex: none;
	width: 19px;
	height: 19px;
	margin-right: 0;
	border-radius: 50%;
	background: var(--color, #2a2b26);
	animation: gsapdt-dots-shift 0.58s linear infinite;
}
.gsapdt-pl--dot-loading span:first-child { opacity: 0; transform: translateX(-19px); animation-name: gsapdt-dots-in; }
.gsapdt-pl--dot-loading span:last-child { animation-name: gsapdt-dots-out; }
@keyframes gsapdt-dots-in  { to { transform: translateX(19px); opacity: 1; } }
@keyframes gsapdt-dots-shift { to { transform: translateX(19px); } }
@keyframes gsapdt-dots-out { to { transform: translateX(39px); opacity: 0; } }

/* Fountain text: la palabra "Loading" con letras que laten en cadena. */
.gsapdt-pl--fountainTextG { display: flex; justify-content: center; width: 300px; }
.gsapdt-pl--fountainTextG span {
	font-size: 31px;
	line-height: 1;
	color: var(--color, #000);
	transform: scale(0.5);
	animation: gsapdt-letter 2.09s linear infinite;
	animation-delay: calc(var(--i) * 0.148s - 2.09s);
}
@keyframes gsapdt-letter {
	from { transform: scale(1); color: var(--color, #000); }
	to   { transform: scale(0.5); color: var(--color2, #fff); }
}

/* Circle loading: disco con una onda que se expande desde el centro. */
.gsapdt-pl--circle-loading {
	width: 49px;
	height: 49px;
	border-radius: 50%;
	background: var(--color, #d3d3d3);
}
.gsapdt-pl--circle-loading::before {
	content: "";
	position: absolute;
	inset: 0;
	border: 10px solid var(--color2, #fff);
	border-radius: 50%;
	animation: gsapdt-ripple 1.15s ease-in-out infinite;
}
@keyframes gsapdt-ripple {
	from { transform: scale(0); }
	to   { transform: scale(1); }
}

/* Dot circle rotator: tres puntos en línea que giran media vuelta y paran. */
.gsapdt-pl--dot-circle-rotator,
.gsapdt-pl--dot-circle-rotator::before,
.gsapdt-pl--dot-circle-rotator::after {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--color, #000);
}
.gsapdt-pl--dot-circle-rotator { animation: gsapdt-half-turn 1.15s ease-in-out infinite; }
.gsapdt-pl--dot-circle-rotator::before,
.gsapdt-pl--dot-circle-rotator::after { content: ""; position: absolute; top: 0; }
.gsapdt-pl--dot-circle-rotator::before { left: -24px; }
.gsapdt-pl--dot-circle-rotator::after { left: 24px; }
@keyframes gsapdt-half-turn {
	0%       { transform: rotate(0deg); }
	50%, 100% { transform: rotate(180deg); }
}

/* Bubbling: tres burbujas que suben, crecen y cambian de color. */
.gsapdt-pl--bubblingG {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 78px;
	height: 49px;
}
.gsapdt-pl--bubblingG span {
	flex: none;
	width: 10px;
	height: 10px;
	margin: 0 auto;
	border-radius: 50%;
	background: var(--color, #000);
	animation: gsapdt-bubble 1.5s ease infinite alternate;
	animation-delay: calc(var(--i) * 0.45s);
}
@keyframes gsapdt-bubble {
	from { width: 10px; height: 10px; background-color: var(--color, #000); transform: translateY(0); }
	to   { width: 23px; height: 23px; background-color: var(--color2, #fff); transform: translateY(-20px); }
}

/* Coffee: taza con asa y tres hilos de vapor. */
.gsapdt-pl--coffee {
	width: 39px;
	height: 49px;
	margin-top: 40px;
	border-radius: 0 0 5px 5px;
	background: linear-gradient(to bottom left, var(--color, #f7941e), var(--color, #c26c07));
}
.gsapdt-pl--coffee::before {
	content: "";
	position: absolute;
	top: 5px;
	right: -15px;
	width: 10px;
	height: 24px;
	border: 5px solid var(--color, #f7941e);
	border-left: 0;
	border-radius: 0 12px 12px 0;
}
.gsapdt-pl--coffee::after {
	content: "";
	position: absolute;
	top: -29px;
	left: 0;
	width: 5px;
	height: 29px;
	border-radius: 4px;
	background: #e1e1e1;
	box-shadow: 34px 0 0 #e1e1e1, 17.5px -15px 0 #e1e1e1;
	animation: gsapdt-steam 3.45s ease infinite;
}
@keyframes gsapdt-steam {
	to { top: -39px; opacity: 0.25; }
}

/* Orbit: tres anillos que giran en planos distintos. */
.gsapdt-pl--orbit-loading { width: 62px; height: 62px; perspective: 780px; }
.gsapdt-pl--orbit-loading span {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	animation: 1.15s linear infinite;
}
.gsapdt-pl--orbit-loading span:nth-child(1) { border-bottom: 3px solid var(--color, #000); animation-name: gsapdt-orbit-1; }
.gsapdt-pl--orbit-loading span:nth-child(2) { border-right: 3px solid var(--color, #000); animation-name: gsapdt-orbit-2; }
.gsapdt-pl--orbit-loading span:nth-child(3) { border-top: 3px solid var(--color, #000); animation-name: gsapdt-orbit-3; }
@keyframes gsapdt-orbit-1 {
	from { transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg); }
	to   { transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); }
}
@keyframes gsapdt-orbit-2 {
	from { transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg); }
	to   { transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); }
}
@keyframes gsapdt-orbit-3 {
	from { transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg); }
	to   { transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg); }
}

/* Battery: pila que se llena y se vacía. */
.gsapdt-pl--battery {
	width: 36px;
	height: 72px;
	border-radius: 1.5px;
	background: #fff;
	box-shadow: 0 0 0 3.2px #425c77;
}
.gsapdt-pl--battery::before {
	content: "";
	position: absolute;
	top: -8.6px;
	left: 9px;
	width: 18px;
	height: 5.4px;
	border-radius: 3px;
	background: #425c77;
}
.gsapdt-pl--battery span {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	top: 72px;
	background: var(--color, #71fb85);
	animation: gsapdt-charge 2.59s ease infinite;
}
.gsapdt-pl--battery::after {
	/* Brillo diagonal sobre la carga. */
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top right, rgba(255, 255, 255, 0.32) 50%, transparent 50%);
}
@keyframes gsapdt-charge {
	0%, 100% { top: 72px; }
	70%      { top: 18px; }
	90%, 95% { top: 0; }
}

/* Equalizer: seis barras finas que suben y bajan desfasadas. */
.gsapdt-pl--equalizer { width: 88px; height: 63px; }
.gsapdt-pl--equalizer span {
	position: absolute;
	bottom: 0;
	left: calc(var(--i) * 14.6px);
	width: 2px;
	height: 10px;
	background: var(--color, #000);
	animation: gsapdt-eq-a 1.15s ease infinite;
	animation-delay: calc(var(--i) * 0.116s);
}
.gsapdt-pl--equalizer span:nth-child(even) { animation-name: gsapdt-eq-b; }
.gsapdt-pl--equalizer span:nth-child(3),
.gsapdt-pl--equalizer span:nth-child(5) { animation-timing-function: ease-in-out; }
.gsapdt-pl--equalizer span:nth-child(4) { animation-timing-function: ease-in; }
@keyframes gsapdt-eq-a {
	0%, 100% { height: 10px; }
	50%      { height: 49px; }
}
@keyframes gsapdt-eq-b {
	0%, 100% { height: 19px; }
	50%      { height: 63px; }
}

/* Square swapping: dos rombos que se cruzan con un destello en medio. */
.gsapdt-pl--square-swapping { width: 19px; height: 19px; transform: rotate(-45deg); }
.gsapdt-pl--square-swapping span {
	position: absolute;
	width: 19px;
	height: 19px;
	animation: gsapdt-swap 0.92s cubic-bezier(0.445, 0.05, 0.55, 0.95) infinite alternate;
}
.gsapdt-pl--square-swapping span:nth-child(1) { right: 0; bottom: 0; background: var(--color, #54fad4); animation-direction: alternate-reverse; }
.gsapdt-pl--square-swapping span:nth-child(2) { top: 0; left: 0; background: var(--color2, #e96f92); }
.gsapdt-pl--square-swapping span:nth-child(3) {
	inset: 0;
	z-index: 2;
	background: rgba(0, 0, 0, 0.5);
	animation: gsapdt-blend 0.92s ease-in infinite;
}
@keyframes gsapdt-swap {
	from { transform: translate(-10px, -10px); }
	to   { transform: translate(10px, 10px); }
}
@keyframes gsapdt-blend {
	0%, 100% { transform: scale(0.01); }
	50%      { transform: scale(1); }
}

/* Jackhammer: tres barras que golpean arriba y abajo. */
.gsapdt-pl--jackhammer,
.gsapdt-pl--jackhammer::before,
.gsapdt-pl--jackhammer::after {
	width: 5px;
	height: 49px;
	border-radius: 5px;
	background: var(--color, #000);
	animation: gsapdt-hammer 1.15s ease infinite alternate;
}
.gsapdt-pl--jackhammer { animation-name: gsapdt-hammer-mid; animation-delay: 0.29s; }
.gsapdt-pl--jackhammer::before,
.gsapdt-pl--jackhammer::after { content: ""; position: absolute; top: 0; }
.gsapdt-pl--jackhammer::before { left: -10px; }
.gsapdt-pl--jackhammer::after { left: 10px; animation-delay: 0.58s; }
@keyframes gsapdt-hammer {
	from { transform: translateY(19px); }
	to   { transform: translateY(-19px); }
}
@keyframes gsapdt-hammer-mid {
	from { transform: translateY(29px); }
	to   { transform: translateY(-19px); }
}

@media (prefers-reduced-motion: reduce) {
	.gsapdt-pl,
	.gsapdt-pl *,
	.gsapdt-pl::before,
	.gsapdt-pl::after,
	.gsapdt-pl *::after {
		animation-duration: 4s !important;
	}
}
