/* ==========================================================================
   TextCRM Vertical Excellence Widget
   Bento-grid "Vertical Excellence" section from demo-html/solution.html.
   12-column md+ grid: large card (8×2) + two compact cards (4×1 each) + a
   wide card (12×1). Collapses to a single column under 768px.
   ========================================================================== */

.textcrm-vexcel {
	position: relative;
	width: 100%;
	padding-top: 96px;                /* py-24 — matches sibling widgets */
	padding-bottom: 96px;
	background-color: #0b1326;
	font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #dae2fd;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;

	/* Card surface tokens (mirrors solution.html .glass-card) */
	--vex-card-bg: rgba(15, 23, 42, 0.6);
	--vex-card-border: rgba(255, 255, 255, 0.08);
	--vex-card-border-top: rgba(255, 255, 255, 0.15);
	--vex-card-border-left: rgba(255, 255, 255, 0.15);
	--vex-card-radius: 24px;
	--vex-card-padding: 32px;
	--vex-row-height: 240px;

	/* Brand accents (solution.html palette + brand green default for secondary) */
	--vex-secondary: #00f5a0;
	--vex-primary: #c0c1ff;
	--vex-tertiary: #ddb7ff;

	/* Resolved per-card accent (set via data-accent below) */
	--vex-accent: var(--vex-secondary);
}

.textcrm-vexcel *,
.textcrm-vexcel *::before,
.textcrm-vexcel *::after {
	box-sizing: border-box;
}

.textcrm-vexcel__container {
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

/* --------------------------------------------------------------------------
   Section header
   -------------------------------------------------------------------------- */
.textcrm-vexcel__header {
	display: block;
	text-align: center;               /* matches .textcrm-value-props__header */
	margin-bottom: 64px;              /* mb-16, same as Value Props */
}

/* Eyebrow — same shape as the Value Props eyebrow, just left-aligned
   (the Vertical Excellence header sits flush-left). */
.textcrm-vexcel__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;              /* spacing below eyebrow (Elementor-controllable) */
	font-size: 10px;
	font-weight: 700;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #00f5a0;
}

.textcrm-vexcel__eyebrow-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: currentColor;
}

.textcrm-vexcel__eyebrow-icon svg,
.textcrm-vexcel__eyebrow-icon i {
	width: 100%;
	height: 100%;
	font-size: 16px;
	line-height: 1;
}

.textcrm-vexcel__title {
	margin: 0 0 16px 0;               /* gap above subtitle */
	font-size: 36px;                  /* text-4xl — same as Value Props */
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #ffffff;
}

/* Highlighted span inside the title — same green as Value Props */
.textcrm-vexcel__title-accent {
	color: #00f5a0;
}

.textcrm-vexcel__subtitle {
	margin: 0 auto;                   /* center the block under the centered title */
	max-width: 42rem;                 /* max-w-2xl, same as Roles / Value Props body */
	font-size: 16px;
	line-height: 1.6;
	color: #9ca3af;                   /* text-gray-400 — sibling-widget body color */
}

/* --------------------------------------------------------------------------
   Bento grid
   -------------------------------------------------------------------------- */
.textcrm-vexcel__grid {
	display: grid;
	grid-template-columns: 1fr;
	grid-auto-rows: auto;
	gap: 24px;
}

@media (min-width: 768px) {
	.textcrm-vexcel__title {
		font-size: 48px;              /* md+ ramp — matches Value Props md:text-5xl */
	}

	.textcrm-vexcel__grid {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		grid-auto-rows: var(--vex-row-height, 240px);
	}
}

/* --------------------------------------------------------------------------
   Card surface — base (glass-card)
   -------------------------------------------------------------------------- */
.textcrm-vexcel__card {
	position: relative;
	overflow: hidden;
	background: var(--vex-card-bg);
	border: 1px solid var(--vex-card-border);
	border-top-color: var(--vex-card-border-top);
	border-left-color: var(--vex-card-border-left);
	border-radius: var(--vex-card-radius);
	padding: var(--vex-card-padding);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	transition: transform 250ms ease, border-color 250ms ease;
}

