/* =========================================================
   === Page 3: Events Styling (events.css)
   ========================================================= */

#events .events-page {
  padding: 20px;
  background: #0a0a0a;
  color: #a5a5a5;
  font-family: Arial, Helvetica, sans-serif;
}

/* Filter Buttons */
#events .flyer-filters {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 0;
}

#events .flyer-filters button {
  background: #7526df;
  color: #fff;
  border: none;
  padding: 8px 16px;
  font-size: 0.95rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#events .flyer-filters button:hover {
  background: #5a1bb5;
  box-shadow: 0 0 8px rgba(117, 38, 223, 0.6);
}

#events .flyer-filters button.active,
#events .flyer-filters button[aria-pressed="true"] {
  background: #7200ff;
  box-shadow: 0 0 12px #e100ff, 0 0 20px rgba(226,0,255,0.6);
  color: #fff;
}

#events .flyer-filters button:focus {
  outline: 3px solid #e100ff;
  outline-offset: 2px;
}

/* Grid Layout for Events */
#events .clearfix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

/* Month group headings */
#events .month-group {
  grid-column: 1 / -1;
  color: #fff;
  font-size: 1.25rem;
  margin: 20px 0 10px;
  padding-left: 10px;
  border-bottom: 1px solid #7526df;
}

/* Fade-in animation helper */
#events .responsive {
  box-sizing: border-box;
  margin-bottom: 12px;
  transition: opacity 0.5s ease, transform 0.2s ease, box-shadow 0.2s ease;
  opacity: 1;
}
#events .responsive.fade-in {
  opacity: 0;
}

/* Flyer Card Styles */
#events .gallery {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px;
  border: 2px solid #7526df;
  border-radius: 6px;
  background: #111;
  box-shadow: 0 0 6px rgba(117, 38, 223, 0.4),
              0 0 12px rgba(117, 38, 223, 0.3);
  cursor: pointer;
  overflow: hidden;
  min-height: 360px;
}

#events .gallery:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 10px rgba(117, 38, 223, 0.6),
              0 0 20px rgba(117, 38, 223, 0.4);
}

/* Lazy-loaded Images */
#events .gallery img {
  width: 100%;
  height: 220px;
  background: #000;
  object-fit: contain;
  transition: transform 0.3s ease;
  display: block;
}

#events .gallery img:hover {
  transform: scale(1.03);
}

/* Description Block */
#events .desc {
  flex-grow: 1;
  padding: 10px;
  text-align: center;
  font-size: 0.9rem;
  color: #ccc;
  background: rgba(117, 38, 223, 0.15);
  border-top: 1px solid #7526df;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

#events .desc strong {
  color: #fff;
}

/* Ads Section Divider */
#events .ads {
  margin-top: 20px;
  padding-top: 20px;
}

/* Lightbox Overlay */
#events .event-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.9);
  z-index: 9999;
}

#events .event-lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#events .event-lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

#events .event-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: 2px solid #7526df;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(117, 38, 223, 0.6);
  background: #000;
}

/* Lightbox Caption (matches HTML id) */
#events #lightboxCaption {
  max-width: 700px;
  width: 100%;
  margin-top: 15px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #ccc;
  background: rgba(0,0,0,0.5);
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(117, 38, 223, 0.6);
}

/* Fallback Message */
#events .no-upcoming-msg {
  text-align: center;
  color: #fff;
  font-size: 1rem;
  margin: 20px 0;
  padding: 12px 16px;
  border: 1px dashed #7526df;
  border-radius: 6px;
  background: rgba(117, 38, 223, 0.15);
  box-shadow: 0 0 8px rgba(117, 38, 223, 0.6),
              0 0 16px rgba(117, 38, 223, 0.4);
  text-shadow: 0 0 6px #7526df;
  transition: opacity 1s ease;
}

#events .no-upcoming-msg.fade-out {
  opacity: 0;
}

.today-badge {
  background: linear-gradient(45deg, #ff6a00, #ffcc00);
  color: black;
  font-weight: bold;
  padding: 2px 6px;
  margin-left: 6px;
  border-radius: 4px;
  font-size: 1.0em;
  animation: pulseGlow 1.5s infinite;
}

.today-highlight {
  box-shadow: 0 0 12px rgba(255, 106, 0, 0.6);
  border: 2px solid #ffcc00;
  border-radius: 6px;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 5px #ff6a00; }
  50% { box-shadow: 0 0 15px #ffcc00; }
  100% { box-shadow: 0 0 5px #ff6a00; }
}

#events .event-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
