/* =========================================================
   Infographic Elements Widget - Mr.D
   Circular (desktop) -> Vertical connected timeline (mobile)
   ========================================================= */

.iew-wrapper {
	--iew-circle-size: 300px;
	--iew-ring-start: #1e56e6;
	--iew-ring-end: #5fa8f5;
	--iew-ring-thickness: 14px;
	--iew-circle-bg: #ffffff;
	--iew-dashed-color: rgba(30, 86, 230, 0.35);
	--iew-dot-color: #1e56e6;
	--iew-card-gap: 16px;
	--iew-items-gap: 24px;
	--iew-icon-box: 60px;
	--iew-badge-size: 64px;
	--iew-line-color: #1e56e6;
	--iew-line-width: 2px;

	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.iew-wrapper * {
	box-sizing: border-box;
}

/* ---------------------------------------------------------
   Shared card styles
   --------------------------------------------------------- */
.iew-card {
	display: flex;
	align-items: center;
	gap: var(--iew-card-gap);
	background: #ffffff;
	border-radius: 16px;
	padding: 20px;
	width: 100%;
	position: relative;
	z-index: 2;
}

.iew-card__icon {
	flex: 0 0 var(--iew-icon-box);
	width: var(--iew-icon-box);
	height: var(--iew-icon-box);
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(145deg, var(--iew-ring-start), var(--iew-ring-end));
	color: #fff;
}

.iew-card__icon i,
.iew-card__icon svg {
	color: #fff;
}

.iew-card__body {
	flex: 1 1 auto;
	min-width: 0;
}

.iew-card__title {
	font-weight: 700;
	font-size: 17px;
	color: var(--iew-ring-start);
	margin: 0 0 6px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.iew-card__desc {
	font-size: 14px;
	line-height: 1.6;
	color: #5a6376;
	margin: 0;
}

.iew-badge {
	flex: 0 0 var(--iew-badge-size);
	width: var(--iew-badge-size);
	height: var(--iew-badge-size);
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--iew-ring-start);
	color: var(--iew-ring-start);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 20px;
	position: relative;
	z-index: 3;
}

/* ---------------------------------------------------------
   DESKTOP GRID (3 columns: left / center / right)
   --------------------------------------------------------- */
.iew-grid {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 40px;
	position: relative;
}

.iew-col {
	display: flex;
	flex-direction: column;
	gap: var(--iew-items-gap);
	position: relative;
}

.iew-col--center {
	align-items: center;
	gap: 30px;
}

.iew-bottom {
	width: 100%;
	display: flex;
	justify-content: center;
}

/* Card row wrapper - holds badge + card, connected by a line stub */
.iew-card-row {
	display: flex;
	align-items: center;
	gap: 14px;
	position: relative;
}

.iew-card-row--left .iew-card {
	flex-direction: row;
}

.iew-card-row--right .iew-card {
	text-align: right;
}

.iew-card-row--right .iew-card__title,
.iew-card-row--right .iew-card__desc {
	text-align: right;
}

.iew-card-row--bottom {
	flex-direction: column;
	align-items: center;
	max-width: 420px;
	margin: 0 auto;
}

.iew-card-row--bottom .iew-badge {
	order: -1;
	margin-bottom: 10px;
}

/* connector stub: line from badge toward the center spine */
.iew-card-row--left::after,
.iew-card-row--right::after {
	content: '';
	position: absolute;
	top: 50%;
	height: var(--iew-line-width);
	background: var(--iew-line-color);
	opacity: 0.55;
	z-index: 1;
}

.iew-col--left .iew-card-row::after {
	right: -40px;
	width: 40px;
}

.iew-col--right .iew-card-row::after {
	left: -40px;
	width: 40px;
}

/* vertical spine running through the center column, behind the circle */
.iew-col--center::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: var(--iew-line-width);
	background: var(--iew-line-color);
	opacity: 0.4;
	transform: translateX(-50%);
	z-index: 0;
}

/* ---------------------------------------------------------
   CENTER CIRCLE
   --------------------------------------------------------- */
.iew-center {
	position: relative;
	width: var(--iew-circle-size);
	height: var(--iew-circle-size);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}