/* Per-card accent resolution */
.textcrm-vexcel__card[data-accent="secondary"] { --vex-accent: var(--vex-secondary); }
.textcrm-vexcel__card[data-accent="primary"]   { --vex-accent: var(--vex-primary); }
.textcrm-vexcel__card[data-accent="tertiary"]  { --vex-accent: var(--vex-tertiary); }

/* --------------------------------------------------------------------------
   Grid placement (md+)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
	.textcrm-vexcel__card--primary  { grid-column: span 8 / span 8; grid-row: span 2 / span 2; }
	.textcrm-vexcel__card--compact-a { grid-column: span 4 / span 4; grid-row: span 1 / span 1; }
	.textcrm-vexcel__card--compact-b { grid-column: span 4 / span 4; grid-row: span 1 / span 1; }
	.textcrm-vexcel__card--wide     { grid-column: span 12 / span 12; grid-row: span 1 / span 1; }
}

/* --------------------------------------------------------------------------
   Card icon (square chip with tinted accent bg)
   -------------------------------------------------------------------------- */
.textcrm-vexcel__card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--vex-accent);
	background-color: color-mix(in srgb, var(--vex-accent) 10%, transparent);
	border-radius: 12px;
}

/* Fallback for browsers without color-mix (uses currentColor + opacity) */
@supports not (background-color: color-mix(in srgb, red 10%, transparent)) {
	.textcrm-vexcel__card-icon {
		background-color: rgba(0, 245, 160, 0.1);
	}
	.textcrm-vexcel__card[data-accent="primary"] .textcrm-vexcel__card-icon  { background-color: rgba(192, 193, 255, 0.1); }
	.textcrm-vexcel__card[data-accent="tertiary"] .textcrm-vexcel__card-icon { background-color: rgba(221, 183, 255, 0.1); }
}

.textcrm-vexcel__card-icon svg {
	display: block;
	width: 24px;
	height: 24px;
	color: currentColor;
}

.textcrm-vexcel__card-icon i {
	font-size: 24px;
	line-height: 1;
	color: currentColor;
}

/* Large icon (primary card) */
.textcrm-vexcel__card-icon--lg {
	width: 48px;
	height: 48px;
	margin-bottom: 24px;
}

/* Small icon (compact + wide cards) */
.textcrm-vexcel__card-icon--sm {
	width: 40px;
	height: 40px;
	margin-bottom: 16px;
	border-radius: 8px;
}

.textcrm-vexcel__card-icon--sm svg {
	width: 20px;
	height: 20px;
}

.textcrm-vexcel__card-icon--sm i { font-size: 20px; }

/* --------------------------------------------------------------------------
   Card text
   -------------------------------------------------------------------------- */
.textcrm-vexcel__card-title {
	margin: 0 0 16px 0;
	color: #ffffff;
	letter-spacing: -0.01em;
	font-weight: 700;
}

.textcrm-vexcel__card-title--lg {
	font-size: 28px;
	line-height: 1.25;
}

.textcrm-vexcel__card-title--sm {
	font-size: 20px;
	line-height: 1.3;
	margin-bottom: 8px;
}

.textcrm-vexcel__card-text {
	margin: 0;
	color: #9ca3af;                   /* text-gray-400 — sibling-widget body color */
	font-size: 17px;                  /* unified card-body size across all cards */
	line-height: 1.65;
}

.textcrm-vexcel__card-text--lg {
	max-width: 30rem;
}

.textcrm-vexcel__card-text--sm {
	/* inherits the unified 17px from .textcrm-vexcel__card-text */
}

/* --------------------------------------------------------------------------
   Primary card — inner layout (header block on top, CTA pinned to bottom)
   -------------------------------------------------------------------------- */
.textcrm-vexcel__card-inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 100%;
	min-height: 320px;
	gap: 24px;
}

/* Checklist under the primary card description */
.textcrm-vexcel__checks {
	list-style: none;
	padding: 0;
	margin: 32px 0 0 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.textcrm-vexcel__check {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--vex-accent);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: 0.05em;
}

