/**
 * TO Journey Insights — process timeline + value pillars.
 * Scoped: .toaew-ji / --toaew-ji-*
 */

.toaew-ji {
	--toaew-ji-primary: #0057b8;
	--toaew-ji-primary-soft: #4d8fd6;
	--toaew-ji-title: #0f2744;
	--toaew-ji-text: #3a4556;
	--toaew-ji-muted: #5c6b7a;
	--toaew-ji-line: #0057b8;
	--toaew-ji-values-bg: #eef4f9;
	--toaew-ji-values-divider: #cfd8e3;
	--toaew-ji-icon-bg: #0057b8;
	--toaew-ji-icon-color: #ffffff;
	--toaew-ji-icon-size: 64px;
	--toaew-ji-ring: #7eb3e8;
	--toaew-ji-gap: 20px;
	--toaew-ji-values-radius: 16px;

	width: 100%;
	color: var( --toaew-ji-text );
}

.toaew-ji__header {
	text-align: center;
	margin-bottom: clamp( 2rem, 4vw, 3rem );
}

.toaew-ji__title {
	margin: 0 0 1rem;
	color: var( --toaew-ji-title );
	font-size: clamp( 1.6rem, 3.2vw, 2.35rem );
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.toaew-ji__title strong,
.toaew-ji__title b {
	font-weight: 800;
}

.toaew-ji__subtitle-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	max-width: 52rem;
	margin: 0 auto;
}

.toaew-ji__subtitle-line {
	flex: 1 1 0;
	height: 1px;
	max-width: 7rem;
	background: var( --toaew-ji-primary );
	opacity: 0.85;
}

.toaew-ji__subtitle {
	margin: 0;
	flex: 0 1 auto;
	color: var( --toaew-ji-muted );
	font-size: clamp( 0.9rem, 1.4vw, 1.05rem );
	font-weight: 400;
	line-height: 1.45;
	text-align: center;
}

/* —— Steps timeline —— */
.toaew-ji__steps {
	position: relative;
	display: grid;
	grid-template-columns: repeat( var( --toaew-ji-steps, 5 ), minmax( 0, 1fr ) );
	gap: var( --toaew-ji-gap );
	margin: 0 0 clamp( 2rem, 4vw, 2.75rem );
	padding: 0;
	list-style: none;
}

.toaew-ji__step {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	min-width: 0;
}

.toaew-ji__step-copy {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	min-height: 9.5rem;
	margin-bottom: 1.25rem;
}

.toaew-ji__step-label {
	margin: 0;
	color: var( --toaew-ji-primary );
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
}

.toaew-ji__step-title {
	margin: 0;
	color: var( --toaew-ji-title );
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.3;
}

.toaew-ji__step-desc {
	margin: 0;
	max-width: 14rem;
	color: var( --toaew-ji-muted );
	font-size: 0.8rem;
	font-weight: 400;
	line-height: 1.45;
}

.toaew-ji__step-track {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding-top: 0.25rem;
}

/* Horizontal connector through icon centers */
.toaew-ji__step-track::before {
	content: "";
	position: absolute;
	top: calc( var( --toaew-ji-icon-size ) / 2 + 0.25rem );
	left: 0;
	right: 0;
	height: 3px;
	background: var( --toaew-ji-line );
	z-index: 0;
}

.toaew-ji__step:first-child .toaew-ji__step-track::before {
	left: 50%;
}

.toaew-ji__step:last-child .toaew-ji__step-track::before {
	right: 50%;
}

/* End caps (dots) on first / last */
.toaew-ji__step:first-child .toaew-ji__step-track::after,
.toaew-ji__step:last-child .toaew-ji__step-track::after {
	content: "";
	position: absolute;
	top: calc( var( --toaew-ji-icon-size ) / 2 + 0.25rem );
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var( --toaew-ji-line );
	transform: translateY( -50% );
	z-index: 1;
}

.toaew-ji__step:first-child .toaew-ji__step-track::after {
	left: 0;
	transform: translate( -25%, -50% );
}

.toaew-ji__step:last-child .toaew-ji__step-track::after {
	right: 0;
	transform: translate( 25%, -50% );
}

.toaew-ji__icon-wrap {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: calc( var( --toaew-ji-icon-size ) + 28px );
	height: calc( var( --toaew-ji-icon-size ) + 28px );
}

.toaew-ji__icon-ring {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px dashed var( --toaew-ji-ring );
	opacity: 0.95;
	pointer-events: none;
}

.toaew-ji__icon-ring--inner {
	inset: 6px;
	border-width: 1.5px;
	opacity: 0.75;
}

