/* ===================================================================
   KL The Guide — Events page (redesign)
   Matches the landing-page aesthetic: full-bleed video hero, Poppins
   white type over a dark gradient, teal #0ea2bd accents, red script
   section titles, cinematic poster cards in a Pinterest masonry.
   Scoped under #main-event so nothing else on the site is affected.
   =================================================================== */

#main-event {
  --ev-primary: var(--color-primary, #0ea2bd);
  --ev-primary-light: var(--color-primary-light, #1ec3e0);
  --ev-red: #e2231a;
  --ev-ink: #17212b;
  --ev-muted: #5c6b78;
  background: #fff;
}

/* ----------------------------------------------------------------- */
/*  HERO                                                             */
/* ----------------------------------------------------------------- */
.ev-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72vh;
  padding: 120px 16px 90px;
  overflow: hidden;
  background: #071926;
  text-align: center;
}

.ev-hero__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ev-hero::before {                       /* readability gradient */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(3, 18, 31, .42) 0%, rgba(3, 18, 31, .30) 40%, rgba(3, 18, 31, .72) 100%);
}

.ev-hero__content {
  max-width: 920px;
  margin: 0 auto;
  color: #fff;
}

.ev-hero__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #d5f8ff;
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
}

.ev-hero__title {
  margin: 0 0 10px;
  color: #fff;
  font-family: var(--font-secondary, 'Poppins', sans-serif);
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
  text-shadow: 0 6px 28px rgba(0, 0, 0, .45);
}

.ev-hero__sub {
  margin: 0 auto 30px;
  max-width: 640px;
  color: rgba(255, 255, 255, .94);
  font-family: var(--font-secondary, 'Poppins', sans-serif);
  font-size: clamp(.95rem, 1.4vw, 1.15rem);
  font-weight: 500;
  line-height: 1.4;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .5);
}

/* ── Glassmorphism month navigator ── */
.ev-monthnav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, .30);
  border-radius: 9999px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.ev-monthnav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background .25s ease, transform .2s ease;
}

.ev-monthnav__btn:hover {
  background: var(--ev-primary);
  transform: scale(1.06);
}

.ev-monthnav__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 150px;
  padding: 0 8px;
  color: #fff;
  line-height: 1;
}

.ev-monthnav__month {
  font-family: var(--font-secondary, 'Poppins', sans-serif);
  font-size: 1.55rem;
  font-weight: 700;
}

.ev-monthnav__year {
  margin-top: 3px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .82);
}

/* ----------------------------------------------------------------- */
/*  TOOLBAR: category filters + share                                */
/* ----------------------------------------------------------------- */
.ev-toolbar {
  position: sticky;
  top: 72px;                              /* clears fixed navbar */
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #eef1f3;
}

.ev-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.ev-filters::-webkit-scrollbar { display: none; }

.ev-filter {
  flex: 0 0 auto;
  padding: 8px 18px;
  border-radius: 9999px;
  color: var(--ev-muted);
  font-family: var(--font-secondary, 'Poppins', sans-serif);
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.ev-filter:hover {
  background: rgba(var(--color-primary-rgb, 14, 162, 189), .10);
  color: var(--ev-primary);
}

.ev-filter.is-active {
  background: var(--ev-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--color-primary-rgb, 14, 162, 189), .35);
}

.ev-share {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.35rem;
}

.ev-share a { line-height: 1; transition: transform .2s ease; }
.ev-share a:hover { transform: translateY(-2px); }

/* ── Slim "advertise with us" bar ── */
.ev-advert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(90deg, rgba(var(--color-primary-rgb, 14, 162, 189), .10), rgba(var(--color-primary-rgb, 14, 162, 189), .04));
  color: var(--ev-ink);
  font-family: var(--font-secondary, 'Poppins', sans-serif);
  font-size: .92rem;
  font-weight: 500;
  text-align: center;
}

.ev-advert i { color: var(--ev-primary); }
.ev-advert a { color: var(--ev-primary); font-weight: 700; text-decoration: none; }
.ev-advert a:hover { text-decoration: underline; }

/* ----------------------------------------------------------------- */
/*  EVENTS SECTION + MASONRY                                         */
/* ----------------------------------------------------------------- */
.ev-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 44px clamp(16px, 4vw, 48px) 60px;
}

