.calendar-hero {
  background: linear-gradient(135deg, var(--tu-cherry) 0%, #111 140%);
  color: #fff;
  text-align: center;
  padding: 72px 20px;
}

.calendar-hero .lead {
  max-width: 640px;
  margin: 0.75rem auto 0;
  color: rgba(255, 255, 255, 0.85);
}

.calendar-section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.calendar-card {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 1.25rem;
  overflow-x: auto;
}

/* FullCalendar re-skin to match brand */
#event-calendar {
  --fc-border-color: var(--border);
  --fc-today-bg-color: rgba(157, 34, 53, 0.08);
  --fc-button-bg-color: var(--tu-cherry);
  --fc-button-border-color: var(--tu-cherry);
  --fc-button-hover-bg-color: var(--tu-cherry-dark);
  --fc-button-hover-border-color: var(--tu-cherry-dark);
  --fc-button-active-bg-color: var(--tu-cherry-dark);
  --fc-event-bg-color: var(--tu-cherry);
  --fc-event-border-color: var(--tu-cherry);
  font-family: inherit;
}

#event-calendar .fc-event {
  cursor: pointer;
}

/* Bootstrap's link styling was turning weekday names and day numbers
   into blue underlined links */
#event-calendar .fc-col-header-cell-cushion,
#event-calendar .fc-daygrid-day-number {
  color: inherit;
  text-decoration: none;
}

.upcoming-heading {
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.event-card {
  display: flex;
  gap: 1rem;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.event-card.is-highlighted {
  box-shadow: 0 0 0 3px rgba(157, 34, 53, 0.45), var(--shadow-elevated);
  transform: translateY(-2px);
}

.event-date-block {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: rgba(157, 34, 53, 0.08);
  color: var(--tu-cherry);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.event-month {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.event-day {
  font-size: 1.4rem;
  font-weight: 800;
}

.event-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.event-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.calendar-legend .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.event-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.4rem;
}

.event-description {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.event-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.event-link-pill {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(157, 34, 53, 0.1);
  color: var(--tu-cherry);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.event-link-pill:hover {
  background: var(--tu-cherry);
  color: #fff;
}

#upcoming-empty {
  color: #666;
}

.event-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 576px) {
  .calendar-hero {
    padding: 48px 16px;
  }

  .calendar-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .calendar-card {
    padding: 0.6rem;
  }

  /* Toolbar: month title on its own line, prev/next/today buttons below */
  #event-calendar .fc-header-toolbar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  #event-calendar .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
    order: -1;
    width: 100%;
    text-align: center;
  }

  #event-calendar .fc-toolbar-title {
    font-size: 1.2rem;
  }

  #event-calendar .fc-button {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

  #event-calendar .fc-col-header-cell-cushion,
  #event-calendar .fc-daygrid-day-number {
    font-size: 0.75rem;
    padding: 2px 3px;
  }

  /* Event titles don't fit in a phone-width cell, so show each event as a
     small color strip (color = category). Full details are in the
     Upcoming Events list below; tapping a day scrolls to its card. */
  #event-calendar .fc-daygrid-event {
    font-size: 0;
    height: 10px;
    min-height: 10px;
    margin-top: 2px;
  }

  #event-calendar .fc-daygrid-day-frame {
    min-height: 44px;
  }

  .event-card {
    flex-direction: column;
  }

  .event-date-block {
    flex-direction: row;
    width: 100%;
    height: auto;
    padding: 0.4rem 0.75rem;
    gap: 0.4rem;
  }
}
