/* ──────────────────────────────────────────
   PBRF Events Page — events.css
   Loaded only on page-templates/hero-events.php
────────────────────────────────────────── */

/* ── FILTER BAR ── */
.ev-filters {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: var(--header-h);
  z-index: 90;
}
.admin-bar .ev-filters { top: calc(var(--header-h) + 32px); }
@media screen and (max-width: 782px) {
  .admin-bar .ev-filters { top: calc(var(--header-h) + 46px); }
}
.ev-filters-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 0;
  overflow: hidden;
}
.ev-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  height: 100%;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  position: relative;
  top: 1px;
  flex-shrink: 0;
}
.ev-filter-btn:hover { color: var(--purple); }
.ev-filter-btn.active { color: var(--purple); border-bottom-color: var(--gold); font-weight: 600; }
.ev-filter-count {
  background: var(--purple);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.ev-filter-btn.active .ev-filter-count { background: var(--gold); color: var(--purple); }
.ev-filter-divider { width: 1px; height: 24px; background: var(--gray-200); margin: 0 8px; flex-shrink: 0; }
.ev-filter-spacer { flex: 1; min-width: 20px; }
.ev-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  padding: 7px 14px;
  flex-shrink: 0;
  height: 39px;
  transition: border-color .2s;
}
.ev-search input {
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--gray-900);
  outline: none !important;
  box-shadow: none !important;
  width: 160px;
}
.ev-search:focus-within {
  border-color: var(--purple);
  outline: none;
}
.ev-search input::placeholder { color: var(--gray-400); }
.ev-search-icon { color: var(--gray-400); font-size: 14px; line-height: 1; }

/* ── MAIN AREA ── */
.ev-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 40px 100px;
}

/* ── Section label ── */
.ev-section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.ev-section-label-text {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  white-space: nowrap;
}
.ev-section-label-line { flex: 1; height: 1px; background: var(--gray-200); }
.ev-section-label-count { font-size: 12px; color: var(--gray-400); font-weight: 500; white-space: nowrap; }

/* ── UPCOMING ── */
.ev-upcoming { margin-bottom: 80px; }

/* Featured event */
.ev-featured {
  display: grid;
  grid-template-columns: 1fr 380px;
  background: var(--purple);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 24px;
  transition: transform .3s, box-shadow .3s;
}
.ev-featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(59,31,106,0.3);
}
.ev-featured-body { padding: 52px; position: relative; }
.ev-featured-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 0% 50%, rgba(90,52,148,0.5) 0%, transparent 70%);
}
.ev-featured-inner { position: relative; }
.ev-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--purple);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.ev-featured-badge-dot { width: 5px; height: 5px; background: var(--purple); border-radius: 50%; }
.ev-featured h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.ev-featured-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 32px;
}
.ev-featured-meta { display: flex; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 36px; }
.ev-meta-item { display: flex; align-items: center; gap: 8px; }
.ev-meta-icon { font-size: 14px; opacity: 0.7; }
.ev-meta-text { font-size: 13px; color: rgba(255,255,255,0.8); }
.ev-featured-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.ev-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--purple);
  font-weight: 700;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: var(--r-sm);
  transition: all .2s;
}
.ev-btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); color: var(--purple); }
.ev-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  font-size: 14px;
  padding: 13px 24px;
  border-radius: var(--r-sm);
  border: 1.5px solid rgba(255,255,255,0.25);
  transition: all .2s;
}
.ev-btn-ghost:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

/* Featured visual side */
.ev-featured-visual {
  background: linear-gradient(135deg, rgba(59,31,106,0.8) 0%, rgba(39,21,74,0.95) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 40px;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.ev-featured-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% center;
  z-index: 0;
}
.ev-featured-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(39,21,74,0.55) 0%, rgba(39,21,74,0.75) 100%);
  z-index: 1;
}
.ev-featured-visual .ev-cal-block,
.ev-featured-visual .ev-cal-time,
.ev-featured-visual .ev-cal-location { position: relative; z-index: 2; }
.ev-cal-block {
  position: relative;
  text-align: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-md);
  padding: 28px 40px;
  width: 100%;
}
.ev-cal-month {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 4px;
}
.ev-cal-day {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.04em;
}
.ev-cal-year { font-size: 13px; color: rgba(255,255,255,0.35); margin-top: 4px; }
.ev-cal-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold);
  color: var(--purple);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  width: 100%;
  position: relative;
}
.ev-cal-location {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  text-align: center;
  position: relative;
}

