/**
 * Elementor Hover Tiles - Frontend Styles
 *
 * Dynamic per-instance values (duration, easing, colors, sizes) are supplied
 * via CSS custom properties written inline on the wrapper element by the
 * widget's render() method. This file only contains structural / animation
 * rules so it can be safely cached and shared by every instance of the
 * widget on the page.
 */

.eht-hover-tile {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	isolation: isolate;
	-webkit-tap-highlight-color: transparent;

	/* Fallback custom property defaults (overridden inline per-widget) */
	--eht-duration: 500ms;
	--eht-easing: ease;
	--eht-content-delay: 100ms;
	--eht-overlay-color: #D9232E;
	--eht-overlay-opacity: 0.88;
	--eht-overlay-normal-size: 52px;
	--eht-overlay-hover-size: 100%;
}

.eht-hover-tile * {
	box-sizing: border-box;
}

/* Background image layer */
.eht-background {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
	transition: transform var(--eht-duration) var(--eht-easing);
	will-change: transform;
}

.eht-hover-tile[data-zoom="yes"]:hover .eht-background,
.eht-hover-tile[data-zoom="yes"]:focus-within .eht-background {
	transform: scale(1.08);
}

/* Overlay wrapper - this is the element that grows on hover */
.eht-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	top: auto;
	width: 100%;
	height: var(--eht-overlay-normal-size);
	z-index: 2;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: height var(--eht-duration) var(--eht-easing);
}

/* Tinted background painted on a pseudo element so it never affects the
   opacity of the hover content sitting on top of it. */
.eht-overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--eht-overlay-color);
	opacity: var(--eht-overlay-opacity);
	z-index: 0;
}

.eht-hover-tile:hover .eht-overlay,
.eht-hover-tile:focus-within .eht-overlay,
.eht-hover-tile.eht-touch-active .eht-overlay {
	height: var(--eht-overlay-hover-size);
}

/* ----- Direction: Top to Bottom ----- */
.eht-hover-tile[data-direction="ttb"] .eht-overlay {
	top: 0;
	bottom: auto;
}

/* ----- Direction: Left to Right / Right to Left (grow horizontally) ----- */
.eht-hover-tile[data-direction="ltr"] .eht-overlay,
.eht-hover-tile[data-direction="rtl"] .eht-overlay {
	top: 0;
	bottom: 0;
	height: 100%;
	width: var(--eht-overlay-normal-size);
	transition: width var(--eht-duration) var(--eht-easing);
}

.eht-hover-tile[data-direction="ltr"] .eht-overlay {
	left: 0;
	right: auto;
}

.eht-hover-tile[data-direction="rtl"] .eht-overlay {
	right: 0;
	left: auto;
}

.eht-hover-tile[data-direction="ltr"]:hover .eht-overlay,
.eht-hover-tile[data-direction="ltr"]:focus-within .eht-overlay,
.eht-hover-tile[data-direction="ltr"].eht-touch-active .eht-overlay,
.eht-hover-tile[data-direction="rtl"]:hover .eht-overlay,
.eht-hover-tile[data-direction="rtl"]:focus-within .eht-overlay,
.eht-hover-tile[data-direction="rtl"].eht-touch-active .eht-overlay {
	width: var(--eht-overlay-hover-size);
	height: 100%;
}

/* Hover content block (title / description / button) */
.eht-hover-content {
	position: relative;
	z-index: 1;
	width: 100%;
	text-align: center;
}

/* Each element animates independently, with its own staggered delay
   (--eht-title-delay / --eht-desc-delay / --eht-btn-delay), so title,
   description and button can each use a different animation style and
   reveal one after another rather than all moving together. */
.eht-title {
	margin: 0 0 10px;
	color: #ffffff;
	opacity: 0;
	transition: opacity var(--eht-duration) var(--eht-easing) var(--eht-title-delay),
		transform var(--eht-duration) var(--eht-easing) var(--eht-title-delay);
}

.eht-description {
	margin: 0 0 16px;
	color: #ffffff;
	opacity: 0;
	transition: opacity var(--eht-duration) var(--eht-easing) var(--eht-desc-delay),
		transform var(--eht-duration) var(--eht-easing) var(--eht-desc-delay);
}

/* Starting transform for each animation style, applied per-element based
   on the widget's Title / Description / Button Animation controls. */
.eht-hover-tile[data-title-anim="fade"] .eht-title,
.eht-hover-tile[data-desc-anim="fade"] .eht-description,
.eht-hover-tile[data-button-anim="fade"] .eht-button {
	transform: none;
}

.eht-hover-tile[data-title-anim="fade-up"] .eht-title,
.eht-hover-tile[data-desc-anim="fade-up"] .eht-description,
.eht-hover-tile[data-button-anim="fade-up"] .eht-button {
	transform: translateY(20px);
}

.eht-hover-tile[data-title-anim="fade-down"] .eht-title,
.eht-hover-tile[data-desc-anim="fade-down"] .eht-description,
.eht-hover-tile[data-button-anim="fade-down"] .eht-button {
	transform: translateY(-20px);
}