.textcrm-vexcel__check-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: currentColor;
}

.textcrm-vexcel__check-icon svg {
	width: 100%;
	height: 100%;
}

/* CTA */
.textcrm-vexcel__cta-wrap {
	margin-top: auto;
}

.textcrm-vexcel__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--vex-accent);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: gap 250ms ease, transform 250ms ease, color 250ms ease;
}

.textcrm-vexcel__cta:hover,
.textcrm-vexcel__cta:focus-visible {
	gap: 16px;
	outline: none;
}

.textcrm-vexcel__cta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
}

.textcrm-vexcel__cta-icon svg {
	width: 100%;
	height: 100%;
}

/* Decorative background image (faded, bottom-right of primary card) */
.textcrm-vexcel__card-bgimg {
	position: absolute;
	right: -40px;
	bottom: -40px;
	z-index: 0;
	opacity: 0.2;
	pointer-events: none;
	transition: transform 700ms ease;
}

.textcrm-vexcel__card-bgimg img {
	display: block;
	width: 400px;
	max-width: 100%;
	height: auto;
	border-radius: 24px;
}

.textcrm-vexcel__card--primary:hover .textcrm-vexcel__card-bgimg {
	transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   Compact cards — vertical layout with stat row pinned to bottom
   -------------------------------------------------------------------------- */
.textcrm-vexcel__card--compact {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
}

.textcrm-vexcel__stat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--vex-accent);
}

.textcrm-vexcel__stat-text {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: 0.05em;
}

.textcrm-vexcel__stat-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: currentColor;
}

.textcrm-vexcel__stat-icon svg {
	width: 100%;
	height: 100%;
}

/* --------------------------------------------------------------------------
   Wide card — content left, stat badges right
   -------------------------------------------------------------------------- */
.textcrm-vexcel__card--wide {
	display: flex;
	align-items: center;
	gap: 48px;
}

.textcrm-vexcel__wide-content {
	flex: 1 1 auto;
	min-width: 0;
}

.textcrm-vexcel__wide-head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.textcrm-vexcel__wide-head .textcrm-vexcel__card-icon {
	margin-bottom: 0;
}

.textcrm-vexcel__wide-head .textcrm-vexcel__card-title {
	margin: 0;
}

.textcrm-vexcel__card--wide .textcrm-vexcel__card-text {
	max-width: 32rem;
}

.textcrm-vexcel__wide-stats {
	display: none;
	gap: 16px;
	flex-shrink: 0;
}

@media (min-width: 768px) {
	.textcrm-vexcel__wide-stats {
		display: flex;
	}
}

.textcrm-vexcel__stat-badge {
	padding: 16px;
	background-color: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 16px;
	min-width: 120px;
}

.textcrm-vexcel__stat-badge-value {
	display: block;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.1;
	color: var(--vex-accent);
}

.textcrm-vexcel__stat-badge-label {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: 0.05em;
	color: #9ca3af;
}

/* --------------------------------------------------------------------------
   Mobile / single-column overrides
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.textcrm-vexcel__card {
		padding: 24px;
	}

	.textcrm-vexcel__card--primary {
		min-height: 0;
	}

	.textcrm-vexcel__card-inner {
		min-height: 0;
	}

	.textcrm-vexcel__card-bgimg {
		display: none;
	}

	.textcrm-vexcel__card--wide {
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
	}
}

@media (max-width: 480px) {
	.textcrm-vexcel {
		padding-top: 64px;
		padding-bottom: 64px;
	}

	.textcrm-vexcel__container {
		padding-left: 16px;
		padding-right: 16px;
	}

	.textcrm-vexcel__header {
		margin-bottom: 48px;          /* matches Value Props mobile mb */
	}

	.textcrm-vexcel__title {
		font-size: 30px;              /* matches Value Props mobile */
	}

	.textcrm-vexcel__card-title--lg {
		font-size: 24px;
	}
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.textcrm-vexcel__card,
	.textcrm-vexcel__card-bgimg,
	.textcrm-vexcel__cta {
		transition: none;
	}
}