.iew-center__dashed {
	position: absolute;
	inset: -20px;
	border: 1px dashed var(--iew-dashed-color);
	border-radius: 50%;
}

.iew-center__ring {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: conic-gradient(from 0deg, var(--iew-ring-start), var(--iew-ring-end), var(--iew-ring-start));
	padding: var(--iew-ring-thickness);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 15px 40px rgba(30, 86, 230, 0.25);
}

.iew-center__inner {
	width: 100%;
	height: 100%;
	background: var(--iew-circle-bg);
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px;
}

.iew-center__title {
	font-size: 30px;
	font-weight: 800;
	color: #0d1b3e;
	line-height: 1.2;
	letter-spacing: 0.5px;
}

.iew-center__subtitle {
	font-size: 16px;
	color: #3a4a6b;
	letter-spacing: 3px;
	margin-top: 2px;
}

.iew-center__divider {
	width: 50px;
	height: 3px;
	background: var(--iew-ring-start);
	margin: 14px 0 10px;
	border-radius: 2px;
}

.iew-center__dots {
	display: flex;
	gap: 6px;
}

.iew-center__dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--iew-ring-start);
	display: inline-block;
}

/* nodes around the ring */
.iew-center__node {
	--radius: calc(var(--iew-circle-size) / 2 + var(--iew-ring-thickness) / 2);
	--angle: calc((360deg / var(--total)) * var(--i));
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	background: #fff;
	border: 3px solid var(--iew-dot-color);
	border-radius: 50%;
	transform: rotate(var(--angle)) translate(var(--radius)) rotate(calc(-1 * var(--angle)));
	z-index: 1;
}

/* ---------------------------------------------------------
   MOBILE LIST (hidden on desktop, shown < 992px)
   --------------------------------------------------------- */
.iew-mobile-list {
	display: none;
	flex-direction: column;
	gap: var(--iew-items-gap);
	position: relative;
	padding-left: 40px;
}

.iew-mobile-list::before {
	content: '';
	position: absolute;
	top: 10px;
	bottom: 10px;
	left: 22px;
	width: var(--iew-line-width);
	background: var(--iew-line-color);
	opacity: 0.4;
}

.iew-mobile-list .iew-card-row {
	position: relative;
	align-items: flex-start;
}

.iew-mobile-list .iew-badge--mobile {
	position: absolute;
	left: -40px;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	font-size: 15px;
}

.iew-mobile-list .iew-card {
	width: 100%;
}

.iew-mobile-center {
	position: relative;
	left: -40px;
	width: calc(100% + 40px);
	display: flex;
	justify-content: center;
	padding: 10px 0;
}

.iew-mobile-center .iew-center {
	width: calc(var(--iew-circle-size) * 0.7);
	height: calc(var(--iew-circle-size) * 0.7);
}

.iew-mobile-list .iew-card-row--mobile:nth-child(-n+3) .iew-card {
	flex-direction: row;
}

.iew-mobile-list .iew-card-row--mobile:nth-child(n+5) .iew-card {
	flex-direction: row-reverse;
	text-align: right;
}

.iew-mobile-list .iew-card-row--mobile:nth-child(n+5) .iew-card__title,
.iew-mobile-list .iew-card-row--mobile:nth-child(n+5) .iew-card__desc {
	text-align: right;
}

/* ---------------------------------------------------------
   RESPONSIVE BREAKPOINTS
   --------------------------------------------------------- */
@media (max-width: 1024px) {
	.iew-grid {
		gap: 24px;
	}
	.iew-center {
		width: calc(var(--iew-circle-size) * 0.85);
		height: calc(var(--iew-circle-size) * 0.85);
	}
}

@media (max-width: 991px) {
	.iew-grid {
		display: none;
	}
	.iew-mobile-list {
		display: flex;
	}
}

@media (max-width: 767px) {
	.iew-card {
		padding: 16px;
		border-radius: 12px;
	}
	.iew-card__title {
		font-size: 15px;
	}
	.iew-card__desc {
		font-size: 13px;
	}
	.iew-mobile-list {
		padding-left: 34px;
	}
	.iew-mobile-list::before {
		left: 18px;
	}
	.iew-mobile-list .iew-badge--mobile {
		left: -34px;
		width: 36px;
		height: 36px;
		font-size: 13px;
	}
}
