/* ============================================
   EVENTS PAGE STYLES
   ============================================ */

/* --- Events Hero --- */
.events-hero {
  position: relative;
  min-height: 400px;
  padding-top: 100px;
  padding-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.events-hero .hero-bg {
  position: absolute;
  inset: 0;
}

.events-hero .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.events-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.6) 100%);
}

.events-hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 24px;
}

.events-hero h1 {
  color: var(--ivory);
  font-size: 88px;
  white-space: nowrap;
  margin-bottom: var(--space-sm);
}

.events-hero .glass-pill {
  margin-bottom: var(--space-md);
}

.events-hero .glass-pill .label {
  color: var(--volt);
  margin-bottom: 0;
}

.events-hero .hero-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 19px;
  line-height: 1.6;
}

/* --- Interactive Calendar --- */
.calendar-section {
  padding: var(--space-lg) 0;
}

.calendar-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.calendar {
  border-radius: 20px;
  overflow: visible;
  padding: 28px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 8px 40px rgba(26, 63, 199, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.calendar:hover {
  transform: none;
  box-shadow:
    0 8px 40px rgba(26, 63, 199, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.calendar-header h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--charcoal);
}

.calendar-nav {
  display: flex;
  gap: 8px;
}

.calendar-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ivory-warm);
  border: 1px solid var(--ivory-muted);
  color: var(--charcoal);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
  min-height: 44px;
  min-width: 44px;
}

.calendar-nav-btn:hover {
  background: var(--royal-light);
  color: var(--royal);
}

.calendar-nav-btn svg {
  width: 18px;
  height: 18px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.calendar-weekday {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  padding: 8px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 8px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  cursor: default;
  border: 1.5px solid transparent;
  transition: background 0.25s var(--ease-spring), transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring), border-color 0.25s var(--ease-spring), color 0.25s var(--ease-spring), opacity 0.25s var(--ease-spring);
}

.calendar-day.other-month {
  color: var(--ivory-muted);
}

.calendar-day.today {
  background: var(--royal-light);
  font-weight: 700;
  color: var(--royal);
}

.calendar-day:hover:not(.other-month) {
  background: var(--ivory-warm);
}

/* Event dots on calendar days */
.calendar-day .event-dots {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}

.event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.event-dot.dot-service { background: var(--royal); }
.event-dot.dot-class { background: var(--volt-muted); }
.event-dot.dot-special { background: var(--cat-special); }
.event-dot.dot-group { background: var(--cat-group); }
.event-dot.dot-worship { background: var(--royal); }
.event-dot.dot-groups { background: var(--cat-groups); }
.event-dot.dot-youth { background: var(--cat-youth); }
.event-dot.dot-women { background: var(--cat-women); }
.event-dot.dot-men { background: var(--cat-men); }
.event-dot.dot-serve { background: var(--cat-serve); }
.event-dot.dot-holiday { background: var(--charcoal); }

/* Calendar day clickable state */
.calendar-day.has-events {
  cursor: pointer;
  transition: background 0.3s var(--ease-spring), transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring), border-color 0.3s var(--ease-spring), color 0.3s var(--ease-spring), opacity 0.3s var(--ease-spring);
}

