/*
 * Centerly — public Events surface (v2).
 *
 * ISLAND rules (same as give.css): every COLOR is a token scoped to the surface
 * by Core\PublicBrand; the ONE exception is a center-owned category color, which
 * the server prints inline (background = tint, text = readable ink). Non-color
 * values are literals. LAYOUT lives here now — the inline `!important` layout
 * PublicView used to fight themes with has moved into these scoped rules.
 *
 * Mobile-first: the month/week grids are HIDDEN below 720px and the day-by-day
 * agenda shows instead, so a phone never gets a seven-column table (Planning
 * Center / Subsplash both force list on mobile; this is the right call).
 *
 * Accessibility: focus is always visible; category color is never the only
 * carrier of meaning (text rides along, some of it visually hidden via
 * .c-sr-only); the month/week views are real <table>s with scope and caption.
 */

.c-evsurface { color: var(--c-ink); font-size: 16px; line-height: 1.5; }
.c-evsurface *, .c-evsurface *::before, .c-evsurface *::after { box-sizing: border-box; }
.c-evsurface .c-ev__inner { padding: 8px 0; max-width: 1120px; margin: 0 auto; }

/* Visually hidden but in the reading order. */
.c-evsurface .c-sr-only, .c-ev-lb .c-sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Focus is always visible. */
.c-evsurface a:focus-visible, .c-evsurface button:focus-visible,
.c-evsurface summary:focus-visible, .c-evsurface input:focus-visible,
.c-ev-lb a:focus-visible, .c-ev-lb button:focus-visible {
	outline: 2px solid var(--c-primary); outline-offset: 2px; border-radius: 3px;
}

/* --- Header ----------------------------------------------------------- */
.c-evsurface .c-ev__head { margin-bottom: 12px; }
.c-evsurface .c-ev__title { margin: 0 0 6px; font-size: 40px; line-height: 1.1; font-weight: 700; color: var(--c-ink); }
.c-evsurface .c-ev__lede { margin: 0 0 16px; max-width: 60ch; color: var(--c-ink-secondary); font-size: 17px; }

/* --- Controls bar: view switcher + subscribe -------------------------- */
.c-evsurface .c-ev__bar {
	display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
	justify-content: space-between; margin-bottom: 12px;
}
.c-evsurface .c-ev__views {
	display: inline-flex; flex-wrap: wrap; background: var(--c-surface-2);
	border: 1px solid var(--c-border); border-radius: 999px; padding: 3px; gap: 2px;
}
.c-evsurface .c-ev__view {
	display: inline-block; padding: 7px 14px; border-radius: 999px; font-weight: 600;
	font-size: 14px; text-decoration: none; color: var(--c-ink-secondary);
}
.c-evsurface .c-ev__view.is-active {
	background: var(--c-surface); color: var(--c-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.c-evsurface .c-ev__subs { display: inline-flex; }

/* --- Add to calendar / Subscribe (native <details> disclosure) -------- */
.c-evsurface .c-atc { position: relative; display: inline-block; }
.c-evsurface .c-atc__btn {
	display: inline-block; padding: 9px 16px; border-radius: 10px;
	border: 1px solid var(--c-primary); background: var(--c-primary); color: var(--c-on-primary);
	font-weight: 600; font-size: 15px; cursor: pointer; list-style: none;
}
.c-evsurface .c-atc__btn::-webkit-details-marker { display: none; }
.c-evsurface .c-atc__menu {
	position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 230px;
	background: var(--c-surface); border: 1px solid var(--c-border-strong);
	border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18); padding: 6px;
}
.c-evsurface .c-atc__grouphd {
	margin: 6px 8px 2px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
	text-transform: uppercase; color: var(--c-ink-muted);
}
.c-evsurface .c-atc__item {
	display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none;
	color: var(--c-ink); font-size: 15px;
}
.c-evsurface .c-atc__item:hover { background: var(--c-surface-2); }

/* --- Search + filter form --------------------------------------------- */
.c-evsurface .c-ev__filters {
	display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px;
}
.c-evsurface .c-ev__field { display: inline-flex; }
.c-evsurface .c-ev__field input {
	padding: 8px 12px; border: 1px solid var(--c-border-strong); border-radius: 8px;
	background: var(--c-surface); color: var(--c-ink); font-size: 15px; font-family: inherit;
}
.c-evsurface .c-ev__searchbtn {
	padding: 8px 16px; border: 1px solid var(--c-primary); border-radius: 8px;
	background: var(--c-primary); color: var(--c-on-primary); font-weight: 600;
	font-size: 15px; cursor: pointer; font-family: inherit;
}
.c-evsurface .c-ev__clear {
	padding: 8px 10px; color: var(--c-ink-secondary); font-size: 14px; text-decoration: underline;
}

/* --- Category chips + legend ------------------------------------------ */
.c-evsurface .c-ev__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.c-evsurface .c-ev__chip {
	display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
	border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-ink-secondary);
	font-weight: 600; font-size: 14px; text-decoration: none;
}
.c-evsurface .c-ev__chip.is-active { border-color: var(--c-primary); color: var(--c-primary); }
.c-evsurface .c-ev__dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }

