/* =============================================================================
   Nejat Tile Reveal Cards  (.nejat-trc)
   3-column floating cards, each with its own background + border-radius.
   Description hidden by default — lifts + fades in on hover.
   Distinct from .nejat-nrc (border-grid, no card lift).
   ============================================================================= */

/* ── Section ─────────────────────────────────────────────────────────────── */

.nejat-trc {
	padding-top: var(--nejat-section-pad-v);
	padding-bottom: var(--nejat-section-pad-v);
	background-color: #ffffff;
}

/* ── Inner container ─────────────────────────────────────────────────────── */

.nejat-trc__inner {
	max-width: var(--nejat-max-width);
	margin: 0 auto;
	padding-left: var(--nejat-gutter);
	padding-right: var(--nejat-gutter);
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.nejat-trc__header {
	margin-bottom: var(--nejat-gap-lg);
}

.nejat-trc__eyebrow {
	display: block;
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: capitalize;
	margin-bottom: 10px;
	color: #00b4c8;
}

.nejat-trc__headline {
	font-size: clamp(26px, 3vw, 40px);
	font-weight: 800;
	line-height: 1.15;
	margin: 0;
	color: #1a1a1a;
}

.nejat-trc__description {
	font-size: 16px;
	line-height: 1.65;
	color: #555555;
	margin: 16px 0 0;
}

.nejat-trc__description p {
	margin: 0;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */

.nejat-trc__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.nejat-trc__card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	position: relative;
	min-height: 300px;
	padding: 32px 28px;
	background-color: #f5f5f5;
	border-radius: 12px;
	overflow: hidden;
	/* Hover lift transition */
	transition:
		background-color 0.3s ease,
		transform 0.3s ease,
		box-shadow 0.3s ease;
	will-change: transform;
}

.nejat-trc__card:hover {
	background-color: #ebebeb;
	transform: translateY(-6px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ── Alternate card background (every other no-bg card) ──────────────────── */

.nejat-trc__card--alt {
	background-color: #ececec;
}

.nejat-trc__card--alt:hover {
	background-color: #e0e0e0;
}

/* ── Card top ────────────────────────────────────────────────────────────── */

.nejat-trc__card-top {
	flex: 1;
}

.nejat-trc__card-title {
	font-size: clamp(17px, 1.5vw, 20px);
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
	color: #1a1a1a;
}

/* Description — hidden by default, fades/lifts in on card hover */
.nejat-trc__card-desc {
	margin: 20px 0 0;
	font-size: 15px;
	line-height: 1.65;
	color: #555555;
	opacity: 0;
	transform: translateY(10px);
	transition:
		opacity 0.3s ease,
		transform 0.3s ease;
}

.nejat-trc__card:hover .nejat-trc__card-desc {
	opacity: 1;
	transform: translateY(0);
}

/* ── Card bottom ─────────────────────────────────────────────────────────── */

.nejat-trc__card-bottom {
	margin-top: 24px;
	flex-shrink: 0;
}

.nejat-trc__card-num {
	display: inline-block;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: #1a1a1a;
	/* Subtle shift down on hover so the number feels anchored */
	transition: transform 0.3s ease;
}

.nejat-trc__card:hover .nejat-trc__card-num {
	transform: translateY(4px);
}

/* ── Card background image (--has-bg modifier) ───────────────────────────── */

/* Background image layer — fades out on hover */
.nejat-trc__card--has-bg::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: var(--trc-bg-img);
	background-size: cover;
	background-position: center;
	border-radius: inherit;
	transition: opacity 0.45s ease;
	z-index: 0;
}

/* Gradient scrim — keeps title readable against any background */
.nejat-trc__card--has-bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.55) 0%,
		rgba(0, 0, 0, 0.20) 45%,
		transparent 72%
	);
	border-radius: inherit;
	transition: opacity 0.45s ease;
	z-index: 1;
	pointer-events: none;
}

/* Fade both layers out on hover — card solid bg-color shows through */
.nejat-trc__card--has-bg:hover::before,
.nejat-trc__card--has-bg:hover::after {
	opacity: 0;
}

/* Stack card content above the pseudo-element layers */
.nejat-trc__card--has-bg .nejat-trc__card-top,
.nejat-trc__card--has-bg .nejat-trc__card-bottom {
	position: relative;
	z-index: 2;
}

/* Title — white + shadow for readability on any bg image */
.nejat-trc__card--has-bg .nejat-trc__card-title {
	color: #ffffff;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
	transition:
		color 0.4s ease,
		text-shadow 0.4s ease;
}

/* On hover: bg is gone, clear the text-shadow from the title */
.nejat-trc__card--has-bg:hover .nejat-trc__card-title {
	text-shadow: none;
}

/* Number — slightly faded white on bg, reverts on hover */
.nejat-trc__card--has-bg .nejat-trc__card-num {
	color: rgba(255, 255, 255, 0.75);
	transition: color 0.4s ease;
}

.nejat-trc__card--has-bg:hover .nejat-trc__card-num {
	transition: color 0.4s ease;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
	.nejat-trc__grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 600px) {
	.nejat-trc__grid {
		grid-template-columns: 1fr !important;
		gap: 16px;
	}

	/* Always show description on mobile — no reliable hover on touch */
	.nejat-trc__card-desc {
		opacity: 1;
		transform: translateY(0);
	}

	.nejat-trc__card:hover {
		transform: none;
		box-shadow: none;
	}

	/*
	 * Background image cards on mobile:
	 * Keep the image visible (static, no hover).
	 * Use a full-card overlay instead of the top-only gradient
	 * so the description (always visible on mobile) stays readable.
	 */
	.nejat-trc__card--has-bg::after {
		background: linear-gradient(
			to bottom,
			rgba(0, 0, 0, 0.60) 0%,
			rgba(0, 0, 0, 0.50) 50%,
			rgba(0, 0, 0, 0.40) 100%
		);
	}

	/* Description text — white so it's legible on the dark scrim.
	 * Color is set via the Elementor "Description Color (on background)" control
	 * which uses :not(:hover) — always active on mobile. */
}
