/* Upcoming events
   -------------------------------------------------------------------------- */
.xg-upcoming {
	margin: 48px 0;
}

.xg-upcoming__title {
	margin: 0 0 8px;
	font-size: 40px;
	font-weight: 800;
	color: #006775;
}

.xg-upcoming__sub {
	margin: 0 0 28px;
	font-size: 22px;
	font-weight: 700;
	color: #43A977;
}

.xg-upcoming__grid {
	--xg-upcoming-gap: 24px;
	display: flex;
	flex-wrap: wrap;
	gap: var(--xg-upcoming-gap);
}

.xg-upcoming__card {
	flex: 0 0 calc((100% - 2 * var(--xg-upcoming-gap)) / 3);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 24px;
	border: 1px solid #43A977;
	border-radius: 14px;
	background: #fff;
	text-decoration: none;
	box-sizing: border-box;
	transition: box-shadow 0.15s ease;
}

.xg-upcoming__badge {
	padding: 5px 12px;
	border-radius: 999px;
	background: #E8F6EE;
	font-size: 13px;
	font-weight: 600;
	color: #1B7A63;
}

.xg-upcoming__date {
	font-size: 18px;
	font-weight: 800;
	color: #43A977;
}

.xg-upcoming__name {
	font-size: 20px;
	font-weight: 800;
	line-height: 1.3;
	color: #006775;
}

.xg-upcoming__loc {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #E7F4F9;
	font-size: 13px;
	font-weight: 600;
	color: #006775;
	margin-top: auto;
}

/* Single event: header left, wide card right */
.xg-upcoming--single {
	display: flex;
	align-items: center;
	gap: 48px;
}

.xg-upcoming--single .xg-upcoming__head {
	flex: 0 0 38%;
}

.xg-upcoming--single .xg-upcoming__sub {
	margin-bottom: 0;
}

.xg-upcoming--single .xg-upcoming__grid {
	flex: 1;
}

.xg-upcoming--single .xg-upcoming__card {
	flex: 1 1 100%;
}

.xg-upcoming--single .xg-upcoming__card-top {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
}

/* Past events — year accordions
   -------------------------------------------------------------------------- */
.xg-past-events {
	margin: 48px 0;
}

.xg-past-events__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 0 13px;
	font-size: 20px;
	font-weight: 800;
	color: #006775;
	cursor: pointer;
	list-style: none;
	border-bottom: 1px solid #D2F2F8;
}

.xg-past-events__summary::-webkit-details-marker {
	display: none;
}

.xg-past-events__summary svg {
	color: #43A977;
	transition: transform 0.2s ease;
}

.xg-past-events__year[open] > .xg-past-events__summary svg {
	transform: rotate(180deg);
}

.xg-past-events__list {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 24px 0;
}

.xg-past-event {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 32px;
	padding: 24px;
	border: 1px solid #ADE4EF;
	border-radius: 16px;
	background: #fff;
	text-decoration: none;
	overflow: hidden;
}

.xg-past-event:nth-child(even) {
	flex-direction: row-reverse;
}

.xg-past-event__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.xg-past-event__title {
	font-weight: 900;
	font-size: 32px;
	line-height: 36px;
	letter-spacing: -5%;
	color: #006775;
}

.xg-past-event__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.xg-past-event__pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 999px;
	font-weight: 500;
	font-size: 14px;
	line-height: 16px;
	letter-spacing: 0%;
	text-align: center;
}

.xg-past-event__pill--loc {
	background: #E7F4F9;
	color: #006775;
}

.xg-past-event__pill--date {
	background: #E8F6EE;
	color: #1B7A63;
}

/* Watermark: first tag name, bottom of the text side */
.xg-past-event__mark {
	position: absolute;
	bottom: -0.12em;
	left: 0;
	font-weight: 900;
	font-size: 120px;
	line-height: 85px;
	letter-spacing: -5%;
	text-transform: uppercase;
	color: rgba(67, 169, 119, 0.16);
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
}

.xg-past-event:nth-child(even) .xg-past-event__mark {
	left: auto;
	right: 0;
}

.xg-past-event__thumb {
	flex: 0 0 30%;
	position: relative;
	z-index: 1;
	aspect-ratio: 380/192;
	border-radius: 10px;
	overflow: hidden;
}

.xg-past-event__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

@media (hover: hover) and (pointer: fine) {
	.xg-past-event:hover {
		border-color: #43A977;
	}
	.xg-past-event:hover .xg-past-event__title {
		color: #1B7A63;
	}
	.xg-upcoming__card:hover {
		box-shadow: 0 6px 20px rgba(67, 169, 119, 0.18);
	}
}

@media (max-width: 991px) {
	.xg-past-event,
	.xg-past-event:nth-child(even) {
		flex-direction: column;
		gap: 16px;
		padding: 16px 16px 64px 16px;
	}

	
	.xg-past-event__title {
		font-weight: 900;
		font-size: 20px;
		line-height: 26px;
		letter-spacing: -5%;
	}
	
	.xg-past-event__mark {
		font-weight: 900;
		font-size: 72px;
		line-height: 51px;
		letter-spacing: -5%;
	}
	
	.xg-past-event__thumb {
		flex: none;
		order: -1;
	}
	.xg-upcoming--single {
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
	}

	.xg-upcoming__card {
		flex: 0 0 100% !important;
	}
}