.calendar-day.has-events:hover {
  background: rgba(255, 255, 240, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(26, 63, 199, 0.06);
}

/* Selected day — liquid glass highlight */
.calendar-day.active-day {
  background: rgba(255, 255, 240, 0.75);
  border: 1.5px solid rgba(26, 63, 199, 0.2);
  box-shadow:
    0 4px 16px rgba(26, 63, 199, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  color: var(--royal);
  font-weight: 700;
  z-index: 2;
}

/* Calendar dropdown row — spans full grid width, pushes rows down */
.calendar-dropdown {
  grid-column: 1 / -1;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  background: rgba(255, 255, 240, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  box-shadow:
    0 4px 20px rgba(26, 63, 199, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  margin: 4px 0;
  transition:
    max-height 0.45s var(--ease-spring),
    opacity 0.35s ease;
}

.calendar-dropdown.open {
  opacity: 1;
}

.calendar-dropdown-inner {
  padding: 14px 18px;
}

.dropdown-event {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
}

.dropdown-event:not(:last-child) {
  border-bottom: 1px solid rgba(26, 63, 199, 0.06);
}

.dropdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dropdown-dot.dot-service { background: var(--royal); }
.dropdown-dot.dot-class { background: var(--volt-muted); }
.dropdown-dot.dot-special { background: var(--cat-special); }
.dropdown-dot.dot-group { background: var(--cat-group); }
.dropdown-dot.dot-worship { background: var(--royal); }
.dropdown-dot.dot-groups { background: var(--cat-groups); }
.dropdown-dot.dot-youth { background: var(--cat-youth); }
.dropdown-dot.dot-women { background: var(--cat-women); }
.dropdown-dot.dot-men { background: var(--cat-men); }
.dropdown-dot.dot-serve { background: var(--cat-serve); }
.dropdown-dot.dot-holiday { background: var(--charcoal); }

/* --- Featured Event --- */
.featured-event {
  display: grid;
  grid-template-columns: 60% 40%;
  overflow: hidden;
  min-height: 360px;
}

.featured-event-img {
  width: 100%;
  height: 100%;
  min-height: 360px;
}

.featured-event-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-event-content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-event-content .badge-volt {
  align-self: flex-start;
  margin-bottom: var(--space-sm);
}

.featured-event-content h2 {
  font-size: 32px;
  color: var(--charcoal);
  margin-bottom: var(--space-sm);
}

.featured-event-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: var(--space-sm);
}

.featured-event-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--slate);
  font-size: 15px;
}

.featured-event-meta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.featured-event-content > p {
  color: var(--charcoal);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

/* --- Filter Bar --- */
.filter-bar {
  position: sticky;
  top: 84px;
  z-index: 100;
  background: rgba(255, 255, 240, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding: 16px 0;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 24px;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 8px 20px;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s var(--ease-spring), transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring), border-color 0.3s var(--ease-spring), color 0.3s var(--ease-spring), opacity 0.3s var(--ease-spring);
  min-height: 44px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 240, 0.55);
  color: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-pill:hover {
  background: rgba(255, 255, 240, 0.75);
}

.filter-pill.active {
  background: var(--royal);
  color: var(--ivory);
  border-color: var(--royal);
}

/* --- Events Grid --- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
}

.event-card-full {
  position: relative;
}

.event-card-full .card-img {
  position: relative;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

.event-card-full .card-img img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.event-card-full .date-badge {
  position: absolute;
  bottom: 12px;
  left: 16px;
  z-index: 2;
}

.event-card-body {
  padding: 20px 24px;
}

.event-card-body .badge {
  display: inline-block;
  margin-bottom: 12px;
}

.event-card-body h3 {
  color: var(--charcoal);
  font-size: 22px;
  margin-bottom: 12px;
}

/* Fix: meta rows should be horizontal icon+text, stacked vertically */
.event-meta-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.event-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--slate);
  font-size: 14px;
}

.event-meta-row svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.event-card-body > p {
  color: var(--charcoal);
  font-size: 15px;
  line-height: 1.6;
  margin-top: 12px;
}

.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--ivory-muted);
}

.event-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s, border-color 0.3s, color 0.3s, opacity 0.3s;
  min-height: 44px;
  min-width: 44px;
}

.event-share-btn:hover {
  background: var(--royal-light);
  color: var(--royal);
}

.event-share-btn svg {
  width: 18px;
  height: 18px;
}

.share-copied {
  font-size: 12px;
  font-weight: 600;
  color: var(--royal);
  white-space: nowrap;
}

/* Load More */
.load-more-wrap {
  text-align: center;
  margin-top: var(--space-lg);
}

/* --- Newsletter CTA --- */
.newsletter-cta {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.newsletter-cta h3 {
  color: var(--charcoal);
  margin-bottom: var(--space-xs);
}

.newsletter-cta > p {
  color: var(--slate);
  font-size: 17px;
  margin-bottom: var(--space-md);
}

/* --- Responsive --- */
@media (max-width: 1024px) and (min-width: 769px) {
  .events-hero h1 {
    font-size: clamp(48px, 8vw, 72px);
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .events-hero h1 {
    font-size: 48px;
    white-space: normal;
  }

  .featured-event {
    grid-template-columns: 1fr;
  }

  .featured-event-img {
    min-height: 220px;
    max-height: 280px;
  }

  .events-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    top: 76px;
  }

  .calendar-days {
    gap: 2px;
  }

  .calendar-day {
    font-size: 12px;
    padding-top: 6px;
    border-radius: 8px;
  }

  .event-dot {
    width: 4px;
    height: 4px;
  }

  .calendar-dropdown-inner {
    padding: 10px 14px;
  }

  .dropdown-event {
    font-size: 13px;
    padding: 8px 0;
  }
}