/* ── Event cards grid ── */
.ev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.ev-card {
  background: #fff;
  border-radius: var(--r-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.ev-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(59,31,106,0.12);
  border-color: rgba(59,31,106,0.2);
}
.ev-card-visual {
  height: 160px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ev-card-visual.gala    { background: linear-gradient(135deg, #2a1248 0%, #5a3494 100%); }
.ev-card-visual.health  { background: linear-gradient(135deg, #1a3a1a 0%, #2d6e3a 100%); }
.ev-card-visual.summit  { background: linear-gradient(135deg, #1a2a3a 0%, #2a5480 100%); }
.ev-card-visual.science { background: linear-gradient(135deg, #3a1a2a 0%, #7a3060 100%); }
.ev-card-visual.run     { background: linear-gradient(135deg, #2a2a1a 0%, #6a6a20 100%); }
.ev-card-visual img     { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-card-emoji          { font-size: 52px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
.ev-card-date-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  text-align: center;
  min-width: 48px;
}
.ev-card-date-badge-month {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 700;
}
.ev-card-date-badge-day {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.ev-card-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--gold);
  color: var(--purple);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}
.ev-card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ev-card-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-mid, #5A3494);
}
.ev-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--purple);
  line-height: 1.2;
}
.ev-card p {
  font-size: 13px;
  color: var(--gray-600, #6B6059);
  line-height: 1.6;
  flex: 1;
}
.ev-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--gray-50, #F4F1EC);
  background: var(--gray-50, #F4F1EC);
}
.ev-card-loc {
  font-size: 12px;
  color: var(--gray-400, #B5A99A);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ev-card-cta {
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
  white-space: nowrap;
}
.ev-card:hover .ev-card-cta { gap: 8px; }

/* hidden cards (JS filter) */
.ev-card[hidden], .ev-card-past[hidden] { display: none; }

/* ── PAST EVENTS ── */
.ev-past .ev-section-label-text { color: var(--gray-400, #B5A99A); }
.ev-past-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.ev-card-past {
  background: var(--gray-50, #F4F1EC);
  border-radius: var(--r-md);
  border: 1px solid var(--gray-200, #E8E1D6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0.85;
  transition: opacity .2s, transform .2s;
}
.ev-card-past:hover { opacity: 1; transform: translateY(-2px); }
.ev-card-past-visual {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  filter: grayscale(60%);
}
.ev-card-past-visual.gala    { background: linear-gradient(135deg, #2a1248 0%, #5a3494 100%); }
.ev-card-past-visual.health  { background: linear-gradient(135deg, #1a3a1a 0%, #2d6e3a 100%); }
.ev-card-past-visual.summit  { background: linear-gradient(135deg, #1a2a3a 0%, #2a5480 100%); }
.ev-card-past-visual.science { background: linear-gradient(135deg, #3a1a2a 0%, #7a3060 100%); }
.ev-card-past-visual img     { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(60%); }
.ev-card-past-emoji          { font-size: 36px; opacity: 0.6; }
.ev-card-past-stamp {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  padding: 4px 9px;
  border-radius: 100px;
}
.ev-card-past-body { padding: 16px 18px; flex: 1; }
.ev-card-past-date { font-size: 11px; color: var(--gray-400, #B5A99A); font-weight: 500; margin-bottom: 6px; }
.ev-card-past h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-600, #6B6059);
  line-height: 1.2;
  margin-bottom: 6px;
}
.ev-card-past p { font-size: 12px; color: var(--gray-400, #B5A99A); line-height: 1.5; }
.ev-card-past-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--gray-200, #E8E1D6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ev-card-past-loc { font-size: 11px; color: var(--gray-400, #B5A99A); }
.ev-card-past-recap {
  font-size: 11px;
  font-weight: 600;
  color: var(--purple);
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.7;
  transition: opacity .2s;
}
.ev-card-past:hover .ev-card-past-recap { opacity: 1; }

/* ── CTA BANNER ── */
.ev-cta {
  background: linear-gradient(135deg, var(--purple-dark, #27154A) 0%, #5A3494 100%);
  border-radius: var(--r-lg);
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}
.ev-cta::before {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
}
.ev-cta-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 10px;
}
.ev-cta h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.1;
}
.ev-cta p { font-size: 15px; color: rgba(255,255,255,0.6); max-width: 440px; }
.ev-cta-actions { display: flex; gap: 12px; flex-shrink: 0; flex-wrap: wrap; }

/* ── No results ── */
.ev-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
  font-size: 15px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .ev-grid, .ev-past-grid { grid-template-columns: 1fr 1fr; }
  .ev-featured { grid-template-columns: 1fr; }
  .ev-featured-visual { min-height: 200px; flex-direction: row; justify-content: space-around; flex-wrap: wrap; }
  .ev-cal-block { width: auto; padding: 20px 32px; }
}
@media (max-width: 768px) {
  .ev-filters-inner { padding: 0 20px; }
  .ev-filter-spacer { display: none; }
  .ev-search { display: none; }
  .ev-main { padding: 40px 20px 80px; }
  .ev-grid, .ev-past-grid { grid-template-columns: 1fr; }
  .ev-featured { grid-template-columns: 1fr; }
  .ev-featured-body { padding: 32px 28px; }
  .ev-featured h2 { font-size: 26px; }
  .ev-featured-visual { display: none; }
  .ev-cta { flex-direction: column; padding: 40px 28px; }
  .ev-cta-actions { flex-direction: column; width: 100%; }
  .ev-cta-actions a { text-align: center; justify-content: center; }
}
