/*
 * TRT Miami smooth motion system.
 * Internal pages only; loaded conditionally from functions.php.
 */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}

	body.trt-motion-ready:not(.elementor-editor-active) .trt-motion-item {
		opacity: 0;
		transform: translate3d(0, 18px, 0);
		transition:
			opacity 620ms cubic-bezier(.22, .61, .36, 1),
			transform 620ms cubic-bezier(.22, .61, .36, 1);
		transition-delay: var(--trt-motion-delay, 0ms);
		will-change: opacity, transform;
	}

	body.trt-motion-ready:not(.elementor-editor-active) .trt-motion-item.is-trt-visible {
		opacity: 1;
		transform: translate3d(0, 0, 0);
		will-change: auto;
	}

	body:not(.home) :is(
		.trt-page-section__card,
		.trt-clinical__card,
		.trt-page-article__inner,
		.trt-program-card,
		.trt-pricing-card,
		.trt-hcg-contact-slide__button,
		.trt-clinical__button,
		.trt-page-section__content a,
		.elementor-button
	) {
		transition:
			transform 260ms ease,
			box-shadow 260ms ease,
			border-color 260ms ease,
			filter 260ms ease,
			background-color 260ms ease;
	}

	body:not(.home) :is(
		.trt-page-section__media img,
		.trt-page-article__media img,
		.trt-clinical__featured
	) {
		transition: transform 480ms cubic-bezier(.22, .61, .36, 1);
	}

	@media (hover: hover) and (pointer: fine) {
		body:not(.home) :is(
			.trt-page-section__card,
			.trt-clinical__card,
			.trt-program-card,
			.trt-pricing-card
		):not(.trt-motion-item):hover,
		body.trt-motion-ready:not(.elementor-editor-active) :is(
			.trt-page-section__card,
			.trt-clinical__card,
			.trt-program-card,
			.trt-pricing-card
		).trt-motion-item.is-trt-visible:hover {
			transform: translateY(-3px);
			box-shadow: 0 18px 42px rgba(11, 41, 76, .12);
		}

		body:not(.home) :is(
			.trt-hcg-contact-slide__button,
			.trt-clinical__button,
			.elementor-button
		):hover {
			transform: translateY(-2px);
		}

		body:not(.home) :is(
			.trt-page-section__media,
			.trt-page-article__media
		):hover img {
			transform: scale(1.012);
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.trt-motion-item {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}