/* ==========================================================================
   Events & News — shared by the four templates of the area
   (archive-ipam_event, taxonomy-ipam_event_type, single-ipam_event, home/category, single).
   Figma 116:31 · 116:32 · 116:33 · 116:34 — enqueued with ipam_enqueue_page_style( 'news-events' ).
   ========================================================================== */

/* Ambient glow of the content blocs (Figma "Ambient Glow" 640px ellipse at x 1060, y -300) */
.ne-list::before,
.ne-detail::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 880px; height: 880px; top: -420px; right: -380px;
  background: url("../../img/news-events/glow-sage.svg") no-repeat center / 100% 100%;
}

/* --------------------------------------------------------------------------
   List bloc (Events List 123:92 / News List 125:291): column, 32px rhythm
   -------------------------------------------------------------------------- */
.ne-list { display: flex; flex-direction: column; gap: var(--spacing-xl); }
.ne-list > .toolbar,
.ne-list > .pagination { margin: 0; }
.ne-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* Toolbar 123:94 — filter pills (links) + search */
.ne-toolbar { gap: 24px; flex-wrap: nowrap; }
.ne-filters { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
a.filter { display: inline-flex; align-items: center; }
.filter[aria-current="page"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.ne-search { width: 280px; min-width: 0; flex-shrink: 0; padding: 10px 16px; }
.ne-search img { width: 16px; height: 16px; flex-shrink: 0; }
.ne-search input { font-size: 15px; line-height: 22px; min-width: 0; }
.ne-search input::placeholder { color: var(--color-text-muted); opacity: 1; }
.ne-search:focus-within { border-color: var(--navy-900); }
.ne-search input::-webkit-search-cancel-button { cursor: pointer; }

/* Card / Media 121:75 in the grids: 16:9 photo, medium shadow, place in mono caps */
.ne-card { border-radius: var(--radius-xl); box-shadow: var(--shadow-medium); }
.ne-card:hover { box-shadow: var(--shadow-card-lg); }
.ne-card .media-card__img { aspect-ratio: 16 / 9; }
.ne-card .media-card__body .card-title a:hover,
.ne-compact .card-title a:hover,
.ne-featured .card-title a:hover { color: var(--green-700); }
.ne-card .media-card__place { gap: 6px; }
.ne-pin { width: 14px; height: 14px; flex-shrink: 0; }

/* Card / Compact 121:94 — whole card clickable */
.ne-compact { position: relative; box-shadow: var(--shadow-small); transition: box-shadow .2s, transform .2s; }
.ne-compact:hover { box-shadow: var(--shadow-medium); transform: translateY(-2px); }
.ne-compact .media-card__meta { gap: 10px; }
.ne-compact__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ne-compact__link:focus-visible { outline: 0; }
.ne-compact:focus-within { outline: 2px solid var(--green-600); outline-offset: 2px; }

/* Featured (event row 123:113 / news column 125:311) */
.ne-featured {
  background: #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow-medium); overflow: hidden;
  display: flex; flex-direction: column;
}
.ne-featured__img { display: block; overflow: hidden; background: var(--color-bg-soft); } /* overflow: lets aspect-ratio win over the image height */
.ne-featured__img img { width: 100%; height: 100%; object-fit: cover; }
.ne-featured__body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 28px; }
.ne-featured .card-title { font-size: 24px; line-height: 30px; }

/* Navy strips (Propose an event 123:227 / Annual report 125:345) */
.ne-strip { gap: 16px; }
.ne-strip p { color: #fff; font-size: 17px; line-height: 26px; }
.ne-strip .link-more { white-space: nowrap; }
.ne-strip .link-more:hover { color: var(--sage-500); }

/* --------------------------------------------------------------------------
   Detail pages (Event 116:32 / News article 116:34)
   -------------------------------------------------------------------------- */
.ne-hero-meta { gap: 10px; }
/* Figma 116:32 / 116:34: breadcrumb, tag + date row, then title, lede, buttons */
.ne-hero .page-hero__inner > .breadcrumb { order: -2; }
.ne-hero .page-hero__inner > .ne-hero-meta { order: -1; margin-bottom: -4px; }
.ne-hero-meta .label:empty { display: none; }
.ne-hero-cta { display: flex; flex-wrap: wrap; gap: 16px; }

.ne-detail { background: var(--color-bg-canvas); }
.ne-body { max-width: none; }
.ne-figure { box-shadow: var(--shadow-medium); }
.ne-figure img { aspect-ratio: 840 / 380; height: auto; }
.ne-figure figcaption { color: var(--color-text-muted); }

.ne-prose { max-width: none; }
.ne-prose h2, .ne-h {
  font-family: var(--font-display); font-variation-settings: "SOFT" 0, "WONK" 1; font-weight: 600;
  font-size: 24px; line-height: 30px; color: var(--color-text-heading); margin: 0;
}
.ne-prose ul:not(.programme) { list-style: none; padding-left: 0; gap: 10px; }
.ne-prose ul:not(.programme) > li { position: relative; padding-left: 22px; }
.ne-prose ul:not(.programme) > li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--green-600);
}
.ne-prose strong { font-weight: 600; color: inherit; }
.ne-prose blockquote, .ne-prose .wp-block-quote {
  margin: 0; padding: 20px 24px; border-left: 4px solid var(--green-600); border-radius: var(--radius-md);
  background: var(--color-bg-soft); font-family: var(--font-display); font-variation-settings: "SOFT" 0, "WONK" 1;
  font-weight: 600; font-size: 20px; line-height: 30px; color: var(--navy-900);
}
.ne-prose blockquote p { font-size: inherit; line-height: inherit; }
.ne-prose blockquote cite { display: block; margin-top: 8px; font: 500 13px/18px var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--color-text-muted); }

