:root {
  --green: #1aff4c;
  --green-soft: rgba(26, 255, 76, 0.18);
  --green-faint: rgba(26, 255, 76, 0.07);
  --bg: #08140d;
  --panel: rgba(11, 26, 18, 0.92);
  --panel-2: rgba(15, 31, 22, 0.94);
  --text: #fff;
  --muted: #a7b0aa;
  --border: rgba(26, 255, 76, 0.22);
  --red: #ff2b2b;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(
      180deg,
      rgba(2, 8, 5, 0.8),
      rgba(4, 15, 9, 0.72) 28%,
      rgba(4, 15, 9, 0.82) 62%,
      rgba(2, 8, 5, 0.96)
    ),
    linear-gradient(
      90deg,
      rgba(0, 30, 15, 0.5),
      rgba(0, 255, 80, 0.055),
      rgba(0, 20, 10, 0.5)
    ),
    url("../img/background/bg-home.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -10;
  pointer-events: none;
  transform: scale(1.03);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 10%,
    rgba(0, 0, 0, 0.1) 48%,
    rgba(0, 0, 0, 0.62) 100%
  );
  z-index: -9;
  pointer-events: none;
}

.tactical-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(26, 255, 76, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 255, 76, 0.024) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -8;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 82%);
}

.media-page {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

.media-hero {
  text-align: center;
  padding: 15px 0 34px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(26, 255, 76, 0.72);
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-kicker span {
  width: 28px;
  height: 1px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.media-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 11px 21px;
  border-radius: 8px;
  background: rgba(15, 31, 22, 0.86);
  border: 1px solid rgba(26, 255, 76, 0.35);
  color: var(--green);
  font-size: 27px;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow:
    0 0 18px rgba(26, 255, 76, 0.16),
    inset 0 0 18px rgba(26, 255, 76, 0.025);
}

.media-subtitle {
  max-width: 760px;
  margin: 0 auto;
  color: #b8c0bb;
  font-size: 14px;
  line-height: 1.65;
}

/* ---------- Shared section headings ---------- */

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 16px;
}

.section-eyebrow {
  display: block;
  color: rgba(26, 255, 76, 0.72);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2.5px;
  margin-bottom: 5px;
}

.section-heading h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.media-count {
  color: #78817b;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

.media-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}

.media-filter {
  padding: 9px 15px;
  border-radius: 7px;
  border: 1px solid rgba(26, 255, 76, 0.24);
  background: rgba(11, 26, 18, 0.84);
  color: #a8b0aa;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: 0.25s ease;
}

.media-filter:hover,
.media-filter.active {
  background: var(--green);
  color: #000;
  border-color: var(--green);
  box-shadow: 0 0 14px rgba(26, 255, 76, 0.45);
}

/* ---------- IMAGE FEATURED 3D CAROUSEL ---------- */

.featured-section {
  position: relative;
  margin: 8px 0 60px;
}

.image-carousel {
  position: relative;
  height: clamp(310px, 39vw, 485px);
  perspective: 1400px;
  overflow: hidden;
  isolation: isolate;
}

.image-carousel::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 25px;
  width: 62%;
  height: 45px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.72);
  filter: blur(24px);
  border-radius: 50%;
  z-index: -1;
}

.carousel-card {
  position: absolute;
  top: 16px;
  left: 50%;
  width: min(62vw, 720px);
  height: calc(100% - 35px);
  transform: translateX(-50%) scale(0.74);
  opacity: 0;
  z-index: 1;
  transition:
    transform 0.75s cubic-bezier(0.2, 0.75, 0.2, 1),
    opacity 0.55s ease,
    filter 0.55s ease;
  cursor: pointer;
  pointer-events: none;
  border-radius: 13px;
  border: 1px solid rgba(26, 255, 76, 0.28);
  overflow: hidden;
  background:
    radial-gradient(
      circle at center,
      rgba(26, 255, 76, 0.12) 0%,
      rgba(15, 31, 22, 0.95) 60%,
      rgba(4, 12, 7, 0.98) 100%
    ),
    rgba(2, 8, 5, 0.95);
  box-shadow:
    0 20px 55px rgba(0, 0, 0, 0.65),
    0 0 20px rgba(26, 255, 76, 0.1);
}

.carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0px 8px 24px rgba(0, 0, 0, 0.85));
}

.carousel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 8, 5, 0.88) 92%);
  pointer-events: none;
}

.carousel-card.is-active {
  transform: translateX(-50%) translateZ(100px) scale(1);
  opacity: 1;
  z-index: 5;
  pointer-events: auto;
  filter: none;
}

.carousel-card.is-left {
  transform: translateX(calc(-50% - 41vw)) rotateY(24deg) scale(0.76);
  opacity: 0.64;
  z-index: 3;
  pointer-events: auto;
  filter: brightness(0.64) saturate(0.7);
}

.carousel-card.is-right {
  transform: translateX(calc(-50% + 41vw)) rotateY(-24deg) scale(0.76);
  opacity: 0.64;
  z-index: 3;
  pointer-events: auto;
  filter: brightness(0.64) saturate(0.7);
}

.carousel-card.is-hidden-left {
  transform: translateX(calc(-50% - 70vw)) rotateY(35deg) scale(0.55);
  opacity: 0;
  z-index: 1;
}

.carousel-card.is-hidden-right {
  transform: translateX(calc(-50% + 70vw)) rotateY(-35deg) scale(0.55);
  opacity: 0;
  z-index: 1;
}

.carousel-caption {
  position: absolute;
  left: 25px;
  right: 25px;
  bottom: 18px;
  z-index: 2;
}

.carousel-caption strong {
  display: block;
  color: #fff;
  font-size: clamp(15px, 2vw, 21px);
  text-shadow: 0 2px 12px #000;
}

.carousel-caption span {
  display: inline-block;
  margin-top: 5px;
  color: var(--green);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 800;
}

.carousel-controls {
  display: flex;
  gap: 7px;
}

.carousel-controls button,
.video-featured-controls button {
  width: 37px;
  height: 37px;
  border: 1px solid rgba(26, 255, 76, 0.3);
  border-radius: 7px;
  background: rgba(7, 18, 11, 0.85);
  color: var(--green);
  cursor: pointer;
  transition: 0.22s ease;
}

.carousel-controls button:hover,
.video-featured-controls button:hover {
  background: var(--green);
  color: #000;
  box-shadow: 0 0 13px rgba(26, 255, 76, 0.42);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
}

.carousel-dot {
  width: 22px;
  height: 3px;
  border: 0;
  padding: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: 0.3s ease;
}

.carousel-dot.active {
  width: 38px;
  background: var(--green);
  box-shadow: 0 0 9px rgba(26, 255, 76, 0.55);
}

/* ---------- IMAGE GRID ---------- */

.gallery-section {
  position: relative;
}

.media-grid {
  display: grid;
  gap: 18px;
}

.image-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    145deg,
    rgba(15, 31, 22, 0.96),
    rgba(7, 18, 12, 0.96)
  );
  border: 1px solid rgba(26, 255, 76, 0.18);
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.media-card:hover {
  transform: translateY(-5px);
  border-color: rgba(26, 255, 76, 0.5);
  box-shadow:
    0 15px 34px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(26, 255, 76, 0.13);
}

.media-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background:
    radial-gradient(
      circle at center,
      rgba(26, 255, 76, 0.1) 0%,
      rgba(11, 26, 18, 0.96) 70%
    ),
    rgba(2, 8, 5, 0.95);
  cursor: pointer;
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: transparent;
  transition:
    transform 0.55s ease,
    filter 0.55s ease;
  filter: drop-shadow(0px 4px 12px rgba(0, 0, 0, 0.65));
}

.media-card:hover .media-thumb img,
.media-card:hover .media-thumb video {
  transform: scale(1.055);
  filter: brightness(1.08) drop-shadow(0px 6px 16px rgba(26, 255, 76, 0.2));
}

.media-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.58));
  pointer-events: none;
}

.media-info {
  padding: 14px 15px 15px;
}

.media-info h3 {
  margin: 0 0 7px;
  color: #f2fff5;
  font-size: 16px;
  line-height: 1.3;
}

