/* =========================================================
   === Page 3: Events Styling (page3.css)
   ========================================================= */

#page3 .events-page {
  padding: 20px;
  background: #0a0a0a;
  color: #a5a5a5;
  font-family: Arial, Helvetica, sans-serif;
}

/* Filter Buttons */
#page3 .flyer-filters {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 0;
}

#page3 .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;
}

#page3 .flyer-filters button:hover {
  background: #5a1bb5;
  box-shadow: 0 0 8px rgba(117, 38, 223, 0.6);
}

#page3 .flyer-filters button.active,
#page3 .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;
}

#page3 .flyer-filters button:focus {
  outline: 3px solid #e100ff;
  outline-offset: 2px;
}

/* Grid Layout for Events */
#page3 .clearfix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

/* Month group headings */
#page3 .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 */
#page3 .responsive {
  box-sizing: border-box;
  margin-bottom: 12px;
  transition: opacity 0.5s ease, transform 0.2s ease, box-shadow 0.2s ease;
  opacity: 1;
}
#page3 .responsive.fade-in {
  opacity: 0;
}

/* Flyer Card Styles */
#page3 .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;
}

#page3 .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 */
#page3 .gallery img {
  width: 100%;
  height: 220px;
  background: #000;
  object-fit: contain;
  transition: transform 0.3s ease;
  display: block;
}

#page3 .gallery img:hover {
  transform: scale(1.03);
}

/* Description Block */
#page3 .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;
}

#page3 .desc strong {
  color: #fff;
}

/* Ads Section Divider */
#page3 .ads {
  margin-top: 20px;
  padding-top: 20px;
}

/* Lightbox Overlay */
#page3 .event-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.9);
  z-index: 9999;
}

#page3 .event-lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#page3 .event-lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

#page3 .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) */
#page3 #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 */
#page3 .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;
}

#page3 .no-upcoming-msg.fade-out {
  opacity: 0;
}