.ev-section__title {
  margin: 0 0 30px;
  color: #1520A6;
  font-family: 'Carter One', cursive;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

/* True Pinterest masonry via CSS columns — posters keep natural height */
.ev-masonry {
  column-count: 4;
  column-gap: 20px;
}

@media (max-width: 1200px) { .ev-masonry { column-count: 3; } }
@media (max-width: 820px)  { .ev-masonry { column-count: 2; column-gap: 14px; } }
@media (max-width: 520px)  { .ev-masonry { column-count: 1; } }

.ev-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1f24;
  cursor: pointer;
  break-inside: avoid;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  transition: transform .3s ease, box-shadow .3s ease;
  text-align: left;
}

@media (max-width: 820px) { .ev-card { margin-bottom: 14px; } }

.ev-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .24);
}

.ev-card:focus-visible {
  outline: 3px solid var(--ev-primary);
  outline-offset: 3px;
}

.ev-card__img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .5s ease;
}

.ev-card:hover .ev-card__img { transform: scale(1.05); }

.ev-card__shade {                         /* gradient so text is readable */
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, .82) 100%);
  pointer-events: none;
}

.ev-card__chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(var(--color-primary-rgb, 14, 162, 189), .92);
  color: #fff;
  font-family: var(--font-secondary, 'Poppins', sans-serif);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.ev-card__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 16px 16px 14px;
  color: #fff;
}

.ev-card__title {
  margin: 0 0 4px;
  font-family: var(--font-secondary, 'Poppins', sans-serif);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.18;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ev-card__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}

.ev-card__date i { color: var(--ev-primary-light); }

/* ── Empty state ── */
.ev-empty {
  max-width: 540px;
  margin: 30px auto;
  padding: 56px 28px;
  border: 1.5px dashed #d7dee3;
  border-radius: 20px;
  text-align: center;
}

.ev-empty i { font-size: 3rem; color: var(--ev-primary); }

.ev-empty h3 {
  margin: 14px 0 6px;
  font-family: var(--font-secondary, 'Poppins', sans-serif);
  font-weight: 700;
  color: var(--ev-ink);
}

.ev-empty p { margin: 0; color: var(--ev-muted); }

/* ----------------------------------------------------------------- */
/*  DETAIL MODAL                                                     */
/* ----------------------------------------------------------------- */
.ev-modal[hidden] { display: none; }

.ev-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ev-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 28, .68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: evFade .25s ease;
}

.ev-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: 88vh;
  overflow: hidden;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  animation: evRise .3s cubic-bezier(.2, .8, .2, 1);
}

.ev-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.ev-modal__close:hover { background: var(--ev-red); transform: rotate(90deg); }

.ev-modal__body { max-height: 88vh; overflow-y: auto; }

/* Detail layout (poster left, info right; stacks on mobile) */
.ev-detail { display: grid; grid-template-columns: 42% 58%; }

@media (max-width: 760px) { .ev-detail { grid-template-columns: 1fr; } }

.ev-detail__media {
  position: relative;
  background: #0d141b;
  min-height: 100%;
}

.ev-detail__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 88vh;
  object-fit: cover;
}

@media (max-width: 760px) {
  .ev-detail__media img { max-height: 46vh; }
}

.ev-detail__chip {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(var(--color-primary-rgb, 14, 162, 189), .95);
  color: #fff;
  font-family: var(--font-secondary, 'Poppins', sans-serif);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.ev-detail__info { padding: 34px clamp(22px, 3vw, 40px); }

.ev-detail__title {
  margin: 0 0 18px;
  color: var(--ev-ink);
  font-family: var(--font-secondary, 'Poppins', sans-serif);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.12;
}

.ev-detail__meta {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.ev-detail__meta li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: .96rem;
  color: var(--ev-ink);
  line-height: 1.45;
}

.ev-detail__meta i {
  flex: 0 0 22px;
  margin-top: 2px;
  color: var(--ev-primary);
  font-size: 1.05rem;
}

.ev-detail__meta a { color: var(--ev-primary); text-decoration: none; word-break: break-word; }
.ev-detail__meta a:hover { text-decoration: underline; }

.ev-detail__desc {
  margin: 0 0 22px;
  padding-top: 18px;
  border-top: 1px solid #eef1f3;
  color: #3c4954;
  font-size: .98rem;
  line-height: 1.62;
}

.ev-detail__socials { display: flex; gap: 12px; }

.ev-detail__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f1f5f7;
  color: var(--ev-ink);
  font-size: 1.1rem;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.ev-detail__socials a:hover {
  background: var(--ev-primary);
  color: #fff;
  transform: translateY(-2px);
}

@keyframes evFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes evRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .ev-hero__video { display: none; }
  .ev-card, .ev-card__img, .ev-modal__dialog, .ev-modal__backdrop { transition: none; animation: none; }
}
