/**
 * Trainora Contact Card
 *
 * 1. Card and hover state
 * 2. Icon and text
 * 3. Reduced motion
 */

/* 1. Card and hover state */
.elementor-widget-trainora-contact-card,
.elementor-widget-trainora-contact-card > .elementor-widget-container {
	height: 100%;
}

.elementor .trn-contact-card {
	--trn-contact-ink: var(--inoforest-color-heading, #0e100f);
	--trn-contact-ease: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 26px;
	color: var(--inoforest-color-text, #4a504c);
	background: var(--inoforest-color-background, #fff);
	border: 1px solid var(--inoforest-color-border, #e4e1d8);
	border-radius: 32px;
	text-decoration: none;
	transition: transform var(--trn-contact-ease), box-shadow var(--trn-contact-ease), border-color var(--trn-contact-ease);
}

.elementor :is(.trn-contact-card:hover, a.trn-contact-card:focus-visible) {
	color: var(--inoforest-color-text, #4a504c);
	border-color: var(--trn-contact-ink);
	box-shadow: 0 8px 24px color-mix(in srgb, var(--trn-contact-ink) 8%, transparent);
	transform: translateY(-8px);
}

.elementor a.trn-contact-card:focus-visible {
	outline: 2px solid var(--inoforest-color-primary, #3b2fe0);
	outline-offset: 3px;
}

/* 2. Icon and text */
.trn-contact-card .trn-contact-card__icon {
	display: grid;
	place-items: center;
	width: 50px;
	height: 50px;
	margin-block-end: 24px;
	font-size: 1.3rem;
	line-height: 1;
	color: var(--trn-contact-ink);
	background: var(--inoforest-custom-surface-alt, #f4f2ec);
	border-radius: 16px;
	transition: background-color var(--trn-contact-ease), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

:is(.trn-contact-card:hover, a.trn-contact-card:focus-visible) .trn-contact-card__icon {
	background-color: var(--inoforest-color-accent, #d4ff3a);
	transform: rotate(-8deg);
}

.trn-contact-card .trn-contact-card__title {
	margin: 0 0 6px;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.02em;
	color: var(--trn-contact-ink);
}

.trn-contact-card .trn-contact-card__description {
	margin: 0 0 18px;
	font-size: 0.95rem;
	line-height: 1.7;
}

.trn-contact-card .trn-contact-card__value {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-block-start: auto;
	font-weight: 700;
	line-height: 1.7;
	color: var(--trn-contact-ink);
	overflow-wrap: anywhere;
}

.trn-contact-card :is(.trn-contact-card__icon, .trn-contact-card__value) svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.trn-contact-card__value :is(svg, i) {
	flex: none;
	transition: transform var(--trn-contact-ease);
}

a.trn-contact-card:is(:hover, :focus-visible) .trn-contact-card__value :is(svg, i) {
	transform: translate(3px, -3px);
}

.trn-contact-card__value:dir(rtl) :is(svg, i) {
	scale: -1 1;
}

a.trn-contact-card:dir(rtl):is(:hover, :focus-visible) .trn-contact-card__value :is(svg, i) {
	transform: translate(-3px, -3px);
}

/* 3. Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.e-con.elementor-invisible:has(> .elementor-widget-trainora-contact-card) {
		visibility: visible;
	}
	.e-con.animated:has(> .elementor-widget-trainora-contact-card) {
		animation: none;
	}
	.elementor .trn-contact-card,
	.elementor .trn-contact-card :is(.trn-contact-card__icon, .trn-contact-card__value :is(svg, i)) {
		transition: none;
	}
	.elementor :is(.trn-contact-card:hover, a.trn-contact-card:focus-visible),
	.elementor :is(.trn-contact-card:hover, a.trn-contact-card:focus-visible) .trn-contact-card__icon,
	.elementor a.trn-contact-card:is(:hover, :focus-visible) .trn-contact-card__value :is(svg, i) {
		transform: none;
	}
}
