/* ==========================================================================
   Team Stats widget  (.aew-ts)
   Real CSS pixels, measured on the 1920px wide About page.
   ========================================================================== */

.aew-ts {
	--aew-accent: var(--aew-red);   /* control: Brand colour */
	--aew-gutter: 24px;             /* control: Side gap */
	--aew-line: var(--aew-accent);  /* control: Line colour */

	position: relative;
	box-sizing: border-box;
	overflow: hidden;
	isolation: isolate;
	background-color: #f2f2f2;
	color: #1a1a1a;
	font-family: var(--aew-font);
	-webkit-font-smoothing: antialiased;
}

.aew-ts *,
.aew-ts *::before,
.aew-ts *::after {
	box-sizing: border-box;
}

/* optional faded photo behind everything (set in the widget; empty = plain colour) */
.aew-ts__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	opacity: 0.25;
	pointer-events: none;
}

.aew-ts-gray-yes .aew-ts__bg {
	filter: grayscale(1);
}

/* colour-fading line along the bottom edge */
.aew-ts__line {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 4px;
	background: linear-gradient(90deg, transparent 0%, var(--aew-line) 50%, transparent 100%);
	pointer-events: none;
}

.aew-ts__inner {
	position: relative;
	width: calc(100% - (var(--aew-gutter) * 2));
	max-width: 1540px;
	margin-inline: auto;
}

/* ---- Heading ---- */

.aew-ts__head {
	margin-bottom: 61px;
	text-align: center;
}

.aew-ts__eyebrow {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin: 0 0 26px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 1.7px;
	line-height: 1.4;
	text-transform: uppercase;
}

.aew-ts__eyebrow-line {
	flex: none;
	display: block;
	width: 50px;
	height: 4px;
	background: var(--aew-accent);
}

.aew-ts__eyebrow-text {
	color: var(--aew-accent);
}

/* extra class so the Elementor kit's global h1–h6 styles don't win */
.aew-ts .aew-ts__title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 60px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
}

.aew-ts__title-text {
	color: #1a1a1a;
}

.aew-ts__title-accent {
	color: var(--aew-accent);
}

/* ---- Grid ---- */

.aew-ts__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aew-ts__item {
	display: flex;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.aew-ts__item--row {
	grid-column: 1 / -1;
}

.aew-ts__card {
	flex: 1 1 auto;
	min-width: 0;
	border: 1px solid #e5e5e5;
	background-color: #fff;
}

/* centred card */
.aew-ts__card--card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 30px;
	text-align: center;
}

/* full-width row */
.aew-ts__card--row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 40px;
	padding: 40px;
	border-left: 5px solid var(--aew-accent);
}

.aew-ts__row-main {
	display: flex;
	align-items: center;
	gap: 28px;
	min-width: 0;
}

.aew-ts__figure {
	display: block;
	min-width: 0;
}

.aew-ts__icon {
	--aew-icon-box: 70px;

	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--aew-icon-box);
	height: var(--aew-icon-box);
	border: 1px solid #e5e5e5;
	background-color: #f9f9f9;
	font-size: 28px;
	line-height: 1;
	color: var(--aew-accent);
}

.aew-ts__card--card .aew-ts__icon {
	margin-bottom: 24px;
}

.aew-ts__icon svg,
.aew-ts__icon i {
	width: 1em;
	height: 1em;
	color: inherit;
}

.aew-ts__icon svg:not([stroke]) {
	fill: currentColor;
}

.aew-ts__value,
.aew-ts__label {
	display: block;
}

.aew-ts__value {
	font-size: 44px;
	font-weight: 400;
	line-height: 1.15;
	color: var(--aew-accent);
}

.aew-ts__label {
	margin-top: 5px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 1.4px;
	line-height: 1.3;
	text-transform: uppercase;
	color: #1a1a1a;
}

.aew-ts__card--card .aew-ts__text {
	display: block;
	margin-top: 5px;
	font-size: 14.2px;
	line-height: 1.5;
	color: #666;
}

/* p carries the kit's global styles, so reset what matters */
.aew-ts .aew-ts__card--row .aew-ts__text {
	max-width: 560px;
	margin: 0;
	font-size: 17.5px;
	line-height: 1.6;
	text-align: right;
	color: #666;
}

/* ---- Responsive (columns are also a control; these are the defaults) ---- */

@media (max-width: 1024px) {
	.aew-ts__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.aew-ts .aew-ts__title {
		font-size: 44px;
	}

	.aew-ts__head {
		margin-bottom: 52px;
	}

	.aew-ts__card--card {
		padding: 26px 24px;
	}

	.aew-ts__card--row {
		padding: 30px 28px;
	}
}

@media (max-width: 767px) {
	.aew-ts__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.aew-ts .aew-ts__title {
		font-size: 32px;
	}

	.aew-ts__head {
		margin-bottom: 40px;
	}

	.aew-ts__eyebrow {
		font-size: 14px;
	}

	.aew-ts__eyebrow-line {
		width: 32px;
	}

	.aew-ts__card--card {
		padding: 24px 20px;
	}

	.aew-ts__card--row {
		flex-direction: column;
		align-items: flex-start;
		padding: 24px 20px;
	}

	/* the sentence goes under the number, left-aligned, instead of squeezing into the corner */
	.aew-ts .aew-ts__card--row .aew-ts__text {
		max-width: none;
		font-size: 15px;
		text-align: left;
	}

	.aew-ts__row-main {
		gap: 18px;
	}

	.aew-ts__icon {
		--aew-icon-box: 56px;

		font-size: 22px;
	}

	.aew-ts__value {
		font-size: 36px;
	}
}
