/* =========================================================================
   Events archive — Metropolitan style
   Loaded only on the Event archive (see functions.php snippet)
   ========================================================================= */

.mp-events {
	--mp-yellow: #CFB259;
	--mp-yellow-dark: #0089bd;
	--mp-ink: #16181d;
	--mp-muted: #7a828c;
	--mp-line: #e6e9ee;
	--mp-radius: 10px;
	--mp-shell: 1440px;

	color: var(--mp-ink);
	font-family: inherit;
}

.mp-events *,
.mp-events *::before,
.mp-events *::after {
	box-sizing: border-box;
}

.mp-shell {
	width: 100%;
	max-width: var(--mp-shell);
	margin-inline: auto;
	padding-inline: 20px;
}

/* -------------------------------------------------------------------------
   Hero — upcoming event
   ---------------------------------------------------------------------- */
.mp-hero {
	position: relative;
	min-height: 520px;
	display: flex;
	background-color: #1c2430;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	color: #fff;
	overflow: hidden;
}

/* Dark wash so white type stays readable over any photo */
.mp-hero__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(9, 14, 22, 0.55) 0%,
		rgba(9, 14, 22, 0.15) 38%,
		rgba(9, 14, 22, 0.72) 100%
	);
	pointer-events: none;
}

.mp-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding-block: 26px 56px;
}

/* Breadcrumbs */
.mp-crumbs {
	display: flex;
	align-items: center;
	gap: 22px;
	font-size: 13px;
	line-height: 1;
}

.mp-crumbs a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
}

.mp-crumbs a:hover {
	color: #fff;
	text-decoration: underline;
}

.mp-crumbs__trail {
	display: flex;
	align-items: center;
	gap: 8px;
	color: rgba(255, 255, 255, 0.7);
}

.mp-crumbs__trail [aria-current="page"] {
	color: #fff;
}

/* Hero copy block */
.mp-hero__body {
	max-width: 640px;
	margin-top: auto;
}

.mp-tag {
	display: inline-block;
	margin-bottom: 16px;
	padding: 6px 12px;
	border-radius: 6px;
	background: var(--mp-yellow);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.01em;
}

.mp-hero__title {
	margin: 0 0 14px;
	font-size: clamp(30px, 4vw, 46px);
	font-weight: 700;
	line-height: 1.14;
	letter-spacing: -0.01em;
	color: #fff;
}

.mp-hero__meta {
	margin: 0 0 26px;
	font-size: 15px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.9);
}

/* -------------------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------------- */
.mp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.mp-btn--solid {
	padding: 15px 26px;
	background: var(--mp-yellow);
	color: #fff;
}

.mp-btn--solid:hover,
.mp-btn--solid:focus-visible {
	background: var(--mp-yellow-dark);
	color: #fff;
}

.mp-btn--ghost {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--mp-yellow);
	background: transparent;
	color: var(--mp-yellow);
}

.mp-btn--ghost:hover,
.mp-btn--ghost:focus-visible {
	background: var(--mp-yellow);
	color: #fff;
}

/* -------------------------------------------------------------------------
   Past events
   ---------------------------------------------------------------------- */
.mp-past {
	padding-block: 80px 96px;
	background: #fff;
}

.mp-past__title {
	margin: 0 0 34px;
	font-size: clamp(26px, 3vw, 34px);
	font-weight: 700;
	letter-spacing: -0.01em;
}

.mp-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

/* Card */
.mp-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--mp-line);
	border-radius: var(--mp-radius);
	background: #fff;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mp-card:hover {
	box-shadow: 0 10px 28px rgba(16, 24, 40, 0.09);
	transform: translateY(-2px);
}

.mp-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #eef1f4;
}

.mp-card__img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.mp-card:hover .mp-card__img {
	transform: scale(1.04);
}

/* City chip on the photo */
.mp-chip {
	position: absolute;
	top: 12px;
	left: 12px;
	max-width: calc(100% - 24px);
	padding: 6px 10px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.94);
	color: var(--mp-ink);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	backdrop-filter: blur(3px);
}

.mp-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 18px 18px;
}

.mp-card__title {
	margin: 0 0 18px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
}

.mp-card__title a {
	color: var(--mp-ink);
	text-decoration: none;
}

.mp-card__title a:hover {
	color: var(--mp-yellow);
}

/* Meta block is pushed to the bottom so every button lines up */
.mp-card__meta {
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--mp-line);
}

.mp-card__date {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 500;
	color: var(--mp-ink);
}

.mp-card__place {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--mp-muted);
}

.mp-card__body .mp-btn--ghost {
	margin-top: 16px;
}

.mp-empty {
	padding: 48px 0;
	color: var(--mp-muted);
}

/* -------------------------------------------------------------------------
   Pagination
   ---------------------------------------------------------------------- */
.mp-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 56px;
}

.mp-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	border-radius: 6px;
	color: var(--mp-ink);
	font-size: 14px;
	text-decoration: none;
	transition: background-color 0.16s ease, color 0.16s ease;
}

.mp-pager a.page-numbers:hover {
	background: #f2f5f8;
}

.mp-pager .page-numbers.current {
	background: var(--mp-yellow);
	color: #fff;
	font-weight: 600;
}

.mp-pager .page-numbers.dots {
	color: var(--mp-muted);
}

.mp-pager .next,
.mp-pager .prev {
	color: var(--mp-ink);
	font-weight: 500;
}

/* -------------------------------------------------------------------------
   Focus + motion baseline
   ---------------------------------------------------------------------- */
.mp-events a:focus-visible {
	outline: 2px solid var(--mp-yellow);
	outline-offset: 2px;
	border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
	.mp-events *,
	.mp-events *::before,
	.mp-events *::after {
		transition: none !important;
		animation: none !important;
	}
}

/* -------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.mp-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.mp-hero {
		min-height: 440px;
	}

	.mp-crumbs__back {
		display: none;
	}

	.mp-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px;
	}

	.mp-past {
		padding-block: 48px 64px;
	}
}

@media (max-width: 520px) {
	.mp-grid {
		grid-template-columns: 1fr;
	}

	.mp-btn--solid {
		width: 100%;
	}
}