/* --- List: month groups + image cards --------------------------------- */
.c-evsurface .c-ev__month { margin-bottom: 14px; }
.c-evsurface .c-ev__monthhd {
	position: sticky; top: 0; z-index: 2; margin: 0 0 10px; padding: 8px 0;
	background: var(--c-surface); font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
	text-transform: uppercase; color: var(--c-ink-secondary); border-bottom: 1px solid var(--c-border);
}
.c-evsurface .c-ev__cards { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 22px; }
.c-evsurface .c-ev__card {
	display: flex; flex-direction: column; gap: 12px; padding: 14px;
	border: 1px solid var(--c-border); border-radius: 14px; background: var(--c-surface);
}
.c-evsurface .c-ev__cardmedia { border-radius: 10px; overflow: hidden; }
.c-evsurface .c-ev__cardmain { display: flex; gap: 16px; min-width: 0; }
.c-evsurface .c-ev__date { flex: 0 0 auto; width: 62px; text-align: center; }
.c-evsurface .c-ev__mon { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-ink-muted); }
.c-evsurface .c-ev__day { font-size: 30px; font-weight: 700; line-height: 1; color: var(--c-ink); }
.c-evsurface .c-ev__wd { font-size: 12px; color: var(--c-ink-muted); }
.c-evsurface .c-ev__body { flex: 1 1 auto; min-width: 0; }
.c-evsurface .c-ev__name { margin: 8px 0 4px; font-size: 19px; font-weight: 700; line-height: 1.25; color: var(--c-ink); }
.c-evsurface .c-ev__name a { color: inherit; text-decoration: none; }
.c-evsurface .c-ev__name a:hover { text-decoration: underline; }
.c-evsurface .c-ev__meta { margin: 0; color: var(--c-ink-secondary); font-size: 15px; }
.c-evsurface .c-ev__cancelflag { color: var(--c-bad); font-weight: 700; }

