.sheet-event-carousel, .sheet-event-detail { max-width: 1200px; margin: 2rem auto; }
.sheet-event-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 1.25rem) / 3);
  gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .4rem .25rem 1rem;
}
.sheet-event-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid #e5eaf0; border-radius: 18px; background: white;
  box-shadow: 0 4px 10px #16294415; scroll-snap-align: start;
}
.sheet-event-card img, .sheet-event-detail img { display: block; width: 100%; height: auto; }
.sheet-event-card-body { display: flex; flex: 1; flex-direction: column; align-items: start; padding: 1.3rem; }
.sheet-event-card h2, .sheet-event-detail h1 {
  color: #865a19; font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.25;
  white-space: pre-line; overflow-wrap: anywhere;
}
.sheet-event-card p, .sheet-event-detail p, .sheet-event-detail dd {
  white-space: pre-line; overflow-wrap: anywhere; line-height: 1.6;
}
.sheet-event-subtitle { font-weight: 650; }
.sheet-event-schedule {
  margin-top: auto; padding-top: .75rem; border-top: 1px solid #e5eaf0; width: 100%;
  color: #1f2a5c; font-weight: 700;
}
.sheet-event-button, .sheet-event-controls button {
  display: inline-block; border: 0; border-radius: 999px; background: #1266a1;
  color: white; font-weight: 650; padding: .5rem 1rem; cursor: pointer;
}
.sheet-event-controls { text-align: right; margin-top: .5rem; }
.sheet-event-controls button { margin-left: .5rem; }
.sheet-event-detail {
  width: min(90%, 1100px); box-sizing: border-box; display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(1.25rem, 5vw, 4rem); border: 1px solid #e5eaf0;
  border-radius: 18px; box-shadow: 0 5px 20px #16294415;
}
.sheet-event-detail img { border-radius: 12px; margin-bottom: 1.25rem; }
.sheet-event-detail dt { font-weight: 700; color: #1f2a5c; }
.sheet-event-detail dd { margin: 0 0 1rem; }
.sheet-event-detail aside > p { margin-top: 1rem; }
@media (max-width: 980px) { .sheet-event-track { grid-auto-columns: calc((100% - 1.25rem) / 2); } }
@media (max-width: 640px) {
  .sheet-event-track { grid-auto-columns: 92%; }
  .sheet-event-detail { grid-template-columns: minmax(0, 1fr); }
}

/* Keep the schedule and action aligned across cards of different lengths. */
body #page-container .sheet-event-card h2 {
  font-size: clamp(1.12rem, 1.4vw, 1.35rem);
  line-height: 1.35;
  text-wrap: balance;
  padding-bottom: .6rem;
}
body #page-container .sheet-event-card .sheet-event-schedule {
  padding-bottom: 0;
}
.sheet-event-card .sheet-event-button { margin-top: .9rem; }
.sheet-event-detail { align-items: start; }
body #page-container .sheet-event-detail h1 {
  font-size: clamp(1.55rem, 2.6vw, 2.25rem);
  text-wrap: balance;
}
body #page-container .sheet-event-content h2 {
  font-size: 1.2rem;
  color: #1f2a5c;
  margin-top: .65rem;
}
.sheet-event-content .sheet-event-button { margin-top: .75rem; }
.sheet-event-detail .sheet-event-facts {
  min-width: 0;
  padding: clamp(1rem, 2.2vw, 1.65rem);
  border: 1px solid #e0e8f2;
  border-radius: 14px;
  background: #f6f9fd;
}
.sheet-event-facts dt { margin-top: .8rem; }
.sheet-event-facts dt:first-child { margin-top: 0; }
.sheet-event-facts dd { padding-bottom: .7rem; border-bottom: 1px solid #e0e8f2; }
.sheet-event-share-label { font-weight: 650; }
.sheet-event-share { display: flex; gap: .6rem; flex-wrap: wrap; }

#main-content > .sheet-event-carousel { width: min(90%, 1200px); }
.sheet-event-share.a2a_kit a { padding: 0; }

#sheet-events-slot > [role="status"] { width: min(90%, 1200px); margin: 2rem auto; text-align: center; }
#sheet-events-slot .sheet-event-carousel { width: min(95%, 1200px); }
#sheet-events-slot button:focus-visible { outline: 2px solid #1266a1; outline-offset: 3px; }

#sheet-events-slot[data-loading] > [role="status"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding-block: 1.25rem;
  color: #17345b;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 600;
  line-height: 1.4;
}

#sheet-events-slot[data-loading] > [role="status"]::before {
  content: "";
  box-sizing: border-box;
  width: 1.45em;
  height: 1.45em;
  flex: none;
  border: 3px solid #dce8f4;
  border-top-color: #1266a1;
  border-right-color: #b28a36;
  border-radius: 50%;
  animation: sheet-events-spin .85s linear infinite;
}

@keyframes sheet-events-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  #sheet-events-slot[data-loading] > [role="status"]::before { animation: none; }
}

/* Banner heading above the events list (matches /events/ hero) */
.page-banner-events {
  background: url(/wp-content/uploads/2023/04/ESA_Events_banner_background.png) center / cover no-repeat;
  padding: 90px 5%;
  text-align: center;
}
body #page-container .page-banner-events h1 {
  margin: 0;
  padding: 0;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 45px;
  line-height: 1.2;
  color: #0033A1 !important;
  text-wrap: balance;
}
@media (max-width: 980px) { body #page-container .page-banner-events h1 { font-size: 40px; } }
@media (max-width: 767px) { .page-banner-events { padding: 60px 5%; } body #page-container .page-banner-events h1 { font-size: 35px; } }
