/**
 * SigmaGraft Elements — Trust Bar.
 *
 * Defaults only: every value here is overridable by the widget's controls.
 * Layout itself comes from the shared .sgx-grid system in base.css, so the
 * row adapts to however many items the repeater holds.
 *
 * Structure: .sgx-tb__cell is the layout box the grid sizes, orders and spans;
 * .sgx-tb__item inside it carries the visual styling and becomes the anchor
 * when the item is linked. Dividers hang off the cell so they stay put no
 * matter which of the two the client is styling.
 *
 * Divider technique: each cell draws its rule on the leading edge, and the
 * grid is pulled back by one divider width inside a wrapper that clips on the
 * inline axis only. That removes the leading rule of *every* row, so 4-up,
 * 3-up, 2-up and stacked layouts all stay correct. `overflow-x: clip` is used
 * rather than `hidden` precisely because it leaves the block axis visible —
 * the scroll-reveal translate must not be cut off.
 */

.sgx-tb {
	position: relative;
	overflow-x: clip;
	isolation: isolate;
	padding: 56px 0;
	background-color: #F7F9FC;
}

.sgx-tb__overlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.sgx-tb__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 24px;
}

.sgx-tb--container-full .sgx-tb__inner {
	max-width: none;
}

/* ═════════ Section header ═════════ */

.sgx-tb__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 48px;
}

.sgx-tb__eyebrow {
	color: #1A62C4;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.sgx-tb__heading {
	margin: 8px 0 0;
	color: #0E2E5C;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.2;
}

.sgx-tb__subheading {
	margin: 12px 0 0;
	max-width: 62ch;
	color: #4A5B6E;
	font-size: 16px;
	line-height: 1.65;
	text-wrap: pretty;
}

/* ═════════ Grid ═════════ */

.sgx-tb-div-on .sgx-tb__grid-clip {
	overflow-x: clip;
	overflow-y: visible;
}

.sgx-tb__grid {
	--sgx-div-w: 1px;
	--sgx-div-v: var(--sgx-div-w);
	--sgx-div-h: 0px;
	--sgx-div-color: #DDE5EE;
	--sgx-div-style: solid;
	--sgx-div-inset: 10px;
}

/* Pulls the leading rule of every row out of the clip. */
.sgx-tb-div-on .sgx-tb__grid {
	margin-inline-start: calc(-1 * var(--sgx-div-w));
}

.sgx-tb__cell {
	position: relative;
	display: flex;
}

.sgx-tb__item {
	--sgx-i-t: 260ms;
	--sgx-i-lift: 0px;
	--sgx-i-scale: 1;
	--sgx-ic: #1A4C9B;
	--sgx-ic-scale: 1;
	--sgx-ic-rotate: 0deg;

	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 16px;
	width: 100%;
	min-width: 0;
	padding: 4px 24px;
	color: inherit;
	text-align: center;
	text-decoration: none;
	transition:
		background-color var(--sgx-i-t) ease,
		border-color var(--sgx-i-t) ease,
		box-shadow var(--sgx-i-t) ease,
		transform var(--sgx-i-t) ease;
}

.sgx-tb__item:hover {
	transform: translateY(var(--sgx-i-lift)) scale(var(--sgx-i-scale));
}

a.sgx-tb__item:focus-visible {
	outline: 2px solid var(--sgx-ic);
	outline-offset: 4px;
}

/* ═════════ Dividers ═════════ */

.sgx-tb-div-on .sgx-tb__cell::before {
	content: "";
	position: absolute;
	inset-inline-start: calc(-1 * var(--sgx-col-gap) / 2);
	top: var(--sgx-div-inset);
	bottom: var(--sgx-div-inset);
	border-inline-start: var(--sgx-div-v) var(--sgx-div-style) var(--sgx-div-color);
	pointer-events: none;
}

.sgx-tb-div-on .sgx-tb__cell::after {
	content: "";
	position: absolute;
	top: calc(-1 * var(--sgx-row-gap) / 2);
	inset-inline: var(--sgx-div-inset);
	border-top: var(--sgx-div-h) var(--sgx-div-style) var(--sgx-div-color);
	pointer-events: none;
}

/* Horizontal rules sit between rows, so the very first cell never has one. */
.sgx-tb-div-on .sgx-tb__cell:first-child::after {
	content: none;
}

/* ═════════ Icon / image ═════════ */

.sgx-tb__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	color: var(--sgx-ic);
	transition:
		color var(--sgx-i-t) ease,
		background-color var(--sgx-i-t) ease,
		border-color var(--sgx-i-t) ease,
		transform var(--sgx-i-t) ease;
}

.sgx-tb__item:hover .sgx-tb__icon {
	transform: scale(var(--sgx-ic-scale)) rotate(var(--sgx-ic-rotate));
}

.sgx-tb__icon .sgx-icon {
	font-size: 30px;
	width: 30px;
	height: 30px;
}

.sgx-tb__img {
	display: block;
	width: 64px;
	height: auto;
	object-fit: contain;
}

.sgx-tb-ishape-circle .sgx-tb__icon {
	border-radius: 999px;
}

.sgx-tb-ishape-rounded .sgx-tb__icon {
	border-radius: 12px;
}

.sgx-tb-ishape-square .sgx-tb__icon {
	border-radius: 0;
}

/* ═════════ Text ═════════ */

.sgx-tb__text {
	display: flex;
	flex-direction: column;
	/* Follows whatever the cell alignment control set. */
	align-items: inherit;
	min-width: 0;
}

.sgx-tb__badge {
	display: inline-flex;
	align-items: center;
	align-self: center;
	margin-bottom: 10px;
	padding: 4px 10px;
	border-radius: 999px;
	background-color: #E8EFF9;
	color: #1A4C9B;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .8px;
	text-transform: uppercase;
	line-height: 1.4;
}

.sgx-tb__title {
	margin: 0 0 10px;
	color: #0E2E5C;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	transition: color var(--sgx-i-t) ease;
}

.sgx-tb__desc {
	margin: 0;
	max-width: 210px;
	color: #5A6B7D;
	font-size: 13px;
	line-height: 1.6;
	text-wrap: pretty;
	transition: color var(--sgx-i-t) ease;
}

/* ═════════ Responsive fallbacks ═════════ */

/*
 * Column counts, gaps and divider direction all come from responsive controls,
 * so only presentation that has no control of its own is repeated here.
 */
@media (max-width: 1024px) {

	.sgx-tb__desc {
		max-width: 34ch;
	}
}

@media (max-width: 767px) {

	.sgx-tb__item {
		padding: 4px 8px;
	}

	.sgx-tb__heading {
		font-size: 26px;
	}
}
