/* Events (categories/events_calendar_legacy). Built on inner.css tokens;
   direction in DESIGN.md. */

[x-cloak] { display: none !important; }

/* ---------- filters ---------- */
.ev-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 72px; padding: 16px;
	background: #fff; border-radius: var(--tp-radius); box-shadow: 0 2px 4px rgba(31, 47, 48, .05), 0 24px 48px -32px rgba(31, 47, 48, .35); }
.ev-field { margin: 0; }
.ev-field--grow { flex: 1 1 240px; }
.ev-select, .ev-input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #cfd8d7; border-radius: var(--tp-radius);
	background: #fff; color: var(--tp-ink); font: inherit; font-size: 16px; }
.ev-select { min-width: 180px; cursor: pointer; }
.ev-select:focus, .ev-input:focus { outline: none; border-color: var(--tp-accent); box-shadow: 0 0 0 3px rgba(44, 110, 107, .18); }
.ev-clear { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--tp-accent); font-weight: 700; font-size: 15px; cursor: pointer; }
.ev-clear:hover { color: var(--tp-accent-ink); text-decoration: underline; }
.ev-count { margin-inline-start: auto; padding: 0 6px; font-size: 14px; font-weight: 600; color: var(--tp-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 639px) {
	.ev-toolbar { margin-bottom: 48px; }
	.ev-field:not(.ev-field--grow) { flex: 1 1 140px; }
	.ev-select { min-width: 0; }
}

/* ---------- upcoming: date, poster, details ---------- */
.ev-next { margin-bottom: 112px; }
.ev-next-list { display: grid; gap: 24px; }
.ev-feature { position: relative; display: grid; grid-template-columns: 180px minmax(0, 300px) minmax(0, 1fr); background: #fff;
	border-radius: var(--tp-radius); overflow: hidden; box-shadow: 0 2px 4px rgba(31, 47, 48, .06), 0 30px 60px -32px rgba(31, 47, 48, .42); }
.ev-feature--noimg { grid-template-columns: 180px minmax(0, 1fr); }
.ev-feature-date { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 32px 16px;
	background: var(--tp-band); color: #fff; text-align: center; }
.ev-day { font-family: var(--tp-display); font-weight: 700; font-size: 104px; line-height: .85; }
.ev-month { font-family: var(--tp-display); font-weight: 600; text-transform: uppercase; font-size: 22px; line-height: 1; color: var(--tp-sage); }
.ev-feature-media { background: var(--tp-tint); }
.ev-feature-media img { display: block; width: 100%; height: 100%; max-height: 360px; object-fit: contain; }
.ev-feature-body { display: flex; flex-direction: column; gap: 12px; padding: 36px 40px; }
.ev-kicker { margin: 0; font-size: 14px; font-weight: 700; color: var(--tp-accent); }
.ev-feature-title { margin: 0; font-family: var(--tp-display); text-transform: uppercase; font-weight: 600; font-size: clamp(30px, 3vw, 44px);
	line-height: .98; color: var(--tp-ink); text-wrap: balance; }
.ev-feature-title a { color: inherit; }
.ev-feature-title a:hover { color: var(--tp-accent-ink); }
.ev-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0; padding: 0; font-size: 16px; font-weight: 600; color: var(--tp-body); }
.ev-facts li[style*="display: none"] + li::before { display: none; }
.ev-summary { margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--tp-muted); max-width: 62ch; }
.ev-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 10px; }
.ev-link { min-height: 44px; display: inline-flex; align-items: center; padding: 0; border: 0; background: none; font: inherit; font-size: 15px;
	font-weight: 700; color: var(--tp-accent); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(44, 110, 107, .35);
	text-underline-offset: 4px; }
.ev-link:hover { color: var(--tp-accent-ink); text-decoration-color: currentColor; }
@media (max-width: 991px) {
	.ev-feature, .ev-feature--noimg { grid-template-columns: 120px minmax(0, 1fr); }
	.ev-feature-media { grid-column: 2; grid-row: 1; }
	.ev-feature-body { grid-column: 1 / -1; padding: 28px 28px 30px; }
	.ev-day { font-size: 72px; }
	.ev-month { font-size: 18px; }
}
@media (max-width: 559px) {
	.ev-feature, .ev-feature--noimg { grid-template-columns: 96px minmax(0, 1fr); }
	.ev-feature-date { padding: 20px 8px; }
	.ev-day { font-size: 56px; }
	.ev-month { font-size: 15px; }
	.ev-feature-body { padding: 22px 20px 24px; }
}

/* ---------- the archive, a year at a time ---------- */
.ev-year + .ev-year { margin-top: 88px; }
.ev-year-title { display: flex; align-items: center; gap: 24px; margin: 0 0 28px; font-family: var(--tp-display); font-weight: 700;
	font-size: clamp(56px, 6vw, 88px); line-height: .9; color: var(--tp-ink); }
.ev-year-title::after { content: ""; flex: 1; height: 1px; background: var(--tp-line); }
.ev-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 1199px) { .ev-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 479px) { .ev-grid { grid-template-columns: minmax(0, 1fr); } }

.ev-card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--tp-radius); overflow: hidden;
	transition: transform .35s var(--tp-ease-out), box-shadow .35s var(--tp-ease-out); }
.ev-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; z-index: 2; background: var(--tp-accent);
	transform: scaleX(0); transform-origin: left center; transition: transform .45s var(--tp-ease-out); }
.ev-card:focus-within { box-shadow: 0 0 0 3px rgba(44, 110, 107, .35); }
.ev-card:focus-within::before { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
	.ev-card:hover { box-shadow: var(--tp-shadow); }
	.ev-card:hover::before { transform: scaleX(1); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
	.ev-card:hover { transform: translateY(-4px); }
}
/* Square announcement posters and wide photographs side by side: a 4:3 box
   on the tint, the picture whole inside it. */
.ev-card-media { aspect-ratio: 4 / 3; background: var(--tp-tint); }
.ev-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ev-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 22px; }
.ev-card-date { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; font-size: 14px; font-weight: 700; color: var(--tp-accent); }
.ev-card-type { font-weight: 600; color: var(--tp-muted); }
.ev-card-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; color: var(--tp-ink); overflow-wrap: anywhere; }
.ev-card-title a { color: inherit; }
.ev-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ev-card-title a:focus-visible { outline: none; }
.ev-card-place { margin: 0; font-size: 15px; color: var(--tp-muted); }

.ev-more { display: block; min-height: 52px; margin: 56px auto 0; padding: 12px 32px; border: 1.5px solid var(--tp-accent); border-radius: 999px;
	background: transparent; color: var(--tp-accent); font-weight: 700; font-size: 16px; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.ev-more:hover { background: var(--tp-accent); color: #fff; }
.ev-more:active { transform: scale(.98); }
