/* ===================================
   AWYB Stats Widget
   =================================== */

.awyb-stats-widget {
	background-color: #177bc4;
	padding: 96px var(--spacing-margins-s, 24px);
	width: 100%;
}

.awyb-stats-widget__container {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 64px;
	width: 100%;
}

/* ----- Header ----- */

.awyb-stats-widget__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	text-align: center;
	color: #fffdf9;
	width: 100%;
}

.awyb-stats-widget__title {
	font-family: var(--font-family-headings);
	font-size: 48px;
	line-height: 48px;
	font-weight: 700;
	letter-spacing: 0;
	margin: 0;
}

.awyb-stats-widget__subtitle {
	font-family: var(--font-family-body);
	font-size: 16px;
	line-height: 24px;
	font-weight: 400;
	max-width: 576px;
	margin: 0 auto;
}

/* ----- Stats Row ----- */

.awyb-stats-widget__row {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: flex-start;
	gap: clamp(16px, 3vw, 40px);
	width: 100%;
}

/* ----- Card (Desktop) ----- */
/*
 * Desktop layout (Figma reference: 412x315 bounding box):
 *   - frame   390 x 315  anchored top-left
 *   - image   390 x 273  anchored top-right, offset down 22px
 *   - card width = frame width + 22px overhang
 * Percentages preserve the same geometry as the card scales fluidly.
 */
.awyb-stats-widget__card {
	flex: 1 1 0;
	min-width: 0;
	max-width: 412px;
	aspect-ratio: 412 / 315;
	position: relative;
}

.awyb-stats-widget__card-frame {
	position: absolute;
	top: 0;
	left: 0;
	width: 94.66%; /* 390 / 412 */
	height: 100%;
	background-color: var(--card-color, #e49880);
}

.awyb-stats-widget__card-media {
	position: absolute;
	top: 6.98%; /* 22 / 315 */
	right: 0;
	width: 94.66%; /* 390 / 412 */
	height: 86.67%; /* 273 / 315 */
	overflow: hidden;
}

.awyb-stats-widget__card-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	display: block;
	filter: blur(1.5px);
}

.awyb-stats-widget__card-overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.4);
}

.awyb-stats-widget__card-content {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 clamp(20px, 7%, 72px);
	text-align: center;
	color: #ffffff;
	font-family: var(--font-family-headings);
	font-weight: 700;
	font-size: clamp(20px, 2.4vw, 32px);
	line-height: 1.1;
}

.awyb-stats-widget__card-content span {
	display: inline-block;
	color: #afd8c5;
	font-size: clamp(36px, 4.2vw, 56px);
	line-height: 1;
}

/* ----- Mobile (vertical stack, image-bounded card) ----- */
/*
 * Mobile layout (Figma reference: 358x315 bounding box):
 *   - frame   312 x 315  centered horizontally (23px from each side)
 *   - image   358 x 273  full-width, offset down 24px
 *   - card width = image width
 */
@media (max-width: 1023px) {
	.awyb-stats-widget {
		padding: 70px var(--spacing-margins-s, 24px);
		padding-left: 0;
		padding-right: 0;
	}

	.awyb-stats-widget__container {
		gap: 40px;
	}

	.awyb-stats-widget__header {
		gap: 24px;
		padding: 0 0;
	}

	.awyb-stats-widget__title {
		font-size: 36px;
		line-height: 40px;
	}

	.awyb-stats-widget__subtitle {
		font-size: 20px;
		line-height: 24px;
	}

	.awyb-stats-widget__row {
		flex-direction: column;
		gap: 32px;
		align-items: center;
	}

	.awyb-stats-widget__card {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
		aspect-ratio: 358 / 315;
	}

	.awyb-stats-widget__card-frame {
		left: 6.42%; /* 23 / 358 */
		right: 6.42%;
		width: auto;
	}

	.awyb-stats-widget__card-media {
		top: 7.62%; /* 24 / 315 */
		left: 0;
		right: 0;
		width: 100%;
	}

	.awyb-stats-widget__card-content {
		font-size: 24px;
	}

	.awyb-stats-widget__card-content span {
		font-size: 48px;
	}
}
