#events h1 {
  text-align: center;
  margin-bottom: 2rem;
}
#events-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.event-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;

  display: flex;
  flex-direction: column;
}
.event-header {
  background: #0080ff;
  color: white;
  padding: 1rem;
  font-weight: bold;
  font-size: 1.1rem;
}
.event-card-featured {
  background: linear-gradient(135deg, #99ffff 0%, #f0f8ff 100%) !important; /* light blue gradient background */
  border: 2px solid #c0392b !important; /* red border for featured events */
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2) !important; /* outer glow ring */
  position: relative !important;
  overflow: hidden !important;

}
.event-card-featured::before { /* adds featured ribbon */
  content: "FEATURED";
  position: absolute;
  top: 12px;
  right: -38px;
  transform: rotate(45deg);
  width: 140px;
  height: 32px;
  background: linear-gradient(90deg, #c0392b, #e74c3c);
  color: white;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  line-height: 32px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 1;
}
.event-header-featured {
  background: #0066cc;
  color: white;
  padding-right: 3em;
}
.event-body {
  padding: 1rem;

  flex: 1;
  display: flex;
  flex-direction: column;
}
.event-time {
  font-size: 0.95rem;
  color: #4b5563;
}
.event-desc {
  margin-top: 0.75rem;
  line-height: 1.5;
}
.event-location {
  margin-top: 0.5rem;
  font-style: italic;
  color: #6b7280;
}
#loading, #error {
  text-align: center;
  padding: 2rem;
  font-size: 1.1rem;
}
.event-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.calendar-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding-top: 20px;
  margin-top: auto;
}
.calendar-icon {
  height: 26px;
  cursor: pointer;
  opacity: 0.85;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
#copy-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
}
#copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  #events-container {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .event-card:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  }
  .event-card-featured:hover {
    transform: translateY(-1px) scale(1.1) !important;
    box-shadow:
            0 20px 40px rgba(0,0,0,0.2),
            0 10px 10px rgba(230, 126, 34, 0.3) !important;
  }
}