/* Events listing page redesign. Two real fixes plus one new component:

   1. .event-section has a hardcoded margin-top:120px in main.css (main.css:4265),
      tuned for sitting directly under the breadcrumb banner — same landmine already
      found and fixed on the Programs page. With a new intro section now in front of
      the Upcoming Events section, that 120px stacks on top of the intro's own
      spacing. Scoped override below.
   2. Featured "Next Event" card: no static design existed for a hero treatment of the
      soonest upcoming event — built from the site's own tokens (var(--theme),
      var(--box-shadow), var(--border)) rather than reusing .news-single-items, which
      is fully dependent on its .news-wrapper ancestor's CSS and not self-contained. */

.events-intro-text {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  color: var(--text);
}

.events-hero-section {
  margin-top: 40px;
}

/* ---- Featured "Next Event" card ---- */
.event-featured {
  display: flex;
  align-items: stretch;
  gap: 40px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 50px;
}
.event-featured__media {
  position: relative;
  flex: 0 0 45%;
  max-width: 45%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.event-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.event-featured__ribbon {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--theme);
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border-radius: 999px;
  z-index: 2;
}
.event-featured__content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 40px 40px 40px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.event-featured__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.event-featured__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}
.event-featured__title {
  font-size: 30px;
  margin-bottom: 14px;
}
.event-featured__excerpt {
  color: var(--text);
  margin-bottom: 24px;
}

.events-more-heading {
  font-size: 22px;
  margin-bottom: 24px;
}

/* ---- Empty state (no upcoming events) ----
   Rules now live in the site-wide .empty-state class (assets/css/a11y-fixes.css)
   so every page can reuse them via render_empty_state(). */

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .event-featured {
    flex-direction: column;
  }
  .event-featured__media {
    max-width: 100%;
    flex-basis: auto;
    aspect-ratio: 16 / 9;
  }
  .event-featured__content {
    padding: 30px;
  }
}
@media (max-width: 575px) {
  .event-featured__title {
    font-size: 24px;
  }
  .event-featured__content {
    padding: 24px;
  }
}
