/* ============================================================================
   Homepage v5: the trust bar (VOY-2295). Pattern: patterns/home-trust.php.
   Spec: docs/design/home/README.md, "Trust bar". Loaded when the section
   renders (inc/home-sections.php).

   The marks keep the logo wall's classes (custom.css, voyager-logowall-item):
   sized by height, monochrome at rest, full colour on hover. The four facts
   size to their content (auto columns) and sit on one line each at 1440.
   ============================================================================ */

.wp-block-group.vy-home-trust {
	box-sizing: border-box;
	margin-block: 0;
	padding: 36px 0 30px;
	border-top: 1px solid var(--wp--preset--color--border-hair);
	background: var(--wp--preset--color--bg-canvas);
	color: var(--wp--preset--color--fg-2);
}

.wp-block-group.vy-home-trust > .vy-home-trust__inner {
	display: flex;
	flex-direction: column;
	gap: 26px;
	box-sizing: border-box;
	width: min(1280px, 100% - 160px);
	max-width: none;
	margin-inline: auto;
}

.vy-home-trust .vy-home-trust__inner > *,
.vy-home-trust .vy-home-trust__logos > *,
.vy-home-trust .vy-home-trust__facts > * {
	margin: 0;
}

.vy-home-trust__lead {
	color: var(--wp--preset--color--fg-4);
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
}

.vy-home-trust .vy-home-trust__logos {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.vy-home-trust .vy-home-trust__logos .voyager-logowall-item img {
	height: clamp(26px, 2.5vw, 38px);
}

.vy-home-trust .vy-home-trust__facts {
	display: grid;
	grid-template-columns: repeat(4, auto);
	justify-content: space-between;
	margin-top: 4px;
	border-top: 1px solid var(--wp--preset--color--border-hair);
}

.vy-home-trust__fact {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 18px;
	color: var(--wp--preset--color--fg-2);
	font-family: var(--font-body);
	font-size: 14.5px;
	line-height: 1.4;
	text-align: center;
	white-space: nowrap;
}

.vy-home-trust__fact + .vy-home-trust__fact {
	border-left: 1px solid var(--wp--preset--color--border-hair);
}

/* The tick: decoration on the fact itself. */
.vy-home-trust__fact:not(.vy-home-trust__fact--rating)::before {
	content: "\2713";
	color: var(--wp--preset--color--accent-bright);
}

.vy-home-trust__fact strong {
	font-weight: 500;
	color: var(--wp--preset--color--fg-1);
}

/* The board's star gold (#F5B623) has no design-system token; amber-500 is
   the nearest one. */
.vy-home-trust__stars {
	color: var(--color-amber-500);
	letter-spacing: 1px;
}

@media (max-width: 1099px) {
	.vy-home-trust .vy-home-trust__logos {
		flex-wrap: wrap;
		justify-content: center;
		gap: 18px 32px;
	}

	.vy-home-trust .vy-home-trust__facts {
		grid-template-columns: repeat(2, auto);
		justify-content: center;
	}

	.vy-home-trust__fact + .vy-home-trust__fact {
		border-left: 0;
	}
}

@media (max-width: 781px) {
	.wp-block-group.vy-home-trust {
		padding: 32px 0;
	}

	.wp-block-group.vy-home-trust > .vy-home-trust__inner {
		width: calc(100% - 40px);
		gap: 20px;
	}

	.vy-home-trust__lead {
		font-size: 13.5px;
	}

	.vy-home-trust .vy-home-trust__logos {
		gap: 18px 26px;
	}

	.vy-home-trust .vy-home-trust__logos .voyager-logowall-item img {
		height: 24px;
	}

	/* The mobile board: the three promises as a ticked list, then the rating. */
	.vy-home-trust .vy-home-trust__facts {
		display: flex;
		flex-direction: column;
		gap: 10px;
		padding-top: 18px;
	}

	.vy-home-trust__fact {
		order: 1;
		justify-content: flex-start;
		gap: 10px;
		padding: 0;
		font-size: 15px;
		text-align: left;
		white-space: normal;
	}

	.vy-home-trust__fact--rating {
		order: 2;
		margin-top: 4px !important;
	}
}
