/* Events (#125): the /events listing (templates/archive-event.html) and the event page
   (templates/single-event.html). Built from the v3 News & Events "Coming up" rows: the dated
   block, venue and dates, a Register or Details action. Loaded by inc/events.php on event
   views only. */

/* ---------- shared ---------- */
/* Server-rendered parts sit inside WordPress groups, whose flow layout gives every child after
   the first a top margin (block gap). In a grid or flex row that knocks siblings out of line
   (the bar's Where cell sat 12px lower than When), so these containers zero it. */
.evbar > *, .evrow__cta > *, .ev-nextcard > *, .ev-nextcard__row > *, .ev-nextcard__info > * { margin-top:0 !important; margin-bottom:0 !important; }
/* status badge: "In 2 days", "Happening now", "Past event" (class set from the dates) */
.ev-status { display:inline-flex; align-items:center; gap:7px; margin:0; width:max-content; padding:4px 11px 4px 9px; border-radius:999px; font-family:var(--font-mono); font-size:11.5px; font-weight:500; letter-spacing:.08em; text-transform:uppercase; background:rgba(233,97,21,.1); color:var(--orange-deep); }
.ev-status::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.ev-status.is-now { background:#e8f5ee; color:#1f7a4a; }
.ev-status.is-now::before { animation:ev-pulse 1.6s ease-in-out infinite; }
.ev-status.is-past, .ev-status.is-undated { background:var(--muted); color:var(--text-soft); }
@keyframes ev-pulse { 50% { opacity:.3; } }

/* the date block: SEP / 28 / 2026 */
.evdate { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.evdate > * { margin:0; }
.evdate__m { font-family:var(--font-mono); font-size:12px; font-weight:500; letter-spacing:.1em; text-transform:uppercase; color:var(--orange-deep); }
.evdate__d { font-family:var(--font-display); font-size:32px; font-weight:800; line-height:1; color:var(--ink); }
.evdate__y { margin-top:3px !important; font-size:11.5px; color:var(--text-soft); }

/* images: shown whole over a blurred copy of themselves (see ceec_event_media_frame) */
.ev-media { position:relative; margin:0; overflow:hidden; background:var(--ink); isolation:isolate; }
.ev-media::before { content:""; position:absolute; inset:-24px; z-index:-1; background:var(--ev-img) center/cover no-repeat; filter:blur(22px) saturate(1.15) brightness(.8); }
.ev-media a, .ev-media img { display:block; width:100%; height:100%; }
/* !important: the block writes an inline object-fit:cover on the image */
.ev-media img { object-fit:contain !important; }

/* ---------- event page: hero ---------- */
/* room under the hero for the info bar that overlaps it (.phero.ev-hero: app.css loads later) */
.phero.ev-hero { padding-bottom:calc(clamp(30px,4vw,48px) + 72px); }
.ev-hero, .ev-barwrap, .ev-main { --ev-side:clamp(280px,26vw,360px); --ev-gap:clamp(32px,5vw,72px); }
.ev-hero__grid { display:grid; grid-template-columns:minmax(0,1fr) var(--ev-side); gap:var(--ev-gap); align-items:center; }
.ev-hero__grid > *, .ev-hero__text > * { margin-top:0; margin-bottom:0; }
.ev-kicker { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:18px !important; }
.ev-kicker > p { margin:0 !important; line-height:1; }
.ev-kicker > p:first-child { font-family:var(--font-mono); font-size:12px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:var(--orange-soft); }
.phero p.ev-status { font-size:11.5px; line-height:1; padding-top:7px; padding-bottom:7px; background:rgba(255,255,255,.1); color:#fff; border:1px solid rgba(255,255,255,.22); }
.ev-hero .ev-status.is-upcoming::before, .ev-hero .ev-status.is-now::before { background:var(--orange); }
.ev-hero .wp-block-post-title { margin-top:14px !important; max-width:22ch; font-size:clamp(30px,4vw,50px); line-height:1.08; letter-spacing:-.02em; overflow-wrap:anywhere; }
.ev-tags { margin-top:22px !important; display:flex; flex-wrap:wrap; gap:8px; }
.ev-tags > * { margin:0; display:contents; }
.ev-tags .wp-block-post-terms__separator { display:none; }
.ev-tags a { display:inline-block; border:1px solid rgba(255,255,255,.3); border-radius:999px; padding:6px 14px; font-size:13px; font-weight:500; color:#fff; text-decoration:none; transition:background-color .2s, border-color .2s; }
.ev-tags a:hover { background:rgba(255,255,255,.12); border-color:#fff; }
/* the hero shows the image in its own shape (no fill bands); a very tall one is capped */
.ev-hero__media { justify-self:stretch; border-radius:var(--radius-2xl); border:1px solid rgba(255,255,255,.14); box-shadow:0 30px 60px -24px rgba(0,0,0,.6); }
.ev-hero__media img { height:auto; max-height:420px; }

/* ---------- event page: the info bar, pulled up over the hero's edge ---------- */
.ev-barwrap { position:relative; z-index:2; margin-top:-64px !important; }
/* the action column is the hero image's column, so it starts exactly under the image */
.evbar { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) var(--ev-side); align-items:stretch; background:#fff; border:1px solid var(--panel-border); border-radius:var(--radius-2xl); box-shadow:var(--shadow-lg); overflow:hidden; }
.evbar__cell { display:flex; gap:14px; align-items:center; padding:24px 28px; }
.evbar > * + * { border-left:1px solid var(--panel-border); }
/* no location: When, then the action */
.evbar:not(:has(.evbar__cell + .evbar__cell)) { grid-template-columns:minmax(0,1fr) var(--ev-side); }
.evbar__cell > i { flex-shrink:0; display:grid; place-items:center; width:42px; height:42px; border-radius:12px; background:rgba(233,97,21,.1); color:var(--orange-deep); font-size:21px; }
.evbar__cell > div { display:flex; flex-direction:column; gap:3px; min-width:0; }
.evbar__label { font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:.12em; text-transform:uppercase; color:var(--text-soft); }
.evbar__cell b { font-family:var(--font-display); font-size:16.5px; font-weight:700; line-height:1.35; color:var(--ink); }
.evbar__link { margin-top:4px; width:max-content; font-size:13px; font-weight:500; color:var(--primary); text-decoration:underline; text-decoration-color:rgba(0,68,85,.3); text-underline-offset:3px; }
.evbar__link:hover { color:var(--orange-deep); text-decoration-color:currentColor; }
.evbar__action { display:flex; flex-direction:column; justify-content:center; align-items:stretch; gap:8px; padding:24px 28px; background:linear-gradient(180deg,#fff,var(--cream)); }
.evbar__action .btn { width:100%; }
.evbar__note { text-align:center; }
.evbar__note { font-size:12.5px; color:var(--text-soft); }
.evbar__ended { display:inline-flex; align-items:center; gap:8px; font-family:var(--font-display); font-size:16px; font-weight:700; color:var(--ink); }
.evbar__ended i { font-size:20px; color:#1f7a4a; }

/* ---------- event page: description and sidebar ---------- */
.ev-main { padding-top:clamp(40px,4vw,56px) !important; }
.ev-layout { display:grid; grid-template-columns:minmax(0,1fr) var(--ev-side); gap:var(--ev-gap); align-items:start; }
.ev-layout > *, .ev-side > * { margin-top:0; margin-bottom:0; }
.ev-article > .eyebrow { margin:0 0 18px; }
.ev-body { max-width:780px; }
.ev-body > * { margin-top:0; margin-bottom:0; }
.ev-body > * + * { margin-top:22px; }
.ev-body p, .ev-body li { font-size:18px; line-height:1.8; color:var(--text); }
.ev-body > p:first-child { font-size:21px; line-height:1.6; color:var(--ink); }
.ev-body h2 { font-family:var(--font-display); font-size:22px; font-weight:700; line-height:1.3; color:var(--ink); margin-top:40px !important; padding-top:24px; border-top:1px solid var(--panel-border); }
.ev-body h3 { font-family:var(--font-display); font-size:19px; font-weight:700; line-height:1.35; color:var(--ink); margin-top:34px !important; }
.ev-body h2 + *, .ev-body h3 + * { margin-top:12px !important; }
.ev-body a { color:var(--orange-deep); text-underline-offset:2px; }
.ev-body ul, .ev-body ol { padding-left:24px; }
.ev-body li + li { margin-top:8px; }
.ev-body li::marker { color:var(--orange); }
.ev-side { position:sticky; top:96px; }
.ev-side > * + * { margin-top:16px !important; }
.ev-card { border:1px solid var(--panel-border); border-radius:var(--radius-2xl); background:#fff; padding:24px 26px 12px; }
.ev-card h4 { margin:0 0 8px; font-family:var(--font-sans); font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--ink); }
.evmini { list-style:none; margin:0; padding:0; }
.evmini > li { position:relative; display:flex; gap:14px; align-items:center; margin:0; padding:14px 0; border-top:1px solid var(--panel-border); }
.evmini > li:first-child { border-top:none; }
.evmini .evdate { flex-shrink:0; width:52px; height:56px; border-radius:12px; background:var(--muted); }
.evmini .evdate__d { font-size:22px; }
.evmini .evdate__m { font-size:10.5px; }
.evmini__info > * { margin:0; }
.evmini .wp-block-post-title { font-family:var(--font-sans); font-size:14.5px; font-weight:600; line-height:1.35; }
.evmini .wp-block-post-title a { color:var(--ink); text-decoration:none; }
.evmini .wp-block-post-title a::after { content:""; position:absolute; inset:0; }
.evmini > li:hover .wp-block-post-title a { color:var(--primary); }
.evmini__where { margin-top:3px !important; font-size:12.5px; line-height:1.4; color:var(--text-soft); display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.ev-all { display:flex; align-items:center; justify-content:space-between; padding:16px 22px; border:1px solid var(--panel-border); border-radius:var(--radius-xl); background:#fff; font-size:14.5px; font-weight:600; color:var(--primary); text-decoration:none; transition:border-color .2s, color .2s; }
.ev-all:hover { border-color:rgba(233,97,21,.5); color:var(--orange-deep); }
.ev-all i { transition:transform .2s; }
.ev-all:hover i { transform:translateX(4px); }

/* ---------- listing hero: text, then the "Next up" event card ---------- */
.ev-lhero__grid { display:grid; grid-template-columns:minmax(0,1fr) clamp(340px,32vw,440px); gap:clamp(32px,5vw,72px); align-items:center; }
.ev-lhero__grid > *, .ev-lhero__text > * { margin-top:0; margin-bottom:0; }
.ev-lhero__text > p:last-child { max-width:56ch; }
.ev-next-q, .ev-next-q .wp-block-post-template { margin:0; padding:0; list-style:none; }
.ev-next-q li { margin:0; }
.ev-nextcard { position:relative; display:flex; flex-direction:column; gap:16px; padding:22px; border:1px solid rgba(255,255,255,.16); border-radius:var(--radius-2xl); background:rgba(255,255,255,.07); backdrop-filter:blur(6px); box-shadow:0 30px 60px -30px rgba(0,0,0,.55); }
.ev-nextcard__head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ev-nextcard__head > * { margin:0 !important; line-height:1; }
.ev-nextcard__label { font-family:var(--font-mono); font-size:12px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:var(--orange-soft); }
.ev-nextcard__row { display:grid; grid-template-columns:104px minmax(0,1fr); gap:18px; align-items:center; }
.ev-nextcard__img { width:104px; aspect-ratio:1/1; border-radius:var(--radius-lg); border:1px solid rgba(255,255,255,.14); }
.ev-nextcard__info { display:flex; flex-direction:column; gap:7px; min-width:0; }
.ev-nextcard .wp-block-post-title { font-family:var(--font-display); font-size:18px; font-weight:700; line-height:1.3; color:#fff; }
.ev-nextcard .wp-block-post-title a { color:inherit; text-decoration:none; }
.ev-nextcard .wp-block-post-title a:hover { color:var(--orange-soft); }
.phero .ev-nextcard p.evrow__when, .phero .ev-nextcard p.evrow__where { display:flex; align-items:flex-start; gap:7px; font-size:13.5px; line-height:1.45; color:rgba(255,255,255,.78); }
.ev-nextcard .evrow__when::before, .ev-nextcard .evrow__where::before { margin-top:2px; background:var(--orange-soft); }
.ev-nextcard__cta .btn { width:100%; }
/* on the dark card the Details button reads as an outline in white */
.ev-nextcard .btn--outlineDark { border-color:rgba(255,255,255,.4); color:#fff; }
.ev-nextcard .btn--outlineDark:hover { background:rgba(255,255,255,.1); border-color:#fff; }

/* ---------- listing: filters (assets/filters.css) ---------- */

/* ---------- listing: upcoming rows ---------- */
.evlist { list-style:none; display:flex; flex-direction:column; gap:14px; margin:24px 0 0; padding:0; }
.evlist > li { margin:0; }
.evrow { position:relative; display:grid; grid-template-columns:84px 112px minmax(0,1fr) auto; gap:24px; align-items:center; padding:18px 24px 18px 18px; border:1px solid var(--panel-border); border-radius:var(--radius-2xl); background:#fff; transition:border-color .2s, box-shadow .2s, transform .2s; }
.evrow:hover { border-color:rgba(233,97,21,.45); box-shadow:var(--shadow-md); transform:translateY(-2px); }
.evrow > * { margin:0 !important; }
.evrow .evdate { height:100%; min-height:96px; border-right:1px solid var(--panel-border); padding-right:18px; }
.evrow__img { width:112px; aspect-ratio:1/1; border-radius:var(--radius-lg); }
.evrow__info { display:flex; flex-direction:column; gap:8px; min-width:0; }
.evrow__info > * { margin:0; }
.evrow .wp-block-post-title { font-family:var(--font-display); font-size:20px; font-weight:700; line-height:1.25; color:var(--ink); }
.evrow .wp-block-post-title a { color:inherit; text-decoration:none; }
.evrow .wp-block-post-title a::after { content:""; position:absolute; inset:0; border-radius:inherit; }
.evrow__meta { display:flex; flex-wrap:wrap; gap:4px 18px; font-size:14px; color:var(--text-soft); }
.evrow__meta > * { margin:0; display:inline-flex; align-items:center; gap:6px; }
/* Phosphor map-pin and calendar, as masks (the bound paragraphs cannot hold an <i>) */
.evrow__where::before, .evrow__when::before { content:""; flex-shrink:0; width:15px; height:15px; background:var(--orange-deep); -webkit-mask:var(--ico) center/contain no-repeat; mask:var(--ico) center/contain no-repeat; }
.evrow__where { --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M128 64a40 40 0 1 0 40 40 40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24 24 24 0 0 1-24 24Zm0-112a88.1 88.1 0 0 0-88 88c0 31.4 14.51 64.68 42 96.25a254.19 254.19 0 0 0 41.45 38.3 8 8 0 0 0 9.18 0 254.19 254.19 0 0 0 41.37-38.3c27.45-31.57 42-64.85 42-96.25a88.1 88.1 0 0 0-88-88Zm0 206c-16.53-13-72-60.75-72-118a72 72 0 0 1 144 0c0 57.23-55.47 105-72 118Z'/%3E%3C/svg%3E"); }
.evrow__when { --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M208 32h-24v-8a8 8 0 0 0-16 0v8H88v-8a8 8 0 0 0-16 0v8H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16ZM72 48v8a8 8 0 0 0 16 0v-8h80v8a8 8 0 0 0 16 0v-8h24v32H48V48Zm136 160H48V96h160v112Z'/%3E%3C/svg%3E"); }
.evrow__init { font-size:13px; }
.evrow__init .wp-block-post-terms__separator { display:none; }
.evrow__init a { position:relative; z-index:1; display:inline-block; margin-right:6px; padding:3px 11px; border:1px solid rgba(233,97,21,.35); border-radius:999px; color:var(--orange-deep); font-weight:500; text-decoration:none; }
.evrow__cta { position:relative; z-index:1; }
.ev-empty { margin:24px 0 0; padding:28px; border:1px dashed var(--panel-border); border-radius:var(--radius-xl); text-align:center; font-size:15px; color:var(--text-soft); background:#fff; }

/* ---------- listing: past events ---------- */
.ev-past { background:var(--cream); border-top:1px solid var(--panel-border); }
.evgrid { list-style:none; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; margin:24px 0 0; padding:0; }
.evgrid > li { position:relative; margin:0; display:flex; flex-direction:column; border:1px solid var(--panel-border); border-radius:var(--radius-2xl); background:#fff; overflow:hidden; transition:border-color .2s, box-shadow .2s, transform .2s; }
.evgrid > li:hover { border-color:rgba(233,97,21,.45); box-shadow:var(--shadow-md); transform:translateY(-3px); }
.evcard__img { aspect-ratio:16/10; border-bottom:1px solid var(--panel-border); }
.evcard__body { flex:1; display:flex; flex-direction:column; gap:8px; padding:18px 20px 22px; }
.evcard__body > * { margin:0; }
.evcard__when { font-family:var(--font-mono); font-size:12px; font-weight:500; letter-spacing:.06em; text-transform:uppercase; color:var(--orange-deep); }
.evgrid .wp-block-post-title { font-family:var(--font-display); font-size:17px; font-weight:700; line-height:1.3; color:var(--ink); }
.evgrid .wp-block-post-title a { color:inherit; text-decoration:none; }
.evgrid .wp-block-post-title a::after { content:""; position:absolute; inset:0; }
.evcard__where { font-size:13.5px; line-height:1.5; color:var(--text-soft); }
.ev-pagination { margin-top:36px !important; display:flex; justify-content:center; gap:6px; font-size:14px; }
.ev-pagination a, .ev-pagination .page-numbers { display:inline-grid; place-items:center; min-width:40px; height:40px; padding:0 12px; border:1px solid var(--panel-border); border-radius:var(--radius-md); color:var(--text); text-decoration:none; background:#fff; }
.ev-pagination .current { background:var(--primary); border-color:var(--primary); color:#fff; }
