.events-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.events-page h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.event-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.event-card img {
  width: 100%;
  height: auto;
  display: block;
}

.event-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.event-info h3 {
  color: #800000;
  margin: 0.5rem 0;
}

.event-info p {
  font-size: 0.95rem;
  color: #444;
}

.event-btn {
  display: flex-start;
  margin-top: auto;
  padding: 0.5rem 1rem;
  background-color: #800000;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.event-btn:hover {
  background-color: #a10000;
}

.event-buttons {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* NEW: How individual buttons behave inside the group */
.event-buttons .event-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.calendar-section {
  margin-bottom: 3rem;
}

.calendar-heading {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
  color: #800000;
}

.calendar-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
  font-size: 0.95rem;
  text-align: center;
}

.calendar-day {
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #f9f9f9;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day.event-day {
  background-color: #fff5f5;
  border: 2px solid #800000;
  font-weight: bold;
  color: #800000;
}

.no-results {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin: 2rem 0 1rem;
  color: #800000;
}

.pagination {
  margin: 2rem auto;
  text-align: center;
}

.pagination button {
  margin: 0 0.25rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  background-color: #f0f0f0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.pagination button.active-page,
.pagination button:hover {
  background-color: #800000;
  color: #fff;
}
.event-details-page img {
  width: 100%;
  border-radius: 8px 8px 0 0;
  object-fit: cover;
}

.event-details-page h1 {
  color: #800000;
  font-size: 2rem;
  margin-top: 1rem;
}

.event-details-page p {
  font-size: 1.1rem;
  color: #333;
  margin: 0.5rem 0;
}
/* Fallback Share Modal */
#shareModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(3px);
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.modal-content h3 {
  margin-bottom: 1rem;
  color: #800000;
}

.modal-content input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.modal-content button {
  padding: 0.5rem 1rem;
  margin: 0.5rem;
  background-color: #800000;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #a10000;
}
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.share-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #ccc;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.share-icon.fb {
  background-color: #3b5998;
}

.share-icon.wa {
  background-color: #25D366;
}

.share-icon.tw {
  background-color: #000;
}

.share-icon.email {
  background-color: #6c757d;
}

.share-icon:hover {
  transform: scale(1.1);
}
/* =========================
   Tabs
========================= */
.events-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
  flex-wrap: wrap;
}

.tab-btn {
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tab-btn.active {
  border-color: #800000;
  color: #800000;
  background: #fff5f5;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* =========================
   Calendar Layout (left + details)
========================= */
.calendar-shell {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.25rem;
  align-items: start;
}

/* Calendar header */
.calendar-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cal-nav {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.cal-nav:hover {
  transform: translateY(-1px);
  border-color: #800000;
}

.calendar-title {
  text-align: center;
}

.calendar-sub {
  margin: 0.2rem 0 0;
  color: #666;
  font-size: 0.95rem;
}

/* Weekday labels */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  font-weight: 700;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Update your grid spacing for better feel */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  text-align: center;
}

/* Day button (clickable) */
.calendar-day {
  padding: 0.75rem 0.25rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  background-color: #f9f9f9;
  min-height: 64px;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.calendar-day:hover {
  transform: translateY(-1px);
  border-color: #800000;
}

.calendar-day.is-outside {
  opacity: 0.35;
}

.calendar-day.is-today {
  border: 2px solid #800000;
}

.calendar-day.is-selected {
  background: #fff5f5;
  border-color: #800000;
}

/* Small dot indicator when events exist */
.calendar-day.has-events::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #800000;
  position: absolute;
  bottom: 8px;
}

/* =========================
   Day Details Panel
========================= */
.day-details {
  border: 1px solid #ddd;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  overflow: hidden;

  /* Start collapsed on desktop until a day is selected */
  max-width: 100%;
  display: none;
}

.day-details.open {
  display: block;
}

.day-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  background: #fff5f5;
  border-bottom: 1px solid #f1d6d6;
}

.day-details-header h3 {
  margin: 0;
  color: #800000;
  font-size: 1.1rem;
}

.day-details-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e3b8b8;
  background: #fff;
  cursor: pointer;
}

.day-details-body {
  padding: 1rem;
}

.day-details-hint {
  margin: 0;
  color: #666;
}

.day-event {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 0.8rem;
  margin-bottom: 0.75rem;
}

.day-event-title {
  margin: 0 0 0.25rem;
  color: #800000;
  font-weight: 800;
}

.day-event-meta {
  margin: 0;
  color: #444;
  font-size: 0.95rem;
}

.day-event a {
  display: inline-block;
  margin-top: 0.5rem;
  color: #800000;
  font-weight: 700;
  text-decoration: none;
}

.day-event a:hover {
  text-decoration: underline;
}

/* =========================
   Mobile behavior: details stacks below calendar
========================= */
@media (max-width: 900px) {
  .calendar-shell {
    grid-template-columns: 1fr;
  }

  .day-details {
    display: none; /* still collapsed until opened */
  }

  .day-details.open {
    display: block;
  }
}
