/* Approved activity page. The shared navigation keeps its existing styles. */
body[data-view="events"] {
  isolation: isolate;
  padding-bottom: 0;
  background: #e5eefb;
}

body[data-view="events"]::before {
  position: fixed;
  z-index: -1;
  inset: 0 auto 0 50%;
  width: min(100%, var(--discover-width));
  background: #e8f0fc url("/media/events/exhibition-background.webp") center top / cover no-repeat;
  transform: translateX(-50%);
  content: "";
  pointer-events: none;
}

body[data-view="events"] :is(.site-header, .site-footer) { display: none; }

.events-page {
  --events-ink: #0b1c40;
  --events-muted: #60728c;
  container-type: inline-size;
  box-sizing: border-box;
  width: min(100%, var(--discover-width));
  min-height: 100dvh;
  margin-inline: auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(var(--tab-space) + 24px);
  color: var(--events-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.events-page :is(h1, h2, h3, p) { margin: 0; }
.events-page img { display: block; max-width: 100%; }
.events-page > h1 {
  font-size: clamp(28px, 7.2cqw, 40px);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.events-feature { margin-top: 14px; }
.events-feature__photo {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  border-radius: 12px;
  object-fit: cover;
}
.events-feature__body { padding-top: 6px; }
.events-feature__label {
  display: block;
  width: fit-content;
  max-inline-size: 100%;
  padding: 2px 6px;
  border-radius: 5px;
  background: #c9dfff;
  color: #0753c7;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}
.events-feature h2 {
  margin-top: 4px;
  font-size: clamp(19px, 5.2cqw, 26px);
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.events-title__subject { display: block; text-wrap: balance; }
.events-feature h2 .events-title__context { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 650; line-height: 1.3; letter-spacing: 0; }
.events-feature__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: #0755eb;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.events-feature__action:hover { background: #064bd0; }
.events-feature__action:active { background: #0643b9; }
.events-feature__action:focus-visible { outline: 3px solid #4c8efa; outline-offset: 3px; }

.events-archive {
  margin-top: 28px;
  padding: 20px 16px 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
}
.events-archive__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}
.events-archive__heading::after {
  height: 1px;
  flex: 1;
  background: #d2dfef;
  content: "";
}
.events-story {
  display: grid;
  box-sizing: border-box;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 112px;
  margin: 0;
  padding-block: 16px;
  border-bottom: 1px solid #dce6f3;
  color: inherit;
  text-decoration: none;
}
.events-story > img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
}
.events-story__body { min-width: 0; }
.events-story time {
  display: block;
  color: #596d89;
  font-size: 12px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.events-story h3 {
  margin-top: 6px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.events-story__word {
  display: inline-block;
  max-inline-size: 100%;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.events-story + .events-story { margin-top: 0; }
.events-story:last-child { border-bottom: 0; }
.events-story:hover h3 { color: #0753c7; }

@container (max-width: 320px) {
  .events-archive { padding-inline: 12px; }
  .events-story { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
}

@container (min-width: 520px) {
  .events-archive { padding-inline: 24px; }
  .events-story { grid-template-columns: 132px minmax(0, 1fr); gap: 20px; min-height: 124px; }
  .events-story h3 { font-size: 18px; }
}
.events-feature .events-feature__date {
  margin-top: 2px;
  color: #3c587c;
  font-size: 12px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.events-state { padding-block: 30px; color: #3e587a; font-size: 14px; }
.events-retry { margin-top: 10px; padding: 8px 14px; border: 1px solid #9cb8df; border-radius: 7px; background: #f6faff; color: #124da9; font: inherit; cursor: pointer; }
.events-story:focus-visible, .events-feature__action:focus-visible { outline: 3px solid #4c8efa; outline-offset: 4px; }
.discover-home .events-teaser-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  font-size: max(14px, 3.8cqw);
  line-height: 1.4;
}
/* Homepage: a dedicated thumbnail fills the left column; the full poster stays in the article. */
.discover-home #homeEventTeaser .discover-recap {
  grid-template-columns: 49.7% minmax(0, 1fr);
  min-height: clamp(128px, 34cqw, 164px);
}
.discover-home #homeEventTeaser .discover-media-card__image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.discover-home #homeEventTeaser .discover-media-card__body { padding: 10px; }
.discover-home #homeEventTeaser .events-teaser-title { margin-top: 6px; font-size: 14px; line-height: 1.4; -webkit-line-clamp: 4; line-clamp: 4; }
.discover-home #homeEventTeaser .discover-media-card__link { margin-top: 6px; font-size: 12px; }
.events-page .events-note {
  margin-top: 17px;
  color: #586d88;
  font-size: 12px;
  line-height: 1.5;
}

@media (min-width: 600px) {
  .events-page { padding-inline: 20px; }
}
