/* MES History Timeline */

.vc_custom_mes_history,
.vc_custom_mes_history > .vc_column_container > .vc_column-inner,
.vc_custom_mes_history_col {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.vc_custom_mes_history .wpb_wrapper {
	max-width: none !important;
}

.mes-history {
	--mes-red: #da251c;
	--mes-grey: #8a8a8a;
	--mes-text: #5a5a5a;
	--mes-text-strong: #1f1a18;
	--mes-node: #8b8b8b;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 48px 3vw 28px;
	background: #ffffff;
	font-family: Arial, Helvetica, sans-serif;
	box-sizing: border-box;
}

.mes-history__header {
	text-align: center;
	margin-bottom: 36px;
}

.mes-history__eyebrow {
	margin: 0 0 6px;
	color: var(--mes-red);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.mes-history__title {
	margin: 0;
	color: var(--mes-text-strong);
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
}

.mes-history__era {
	margin: 0 0 70px;
}

.mes-history__era:last-child {
	margin-bottom: 20px;
}

.mes-history__era-title {
	margin: 0 0 28px;
	text-align: center;
	color: var(--mes-text-strong);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.mes-history__track {
	position: relative;
	width: 100%;
	padding: 0 1.5vw;
}

.mes-history__wave {
	position: absolute;
	left: 5%;
	right: 5%;
	top: calc(170px + 18px + 22px + 42px - 45px);
	width: 90%;
	height: 90px;
	pointer-events: none;
	z-index: 1;
}

.mes-history__list {
	display: grid;
	grid-template-columns: repeat(var(--mes-history-cols, 7), minmax(0, 1fr));
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
	z-index: 2;
}

.mes-history__item {
	display: grid;
	grid-template-rows: minmax(170px, auto) 18px 22px 88px 22px 18px minmax(170px, auto);
	align-items: center;
	justify-items: center;
	min-width: 0;
	padding: 0 10px;
}

.mes-history__text {
	max-width: 210px;
	width: 100%;
	text-align: center;
	color: var(--mes-text);
	font-size: 13.5px;
	line-height: 1.5;
}

.mes-history__text p {
	margin: 0;
}

.mes-history__text strong {
	color: var(--mes-text-strong);
	font-weight: 700;
}

.mes-history__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--mes-red);
}

.mes-history__stem {
	width: 0;
	height: 100%;
	min-height: 16px;
	border-left: 1.5px dashed var(--mes-red);
	justify-self: center;
}

.mes-history__node {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: var(--mes-node);
	box-shadow: 0 0 0 4px #ffffff;
	z-index: 3;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.mes-history__year {
	color: #ffffff;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
}

/* Top text / bottom empty */
.mes-history__item--top .mes-history__text {
	grid-row: 1;
}

.mes-history__item--top .mes-history__dot {
	grid-row: 2;
}

.mes-history__item--top .mes-history__stem {
	grid-row: 3;
}

.mes-history__item--top .mes-history__node {
	grid-row: 4;
}

/* Bottom text / top empty */
.mes-history__item--bottom .mes-history__text {
	grid-row: 7;
}

.mes-history__item--bottom .mes-history__dot {
	grid-row: 6;
}

.mes-history__item--bottom .mes-history__stem {
	grid-row: 5;
}

.mes-history__item--bottom .mes-history__node {
	grid-row: 4;
}

.mes-history__item:hover .mes-history__node,
.mes-history__item:focus-within .mes-history__node {
	background: #6f6f6f;
	transform: scale(1.05);
}

/* Tablet */
@media (max-width: 1199px) {
	.mes-history {
		padding: 40px 2vw 24px;
	}

	.mes-history__text {
		max-width: 160px;
		font-size: 12px;
	}

	.mes-history__node {
		width: 68px;
		height: 68px;
	}

	.mes-history__year {
		font-size: 15px;
	}

	.mes-history__item {
		grid-template-rows: minmax(155px, auto) 14px 18px 78px 18px 14px minmax(155px, auto);
		padding: 0 6px;
	}

	.mes-history__wave {
		top: calc(155px + 14px + 18px + 39px - 40px);
		height: 80px;
	}
}

/* Stacked vertical timeline on mobile / small tablet */
@media (max-width: 991px) {
	.mes-history {
		padding: 24px 0 10px;
	}

	.mes-history__title {
		font-size: 26px;
	}

	.mes-history__era {
		margin-bottom: 48px;
	}

	.mes-history__wave {
		display: none;
	}

	.mes-history__list {
		display: flex;
		flex-direction: column;
		gap: 0;
		padding-left: 28px;
		border-left: 2px solid var(--mes-red);
		margin-left: 18px;
	}

	.mes-history__item {
		display: grid;
		grid-template-columns: 84px 1fr;
		grid-template-rows: auto;
		gap: 8px 16px;
		align-items: start;
		padding: 18px 0;
		position: relative;
	}

	.mes-history__item::before {
		content: "";
		position: absolute;
		left: -33px;
		top: 42px;
		width: 10px;
		height: 10px;
		border-radius: 50%;
		background: var(--mes-red);
		box-shadow: 0 0 0 3px #ffffff;
	}

	.mes-history__item--top .mes-history__text,
	.mes-history__item--bottom .mes-history__text,
	.mes-history__item--top .mes-history__dot,
	.mes-history__item--bottom .mes-history__dot,
	.mes-history__item--top .mes-history__stem,
	.mes-history__item--bottom .mes-history__stem,
	.mes-history__item--top .mes-history__node,
	.mes-history__item--bottom .mes-history__node {
		grid-row: auto;
	}

	.mes-history__node {
		grid-column: 1;
		grid-row: 1;
		width: 70px;
		height: 70px;
	}

	.mes-history__text {
		grid-column: 2;
		grid-row: 1;
		max-width: none;
		text-align: left;
		font-size: 13px;
		padding-top: 10px;
	}

	.mes-history__dot,
	.mes-history__stem {
		display: none;
	}
}