/* Featured image + the category-colored fallback tile (one 16:9 ratio). */
.c-evsurface .c-ev__cardimg, .c-evsurface .c-ev__gimg,
.c-evsurface .c-ev__tile { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.c-evsurface .c-ev__tile {
	display: flex; align-items: center; justify-content: center; text-align: center;
	padding: 10px; border-radius: 10px; font-weight: 700; letter-spacing: 0.02em;
	background: var(--c-surface-2); color: var(--c-ink-secondary);
}
.c-evsurface .c-ev__tile span { font-size: 16px; }

/* --- Gallery ---------------------------------------------------------- */
.c-evsurface .c-ev__gallery {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 22px;
}
.c-evsurface .c-ev__gcard { border: 1px solid var(--c-border); border-radius: 14px; overflow: hidden; background: var(--c-surface); }
.c-evsurface .c-ev__gmedia { display: block; }
.c-evsurface .c-ev__gbody { padding: 12px 14px 14px; }
.c-evsurface .c-ev__gname { margin: 8px 0 4px; font-size: 17px; font-weight: 700; line-height: 1.25; color: var(--c-ink); }
.c-evsurface .c-ev__gname a { color: inherit; text-decoration: none; }
.c-evsurface .c-ev__gname a:hover { text-decoration: underline; }

/* --- Pills, canceled -------------------------------------------------- */
.c-evsurface .c-ev__pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.c-evsurface .is-canceled > a, .c-evsurface .c-ev__name.is-canceled a,
.c-evsurface .c-cal2__evt.is-canceled, .c-evsurface .c-evd__title.is-canceled { text-decoration: line-through; }
.c-evsurface .c-ev__card.is-canceled, .c-evsurface .c-ev__gcard.is-canceled, .c-evsurface .c-evd__hero.is-canceled { opacity: 0.75; }

.c-evsurface .c-ev__empty { padding: 40px 0; text-align: center; color: var(--c-ink-muted); font-size: 16px; }

/* --- Calendar shell + period nav -------------------------------------- */
.c-evsurface .c-cal2__nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.c-evsurface .c-cal2__btn {
	display: inline-block; padding: 7px 12px; border: 1px solid var(--c-border-strong); border-radius: 8px;
	background: var(--c-surface); color: var(--c-ink); font-weight: 600; font-size: 14px; text-decoration: none;
}
.c-evsurface .c-cal2__title { margin: 0 0 0 6px; font-size: 22px; font-weight: 700; color: var(--c-ink); }

/* --- Month table (accessible) ----------------------------------------- */
.c-evsurface .c-cal2__table {
	display: none; width: 100%; border-collapse: collapse; table-layout: fixed;
	border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden;
}
.c-evsurface .c-cal2__table th {
	padding: 8px 6px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
	color: var(--c-ink-muted); background: var(--c-surface-2); border-bottom: 1px solid var(--c-border);
}
.c-evsurface .c-cal2__table th abbr { text-decoration: none; }
.c-evsurface .c-cal2__cell {
	height: 108px; vertical-align: top; padding: 5px; border: 1px solid var(--c-border); background: var(--c-surface);
}
.c-evsurface .c-cal2__cell.is-out { background: var(--c-surface-2); }
.c-evsurface .c-cal2__cell.is-today .c-cal2__date { background: var(--c-primary); color: var(--c-on-primary); border-radius: 999px; }
.c-evsurface .c-cal2__date {
	display: inline-block; min-width: 22px; height: 22px; line-height: 22px; text-align: center;
	font-size: 13px; font-weight: 600; color: var(--c-ink-secondary); margin-bottom: 3px;
}
.c-evsurface .c-cal2__evt {
	display: block; margin-bottom: 3px; padding: 2px 6px; border-radius: 5px; font-size: 12px;
	font-weight: 600; line-height: 1.3; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.c-evsurface .c-cal2__more { font-size: 12px; font-weight: 600; color: var(--c-ink-muted); padding: 1px 4px; }

/* --- Week table ------------------------------------------------------- */
.c-evsurface .c-cal2__week { display: none; width: 100%; border-collapse: collapse; border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; }
.c-evsurface .c-cal2__weekday {
	width: 84px; padding: 10px; text-align: left; vertical-align: top; font-weight: 700;
	background: var(--c-surface-2); border: 1px solid var(--c-border); color: var(--c-ink);
}
.c-evsurface .c-cal2__weeknum { display: block; font-size: 22px; color: var(--c-ink); }
.c-evsurface .c-cal2__weekcell { padding: 8px; border: 1px solid var(--c-border); background: var(--c-surface); }
.c-evsurface .c-cal2__weeknone { color: var(--c-ink-muted); }

/* --- Day + agenda (shared row) ---------------------------------------- */
.c-evsurface .c-cal2__day { border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-surface); padding: 8px 14px; }
.c-evsurface .c-cal2__agenda { display: block; }
.c-evsurface .c-cal2__daygrp { padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.c-evsurface .c-cal2__dayhd { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--c-ink); }
.c-evsurface .c-cal2__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 6px 0; }
.c-evsurface .c-cal2__rowtime { min-width: 96px; color: var(--c-ink-muted); font-size: 14px; font-weight: 600; }
.c-evsurface .c-cal2__rowtitle { margin: 0; font-size: 16px; font-weight: 600; color: var(--c-ink); }
.c-evsurface .c-cal2__rowtitle a { color: inherit; text-decoration: none; }
.c-evsurface .c-cal2__rowtitle a:hover { text-decoration: underline; }
.c-evsurface .c-cal2__rowloc { color: var(--c-ink-muted); font-size: 14px; }