.eht-hover-tile[data-title-anim="fade-left"] .eht-title,
.eht-hover-tile[data-desc-anim="fade-left"] .eht-description,
.eht-hover-tile[data-button-anim="fade-left"] .eht-button {
	transform: translateX(-30px);
}

.eht-hover-tile[data-title-anim="fade-right"] .eht-title,
.eht-hover-tile[data-desc-anim="fade-right"] .eht-description,
.eht-hover-tile[data-button-anim="fade-right"] .eht-button {
	transform: translateX(30px);
}

.eht-hover-tile[data-title-anim="zoom-in"] .eht-title,
.eht-hover-tile[data-desc-anim="zoom-in"] .eht-description,
.eht-hover-tile[data-button-anim="zoom-in"] .eht-button {
	transform: scale(0.6);
}

.eht-hover-tile[data-title-anim="zoom-out"] .eht-title,
.eht-hover-tile[data-desc-anim="zoom-out"] .eht-description,
.eht-hover-tile[data-button-anim="zoom-out"] .eht-button {
	transform: scale(1.4);
}

/* "None" - element is always visible, no hover animation at all. */
.eht-hover-tile[data-title-anim="none"] .eht-title,
.eht-hover-tile[data-desc-anim="none"] .eht-description,
.eht-hover-tile[data-button-anim="none"] .eht-button {
	opacity: 1;
	transform: none;
	transition: none;
}

/* Final (hovered) state - identical target for every animation style,
   since they all converge on fully visible / untransformed. */
.eht-hover-tile:hover .eht-title,
.eht-hover-tile:focus-within .eht-title,
.eht-hover-tile.eht-touch-active .eht-title,
.eht-hover-tile:hover .eht-description,
.eht-hover-tile:focus-within .eht-description,
.eht-hover-tile.eht-touch-active .eht-description {
	opacity: 1;
	transform: translate(0, 0) scale(1);
}

.eht-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
	background-color: #008ACB;
	color: #ffffff;
	padding: 12px 26px;
	border-radius: 30px;
	font-weight: 600;
	line-height: 1;
	opacity: 0;
	transition: opacity var(--eht-duration) var(--eht-easing) var(--eht-btn-delay),
		transform var(--eht-duration) var(--eht-easing) var(--eht-btn-delay),
		background-color var(--eht-duration) var(--eht-easing),
		color var(--eht-duration) var(--eht-easing);
}

.eht-hover-tile:hover .eht-button,
.eht-hover-tile:focus-within .eht-button,
.eht-hover-tile.eht-touch-active .eht-button {
	opacity: 1;
	transform: translate(0, 0) scale(1);
}

.eht-button:hover,
.eht-button:focus-visible {
	color: #ffffff;
}

.eht-button-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.eht-button-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Bottom bar (normal state trigger) */
.eht-bottom-bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 14px 20px;
	transition: opacity calc(var(--eht-duration) * 0.6) var(--eht-easing);
	pointer-events: none;
}

.eht-bottom-title {
	color: #ffffff;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.eht-bottom-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	flex-shrink: 0;
}

.eht-bottom-arrow svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.eht-hover-tile:hover .eht-bottom-bar,
.eht-hover-tile:focus-within .eht-bottom-bar,
.eht-hover-tile.eht-touch-active .eht-bottom-bar {
	opacity: 0;
}

/* Keyboard focus ring on the whole tile */
.eht-hover-tile:focus-visible {
	outline: 3px solid #008ACB;
	outline-offset: 2px;
}

.eht-button:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.eht-overlay,
	.eht-hover-content,
	.eht-background,
	.eht-bottom-bar,
	.eht-button {
		transition-duration: 1ms !important;
	}
}

/* Mobile: hover effect disabled, show a sensible static state */
.eht-hover-tile[data-mobile-disable="yes"] {
	--eht-static-mobile: 1;
}

@media (max-width: 767px) {
	.eht-hover-tile[data-mobile-disable="yes"] .eht-overlay {
		height: var(--eht-overlay-normal-size) !important;
		width: var(--eht-overlay-normal-size) !important;
	}

	.eht-hover-tile[data-mobile-disable="yes"][data-direction="ltr"] .eht-overlay,
	.eht-hover-tile[data-mobile-disable="yes"][data-direction="rtl"] .eht-overlay {
		height: 100% !important;
	}

	.eht-hover-tile[data-mobile-disable="yes"]:not([data-direction="ltr"]):not([data-direction="rtl"]) .eht-overlay {
		width: 100% !important;
	}

	.eht-hover-tile[data-mobile-disable="yes"] .eht-hover-content,
	.eht-hover-tile[data-mobile-disable="yes"] .eht-title,
	.eht-hover-tile[data-mobile-disable="yes"] .eht-description,
	.eht-hover-tile[data-mobile-disable="yes"] .eht-button,
	.eht-hover-tile[data-mobile-disable="yes"] .eht-bottom-bar {
		transition: none;
	}

	.eht-hover-tile[data-mobile-disable="yes"] .eht-title,
	.eht-hover-tile[data-mobile-disable="yes"] .eht-description,
	.eht-hover-tile[data-mobile-disable="yes"] .eht-button {
		opacity: 1 !important;
		transform: none !important;
	}
}
