.events-hero {
  margin-bottom: 24px;
  padding: clamp(20px, 4vw, 36px);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff8dc, #f4f0bd);
  border: 1px solid #d9cc83;
}

.events-hero h1 { margin-bottom: 12px; }
.events-hero .place-eyebrow { margin-top: 0; }

.event-view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.event-view-switch button {
  min-height: 52px;
  border: 2px solid var(--red);
  border-radius: 9px;
  background: white;
  color: var(--red-dark);
  font-size: 1.05rem;
}

.event-view-switch button[aria-pressed="true"] {
  background: var(--red);
  color: white;
}

.community-event-prompt {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid #d9cc83;
  border-radius: 10px;
  background: #fff8dc;
}
.community-event-prompt[hidden] { display: none; }
.community-event-prompt h2 { margin: 0 0 4px; font-size: 1.25rem; }
.community-event-prompt p { margin: 0; }
.community-event-prompt .button { flex: 0 0 auto; }

.event-controls {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(145px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f6f1;
}

.event-controls label { display: block; margin-bottom: 4px; font-weight: 750; }
.event-controls input,
.event-controls select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #817a79;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.event-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 6px solid var(--red);
  border-radius: 11px;
  background: white;
  box-shadow: 0 5px 16px rgba(20, 35, 50, .08);
}

.event-card.is-past { border-top-color: #777; }
.event-card-body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.event-card h2 { margin: 7px 0 8px; font-size: 1.25rem; line-height: 1.25; }
.event-card p { margin: 5px 0; }
.event-card-date { color: var(--red-dark); font-weight: 800; }
.event-card-location { color: var(--muted); }
.event-card-phone a { color: var(--blue); font-weight: 750; }
.event-card-notes { margin-top: 10px !important; }
.event-card-flyer {
  margin: 14px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f6f1;
}
.event-card-flyer a { display: block; }
.event-card-flyer img { display: block; width: 100%; height: auto; }
.event-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 16px; }
.event-card-actions .button { flex: 1 1 120px; }

.event-card-community .event-card-body { padding: 15px 18px; }
.event-card-community .event-card-actions {
  justify-content: flex-start;
  margin-top: 10px;
  padding-top: 0;
}
.event-card-community .event-card-actions .button {
  flex: 0 1 auto;
  min-width: 118px;
}
.event-card-details[hidden] { display: none; }
.event-card-details {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.event-card-expanded-actions { margin-top: 12px; }
.event-card-expanded-actions .button { width: 100%; }

.event-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.event-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf5fa;
  color: #174c70;
  font-size: .78rem;
  font-weight: 800;
}
.event-badge.status { background: #f4f0bd; color: #5c4811; }
.event-card.is-past .event-badge.status { background: #ecebea; color: #56504f; }

.event-note {
  margin-top: 30px;
  padding: 18px 20px;
  border-left: 6px solid var(--blue);
  border-radius: 7px;
  background: #edf5fa;
}
.event-note h2 { margin: 0 0 6px; font-size: 1.3rem; }

@media (max-width: 820px) {
  .event-controls { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .event-controls,
  .event-grid { grid-template-columns: 1fr; }
  .events-hero { padding: 20px 16px; }
  .community-event-prompt { display: block; }
  .community-event-prompt .button { width: 100%; margin-top: 14px; }
  .event-card-community .event-card-actions { flex-wrap: nowrap; }
  .event-card-community .event-card-actions .button { flex: 1 1 0; min-width: 0; }
}
