/* ==========================================================================
   Technology page benefits — sideways card carousel
   ========================================================================== */

.eit-tben {
	--eit-tben-gutter: clamp(18px, 3vw, 30px);
	/* Left edge of the page content, so the scrolling row starts in line with
	   the heading while still running out to the right edge of the screen. */
	--eit-tben-edge: max(var(--eit-tben-gutter), calc((100% - var(--eit-wrap)) / 2 + var(--eit-tben-gutter)));

	padding: clamp(52px, 7vw, 100px) 0;
	background: linear-gradient(180deg, #e8edf7 0%, #eef1f8 55%, #e9eef7 100%);
	overflow: hidden;
}

.eit-tben__inner {
	max-width: var(--eit-wrap);
	margin-inline: auto;
	padding-inline: var(--eit-tben-gutter);
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 40px;
}

.eit-tben__head { flex: 1 1 560px; max-width: 820px; }

/* Size, weight and colour come from the shared heading style (headings.css). */
.eit-tben__title {
	margin: 0;
	text-wrap: balance;
}

.eit-tben__text {
	margin: 16px 0 0;
	max-width: 68ch;
	color: var(--eit-body, #3d4453);
	font-size: clamp(16px, 1.3vw, 18px);
	line-height: 1.7;
}

/* ---------- Arrows ---------- */

.eit-tben__nav {
	display: flex;
	gap: 12px;
}

.eit-tben__arrow {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 1px solid rgba(21, 24, 31, .14);
	border-radius: 50%;
	background: #ffffff;
	color: var(--eit-ink, #15181f);
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.eit-tben__arrow svg { width: 20px; height: 20px; }

.eit-tben__arrow:hover:not(:disabled),
.eit-tben__arrow:focus-visible {
	background: var(--eit-accent, #3b4fe8);
	border-color: var(--eit-accent, #3b4fe8);
	color: #ffffff;
}

.eit-tben__arrow:focus-visible { outline: 2px solid var(--eit-accent, #3b4fe8); outline-offset: 3px; }

.eit-tben__arrow:disabled { opacity: .4; cursor: default; }

/* ---------- Scrolling row ---------- */

.eit-tben__track {
	list-style: none;
	margin: clamp(32px, 4vw, 52px) 0 0;
	padding: 6px var(--eit-tben-gutter) 18px var(--eit-tben-edge);
	display: flex;
	gap: clamp(16px, 1.8vw, 24px);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--eit-tben-edge) var(--eit-tben-gutter);
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.eit-tben__track::-webkit-scrollbar { display: none; }

.eit-tben__track:focus-visible {
	outline: 2px solid var(--eit-accent, #3b4fe8);
	outline-offset: -2px;
}

.eit-tben__card {
	flex: none;
	width: clamp(270px, 28vw, 370px);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	padding: clamp(24px, 2.4vw, 32px);
	border: 1px solid rgba(255, 255, 255, .9);
	border-radius: 20px;
	background: rgba(255, 255, 255, .72);
	box-shadow: 0 2px 10px rgba(16, 24, 40, .05);
	transition: background-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.eit-tben__card:hover {
	background: #ffffff;
	box-shadow: 0 18px 40px rgba(16, 24, 40, .12);
	transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
	.eit-tben__card { transition: none; }
	.eit-tben__card:hover { transform: none; }
}

.eit-tben__icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: linear-gradient(140deg, #5b82ee 0%, var(--eit-accent, #3b4fe8) 100%);
	box-shadow: 0 8px 18px rgba(59, 79, 232, .28);
}

.eit-tben__icon img { display: block; width: 24px; height: 24px; }

.eit-tben__card-title {
	margin: 26px 0 0;
	color: var(--eit-ink, #15181f);
	font-size: clamp(19px, 1.6vw, 22px);
	font-weight: 600;
	line-height: 1.3;
}

.eit-tben__card-text {
	margin: 12px 0 0;
	color: var(--eit-body, #3d4453);
	font-size: clamp(15px, 1.1vw, 16px);
	line-height: 1.65;
}

/* ---------- Progress ---------- */

.eit-tben__progress {
	flex: 1 1 100%;
	height: 3px;
	margin-top: clamp(14px, 2vw, 24px);
	border-radius: 3px;
	background: rgba(21, 24, 31, .1);
	overflow: hidden;
}

.eit-tben__progress span {
	display: block;
	width: 30%;
	height: 100%;
	border-radius: inherit;
	background: var(--eit-accent, #3b4fe8);
	transition: transform .15s linear;
}

/* Without the script the arrows cannot work, so leave only the swipeable row. */
.eit-tben:not(.is-ready) .eit-tben__nav,
.eit-tben:not(.is-ready) .eit-tben__progress { display: none; }

/* ---------- Static grid (four cards or fewer) ---------- */

.eit-tben--static .eit-tben__track {
	display: grid;
	grid-template-columns: 1fr;
	overflow: visible;
	scroll-snap-type: none;
	max-width: var(--eit-wrap);
	margin-inline: auto;
	padding: 6px var(--eit-tben-gutter) 0;
}

.eit-tben--static .eit-tben__card { width: auto; }

@media (min-width: 640px) {
	.eit-tben--static .eit-tben__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.eit-tben--static .eit-tben__card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (min-width: 1000px) {
	.eit-tben--static .eit-tben__track { grid-template-columns: repeat(var(--eit-tben-count, 3), minmax(0, 1fr)); }
	.eit-tben--static .eit-tben__card:last-child:nth-child(odd) { grid-column: auto; }
}

/* ---------- Phones: a short row of benefits swipes instead of stacking ----------
   Up to four cards used to pile into one tall column. Here they become a row
   showing about 1.2 cards, like the longer carousel above (svc-carousel.js adds
   the progress bar under it on service pages). */
@media (max-width: 639px) {
	.eit-tben--static .eit-tben__track {
		display: flex;
		gap: 12px;
		max-width: none;
		margin-inline: 0;
		padding: 6px var(--eit-tben-gutter) 18px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--eit-tben-gutter);
		scrollbar-width: none;
	}
	.eit-tben--static .eit-tben__track::-webkit-scrollbar { display: none; }
	.eit-tben--static .eit-tben__card { flex: 0 0 min(82%, 330px); width: auto; padding: 22px; }
}
