/* Legacy EPC image grid, used by pages that still contain these block classes. */
.epc-build-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}

.epc-build-grid > .wp-block-uagb-container {
	min-width: 0;
	overflow: hidden;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(15, 57, 79, .08);
}

.epc-build-grid-img,
.epc-build-grid-img .wp-block-uagb-image__figure,
.epc-build-grid-img picture {
	display: block;
	width: 100%;
	overflow: hidden;
}

.epc-build-grid-img img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform .3s ease;
}

.epc-build-grid > .wp-block-uagb-container:hover .epc-build-grid-img img {
	transform: scale(1.03);
}

@media (max-width: 1359px) {
	.epc-build-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.epc-build-grid { grid-template-columns: 1fr; }
}

/* Eight-stage EPC timeline on the integration page. The content remains core blocks. */
.hs-epc-stages {
	--hs-epc-blue: #0e4c96;
	--hs-epc-blue-deep: #123968;
	position: relative;
	isolation: isolate;
	padding: clamp(58px, 6vw, 92px) 24px 38px;
	background: #dceeff url('../images/epc-process-snow-mountains.png') center center / cover no-repeat;
	color: #193a5e;
}

.hs-epc-stages::before {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(7,60,120,.16) 0%, rgba(19,82,151,.08) 24%, rgba(255,255,255,.67) 49%, rgba(255,255,255,.91) 100%);
	content: '';
}

.hs-epc-stages__inner {
	width: 100%;
	margin: 0 auto;
}

.hs-epc-stages__header {
	max-width: 1100px;
	margin: 0 auto 48px;
	text-align: center;
}

.hs-epc-stages__eyebrow {
	margin: 0 0 8px;
	color: #e9f6ff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .14em;
}

.hs-epc-stages__title {
	margin: 0;
	color: #fff;
	font-size: clamp(32px, 3.3vw, 52px);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: .02em;
	text-shadow: 0 2px 14px rgba(10, 51, 98, .38);
}

.hs-epc-stages__intro {
	margin: 14px 0 0;
	color: #f5fbff;
	font-size: clamp(15px, 1.2vw, 19px);
	font-weight: 600;
	line-height: 1.7;
	text-shadow: 0 1px 8px rgba(10, 51, 98, .42);
}

.hs-epc-stages__grid {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
}

.hs-epc-stages__card {
	position: relative;
	min-width: 0;
	margin: 0;
	padding: 0 4px;
	text-align: center;
}

.hs-epc-stages__card::before {
	position: absolute;
	top: 25px;
	left: -8px;
	width: calc(100% + 16px);
	height: 2px;
	background: rgba(255,255,255,.88);
	content: '';
}

.hs-epc-stages__card-head {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 164px;
	margin: 0;
}

.hs-epc-stages__number {
	position: relative;
	display: grid;
	width: 52px;
	height: 52px;
	margin: 0;
	place-items: center;
	border: 3px solid #fff;
	border-radius: 50%;
	background: #8ac5f2;
	box-shadow: 0 0 0 1px rgba(255,255,255,.9), 0 4px 14px rgba(13, 63, 127, .25);
	color: #fff;
	font-size: 23px;
	font-weight: 800;
	line-height: 1;
}

.hs-epc-stages__card-head .hs-epc-stages__number {
	margin: 0 !important;
}

.hs-epc-stages__number::after {
	position: absolute;
	top: 49px;
	left: 50%;
	width: 2px;
	height: 22px;
	transform: translateX(-50%);
	background: rgba(255,255,255,.9);
	content: '';
}

