/* 5th Axis — Past Events: grayscale-to-color card, grid or slider layout */

.axis5th-archive-events {
	--axis5th-archive-title-color: #dd2828;
	--axis5th-archive-subtitle-color: #ffffff;
	--axis5th-archive-overlay-opacity: 0.85;
	--axis5th-archive-columns: 3;
}

.axis5th-archive-card {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3.4;
	text-decoration: none;
}

.axis5th-archive-card__image {
	position: absolute;
	inset: 0;
}

.axis5th-archive-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(0%);
	transition: filter 0.4s ease, transform 0.4s ease;
}

.axis5th-archive-card:hover .axis5th-archive-card__image img {
	filter: grayscale(100%);
	transform: scale(1.04);
}

/* Clean image by default — the gradient scrim and title/subtitle only
   appear together on hover (opacity, not display:none, so the fade is
   smooth rather than an instant snap). */
.axis5th-archive-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 24px;
	background: linear-gradient(to top, rgba(0, 0, 0, var(--axis5th-archive-overlay-opacity)) 0%, rgba(0, 0, 0, 0) 65%);
	opacity: 0;
	transition: opacity 0.35s ease;
}

.axis5th-archive-card:hover .axis5th-archive-card__overlay {
	opacity: 1;
}

.axis5th-archive-card__eyebrow {
	font-family: var(--e-global-typography-57475c0-font-family);
	margin-bottom: 6px;
	font-size: 16px;
	font-weight: 400;
	text-transform: uppercase;
	color: var(--e-global-color-primary);
}

.axis5th-archive-card__subtitle {
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--e-global-color-e735d4d);
}

/* -------------------- Grid layout -------------------- */

.axis5th-archive-events__grid {
	display: grid;
	grid-template-columns: repeat(var(--axis5th-archive-columns, 3), minmax(0, 1fr));
	gap: 20px;
}

@media(max-width: 991px){
	.axis5th-archive-card__overlay{
		opacity: 1;
	}
}
@media only screen and (max-width: 900px) {
	.axis5th-archive-events__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

}

@media only screen and (max-width: 640px) {
	.axis5th-archive-events__grid {
		grid-template-columns: 1fr;
	}
}

/* -------------------- Slider layout -------------------- */

.axis5th-archive-events-swiper {
	/* Clip horizontally (hide off-screen slides while paging) but not
	   vertically, matching the same fix used in axis5th-events.css. */
	overflow-x: hidden;
	overflow-y: visible;
}

.axis5th-archive-events__nav {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 20px;
}

.axis5th-archive-events__arrow {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--e-global-color-primary);
	color: #1a1a1a;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.axis5th-archive-events__arrow:hover:not(.swiper-button-disabled) {
	background: var(--e-global-color-primary);
	border-color: var(--e-global-color-primary);
	color: var(--e-global-color-e735d4d);
}

.axis5th-archive-events__arrow.swiper-button-disabled {
	opacity: 0.4;
	cursor: default;
}

.axis5th-archive-events__empty {
	text-align: center;
	color: #6c6c6c;
	padding: 48px 0;
}
