body.page-events {
  font-family: inherit;
  color: var(--text);
}

.events-band {
  width: 100%;
  background: transparent;
  padding: 2rem 0;
  box-sizing: border-box;
}
.events-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}
.events-grid {
  display: grid;
  grid-template-columns: 3fr 1fr; 
  gap: 1.5rem;
  align-items: start;
}

.calendar-column .card.pill-card {
  margin: 0;
  padding: 1rem;
  background: linear-gradient(180deg, var(--panel), var(--card));
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--text);
}

.calendar-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#calendarMonth {
  font-weight: bold;
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 0.75rem;
  color: var(--text);
}

#weekdayLabels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

#calendarGrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  flex: 1 1 auto;
  min-height: 0;
}

.calendar-day {
  position: relative;
  min-height: 100px;
  padding: 0.5rem;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--card), color-mix(in srgb, var(--card) 92%, rgba(0,0,0,0.04) 8%));
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  border: 1px solid rgba(255,255,255,0.02);
  overflow: visible; 
}

.calendar-day .day-number {
  display: inline-block;
  font-weight: 600;
  color: var(--muted);
  z-index: 2;
}

.calendar-day.today {
  border: 2px solid var(--accent-strong);
  animation: events-pulse 2s infinite;
}

.calendar-day.weekend {
  background: linear-gradient(135deg, color-mix(in srgb, var(--card-2) 86%, rgba(0,0,0,0.06) 14%), var(--card));
}

.calendar-day:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,0.32);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, var(--card) 96%), var(--card));
}

.calendar-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: events-fadeIn 0.45s ease;
  z-index: 2;
}

.floating-tooltip,
.calendar-day .tooltip {
  position: fixed; 
  background: linear-gradient(180deg, var(--panel), var(--card));
  border: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
  white-space: normal;
  display: none;
  z-index: 999999;
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
  color: var(--text);
  max-width: 320px;
  text-align: left;
  line-height: 1.25;
}

.floating-tooltip .tip-event,
.calendar-day .tooltip .tip-event { margin-bottom: 6px; }
.floating-tooltip .tip-title,
.calendar-day .tooltip .tip-title { font-weight: 800; color: var(--text); margin-bottom: 4px; }
.floating-tooltip .tip-date,
.calendar-day .tooltip .tip-date,
.floating-tooltip .tip-time,
.calendar-day .tooltip .tip-time { color: var(--muted); font-size: 0.92rem; margin-bottom: 4px; }
.floating-tooltip .tip-desc,
.calendar-day .tooltip .tip-desc { font-style: italic; color: var(--muted); font-size: 0.92rem; }

.floating-tooltip hr,
.calendar-day .tooltip hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

@keyframes events-fadeIn {
  from { opacity: 0; transform: scale(0.8) translateX(-50%); }
  to { opacity: 1; transform: scale(1) translateX(-50%); }
}
@keyframes events-pulse {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: var(--accent-strong); }
}

#calendarControls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
}
#calendarControls button {
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.16s ease;
}
#calendarControls button:not(.btn) {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff;
  border: none;
  box-shadow: 0 6px 18px rgba(81,35,168,0.08);
}

.event-column {
  padding: 0.25rem 0;
}

.event-header h3 {
  margin: 0 0 0.75rem 0;
  color: var(--accent);
  font-size: 1.25rem;
  text-align: left;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--accent);
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  padding-right: 6px;
}

.event-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.5rem 0.5rem; 
  background: transparent;
  border: none;
  color: var(--text);
  transition: background-color 0.12s ease, transform 0.12s ease;
  will-change: background-color, transform;
  border-radius: 8px; 
}

.event-item::before {
  content: "📅";
  display: inline-block;
  font-size: 1.05em;
  width: 1.25em;
  margin-top: 0.08rem; 
  line-height: 1;
}

.event-item .event-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.event-item .event-title,
.event-item .title {
  margin: 0;
  padding: 0;
  font-weight: 800;
  color: var(--text);
  font-size: 1rem;
  text-transform: none;
}

.event-item .event-date,
.event-item .date {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.event-item .event-desc,
.event-item .desc {
  margin: 0;
  font-style: italic;
  color: var(--muted);
  line-height: 1.35;
}

.event-item + .event-item {
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255,255,255,0.03);
}

.event-item:hover,
.event-item:focus,
.event-item:focus-within {
  transform: translateY(-2px);
  background-color: rgba(127,87,255,0.08); 
  border-color: rgba(127,87,255,0.14);
  box-shadow: 0 6px 18px rgba(81,35,168,0.06);
  outline: none;
  z-index: 3;
}

.event-item:focus-visible {
  background-color: rgba(127,87,255,0.12);
  box-shadow: 0 10px 28px rgba(81,35,168,0.12);
  transform: translateY(-2px);
}

#eventModal {
  display: none;
  position: fixed;
  top:0;
  left:0;
  width: 100%;
  height: 100%;
  background: rgba(3,3,5,0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
#eventModalContent {
  background: linear-gradient(180deg, var(--panel), var(--card));
  padding: 1.25rem;
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: 0 12px 36px rgba(0,0,0,0.55);
}
#eventModalContent h2 { margin-bottom: 0.5rem; color: var(--text); }
#eventModalContent p { margin-bottom: 1rem; color: var(--muted); }
#eventModalContent a:not(.btn) {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff;
}
#closeModal {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}

@media (max-width: 900px) {
  .events-grid {
    grid-template-columns: 1fr;
  }
  .event-list {
    max-height: none;
    overflow: visible;
    margin-top: 0.5rem;
  }
  .event-item::before { margin-top: 0; }
}

.calendar-day:hover .tooltip,
.calendar-day:focus-within .tooltip {
  display: block;
}
