/**
 * Event card — used inside the events archive grid.
 */

.events-archive__header {
	margin-bottom: 1.5rem;
}

.events-archive__lead {
	color: var(--color-text-2);
	max-width: 60rem;
}

.event-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
}

.event-grid__empty {
	color: var(--color-text-2);
}

.event-archive__toggle {
	margin-top: 2rem;
	font-size: 0.9rem;
}

.event-card {
	position: relative;
	border: 1px solid var(--color-line-3);
	overflow: hidden;
	background: var(--color-background);
	transition: transform 120ms ease, box-shadow 120ms ease;
}

/*
 * `.event-card` intentionally does NOT set `display`. Grid items inside
 * `.event-grid` are positioned by the grid container regardless of their
 * own display value, and a future `[hidden]`-based filter would have the
 * UA `[hidden] { display: none }` rule win cleanly — no override needed.
 */

.event-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.event-card__link {
	color: inherit;
	text-decoration: none;
}

/*
 * Stretched-link pattern: the title anchor's ::after overlay covers the
 * whole card, so clicking anywhere navigates to the event. Other genuine
 * links inside the card (e.g. the location map link) sit above it via
 * z-index so they remain independently clickable.
 */
.event-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
}

.event-card__media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--color-background-2);
}

.event-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.event-card__body {
	padding: 1rem 1.1rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.event-card__category {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.72rem;
	color: var(--color-text);
	font-weight: 600;
}

.event-card__title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
}

.event-card__datetime {
	margin: 0;
	color: var(--color-text-2);
	font-size: 0.9rem;
}

.event-card__date,
.event-card__time {
	display: block;
}

.event-card__location {
	margin: 0;
	color: var(--color-text-2);
	font-size: 0.85rem;
}

.event-card__location-link {
	position: relative;
	z-index: 1;
	color: inherit;
	text-decoration: underline;
}

.event-card__location-link:hover {
	color: var(--color-text);
}

.event-card__excerpt {
	margin: 0.25rem 0 0;
	color: var(--color-text-2);
	font-size: 0.88rem;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.event-card__badge {
	display: inline-block;
	margin-top: 0.5rem;
	padding: 0.18rem 0.55rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: var(--color-background-2);
	color: var(--color-text);
	align-self: flex-start;
}

.event-card__badge--invite {
	background: var(--color-status-waitlist-bg);
	color: var(--color-status-waitlist-text);
}

.event-card__badge--lottery {
	background: var(--color-status-pending-bg);
	color: var(--color-status-pending-text);
}

.event-card__badge--walkin {
	background: var(--color-status-confirmed-bg);
	color: var(--color-status-confirmed-text);
}
