/* News cards share one layout while retaining their existing links and flyers. */
.events-page .upcoming-event-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 24px;
  margin-top: 28px;
  align-items: stretch;
}

.events-page .upcoming-event-list > .news-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-rows: 1fr 120px;
  grid-template-areas: "copy copy" "media actions";
  gap: 24px 20px;
  align-items: center;
  justify-items: stretch;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 26px;
  border: 1px solid rgba(41, 116, 190, .18);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff 0%, #f2f8ff 68%, #eef8ea 100%);
  box-shadow: 0 12px 30px rgba(15, 30, 76, .08);
}

.events-page .news-card::after {
  content: none;
}

.events-page .news-card-copy {
  grid-area: copy;
  align-self: start;
  min-width: 0;
}

.events-page .news-card-copy .eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .075em;
}

.events-page .news-card-copy h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.22;
  overflow-wrap: break-word;
}

.events-page .news-card-copy p:not(.eyebrow) {
  max-width: none;
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}

.resource-detail-page.events-page .resource-rich-text a.news-card-media,
.resource-detail-page.events-page .resource-rich-text .news-card-media {
  grid-area: media;
  display: block;
  justify-self: start;
  align-self: end;
  width: 88px;
  height: 120px;
  min-height: 0;
  aspect-ratio: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(41, 116, 190, .2);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 30, 76, .1);
}

.events-page .news-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

.events-page .news-card-photo img {
  object-fit: cover;
}

.resource-detail-page.events-page .resource-rich-text .news-card-media:is(.events-socks-mark, .news-card-icon) {
  display: grid;
  place-items: center;
  height: 88px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
  font-size: 36px;
}

.resource-detail-page.events-page .resource-rich-text .news-card-media:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.events-page .news-card .news-card-actions {
  grid-area: actions;
  display: flex;
  justify-content: flex-end;
  align-self: end;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.events-page .news-card .news-card-actions > .btn {
  width: auto;
  min-width: 160px;
  max-width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  gap: 8px;
  font-size: 15px;
  white-space: nowrap;
}

.events-page .news-card-actions > .btn > i {
  flex-shrink: 0;
  margin-right: 0;
}

@media (max-width: 980px) {
  .events-page .upcoming-event-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .events-page .resource-content-card {
    padding: 0;
  }

  .events-page .resource-content-header {
    padding: 24px 16px;
  }

  .events-page .resource-rich-text {
    padding: 22px 16px;
  }

  .events-page .upcoming-event-list {
    gap: 18px;
  }

  .events-page .upcoming-event-list > .news-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr 120px auto;
    grid-template-areas: "copy" "media" "actions";
    gap: 20px;
    padding: 24px 20px;
  }

  .events-page .news-card-copy h2 {
    font-size: 22px;
  }

  .resource-detail-page.events-page .resource-rich-text a.news-card-media,
  .resource-detail-page.events-page .resource-rich-text .news-card-media {
    justify-self: center;
  }

  .events-page .news-card .news-card-actions > .btn {
    width: 100%;
    min-width: 0;
    min-height: 60px;
    white-space: normal;
  }
}
