/**
 * Upcoming Events
 */

.module.upcoming-events header {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--text-spacing-small);
	justify-content: space-between;
}

.module.upcoming-events header .btn {
	white-space: nowrap;
}

.module.upcoming-events header + ul {
	margin-top: var(--text-spacing-xxlarge);
}

.module.upcoming-events ul {
	align-items: stretch;
	display: flex;
	flex-direction: column;
	gap: var(--text-spacing-xlarge);
	list-style: none;
	margin: 0;
	padding: 0;
}

/*
 * Event artwork is flyer-style — text and borders baked into the image — so
 * show it whole, the same as the event detail hero. Drops the card's fixed
 * 269/200 ratio and the global .media cover contract.
 */

.module.upcoming-events .card.event .media {
	aspect-ratio: auto;
}

.module.upcoming-events .card.event .media img {
	height: auto;
	position: relative;
}

.module.upcoming-events .card .btn.tertiary {
	border-bottom: none;
	padding-bottom: 4px;
	position: relative;
}

.module.upcoming-events .card .btn.tertiary::after {
	background: var(--goldie-yellow);
	bottom: 0;
	content: '';
	height: 2px;
	left: 0;
	position: absolute;
	transition: background .3s ease, transform .3s ease;
	width: 100%;
}

.module.upcoming-events .card .btn.tertiary:hover::after,
.module.upcoming-events .card:hover .btn.tertiary::after {
	background: var(--goldie-yellow-hover);
	transform: translateY(-2px);
}

.module.upcoming-events .card .btn.tertiary:hover,
.module.upcoming-events .card:hover .btn.tertiary {
	color: var(--russian-blue-hover);
}

/** Dark Background (Russian Blue) **/

.module.upcoming-events.background-russian-blue .card .date {
	color: var(--husky-blue-25);
}

.module.upcoming-events.background-russian-blue a.card.event:hover .heading-4,
.module.upcoming-events.background-russian-blue .card .btn.tertiary:hover,
.module.upcoming-events.background-russian-blue .card:hover .btn.tertiary {
	color: var(--white);
}

/*
 * ====================================================================== *
 * MQ <=950px — Tablet
 * ====================================================================== *
 */

@media only screen and (max-width: calc(950rem / 16)) {

	.module.upcoming-events header + ul {
		margin-top: var(--text-spacing-xlarge);
	}

	.module.upcoming-events header .btn {
		margin-right: 0;
	}

	.module.upcoming-events .card.event {
		gap: var(--text-spacing-large);
	}

	.module.upcoming-events .card.event .content {
		padding-left: 0;
	}

	.module.upcoming-events .card.event .media {
		width: 320px;
	}

}

/*
 * ====================================================================== *
 * MQ <=650px — Mobile
 * ====================================================================== *
 */

@media only screen and (max-width: calc(650rem / 16)) {

	.module.upcoming-events header + ul {
		margin-top: var(--text-spacing-xlarge);
	}

	.module.upcoming-events ul {
		flex-direction: row;
		gap: var(--text-spacing-small);
		margin-left: var(--viewport-edge);
		margin-right: var(--viewport-edge);
		overflow-x: auto;
		padding-left: calc(var(--viewport-edge) * -1);
		padding-right: calc(var(--viewport-edge) * -1);
		scrollbar-width: none;
	}

	.module.upcoming-events ul::-webkit-scrollbar {
		display: none;
	}

	.module.upcoming-events li {
		flex-shrink: 0;
		width: 269px;
	}

	.module.upcoming-events .card.event {
		gap: var(--text-spacing-small);
	}

	.module.upcoming-events .card.event .media {
		width: 269px;
	}

	.module.upcoming-events .card.event .content {
		gap: var(--text-spacing-xsmall);
		padding-bottom: 8px;
	}

}