.media-info p {
  min-height: 36px;
  margin: 0;
  color: #a8b0aa;
  font-size: 12px;
  line-height: 1.5;
}

.media-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #707a73;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.media-category {
  color: var(--green);
  font-weight: 800;
}

.media-badge {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 3;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(2, 8, 5, 0.82);
  border: 1px solid rgba(26, 255, 76, 0.38);
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  backdrop-filter: blur(5px);
}

.media-badge.highlights {
  box-shadow: 0 0 12px rgba(26, 255, 76, 0.2);
}
.media-badge.picture-taking {
  color: #d9ffe1;
}
.media-badge.events {
  color: #fff;
}
.media-badge.tournaments {
  color: #fff;
}

.media-badge i {
  margin-right: 4px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 55px 20px;
  text-align: center;
  background: rgba(15, 31, 22, 0.74);
  border: 1px solid rgba(26, 255, 76, 0.18);
  border-radius: 12px;
  color: #aaa;
}

.empty-state i {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 30px;
}

/* ---------- VIDEO PAGE ---------- */

.video-page .media-hero {
  padding-bottom: 25px;
}

.video-hero .media-title {
  border-radius: 3px;
  background: rgba(4, 10, 7, 0.8);
  border-left: 4px solid var(--green);
  border-right: 0;
  box-shadow: 0 0 25px rgba(26, 255, 76, 0.1);
}

.video-featured-section {
  margin: 0 0 60px;
}

.video-featured-frame {
  position: relative;
  min-height: clamp(380px, 49vw, 585px);
  overflow: hidden;
  background: #030805;
  border: 1px solid rgba(26, 255, 76, 0.25);
  box-shadow:
    0 25px 65px rgba(0, 0, 0, 0.5),
    inset 0 0 50px rgba(26, 255, 76, 0.025);
}

.video-featured-screen,
.video-featured-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-featured-screen img {
  object-fit: cover;
  filter: brightness(0.55) saturate(0.75);
  transform: scale(1.02);
  transition:
    transform 8s ease,
    opacity 0.55s ease;
}

.video-featured-frame:hover .video-featured-screen img {
  transform: scale(1.08);
}

.video-featured-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.9),
      rgba(0, 0, 0, 0.42) 48%,
      rgba(0, 0, 0, 0.7)
    ),
    linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent 42%);
  pointer-events: none;
}

.video-featured-frame::before {
  content: "TRGPH // PLAY";
  position: absolute;
  top: 20px;
  left: 22px;
  z-index: 3;
  color: rgba(26, 255, 76, 0.65);
  font-size: 9px;
  letter-spacing: 3px;
  font-weight: 900;
}

.video-featured-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.018) 0,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: screen;
  opacity: 0.45;
}

.video-featured-copy {
  position: absolute;
  z-index: 4;
  left: clamp(24px, 6vw, 75px);
  bottom: clamp(70px, 8vw, 95px);
  width: min(580px, 72%);
}

.featured-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 900;
}

.featured-live i {
  font-size: 6px;
  animation: pulseDot 1.5s infinite;
}

.video-featured-copy h2 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 5vw, 55px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 4px 25px #000;
}

.video-featured-copy p {
  margin: 0 0 19px;
  color: #c0c7c2;
  font-size: 13px;
  line-height: 1.6;
  max-width: 520px;
}

.featured-play {
  border: 1px solid var(--green);
  background: var(--green);
  color: #000;
  border-radius: 3px;
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(26, 255, 76, 0.3);
  transition: 0.22s ease;
}

.featured-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(26, 255, 76, 0.55);
}

.video-featured-controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 5;
  display: flex;
  gap: 6px;
}

.video-library {
  border-top: 1px solid rgba(26, 255, 76, 0.11);
  padding-top: 32px;
}

.video-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.video-grid .media-card {
  border-radius: 4px;
}

.video-grid .media-thumb {
  aspect-ratio: 16/8.9;
}

.video-grid .media-thumb img {
  object-fit: cover;
  background: #020805;
  filter: none;
}

.video-grid .media-info {
  padding: 17px 19px 18px;
}

.video-grid .media-info h3 {
  font-size: 18px;
}

