/* ==========================================================================
   NT Scroll To Top — círculo blanco con anillo de progreso + porcentaje
   Identidad visual: marrón #6d4a37 · acento dorado #d6b161
   Sin dependencias.
   ========================================================================== */

#scroll-top {
	display: none !important;
}

.nt-scrolltop {
	position: fixed;
	right: 50px;
	bottom: 50px;
	width: 5rem;
	height: 5rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #ffffff;
	cursor: pointer;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 12px 30px rgba(109, 74, 55, .25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(40px);
	transition: opacity .4s ease, transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, visibility .4s;
}

.nt-scrolltop.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.nt-scrolltop:hover {
	box-shadow: 0 18px 38px rgba(214, 177, 97, .45);
	transform: translateY(-4px);
}

.nt-scrolltop:active {
	transform: translateY(-1px) scale(.96);
}

.nt-scrolltop:focus-visible {
	outline: 2px solid #d6b161;
	outline-offset: 3px;
}

/* ---------- Anillo de progreso ---------- */
.nt-scrolltop__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.nt-scrolltop__track {
	fill: none;
	stroke: rgba(109, 74, 55, .14);
	stroke-width: 3;
}

.nt-scrolltop__progress {
	fill: none;
	stroke: #6d4a37;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 150.8; /* 2 * PI * r(24) */
	stroke-dashoffset: 150.8;
	transition: stroke-dashoffset .15s linear, stroke .35s ease;
}

.nt-scrolltop:hover .nt-scrolltop__progress {
	stroke: #d6b161;
}

/* ---------- Centro: porcentaje + flecha (cross-fade en hover) ---------- */
.nt-scrolltop__center {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nt-scrolltop__percent,
.nt-scrolltop__icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity .3s ease, transform .3s ease;
}

.nt-scrolltop__percent {
	font-weight: 800;
	font-size: 16px;
	color: #6d4a37;
	opacity: 1;
	transform: scale(1);
}

.nt-scrolltop__icon {
	color: #d6b161;
	font-size: 18px;
	opacity: 0;
	transform: scale(.6);
}

.nt-scrolltop:hover .nt-scrolltop__percent {
	opacity: 0;
	transform: scale(.6);
}

.nt-scrolltop:hover .nt-scrolltop__icon {
	opacity: 1;
	transform: scale(1);
}

/* idle pulse sutil para llamar la atención sin ser ruidoso */
.nt-scrolltop.is-visible {
	animation: ntScrollTopPulse 3.2s ease-in-out infinite;
}

.nt-scrolltop:hover {
	animation: none;
}

@keyframes ntScrollTopPulse {
	0%, 100% { box-shadow: 0 12px 30px rgba(109, 74, 55, .25), 0 0 0 0 rgba(214, 177, 97, .4); }
	50%      { box-shadow: 0 12px 30px rgba(109, 74, 55, .25), 0 0 0 10px rgba(214, 177, 97, 0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 575px) {
	.nt-scrolltop {
		width: 3.4rem;
		height: 3.4rem;
		right: 18px;
		bottom: 18px;
	}
	.nt-scrolltop__percent { font-size: 12px; }
	.nt-scrolltop__icon { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.nt-scrolltop,
	.nt-scrolltop__percent,
	.nt-scrolltop__icon,
	.nt-scrolltop__progress {
		animation: none !important;
		transition-duration: .01ms !important;
	}
}
