/* KWCS event-archive styles — pagination for the event listings. */

.wp-block-post-title,
.kwcs-pagination { text-align: center; }

.wp-pagenavi,
.navigation.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 56px;
  }

.navigation.pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 100px;
    border: 2px solid var(--border);
    font-weight: 800;
    font-size: 14.5px;
    color: var(--navy);
    text-decoration: none;
    transition: background 0.18s, border-color 0.18s;
  }

.navigation.pagination .page-numbers:hover {
    background: var(--gold-tint);
    border-color: var(--gold);
  }

.navigation.pagination .page-numbers.current {
    background: var(--navy);
    border-color: var(--navy);
    color: white;
  }

.navigation.pagination .screen-reader-text { display: none; }

/* ── Community events archive ─────────────────────────────────────────────
   Upcoming events, then a filterable list of past ones. Both are wide rows —
   photo left, details right — inside a white panel that floats on the cream
   page background. */

.community-archive {
  padding: 64px 80px 110px;
}

.ce-panel {
  max-width: 1080px;
  margin: 0 auto;
  background: white;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(30, 75, 143, 0.08);
  padding: 34px 40px;
}

.ce-row {
  display: grid;
  grid-template-columns: 216px 1fr;
  gap: 32px;
  padding: 30px 0;
}

/* A gold rule between rows, the way the mockup separates them. */
.ce-row + .ce-row {
  border-top: 3px solid var(--gold);
}

.ce-row.is-hidden { display: none; }

.ce-row-media img,
.ce-row-media .comm-card-placeholder {
  display: block;
  width: 100%;
  /* height:auto so the ratio wins over the img tag's own height attribute. */
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

/* An event without a photo yet still needs to hold its column. */
.ce-row-media .comm-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--gold-tint);
  border: 2px dashed var(--gold-pale);
}

.ce-row-media .comm-card-placeholder-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-deep);
  text-align: center;
  line-height: 1.35;
}

.ce-row-title {
  font-family: 'Chewy', cursive;
  font-size: 30px;
  line-height: 1.1;
  color: var(--navy-deep);
  margin: 0 0 6px;
}

.ce-row-meta {
  font-family: 'Chewy', cursive;
  font-size: 22px;
  color: var(--gold-deep);
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.ce-row-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy);
  font-weight: 500;
  margin: 0 0 18px;
  max-width: 62ch;
}

.ce-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.ce-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  padding: 9px 26px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.ce-btn--details,
.ce-btn--photos {
  background: var(--gold);
  color: var(--navy-deep);
}

.ce-btn--details:hover,
.ce-btn--photos:hover { background: var(--gold-light); }

.ce-btn--donate {
  background: var(--navy);
  color: white;
}

.ce-btn--donate:hover { background: var(--navy-mid); }

.ce-row-note {
  font-size: 15px;
  color: var(--navy);
  font-weight: 500;
  margin: 16px 0 0;
}

.ce-empty {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

/* ── Past events ─────────────────────────────────────────────────────── */

.ce-past {
  max-width: 1080px;
  margin: 90px auto 0;
}

.ce-past-title .gold { color: var(--gold-deep); }

.ce-past-title {
  position: relative;
  font-size: clamp(40px, 4.4vw, 58px);
  line-height: 1;
  color: var(--navy-deep);
  text-align: center;
  margin: 0 0 28px;
}

/* The heading is centred, so the stars hang off the end of the line. */
.ce-past-stars {
  position: absolute;
  right: 4%;
  top: -22px;
  width: 78px;
  height: 80px;
  pointer-events: none;
  background-color: var(--gold);
  -webkit-mask: url(../../img/kwcs-icon-stars.svg) no-repeat center / contain;
  mask: url(../../img/kwcs-icon-stars.svg) no-repeat center / contain;
}

.ce-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 28px;
  padding: 0 8px 14px;
  border-bottom: 3px solid var(--gold);
  margin-bottom: 28px;
}

.ce-filter label {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--navy-deep);
  margin-bottom: 4px;
}

.ce-filter select {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  background: transparent;
  border: 0;
  padding: 2px 0;
  cursor: pointer;
}

.ce-filter--search { margin-left: auto; }

.ce-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px solid var(--gold);
  border-radius: 100px;
  padding: 8px 18px;
  color: var(--gold-deep);
  min-width: 240px;
}

.ce-filter-search {
  border: 0;
  outline: none;
  background: transparent;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  width: 100%;
}

.ce-no-results {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .community-archive { padding: 48px 32px 80px; }
  .ce-panel { padding: 26px 28px; }
  .ce-row { grid-template-columns: 180px 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .community-archive { padding: 36px 20px 64px; }
  .ce-panel { padding: 20px 20px; border-radius: 22px; }
  .ce-row { grid-template-columns: 1fr; gap: 18px; }
  .ce-row-media img,
  .ce-row-media .comm-card-placeholder { aspect-ratio: 16 / 10; }
  .ce-row-title { font-size: 26px; }
  .ce-row-meta { font-size: 19px; gap: 12px; }
  .ce-past-stars { display: none; }
  .ce-filters { gap: 16px; }
  .ce-filter--search { margin-left: 0; width: 100%; }
}