.c-evsurface .c-cal2__legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--c-border); font-size: 13px; color: var(--c-ink-secondary); }
.c-evsurface .c-cal2__legenditem { display: inline-flex; align-items: center; gap: 6px; }
.c-evsurface .c-cal2__dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

/* --- Detail page ------------------------------------------------------ */
.c-evsurface .c-evd__back { margin: 0 0 10px; }
.c-evsurface .c-evd__back a { color: var(--c-ink-secondary); text-decoration: none; font-weight: 600; }
.c-evsurface .c-evd__canceled { display: inline-block; margin: 0 0 12px; padding: 8px 14px; border-radius: 8px; background: var(--c-bad-soft, var(--c-surface-2)); color: var(--c-bad); font-weight: 700; }
.c-evsurface .c-evd__hero { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; margin-bottom: 16px; }
.c-evsurface .c-evd__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.c-evsurface .c-evd__title { margin: 0 0 8px; font-size: 34px; line-height: 1.1; font-weight: 700; color: var(--c-ink); }
.c-evsurface .c-evd__facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 16px 0; }
.c-evsurface .c-evd__facts dt { font-weight: 700; color: var(--c-ink-secondary); }
.c-evsurface .c-evd__facts dd { margin: 0; color: var(--c-ink); }
.c-evsurface .c-evd__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0; }
.c-evsurface .c-evd__more { font-weight: 600; color: var(--c-primary); text-decoration: none; }
.c-evsurface .c-evd__share { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.c-evsurface .c-evd__sharelabel { color: var(--c-ink-muted); font-size: 14px; }
.c-evsurface .c-evd__sharelink { color: var(--c-ink-secondary); font-size: 14px; text-decoration: none; border: 1px solid var(--c-border); border-radius: 6px; padding: 4px 8px; }
.c-evsurface .c-evd__desc { max-width: 68ch; margin: 16px 0; color: var(--c-ink); }
.c-evsurface .c-evd__desc p { margin: 0 0 12px; }
.c-evsurface .c-evd__map { margin: 16px 0; }
.c-evsurface .c-evd__map iframe { display: block; width: 100%; height: 320px; border: 0; border-radius: 12px; }
.c-evsurface .c-evd__maplink { margin: 6px 0 0; font-size: 14px; }
.c-evsurface .c-evd__series { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--c-border); }
.c-evsurface .c-evd__prevnext { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.c-evsurface .c-evd__navlink { color: var(--c-primary); text-decoration: none; font-weight: 600; }
.c-evsurface .c-evd__serieshd { margin: 0 0 6px; font-weight: 700; color: var(--c-ink-secondary); }
.c-evsurface .c-evd__serieslist { margin: 0; padding-left: 18px; }
.c-evsurface .c-evd__serieslist a { color: var(--c-ink); }
.c-evsurface .c-evd__serieslist a.is-canceled { text-decoration: line-through; color: var(--c-ink-muted); }

/* --- Lightbox + expand (progressive enhancement) ---------------------- */
.c-ev-lb { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; background: rgba(0, 0, 0, 0.5); }
.c-ev-lb__panel { position: relative; width: 100%; max-width: 680px; max-height: 90vh; overflow: auto; background: var(--c-surface); color: var(--c-ink); border-radius: 16px; padding: 20px 22px; }
.c-ev-lb__close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-surface); color: var(--c-ink); font-size: 20px; line-height: 1; cursor: pointer; }
.c-evsurface .c-ev__expand { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-surface-2); }

