/* ============================================================
   League of GOATS — Media Guide page
   A click-through slide viewer with a real fullscreen-presentation
   mode. Built from plain <img> + <button> elements on purpose —
   no iframes, no plugins, no bleeding-edge APIs — so it holds up
   on everything from a phone browser to a smart TV's browser.
   ============================================================ */

.mg-hero .hero-sub { max-width: 640px; }

.mg-viewer {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.mg-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mg-slide {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* Big, transparent click/tap zones over each side of the slide —
   real <button>s so they're reachable by keyboard and TV remote
   focus, not just mouse/touch. */
.mg-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: transparent;
  display: flex;
  align-items: center;
  transition: background 0.15s ease;
}
.mg-edge-prev { left: 0; justify-content: flex-start; }
.mg-edge-next { right: 0; justify-content: flex-end; }
.mg-edge:hover, .mg-edge:focus-visible {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent);
  color: var(--gold-light);
  font-size: 34px;
  outline: none;
}
.mg-edge-next:hover, .mg-edge-next:focus-visible {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.35), transparent);
}
.mg-edge::after {
  content: "";
  width: 100%;
}
.mg-edge-prev:hover::before, .mg-edge-prev:focus-visible::before {
  content: "‹";
  padding-left: 18px;
}
.mg-edge-next:hover::before, .mg-edge-next:focus-visible::before {
  content: "›";
  padding-right: 18px;
  margin-left: auto;
}

.mg-counter {
  position: absolute;
  right: 14px;
  bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--bone);
  background: rgba(8, 8, 10, 0.65);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 5px 12px;
  pointer-events: none;
}

.mg-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.mg-ctrl-btn {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--silver);
  background: var(--bg-panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.mg-ctrl-btn:hover, .mg-ctrl-btn:focus-visible { color: var(--gold-light); border-color: var(--gold); outline: none; }
.mg-ctrl-btn span { font-size: 16px; line-height: 1; }
.mg-ctrl-fullscreen { margin-left: auto; }
.mg-ctrl-fullscreen[hidden] { display: none; }

.mg-dots { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-panel-2);
  padding: 0;
  cursor: pointer;
}
.mg-dot:hover, .mg-dot:focus-visible { border-color: var(--gold-light); outline: none; }
.mg-dot.is-active { background: var(--gold); border-color: var(--gold); }

.mg-filmstrip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  margin-top: 16px;
  scrollbar-width: thin;
}
.mg-thumb {
  flex-shrink: 0;
  width: 128px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--line-soft);
  padding: 0;
  cursor: pointer;
  background: #000;
}
.mg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.65; transition: opacity 0.15s; }
.mg-thumb:hover img, .mg-thumb:focus-visible img { opacity: 1; }
.mg-thumb.is-active { border-color: var(--gold); }
.mg-thumb.is-active img { opacity: 1; }

.mg-hint {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* ---------------- Fullscreen presentation mode ---------------- */
.mg-viewer:fullscreen,
.mg-viewer:-webkit-full-screen,
.mg-viewer:-moz-full-screen,
.mg-viewer:-ms-fullscreen {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
  background: #000;
}
.mg-viewer:fullscreen .mg-stage,
.mg-viewer:-webkit-full-screen .mg-stage,
.mg-viewer:-moz-full-screen .mg-stage,
.mg-viewer:-ms-fullscreen .mg-stage {
  flex: 1;
  aspect-ratio: unset;
  min-height: 0;
}
.mg-viewer:fullscreen .mg-controls,
.mg-viewer:-webkit-full-screen .mg-controls,
.mg-viewer:-moz-full-screen .mg-controls,
.mg-viewer:-ms-fullscreen .mg-controls {
  background: #000;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .mg-controls { padding: 12px 14px; gap: 8px; }
  .mg-ctrl-btn { padding: 9px 12px; font-size: 12px; }
  .mg-ctrl-fullscreen { width: 100%; justify-content: center; margin-left: 0; order: 4; }
  .mg-dots { order: 3; width: 100%; justify-content: center; margin-top: 4px; }
  .mg-thumb { width: 96px; }
}