.video-grid .media-info p {
  min-height: 40px;
  font-size: 12.5px;
}

.media-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid var(--green);
  color: var(--green);
  box-shadow: 0 0 20px rgba(26, 255, 76, 0.42);
  pointer-events: none;
  transition: 0.25s ease;
}

.media-card:hover .media-play {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--green);
  color: #000;
}

/* ---------- LIGHTBOX ---------- */

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
}

.media-lightbox.show {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  width: min(1100px, 90vw);
  max-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img,
.lightbox-content video {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 7px;
  border: 1px solid rgba(26, 255, 76, 0.32);
  box-shadow: 0 0 45px rgba(26, 255, 76, 0.15);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: #0b1a12;
  color: var(--green);
  font-size: 20px;
  cursor: pointer;
  z-index: 10001;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--green);
  color: #000;
  box-shadow: 0 0 14px var(--green);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  width: 43px;
  height: 52px;
  border: 1px solid rgba(26, 255, 76, 0.55);
  border-radius: 6px;
  background: rgba(8, 20, 13, 0.88);
  color: var(--green);
  cursor: pointer;
  transition: 0.22s ease;
}

.lightbox-prev {
  left: 20px;
}
.lightbox-next {
  right: 20px;
}

.lightbox-caption {
  position: fixed;
  bottom: 17px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 82vw);
  text-align: center;
  color: #ddd;
  font-size: 12px;
}

.lightbox-caption strong {
  color: var(--green);
}

/* ---------- MOTION ---------- */

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- RESPONSIVE ---------- */

@media screen and (max-width: 1000px) {
  .image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .carousel-card {
    width: min(68vw, 650px);
  }
  .carousel-card.is-left {
    transform: translateX(calc(-50% - 38vw)) rotateY(22deg) scale(0.72);
  }
  .carousel-card.is-right {
    transform: translateX(calc(-50% + 38vw)) rotateY(-22deg) scale(0.72);
  }
}

@media screen and (max-width: 700px) {
  body::before {
    background-attachment: scroll;
  }

  .media-page {
    width: min(100% - 24px, 1240px);
    padding-top: 35px;
  }

  .media-title {
    font-size: 20px;
    padding: 9px 15px;
  }

  .section-heading {
    align-items: center;
  }

  .section-heading h2 {
    font-size: 20px;
  }

  .image-carousel {
    height: 290px;
  }

  .carousel-card {
    width: 74vw;
    top: 20px;
    height: 245px;
  }

  .carousel-card.is-left {
    transform: translateX(calc(-50% - 44vw)) rotateY(18deg) scale(0.67);
    opacity: 0.42;
  }

  .carousel-card.is-right {
    transform: translateX(calc(-50% + 44vw)) rotateY(-18deg) scale(0.67);
    opacity: 0.42;
  }

  .carousel-caption {
    left: 15px;
    right: 15px;
    bottom: 13px;
  }

  .carousel-controls button,
  .video-featured-controls button {
    width: 34px;
    height: 34px;
  }

  .image-grid,
  .video-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .video-featured-frame {
    min-height: 430px;
  }

  .video-featured-copy {
    left: 20px;
    right: 20px;
    bottom: 75px;
    width: auto;
  }

  .video-featured-copy h2 {
    font-size: 31px;
  }

  .video-featured-controls {
    right: 15px;
    bottom: 15px;
  }

  .media-toolbar {
    justify-content: center;
    gap: 8px;
  }

  .media-filter {
    padding: 8px 12px;
    font-size: 10px;
  }

  .lightbox-nav {
    width: 37px;
    height: 44px;
  }

  .lightbox-prev {
    left: 8px;
  }
  .lightbox-next {
    right: 8px;
  }
}

@media screen and (max-width: 420px) {
  .hero-kicker {
    letter-spacing: 2px;
    font-size: 8px;
  }
  .media-subtitle {
    font-size: 12px;
  }

  .image-carousel {
    height: 250px;
  }

  .carousel-card {
    width: 80vw;
    height: 210px;
  }

  .carousel-card.is-left,
  .carousel-card.is-right {
    opacity: 0.25;
  }
}
