/* ================================================================
   FESTIVALS & EVENTS PAGE
================================================================ */

/* ── Festive crimson hero ── */
.fe-hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 44px;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 48%, #e0654a 100%);
  color: #fff;
}
/* Faint gold dot lattice — celebratory, low-key */
.fe-hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(244, 196, 90, 0.16) 1.5px, transparent 1.6px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
}
/* Warm glow bleeding from the top-right */
.fe-hero-glow {
  position: absolute;
  top: -160px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(244, 196, 90, 0.38) 0%, transparent 68%);
  pointer-events: none;
}
.fe-hero-inner {
  position: relative;
  z-index: 2;
}
.fe-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 22px;
  transition: color var(--transition);
}
.fe-breadcrumb:hover { color: #fff; }
.fe-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f6cf78;
  margin-bottom: 14px;
}
.fe-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 16px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.18);
}
.fe-lede {
  max-width: 620px;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

/* ── "Next up" highlight — same proportions as every card, crimson ring ── */
.ev-card--featured {
  outline: 2.5px solid var(--red);
  outline-offset: -2.5px;
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.12), var(--shadow-lg);
}

/* "Next up" badge — sits above the title in the card-top, over the poster */
.fe-featured-flag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red);
  background: #fff;
  padding: 5px 11px;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
}
.fe-featured-flag .fe-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: fe-pulse 1.6s ease-in-out infinite;
}
@keyframes fe-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.4; }
}

/* ── Sticky controls bar ── */
.ev-controls {
  position: sticky;
  top: 72px;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--light-grey);
  padding: 16px 0;
}
.ev-controls-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.ev-filter-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.ev-filter-btn {
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--light-grey);
  background: #fff;
  color: var(--dark-grey);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.ev-filter-btn:hover {
  border-color: var(--red);
  color: var(--red);
}
.ev-filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(200, 16, 46, 0.25);
}
.ev-controls-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ev-month-select {
  padding: 7px 14px;
  border: 1px solid var(--light-grey);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--dark-grey);
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.ev-month-select:focus { border-color: var(--red); }
.ev-count {
  font-size: 0.85rem;
  color: var(--mid-grey);
  white-space: nowrap;
}

/* ── Main / grid ── */
.fe-main { padding: 40px 0 88px; }

.ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 24px;
}

/* ── Loading / empty / error states ── */
.ev-loading {
  text-align: center;
  padding: 80px 0;
  color: var(--mid-grey);
}
.ev-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--light-grey);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: ev-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes ev-spin { to { transform: rotate(360deg); } }

.ev-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--mid-grey);
}
.ev-empty svg { opacity: 0.3; margin-bottom: 12px; }
.ev-empty p { font-size: 1rem; }

.ev-error {
  background: #fff0f0;
  border: 1px solid #f5c2c7;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 40px 0;
  color: #c8102e;
  font-size: 0.9rem;
}

/* ── Event card — full-bleed poster with overlaid details ── */
.ev-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 646 / 760; /* nepvents poster ratio */
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: #14141f;
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}
.ev-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.ev-card--past { opacity: 0.7; }
.ev-card--past:hover { opacity: 1; }

/* Legibility scrims — stronger so text reads on light/busy posters */
.ev-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 36%),
    linear-gradient(to top, rgba(0, 0, 0, 0.94) 6%, rgba(0, 0, 0, 0.62) 40%, rgba(0, 0, 0, 0) 74%);
}

/* Top row: title/badge on the left, action icons on the right (in flow → never overlap) */
.ev-card-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px 0;
}
.ev-card-head { min-width: 0; } /* let the title wrap/clamp instead of pushing the icons */
.ev-card-actions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
}
.ev-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: background var(--transition), transform var(--transition);
}
.ev-icon-btn:hover { background: #fff; transform: scale(1.08); }

.ev-card-bottom {
  position: relative;
  z-index: 2;
  padding: 0 16px 16px;
}

.ev-past-label {
  display: inline-block;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 100px;
  margin-bottom: 8px;
}
.ev-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ev-category {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.ev-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 9px;
}
.ev-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
.ev-meta-item svg { flex-shrink: 0; color: #fff; opacity: 0.9; }
.ev-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* ── Responsive ── */
@media (max-width: 768px) {
  .fe-hero { padding: 96px 0 36px; }
  .ev-controls { top: 64px; }
  .ev-grid { grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 18px; }
  .ev-controls-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ev-controls-right { width: 100%; justify-content: space-between; }
}
@media (max-width: 480px) {
  .ev-filter-btn { padding: 6px 13px; font-size: 0.8rem; }
  .ev-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .ev-title { font-size: 1.05rem; }
  .ev-card-top { padding: 14px 14px 0; }
  .ev-card-bottom { padding: 0 14px 14px; }
}
