/* Floating "back to top" — desktop only */
.scroll-to-top {
	display: none;
}

@media only screen and (min-width: 701px) {
	.scroll-to-top {
		position: fixed;
		right: 28px;
		bottom: 36px;
		z-index: 400;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: #0076b1;
		color: #fff;
		box-shadow: 0 4px 14px rgba(16, 82, 137, 0.35);
		cursor: pointer;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateY(16px) scale(0.85);
		transition:
			opacity 0.35s ease,
			visibility 0.35s ease,
			transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
			background-color 0.2s ease,
			box-shadow 0.2s ease;
	}

	.scroll-to-top.is-visible {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0) scale(1);
	}

	.scroll-to-top:hover,
	.scroll-to-top:focus {
		background: #12A3EB;
		box-shadow: 0 6px 18px rgba(16, 82, 137, 0.45);
		outline: none;
	}

	.scroll-to-top:active {
		transform: translateY(2px) scale(0.96);
	}

	.scroll-to-top__icon {
		width: 20px;
		height: 20px;
		display: block;
		transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.scroll-to-top:hover .scroll-to-top__icon,
	.scroll-to-top:focus .scroll-to-top__icon {
		transform: translateY(-3px);
		animation: scroll-to-top-bounce 0.7s ease infinite;
	}

	@keyframes scroll-to-top-bounce {
		0%, 100% {
			transform: translateY(-2px);
		}
		50% {
			transform: translateY(-6px);
		}
	}

	@media (prefers-reduced-motion: reduce) {
		.scroll-to-top,
		.scroll-to-top__icon {
			transition: none;
			animation: none;
		}

		.scroll-to-top:hover .scroll-to-top__icon,
		.scroll-to-top:focus .scroll-to-top__icon {
			animation: none;
			transform: none;
		}
	}
}
