/* =========================================================
   OUR EVENTS PAGE – HERO + FILTERS + EVENT CARDS
   ========================================================= */

.our-events-page {
  background-color: var(--primary-bg);
  color: var(--headings);
  margin: 0 !important;
}

/* ---------- HERO SECTION ---------- */
.events-hero {
  background-color: var(--primary-bg);
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.events-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* ---------- FILTER BAR ---------- */
.mr-sid-events-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
  max-width: 1100px;
}

.filter-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.filter-select,
.filter-input {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid #ccc;
  background: #fff;
  padding: 0 1rem;
  font-size: 0.95rem;
  line-height: 1.3;
  border-radius: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-family: inherit;
}

.filter-group > .filter-date-wrapper,
.filter-group > .filter-select,
.filter-group > .filter-input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  min-height: 40px;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--accent, #b6aa93);
  background: #fafafa;
}

.filter-submit {
  flex: 0 0 auto;
  background-color: #d1ccbd;
  color: #111;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.25s ease;
  white-space: nowrap;
}

.filter-submit:hover {
  background-color: #b5a985;
}

/* ---------- EVENT LISTING ---------- */
.events-listing {
  margin: 0;
  padding: 0;
}

.event-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  color: #fff;
}

.event-card a {
  text-decoration: none !important;
  color: inherit;
  display: block;
}

/* Event Image */
.event-image {
  width: 100%;
  height: 70vh;
  background-size: cover;
  background-position: center center;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

/* Overlay fade for text readability */
.event-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(36, 36, 36, 0.40);
  z-index: 1;
}

/* ---------- EVENT INFO ---------- */
.event-info {
  position: absolute;
  bottom: 15%;
  z-index: 2;
  max-width: 70%;
}

.event-card .event-info {
  left: 10%;
  right: auto;
  text-align: left;
}

.event-card.flipped .event-info {
  left: auto;
  right: 10%;
  text-align: right;
}

.event-info h2 {
  text-transform: uppercase;
  margin: 0 0 0.25rem;
  color: #fff;
}

.event-date {
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: #fff;
}

.event-description {
  text-transform: uppercase;
}

/* ---------- ORGANIZER BADGES ---------- */
.event-organizers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.event-card.flipped .event-organizers {
  justify-content: flex-end;
}

.event-organizer {
  background-color: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
}

.events-listing.loading {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}

.events-listing.loading::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid #ccc;
  border-top-color: var(--ast-global-color-0, black);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- RSVP ---------- */
.event-rsvp {
  display: inline-block;
  position: relative;
  align-self: flex-start;
  margin-top: 1rem;
  border: 2px solid #fff;
  border-radius: 4px;
  color: #fff;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.25s ease;
  background: transparent;
  text-align: center;
  white-space: nowrap;
  width: fit-content;
  background: rgba(36,36,36,0.3);
  min-width: 0; 
}
.event-card.flipped .event-rsvp {
  margin-left: auto;
}
.event-rsvp:hover {
  backdrop-filter: blur(1.5px);
  background: rgba(36,36,36,0.6);
  border: 2px solid #fff;
}
.rsvp-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rsvp-modal-content {
  margin-top: 2rem;
}

.rsvp-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.rsvp-modal-inner {
  position: relative;
  z-index: 2;
  background: #fff;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: fadeInScale 0.25s ease-out;
  overflow-y: auto;
}

.rsvp-heading {
  text-align: center;
}
.rsvp-date {
  font-size: 1rem;
  font-weight: 400;
}

.rsvp-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  padding: 0.5rem;
  color: black;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  box-shadow: none;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

body.rsvp-open {
  overflow: hidden;
}

/* ---------- CALENDAR ---------- */
.filter-date-wrapper .date-display-input {
  cursor: pointer;
  text-align: left;
}

.filter-date-wrapper {
  position: relative;
  font-family: inherit;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin: 1rem 0;
  padding: 0.5rem 0;
  background: var(--primary-bg);
}

.date-picker-popup {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  z-index: 1000;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  min-width: 350px;
}

.calendar-popup {
  text-align: center;
}

button.prev-month,
button.next-month {
  padding: 0.5rem;
  font-size: 1rem;
  background: none;
  color: #444;
  box-shadow: none;
  border: 1px solid rgba(36,36,36,0.15);
}

button.cal-day {
  padding: 0.5rem;
  font-size: 1rem;
  background: none;
  color: #444;
  &:hover {
    background: #2a2a2a;
    color: #fff;
    border-radius: 100%;
  }
}

button.calendar-clear,
button.calendar-apply {
  border: 2px solid #242424;
  color: #242424;
  background: rgba(36,36,36,0.05);
  backdrop-filter: blur(1.5px);
  text-transform: uppercase;
}

.cal-day.selected {
  background: #2a2a2a;
  color: #fff;
  border-radius: 100%;
}

.cal-day.range-start,
.cal-day.range-end {
  font-weight: bold;
  background-color: #555;
  color: #fff;
  border-radius: 50%;
}

.cal-day.in-range {
  background-color: #e0e0e0;
  color: #333;
  border-radius: 0;
}

.cal-day.today {
  border: 1px solid #aaa;
}

.cal-day.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cal-day.disabled:hover {
  background: none;
}

.cal-day:disabled {
  pointer-events: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .event-image {
    height: 60vh;
  }

  .event-info {
    bottom: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
  }

  .events-title {
    font-size: 1.6rem;
  }

  .filter-select,
  .filter-input {
    min-width: 130px;
  }
  .filter-group {
    flex-wrap: wrap;
    flex-direction: column;
  }
}
@media (min-width: 1024px) {
	.event-image {
	  background-position: 50% 25%;
	}
}