/* --- Responsive: real grids appear at >=720px, agenda hides ----------- */
@media (min-width: 720px) {
	.c-evsurface .c-cal2__table { display: table; }
	.c-evsurface .c-cal2__week { display: table; }
	.c-evsurface .c-cal2__agenda { display: none; }
	.c-evsurface .c-ev__cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.c-evsurface .c-ev__card { grid-template-columns: 1fr; }
	.c-evsurface .c-ev__title { font-size: 32px; }
}

/* =====================================================================
 * DESIGN PASS — 09/13/2026
 * ---------------------------------------------------------------------
 * Everything above is structure and behavior and is left alone. This
 * section is the visual layer: it fixes two real layout bugs and lifts
 * the surface out of "unstyled default" territory.
 *
 * Bugs fixed here:
 *  1. .c-ev__cardmain was never made a flex row, so .c-ev__date's three
 *     stacked spans (SEP / 20 / Sunday) rendered inline inside a 62px
 *     box and collided with the event title. Visible on the live list
 *     view. Fixed by lifting the date out of flow entirely — it is now
 *     an overlay chip on the media, which is also the better design.
 *  2. The Events page uses Divi's default template, which reserves a
 *     ~29% right sidebar. No widgets are assigned to it, so the page
 *     rendered 1080px of content in a 1536px viewport with a dead
 *     column and a visible rule down the right. Reclaimed below.
 *
 * :has() carries the sidebar fix. Supported in every evergreen browser
 * since 2023; where it is missing the page simply keeps the old narrow
 * column, which is the current behavior, so there is no regression.
 * ================================================================== */

/* ---- Reclaim the dead sidebar column ------------------------------- */
body:has(.c-evsurface) #main-content .container {
	width: 100%;
	max-width: 1240px;
}
body:has(.c-evsurface) #left-area {
	width: 100%;
	padding-right: 0;
	float: none;
}
body:has(.c-evsurface) #sidebar {
	display: none;
}
/* Divi draws the sidebar's vertical rule as .container::before, so hiding
 * #sidebar alone leaves a 1px #e2e2e2 line down the dead column. */
body:has(.c-evsurface) #main-content .container::before {
	display: none;
}

/* The theme prints its own page title ("Events") above our header, so
 * every list view showed the word twice, and every occurrence page was
 * titled "Events" rather than the event. Ours is contextual; keep it. */
body:has(.c-evsurface) #left-area > article > .entry-title,
body:has(.c-evsurface) .et_post_meta_wrapper > .entry-title {
	display: none;
}

/* ---- Header -------------------------------------------------------- */
.c-evsurface .c-ev__head {
	margin-bottom: 22px;
}
.c-evsurface .c-ev__lede {
	max-width: 58ch;
	font-size: 17px;
	line-height: 1.55;
	color: var(--c-ink-secondary);
}

/* ---- Control bar: one cohesive surface, not four stacked rows ------ */
.c-evsurface .c-ev__bar {
	margin-bottom: 14px;
}
.c-evsurface .c-ev__views {
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.c-evsurface .c-ev__view {
	transition: background-color 160ms ease, color 160ms ease;
}
.c-evsurface .c-ev__view:hover {
	color: var(--c-ink);
	background: rgba(0, 0, 0, 0.04);
}
.c-evsurface .c-ev__view.is-active {
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10), 0 2px 8px -4px rgba(0, 0, 0, 0.18);
}