.hs-epc-stages__card:nth-child(2) .hs-epc-stages__number { background: #73b8ef; }
.hs-epc-stages__card:nth-child(3) .hs-epc-stages__number { background: #5aa9e6; }
.hs-epc-stages__card:nth-child(4) .hs-epc-stages__number { background: #3d93d5; }
.hs-epc-stages__card:nth-child(5) .hs-epc-stages__number { background: #247cc4; }
.hs-epc-stages__card:nth-child(6) .hs-epc-stages__number { background: #1b68ae; }
.hs-epc-stages__card:nth-child(7) .hs-epc-stages__number { background: #498fc9; }
.hs-epc-stages__card:nth-child(8) .hs-epc-stages__number { background: #80b6e0; }

.hs-epc-stages__card-title {
	margin: 34px 0 0;
	color: var(--hs-epc-blue-deep);
	font-size: clamp(16px, 1.35vw, 20px);
	font-weight: 800;
	line-height: 1.4;
}

.hs-epc-stages__english {
	margin: 3px 0 0;
	color: var(--hs-epc-blue);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
}

.hs-epc-stages__details {
	display: grid;
	align-content: start;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hs-epc-stages__card .hs-epc-stages__details {
	margin-block-start: 0 !important;
}

.hs-epc-stages__details li {
	margin: 0;
	padding: 0;
	color: #183552;
	font-size: clamp(12px, .94vw, 14px);
	font-weight: 600;
	line-height: 1.5;
	overflow-wrap: anywhere;
	text-shadow: 0 1px 2px rgba(255,255,255,.9);
}

.hs-epc-stages__details li::before { content: none; }

.hs-epc-stages__note {
	display: flex;
	justify-content: center;
	align-items: baseline;
	gap: 6px;
	margin: 42px auto 0;
	padding: 14px 18px;
	border-top: 1px solid rgba(35, 100, 165, .25);
	background: rgba(255,255,255,.66);
	color: #234464;
	text-align: center;
}

.hs-epc-stages__note-label,
.hs-epc-stages__note-text {
	margin: 0;
	color: inherit;
	font-size: 13px;
	line-height: 1.7;
}

.hs-epc-stages__note-label { flex: none; font-weight: 800; }

@media (max-width: 1379px) {
	.hs-epc-stages__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 35px; }
	.hs-epc-stages__card-head { min-height: 145px; }
	.hs-epc-stages__details li { font-size: 14px; }
	.hs-epc-stages__details { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.67); }
}

@media (max-width: 899px) {
	.hs-epc-stages__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
	.hs-epc-stages__card-head { min-height: 132px; }
	.hs-epc-stages__card-title { font-size: 18px; }
	.hs-epc-stages__details { border: 1px solid rgba(34, 95, 153, .14); }
}

@media (max-width: 600px) {
	.hs-epc-stages { padding: 60px 18px 28px; background-position: center top; background-size: auto 540px; background-color: #eef6ff; }
	.hs-epc-stages::before { background: linear-gradient(180deg, rgba(10,61,121,.16) 0%, rgba(255,255,255,.62) 380px, rgba(255,255,255,.94) 560px); }
	.hs-epc-stages__header { margin-bottom: 36px; }
	.hs-epc-stages__title { font-size: 30px; }
	.hs-epc-stages__intro { font-size: 14px; }
	.hs-epc-stages__grid { display: block; }
	.hs-epc-stages__card { display: grid; grid-template-columns: 62px minmax(0, 1fr); padding: 0 0 28px; text-align: left; }
	.hs-epc-stages__card::before { top: 0; bottom: 0; left: 25px; width: 2px; height: auto; }
	.hs-epc-stages__card:last-child::before { bottom: 28px; }
	.hs-epc-stages__card-head { display: grid; grid-template-columns: 62px minmax(0, 1fr); grid-column: 1 / -1; align-items: center; min-height: 56px; }
	.hs-epc-stages__number { grid-column: 1; grid-row: 1 / span 2; }
	.hs-epc-stages__number::after { content: none; }
	.hs-epc-stages__card-title { grid-column: 2; margin: 0; font-size: 19px; }
	.hs-epc-stages__english { grid-column: 2; margin: 0; }
	.hs-epc-stages__details { grid-column: 2; gap: 6px; margin: 6px 0 0; }
	.hs-epc-stages__card .hs-epc-stages__details { margin-block-start: 6px !important; }
	.hs-epc-stages__details li { font-size: 14px; }
	.hs-epc-stages__note { display: block; margin-top: 8px; text-align: left; }
	.hs-epc-stages__note-label { display: inline; margin-right: 4px; }
	.hs-epc-stages__note-text { display: inline; }
}
