/* =========================================================
   LATEST EVENT SPOTLIGHT — homepage (index.php)
   Currently featuring: PMEC 2026
   ========================================================= */

.latest-event {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  color: #fff;
  background-color: #121115;
  background-image:
    radial-gradient(900px 480px at 8% 0%, rgba(122, 24, 32, 0.55), transparent 65%),
    radial-gradient(700px 420px at 100% 100%, rgba(250, 71, 33, 0.18), transparent 60%);
}

/* ---------- Video ---------- */
.latest-event__media {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  aspect-ratio: 832 / 464;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.latest-event__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* Centre play button — only shown when the video is paused
   (reduced-motion / data-saver users, blocked autoplay, or user paused) */
.latest-event__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #f29a1c 0%, #fa4721 100%);
  box-shadow: 0 10px 30px rgba(250, 71, 33, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.85);
  transition: opacity 300ms ease, transform 300ms ease, visibility 300ms;
}
.latest-event__play svg {
  width: 30px;
  height: 30px;
  margin-left: 4px;
  fill: currentColor;
}
.latest-event__media.is-paused .latest-event__play {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

/* Bottom control bar */
.latest-event__controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
.latest-event__ctrl {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 100px;
  color: #fff;
  font-family: var(--shiv-font, "DM Sans", sans-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  background: rgba(14, 15, 17, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 300ms ease;
}
.latest-event__ctrl:hover,
.latest-event__ctrl:focus-visible {
  color: #fff;
  background: #fa4721;
}
.latest-event__ctrl svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}
.latest-event__ctrl--icon {
  width: 44px;
  padding: 0;
  justify-content: center;
}

/* Sound toggle: swap icon + label on state */
.latest-event__sound .is-on {
  display: none;
}
.latest-event__sound[aria-pressed="true"] .is-on {
  display: inline;
}
.latest-event__sound[aria-pressed="true"] .is-off {
  display: none;
}
/* Gentle ring to draw the eye to "Tap for sound" (runs 3 times) */
.latest-event__sound[aria-pressed="false"] {
  animation: latest-event-ring 2s ease-out 2s 3;
}
@keyframes latest-event-ring {
  0%   { box-shadow: 0 0 0 0 rgba(250, 71, 33, 0.7); }
  100% { box-shadow: 0 0 0 14px rgba(250, 71, 33, 0); }
}

/* ---------- Content ---------- */
.latest-event__content {
  padding-left: 30px;
}

/* Eyebrow reuses the theme's own section label (.sec-title--two: twin
   orange arrows + tagline that fills orange on scroll, like "ABOUT US") */
.latest-event__eyebrow {
  margin-bottom: 0;
}
.latest-event__eyebrow .sec-title__top {
  margin-bottom: 0;
}

.latest-event__title {
  margin: 18px 0 8px;
  color: #fff;
  font-family: var(--shiv-heading-font, "Plus Jakarta Sans", sans-serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.latest-event__subtitle {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f29a1c;
  background: linear-gradient(90deg, #f29a1c 0%, #fa4721 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.latest-event__text {
  max-width: 46ch;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.7;
}

.latest-event__thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 360px;
  margin: 0 0 32px;
}
.latest-event__thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.latest-event__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}
.latest-event__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 71, 33, 0.35);
  opacity: 0;
  transition: opacity 300ms ease;
}
.latest-event__thumb:hover img,
.latest-event__thumb:focus-visible img {
  transform: scale(1.06);
}
.latest-event__thumb:hover::after,
.latest-event__thumb:focus-visible::after {
  opacity: 1;
}

/* ---------- Events-section card for the latest event ---------- */
.gallery-page__card--latest img {
  aspect-ratio: 3 / 2; /* match the other event covers (3:2) */
  object-fit: cover;
}
/* Corner tag in the same language as the section eyebrow:
   twin orange arrows + uppercase label on a dark plate */
.latest-event-card__badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 14px;
  color: #fff;
  font-family: var(--shiv-font, "DM Sans", sans-serif);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(14, 15, 17, 0.85);
  pointer-events: none;
}
.latest-event-card__arrows {
  display: inline-flex;
  justify-content: space-between;
  width: 24px;
  height: 11px;
  flex-shrink: 0;
}
.latest-event-card__arrows::before,
.latest-event-card__arrows::after {
  content: "";
  width: calc(50% - 2px);
  height: 100%;
  background: linear-gradient(180deg, #f29a1c 0%, #fa4721 100%);
}
.latest-event-card__arrows::before {
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}
.latest-event-card__arrows::after {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
/* Whole card is the click target (not just the 32px icon) */
.latest-event-card__link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Lightbox video ---------- */
.latest-event-popup {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  background: #000;
}
.latest-event-popup video {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 120px);
  background: #000;
}
.mfp-close-btn-in .latest-event-popup .mfp-close {
  top: -44px;
  right: -6px;
  color: #fff;
  opacity: 0.85;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .latest-event {
    padding: 70px 0;
  }
  .latest-event__content {
    padding-left: 0;
  }
}
@media (max-width: 575px) {
  .latest-event {
    padding: 56px 0;
  }
  .latest-event__controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
  .latest-event__ctrl {
    font-size: 13px;
    padding: 0 14px;
  }
  .latest-event__ctrl--icon {
    padding: 0;
  }
  .latest-event__play {
    width: 64px;
    height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .latest-event__sound[aria-pressed="false"] {
    animation: none;
  }
  .latest-event__thumb img {
    transition: none;
  }
}