/* Programme (list with the "programme" class): time in mono green */
.ne-prose .programme { list-style: none; padding: 0; gap: 8px; }
.ne-prose .programme li { display: flex; gap: 16px; align-items: baseline; font-size: 17px; line-height: 26px; }
.ne-prose .programme strong, .ne-prose .programme time {
  flex-shrink: 0; min-width: 43px; font: 500 13px/18px var(--font-mono); letter-spacing: 1px; color: var(--color-accent-cta);
}

/* Video (Figma 124:260): poster + green play button */
.ne-video { aspect-ratio: 840 / 428; box-shadow: var(--shadow-medium); }
.ne-video.is-playing { aspect-ratio: 16 / 9; }
.ne-video .video-embed__play { transition: background .2s; }
.ne-video .video-embed__play:hover { background: rgba(0, 0, 13, 0.2); }
.ne-video .video-embed__play span { transition: transform .2s; }
.ne-video .video-embed__play:hover span { transform: scale(1.06); }
.ne-video .video-embed__play img { position: static; width: 26px; height: 26px; inset: auto; object-fit: contain; }

.ne-share .pill:hover { background: var(--navy-900); color: #fff; }

/* Aside (124:269 / 126:449) */
.ne-detail .info-card { box-shadow: var(--shadow-small); border-radius: var(--radius-lg); }
.ne-detail .info-card > .label { font-size: 13px; }
.ne-detail .info-card dl > div { display: flex; flex-direction: column; gap: 4px; }
.ne-detail .info-card dd { margin: 0; font-weight: 400; font-size: 17px; line-height: 26px; }
.ne-detail .info-card dd a { text-decoration: underline; text-underline-offset: 3px; }
.ne-detail .link-list a { border-color: var(--color-border-default); font-weight: 400; line-height: 22px; }
.ne-detail .link-list a:hover { border-color: var(--navy-900); }

/* Related events / more news (124:311 / 126:489) */
.ne-related .section-head { margin-bottom: var(--spacing-xl); }

/* --------------------------------------------------------------------------
   Responsive — mobile follows Figma 84:33 (single column, 24px gutters)
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .ne-detail .article__aside { position: static; }
}
@media (max-width: 900px) {
  .ne-toolbar { flex-direction: column; align-items: stretch; }
  .ne-search { width: 100%; }
}
@media (max-width: 640px) {
  .ne-hero, .ne-list, .ne-detail, .ne-related, .page-hero.ne-hero { padding-left: 24px; padding-right: 24px; }
  .ne-filters {
    flex-wrap: nowrap; overflow-x: auto; margin: 0 -24px; padding: 2px 24px; scrollbar-width: none;
  }
  .ne-filters::-webkit-scrollbar { display: none; }
  .ne-filters .filter { flex-shrink: 0; white-space: nowrap; }
  .ne-featured__body { padding: 24px; }
  .ne-featured .card-title { font-size: 22px; line-height: 28px; }
  .ne-card .media-card__body { padding: 24px; }
  .ne-strip { padding: 20px 24px; }
  .ne-strip p { min-width: 100%; }
  .ne-hero-cta .btn { flex: 1 1 100%; }
  .ne-prose .programme li { flex-direction: column; gap: 2px; }
  .ne-video, .ne-video.is-playing { aspect-ratio: 16 / 9; }
  .ne-video .video-embed__play span { width: 60px; height: 60px; }
  .ne-related .section-head--row { align-items: flex-start; flex-direction: column; }
}