/* Filters read as one panel instead of loose controls on the page. */
.c-evsurface .c-ev__filters {
	gap: 10px;
	padding: 12px;
	border: 1px solid var(--c-border);
	border-radius: 14px;
	background: var(--c-surface-2);
	margin-bottom: 16px;
}
.c-evsurface .c-ev__filters input[type="search"],
.c-evsurface .c-ev__filters input[type="text"],
.c-evsurface .c-ev__filters input[type="date"] {
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid var(--c-border-strong);
	border-radius: 10px;
	background: var(--c-surface);
	color: var(--c-ink);
	font: inherit;
	font-size: 15px;
}
.c-evsurface .c-ev__filters input[type="search"] {
	flex: 1 1 220px;
	min-width: 0;
}
.c-evsurface .c-ev__filters input[type="text"] {
	flex: 1 1 160px;
	min-width: 0;
}
.c-evsurface .c-ev__filters input[type="date"] {
	flex: 0 1 165px;
	color: var(--c-ink-secondary);
}
.c-evsurface .c-ev__filters input:focus-visible {
	outline: 2px solid var(--c-primary);
	outline-offset: 1px;
	border-color: var(--c-primary);
}
.c-evsurface .c-ev__filters input::placeholder {
	color: var(--c-ink-muted);
	opacity: 1;
}
/* Tint the native calendar button so it stops reading as browser chrome. */
.c-evsurface .c-ev__filters input[type="date"]::-webkit-calendar-picker-indicator {
	opacity: 0.55;
	cursor: pointer;
}
.c-evsurface .c-ev__filters input[type="date"]:hover::-webkit-calendar-picker-indicator {
	opacity: 1;
}

/* ---- Month heading: an accent rule, not a full-width hairline ------ */
.c-evsurface .c-ev__monthhd {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 30px 0 16px;
	font-size: 13px;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	color: var(--c-ink-secondary);
	backdrop-filter: saturate(180%) blur(6px);
}
.c-evsurface .c-ev__monthhd::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: linear-gradient(90deg, var(--c-border-strong), transparent);
}

/* ---- Cards --------------------------------------------------------- */
.c-evsurface .c-ev__cards {
	gap: 22px;
	margin-bottom: 8px;
}
.c-evsurface .c-ev__card {
	position: relative;
	padding: 0;
	overflow: hidden;
	border-radius: 18px;
	border-color: var(--c-border);
	gap: 0;
	box-shadow: 0 1px 2px rgba(16, 12, 32, 0.04), 0 10px 26px -18px rgba(16, 12, 32, 0.30);
	transition: transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 200ms cubic-bezier(0.2, 0.7, 0.2, 1), border-color 200ms ease;
}
.c-evsurface .c-ev__card:hover {
	transform: translateY(-3px);
	border-color: var(--c-border-strong);
	box-shadow: 0 2px 4px rgba(16, 12, 32, 0.06), 0 22px 44px -22px rgba(16, 12, 32, 0.42);
}
.c-evsurface .c-ev__card:focus-within {
	border-color: var(--c-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 22%, transparent);
}
.c-evsurface .c-ev__cardmedia {
	position: relative;
	border-radius: 0;
	margin: 0;
}
/* A scrim so an overlay chip stays legible on any photograph. */
.c-evsurface .c-ev__cardmedia::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(10, 8, 20, 0.34) 0%, rgba(10, 8, 20, 0.06) 34%, rgba(10, 8, 20, 0) 62%);
}
.c-evsurface .c-ev__cardimg,
.c-evsurface .c-ev__gimg {
	transition: transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.c-evsurface .c-ev__card:hover .c-ev__cardimg,
.c-evsurface .c-ev__card:hover .c-ev__gimg {
	transform: scale(1.035);
}

/* The date: lifted out of flow into a chip over the media. This is both
 * the fix for the collision and the reason the card reads at a glance. */
.c-evsurface .c-ev__card .c-ev__date {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: 58px;
	padding: 7px 10px 8px;
	border-radius: 12px;
	background: var(--c-surface);
	box-shadow: 0 2px 10px -3px rgba(16, 12, 32, 0.45);
	line-height: 1;
}
.c-evsurface .c-ev__card .c-ev__mon {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--c-primary);
}
.c-evsurface .c-ev__card .c-ev__day {
	margin-top: 3px;
	font-size: 23px;
	font-weight: 800;
	color: var(--c-ink);
	font-variant-numeric: tabular-nums;
}
.c-evsurface .c-ev__card .c-ev__wd {
	margin-top: 3px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--c-ink-muted);
}

