:root {
  --bg-dark: #050610;
  --violet: #9b4dff;
  --blue: #3b82f6;
  --gold: #f5c16c;
  --text-main: #f2f2f2;
  --text-muted: #b6b7d0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* ===========================
   SECTION
=========================== */

.gx9-latest-events {
  position: relative;
  padding: 100px 24px;
  background:
    linear-gradient(rgba(5,6,16,0.88), rgba(5,6,16,0.88)),
    url("https://images.unsplash.com/photo-1492684223066-81342ee5ff30")
    center / cover no-repeat;
  color: var(--text-main);
}

.gx9-overlay-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(5,6,16,0.5), rgba(11,15,42,0.5));
  pointer-events: none;
}

.gx9-container {
  max-width: 1200px;
  margin: auto;
  padding: 0 10px;
  position: relative;
  z-index: 1;
}

/* ===========================
   HEADER SPACING
=========================== */

.gx9-events-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}

.gx9-events-header h2 {
  font-size: 34px;
  margin-bottom: 12px;
}

.gx9-events-header p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===========================
   GRID LAYOUT
=========================== */

.gx9-feature-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

/* ===========================
   LEFT CONTENT
=========================== */

.gx9-feature-content {
  padding-right: 10px;
}

.gx9-feature-content h2 {
  font-size: 26px;
  margin-bottom: 14px;
}

.gx9-feature-content p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 16px;
}

/* ===========================
   EVENT CARD
=========================== */

.gx9-event-card {
  background: linear-gradient(160deg, #0c0f2b, #050610);
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid rgba(245,193,108,0.35);
  box-shadow:
    inset 0 0 18px rgba(245,193,108,0.08),
    0 0 28px rgba(245,193,108,0.3);
}

/* VIDEO */
.gx9-event-media {
  height: 340px;
}

.gx9-event-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* FOOTER */
.gx9-event-footer {
  padding: 18px 16px 22px;
  text-align: center;
}

.gx9-event-footer h3 {
  font-size: 19px;
}

/* ===========================
   ANIMATION
=========================== */

.gx9-animate {
  opacity: 0;
  transform: translateY(40px);
}

.gx9-animate.gx9-show {
  opacity: 1;
  transform: translateY(0);
  transition: 0.8s ease;
}

/* ===========================
   POPUP VIDEO
=========================== */

.gx9-video-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.gx9-video-popup.active {
  display: flex;
}

.gx9-popup-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gx9-popup-content video {
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.gx9-popup-close {
  position: absolute;
  top: 8px;
  right: 14px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  z-index: 20;
}

/* ===========================
   TABLET
=========================== */

@media (max-width: 992px) {

  .gx9-latest-events {
    padding: 80px 20px;
  }

  .gx9-feature-layout {
    gap: 30px;
  }

  .gx9-event-media {
    height: 300px;
  }

}

/* ===========================
   MOBILE
=========================== */

@media (max-width: 768px) {

  .gx9-latest-events {
    padding: 70px 18px;
  }

  .gx9-feature-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .gx9-feature-content {
    padding-right: 0;
  }

  .gx9-feature-content h2 {
    font-size: 24px;
  }

  .gx9-event-media {
    height: 260px;
  }

  .gx9-events-header {
    margin-bottom: 40px;
  }

  .gx9-popup-content {
    max-height: 80vh;
  }

}

/* ===========================
   SMALL MOBILE
=========================== */

@media (max-width: 480px) {

  .gx9-latest-events {
    padding: 60px 14px;
  }

  .gx9-event-media {
    height: 220px;
  }

  .gx9-events-header h2 {
    font-size: 26px;
  }

}
