/* ============================
   Events Page Styles
   ============================ */

.events-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: center;
  padding: 34px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.12), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(212, 175, 55, 0.18), transparent 18%),
    linear-gradient(135deg, #081316 0%, #123135 52%, #0d181c 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(7, 18, 20, 0.2);
}

.events-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 13, 15, 0.35), rgba(6, 13, 15, 0.05)),
    radial-gradient(ellipse at 18% 24%, rgba(212, 175, 55, 0.18) 0%, transparent 45%),
    radial-gradient(ellipse at 82% 24%, rgba(255, 255, 255, 0.08) 0%, transparent 42%);
  pointer-events: none;
  z-index: 0;
}

.events-hero .hero-copy,
.events-hero .hero-panel {
  position: relative;
  z-index: 1;
}

.events-hero h1 {
  max-width: 14ch;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  color: #fff;
}

.events-hero .eyebrow {
  color: #f5e6a3;
}

.events-hero .lede {
  color: rgba(255, 255, 255, 0.74);
}

.events-hero__strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.events-hero__strip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
  font-weight: 700;
}

.events-hero__panel {
  align-self: stretch;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.events-hero__panel img {
  aspect-ratio: 4 / 3;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.events-hero__panel figcaption {
  padding: 14px 16px 16px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.55;
  font-size: 0.93rem;
}

/* Section base */
.events-section {
  padding: 56px 0;
  max-width: 1180px;
  margin: 0 auto;
  width: min(1180px, calc(100% - 32px));
}

.events-section__heading {
  text-align: center;
  margin-bottom: 40px;
}

.events-section__heading h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  margin: 10px 0 8px;
  color: var(--brand);
  font-weight: 850;
  letter-spacing: -0.02em;
}

.events-section__sub {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 60ch;
  margin: 0 auto;
  line-height: 1.6;
}

/* Upcoming events list */
.events-list {
  display: grid;
  gap: 20px;
}

.event-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(216, 225, 232, 0.85);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}

.event-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), #0d3d36);
  color: #fff;
  padding: 20px 16px;
  text-align: center;
  min-height: 100%;
}

.event-date-block .event-month {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
  line-height: 1;
}

.event-date-block .event-day {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  margin: 4px 0 2px;
  letter-spacing: -0.03em;
}

.event-date-block .event-year {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.8;
}

.event-card-body {
  padding: 22px 24px;
  display: grid;
  gap: 8px;
}

.event-card-body .event-badge {
  display: inline-block;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-badge--register {
  background: rgba(49, 130, 206, 0.12);
  color: #2b6cb0;
}

.event-badge--open {
  background: rgba(20, 108, 95, 0.12);
  color: var(--brand);
}

.event-card-body h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.event-card-body .event-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.event-card-body .event-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.event-card-body .event-desc {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  font-size: 0.9rem;
}

.event-card-body .event-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* Past events */
.event-card.is-past .event-date-block {
  background: linear-gradient(135deg, #718096, #4a5568);
  opacity: 0.8;
}

.event-card.is-past {
  opacity: 0.7;
}

.event-card.is-past:hover {
  opacity: 0.85;
}

/* Gallery grid */
.events-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.events-gallery-grid .gallery-item {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #eef3f7;
  border: 1px solid rgba(216, 225, 232, 0.7);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer;
  position: relative;
}

.events-gallery-grid .gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
  z-index: 2;
}

.events-gallery-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.events-gallery-grid .gallery-item:hover img {
  transform: scale(1.08);
}

.events-gallery-grid .gallery-item--wide {
  grid-column: span 2;
  grid-row: span 2;
}

.events-gallery-grid .gallery-item--wide {
  aspect-ratio: auto;
}

/* Lightbox */
.events-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 32px;
  cursor: pointer;
}

.events-lightbox[hidden] {
  display: none;
}

.events-lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
  object-fit: contain;
  cursor: default;
}

.events-lightbox .lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: #fff;
  font-size: 2.2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.events-lightbox .lightbox-close:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Empty state */
.events-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.events-empty .empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.events-empty h3 {
  color: var(--text);
  margin: 0 0 8px;
}

/* Loading skeleton */
.events-skeleton {
  display: grid;
  gap: 20px;
}

.events-skeleton .skeleton-event {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(216, 225, 232, 0.6);
  min-height: 140px;
}

.events-skeleton .skeleton-date {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
  animation: pulse 1.8s ease-in-out infinite;
}

.events-skeleton .skeleton-body {
  padding: 22px 24px;
  display: grid;
  gap: 10px;
}

.events-skeleton .skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: 6px;
}

.events-skeleton .skeleton-line:nth-child(1) { width: 30%; }
.events-skeleton .skeleton-line:nth-child(2) { width: 70%; }
.events-skeleton .skeleton-line:nth-child(3) { width: 55%; }
.events-skeleton .skeleton-line:nth-child(4) { width: 90%; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 960px) {
  .events-hero {
    grid-template-columns: 1fr;
  }

  .events-hero__panel img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 768px) {
  .event-card {
    grid-template-columns: 1fr;
  }

  .event-date-block {
    flex-direction: row;
    gap: 10px;
    padding: 12px 20px;
    min-height: auto;
  }

  .event-date-block .event-month { font-size: 0.75rem; }
  .event-date-block .event-day { font-size: 1.8rem; margin: 0; }
  .event-date-block .event-year { font-size: 0.78rem; }

  .event-card-body {
    padding: 16px 18px;
  }

  .events-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .events-gallery-grid .gallery-item--wide {
    grid-column: span 2;
    grid-row: span 1;
  }

  .events-hero {
    padding: 22px;
    border-radius: 28px;
  }

  .events-hero h1 {
    font-size: clamp(2.2rem, 10vw, 3.3rem);
  }

  .events-skeleton .skeleton-event {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .events-gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .event-card-body .event-meta {
    flex-direction: column;
    gap: 6px;
  }

  .events-hero__strip {
    gap: 8px;
  }

  .events-hero__strip span {
    width: 100%;
    justify-content: center;
  }
}