/* Category pill rides the opposite corner of the media. */
.c-evsurface .c-ev__card .c-ev__pill {
	position: absolute;
	top: 14px;
	right: 12px;
	z-index: 2;
	box-shadow: 0 2px 10px -3px rgba(16, 12, 32, 0.45);
}

.c-evsurface .c-ev__cardmain {
	display: block;
	padding: 16px 18px 18px;
}
.c-evsurface .c-ev__body {
	min-width: 0;
}
.c-evsurface .c-ev__name {
	margin: 0 0 6px;
	font-size: 20px;
	letter-spacing: -0.01em;
}
.c-evsurface .c-ev__name a:hover {
	text-decoration: none;
	color: var(--c-primary);
}
.c-evsurface .c-ev__meta {
	font-size: 14.5px;
	color: var(--c-ink-secondary);
}

/* ---- The category tile: give the fallback some life ----------------- */
/* The inline style carries the category color as a background shorthand,
 * which beats any stylesheet rule — so the texture goes on a pseudo
 * element, which the inline style cannot reach. */
.c-evsurface .c-ev__tile {
	position: relative;
	isolation: isolate;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.c-evsurface .c-ev__tile::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, 0.55), transparent 60%),
		repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 11px),
		linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.10) 100%);
}
.c-evsurface .c-ev__tile span {
	position: relative;
	z-index: 1;
	font-size: 13px;
	opacity: 0.85;
}

/* ---- Detail page: the hero tile was ~600px of flat color ------------ */
.c-evsurface .c-evd__media .c-ev__tile,
.c-evsurface .c-evd__media img {
	max-height: 420px;
	border-radius: 18px;
}
.c-evsurface .c-evd__title {
	letter-spacing: -0.02em;
}

/* ---- Subscribe button: match the card language --------------------- */
.c-evsurface .c-atc__btn {
	box-shadow: 0 1px 2px rgba(16, 12, 32, 0.10), 0 8px 20px -12px var(--c-primary);
	transition: transform 160ms ease, box-shadow 160ms ease;
}
.c-evsurface .c-atc__btn:hover {
	transform: translateY(-1px);
}

/* ---- Wider grid once the sidebar column is reclaimed ---------------- */
@media (min-width: 1100px) {
	.c-evsurface .c-ev__cards {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.c-evsurface .c-ev__card,
	.c-evsurface .c-ev__cardimg,
	.c-evsurface .c-ev__gimg,
	.c-evsurface .c-atc__btn {
		transition: none;
	}
	.c-evsurface .c-ev__card:hover {
		transform: none;
	}
	.c-evsurface .c-ev__card:hover .c-ev__cardimg,
	.c-evsurface .c-ev__card:hover .c-ev__gimg {
		transform: none;
	}
}

/* Host / speaker links in the event facts list (People wiring). */
.c-evd__person { color: var(--c-primary, #4338CA); text-decoration: none; font-weight: 600; }
.c-evd__person:hover { text-decoration: underline; }
.c-evd__cred { font-weight: 400; color: var(--c-ink-secondary, #3B404A); }
