/* IMEA — How It Works (AI-powered Detection & Response) */
.imea-hiw {
	position: relative;
	overflow: hidden;
	padding: 80px 0 0;
	background: rgba(0, 0, 0, 1);
	color: var(--text-color, #fff);
}

/* Static orbit backdrop — glows through the translucent panels. */
.imea-hiw::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: 100%;
	max-width: 100%;
	background: url("../svg/hiw-orbit.png") no-repeat center bottom;
	background-size: cover;
	pointer-events: none;
	z-index: 0;
	height: 100%;
}

.imea-hiw__head,
.imea-hiw__grid {
	position: relative;
	z-index: 1;
}

/* ---------------- Header ---------------- */
.imea-hiw__head { padding-bottom: 64px; }
.imea-hiw__head .container-fluid {
	padding-left: clamp(20px, 4vw, 64px);
	padding-right: clamp(20px, 4vw, 64px);
}
.imea-hiw__eyebrow {
	display: inline-block;
	margin-bottom: 18px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--primary-color, #22b573);
}
.imea-hiw__title {
	margin: 0;
	font-size: 48px;
	line-height: 60px;
	font-weight: 400;
	color: #fff;
}
.imea-hiw__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
}
.imea-hiw__desc {
	margin: 6px 0 26px;
	/* max-width: 520px; */
	font-size: clamp(16px, 1.3vw, 19px);
	line-height: 1.5;
	color: var(--text-muted, rgba(255, 255, 255, .7));
}
.imea-hiw__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 34px;
	border-radius: 6px;
	font-size: 17px;
	font-weight: 500;
	text-decoration: none;
	background: var(--secondary-color, #CCFC00);
	color: var(--text-color);
	transition: filter .2s ease, transform .2s ease;
}
.imea-hiw__cta:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* ---------------- Staircase grid ---------------- */
.imea-hiw__grid {
	--imea-hiw-step: 56px;
	--imea-hiw-cols: 6; /* overridden inline by PHP with the actual card count (4/5/6) */
	display: grid;
	grid-template-columns: repeat(var(--imea-hiw-cols), 1fr);
	align-items: stretch;
	min-height: 620px;
}

.imea-hiw__card {
	position: relative;
	padding: 40px clamp(16px, 1.6vw, 26px) 60px;

	/* Normal state (Figma) */
	background: linear-gradient(
		276.21deg,
		rgba(0, 0, 0, 0) 48.22%,
		rgba(33, 165, 94, 0.5) 122.37%
	);

	/* Right divider that fades top→bottom into #0D3F24 (Figma) */
	border: 0;
	border-right: 1px solid;
	border-image: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0) 0%,
		#0D3F24 100%
	) 1;
	transition: background .25s ease;
}
.imea-hiw__card:last-child { border-right: 0; }

.imea-hiw__card:hover {
	/* Hover state (Figma) — brighter green glow from bottom */
	background: linear-gradient(
		180.67deg,
		rgba(45, 26, 26, 0) -4.15%,
		rgba(7, 250, 119, 0.5) 92.07%
	);
}

.imea-hiw__card-inner {
	position: relative;
	padding-top: calc(var(--imea-hiw-i, 0) * var(--imea-hiw-step));
}
.imea-hiw__num {
	display: block;
	margin-bottom: 20px;
	font-size: 30px;
	font-weight: 400;
	line-height: 1;
	color: var(--text-light, rgba(255, 255, 255, .92));
}
.imea-hiw__card-title {
	margin: 0 0 14px;
	font-size: clamp(17px, 1.3vw, 20px);
	font-weight: 400;
	line-height: 1.25;
	color: #fff;
}
.imea-hiw__card-text {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: #f2f2f2;
	font-weight: 300;
}

/* ---------------- Flat variant (layout-2) ---------------- */
.imea-hiw--layout-2 .imea-hiw__grid { min-height: 0; }
.imea-hiw--layout-2 .imea-hiw__card-inner { padding-top: 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1199px) {
	.imea-hiw__grid { grid-template-columns: repeat(3, 1fr); min-height: 0; }
	.imea-hiw__card-inner { padding-top: 0; }
	.imea-hiw__card {
		border-right: 1px solid;
		border-bottom: 1px solid;
		border-image: linear-gradient(180deg, rgba(255,255,255,0) 0%, #0D3F24 100%) 1;
	}
}
@media (max-width: 767px) {
	.imea-hiw__aside { align-items: flex-start; text-align: left; }
	.imea-hiw__grid { grid-template-columns: 1fr; }
	.imea-hiw__card { border-right: 0; }
	.imea-hiw__title {
		font-size: 28px;
		line-height: normal;
		margin-bottom: 10px;
	}
}