.toaew-ji__icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var( --toaew-ji-icon-size );
	height: var( --toaew-ji-icon-size );
	border-radius: 50%;
	background: var( --toaew-ji-icon-bg );
	color: var( --toaew-ji-icon-color );
	box-shadow: 0 2px 10px rgba( 0, 87, 184, 0.25 );
}

.toaew-ji__icon i,
.toaew-ji__icon svg {
	width: 1.55rem;
	height: 1.55rem;
	font-size: 1.55rem;
	line-height: 1;
}

.toaew-ji__icon img {
	width: 1.55rem;
	height: 1.55rem;
	object-fit: contain;
}

.toaew-ji__step-num {
	margin-top: 0.65rem;
	color: var( --toaew-ji-primary );
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.02em;
}

/* —— Values bar —— */
.toaew-ji__values {
	display: grid;
	grid-template-columns: repeat( var( --toaew-ji-values, 5 ), minmax( 0, 1fr ) );
	gap: 0;
	margin: 0;
	padding: clamp( 1.35rem, 2.5vw, 1.75rem ) clamp( 0.75rem, 1.5vw, 1.25rem );
	list-style: none;
	background: var( --toaew-ji-values-bg );
	border-radius: var( --toaew-ji-values-radius );
}

.toaew-ji__value {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.55rem;
	padding: 0.5rem 1rem;
	text-align: center;
	border-right: 1px solid var( --toaew-ji-values-divider );
}

.toaew-ji__value:last-child {
	border-right: none;
}

.toaew-ji__value-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var( --toaew-ji-primary );
	width: 2rem;
	height: 2rem;
}

.toaew-ji__value-icon i,
.toaew-ji__value-icon svg {
	width: 1.65rem;
	height: 1.65rem;
	font-size: 1.65rem;
	line-height: 1;
}

.toaew-ji__value-icon img {
	width: 1.65rem;
	height: 1.65rem;
	object-fit: contain;
}

.toaew-ji__value-title {
	margin: 0;
	color: var( --toaew-ji-primary );
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.3;
	text-transform: uppercase;
}

.toaew-ji__value-desc {
	margin: 0;
	max-width: 12.5rem;
	color: var( --toaew-ji-muted );
	font-size: 0.78rem;
	font-weight: 400;
	line-height: 1.4;
}

/* Tablet */
@media ( max-width: 1024px ) {
	.toaew-ji__steps {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
		row-gap: 2rem;
	}

	.toaew-ji__step-track::before,
	.toaew-ji__step:first-child .toaew-ji__step-track::after,
	.toaew-ji__step:last-child .toaew-ji__step-track::after {
		display: none;
	}

	.toaew-ji__step-copy {
		min-height: 0;
	}

	.toaew-ji__values {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
		row-gap: 1.25rem;
	}

	.toaew-ji__value {
		border-right: none;
		padding: 0.75rem;
	}
}

/* Mobile */
@media ( max-width: 767px ) {
	.toaew-ji__subtitle-row {
		flex-direction: column;
		gap: 0.65rem;
	}

	.toaew-ji__subtitle-line {
		width: 3.5rem;
		max-width: none;
		flex: 0 0 auto;
	}

	.toaew-ji__steps {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}

	.toaew-ji__step {
		display: grid;
		grid-template-columns: auto 1fr;
		grid-template-rows: auto auto;
		column-gap: 1rem;
		align-items: start;
		text-align: left;
	}

	.toaew-ji__step-copy {
		grid-column: 2;
		grid-row: 1;
		align-items: flex-start;
		margin-bottom: 0;
	}

	.toaew-ji__step-track {
		grid-column: 1;
		grid-row: 1 / span 2;
		width: auto;
		padding-top: 0;
	}

	.toaew-ji__step-desc {
		max-width: none;
	}

	.toaew-ji__step-num {
		margin-top: 0.5rem;
	}

	.toaew-ji__values {
		grid-template-columns: 1fr;
		padding: 1.25rem 1rem;
	}

	.toaew-ji__value {
		align-items: flex-start;
		text-align: left;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0.65rem 0.85rem;
		padding: 0.85rem 0;
		border-right: none;
		border-bottom: 1px solid var( --toaew-ji-values-divider );
	}

	.toaew-ji__value:last-child {
		border-bottom: none;
	}

	.toaew-ji__value-title,
	.toaew-ji__value-desc {
		flex: 1 1 calc( 100% - 3rem );
	}

	.toaew-ji__value-desc {
		max-width: none;
		padding-left: calc( 2rem + 0.85rem );
	}

	.toaew-ji__value-title {
		padding-left: 0;
	}
}
