/* Retro Junkie Media — hero slideshow (standalone, no Tailwind) */

.rj-hero-gallery {
  --rjm-night: #160824;
  --rjm-wall: #1e0d32;
  --rjm-text: #f6f3ff;
  --rjm-mute: #cbbbe0;
  --rjm-pink: #ff3cac;
  --rjm-cyan: #22e0ff;
  --rjm-radius: 12px;
  --rjm-gap: 12px;

  overflow: hidden;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 20px;
  margin-bottom: 0;
  padding: 16px 0 16px 16px;
  box-sizing: border-box;
  background: var(--rjm-night);
  border-bottom: 1px solid #4b2a73;
  position: relative;
}

.rj-hero-gallery .rj-hero-viewport {
  overflow: hidden;
  width: 100%;
  height: 22rem;
}

.rj-hero-gallery .rj-hero-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--rjm-gap);
  width: max-content;
  height: 100%;
  overflow: visible;
  will-change: transform;
  transform: translateX(0);
}

.rj-hero-gallery .rj-hero-slide {
  box-sizing: border-box;
  height: 100%;
  border-radius: var(--rjm-radius);
  overflow: hidden;
}

.rj-hero-gallery .rj-hero-slide--copy {
  flex: 0 0 min(86vw, 42rem);
  width: min(86vw, 42rem);
  background: var(--rjm-wall);
}

.rj-hero-gallery .rj-hero-copy-inner {
  box-sizing: border-box;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

.rj-hero-gallery .rj-hero-eyebrow {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--rjm-cyan);
}

.rj-hero-gallery .rj-hero-title {
  margin: 1rem 0 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.4rem, 12vw, 3.25rem);
  line-height: 1;
  color: var(--rjm-text);
}

.rj-hero-gallery .rj-pink {
  color: var(--rjm-pink);
}

.rj-hero-gallery .rj-cyan {
  color: var(--rjm-cyan);
}

.rj-hero-gallery .rj-hero-lede {
  margin: 1.25rem auto 0;
  max-width: 48rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--rjm-mute);
}

.rj-hero-gallery .rj-hero-trust {
  margin: 0.7rem auto 0;
  max-width: 36rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--rjm-cyan);
}

.rj-hero-gallery a.rj-hero-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  max-width: 22rem;
  margin: 1.1rem auto 0;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  background: var(--rjm-pink) !important;
  color: var(--rjm-night) !important;
  font-weight: 800;
  font-size: 1.125rem;
  text-decoration: none !important;
  box-shadow: 0 0 18px rgba(255, 60, 172, 0.45);
}

.rj-hero-gallery a.rj-hero-cta:hover {
  background: var(--rjm-cyan) !important;
  color: var(--rjm-night) !important;
}

.rj-hero-gallery .rj-hero-slide--photo {
  flex: 0 0 auto;
  width: auto;
  background: transparent;
}

.rj-hero-gallery .rjm-slide-link {
  display: block;
  height: 100%;
  border-radius: var(--rjm-radius);
}

.rj-hero-gallery .rjm-slide-link:focus-visible {
  outline: 3px solid var(--rjm-cyan);
  outline-offset: -3px;
}

.rj-hero-gallery .rj-hero-slide--photo img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  border-radius: var(--rjm-radius);
}

.rj-hero-gallery.is-rj-hero-auto .rj-hero-slide--photo img:not(.is-loaded) {
  opacity: 0;
}

.rj-hero-gallery.is-rj-hero-auto .rj-hero-slide--photo img.is-loaded {
  opacity: 1;
  transition: opacity 0.35s ease;
}

.rj-hero-gallery.rjm-effect-focus .rj-hero-viewport {
  perspective: 900px;
}

.rj-hero-gallery.rjm-effect-focus .rj-hero-slide {
  transform-origin: center;
  transition: opacity 100ms linear;
  backface-visibility: hidden;
}

.rj-hero-gallery.rjm-effect-momentum .rj-hero-viewport {
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.rj-hero-gallery.rjm-effect-momentum.is-dragging .rj-hero-viewport {
  cursor: grabbing;
}

.rj-hero-gallery.rjm-effect-fade {
  padding-right: 16px;
}

.rj-hero-gallery.rjm-effect-fade .rj-hero-track {
  position: relative;
  display: block;
  width: 100%;
  gap: 0;
  transform: none !important;
  will-change: auto;
}

.rj-hero-gallery.rjm-effect-fade .rj-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition:
    opacity var(--rjm-transition-duration, 1150ms) ease,
    transform var(--rjm-transition-duration, 1150ms) ease;
}

.rj-hero-gallery.rjm-effect-fade .rj-hero-slide.is-active {
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.rj-hero-gallery.rjm-effect-fade .rj-hero-slide--copy {
  display: block;
}

.rj-hero-gallery.rjm-effect-fade .rj-hero-slide--photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rjm-carousel-controls {
  position: absolute;
  right: 16px;
  bottom: 28px;
  z-index: 5;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(246, 243, 255, 0.28);
  border-radius: 999px;
  background: rgba(22, 8, 36, 0.82);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
}

.rjm-carousel-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(203, 187, 224, 0.38);
  border-radius: 50%;
  background: var(--rjm-wall);
  color: var(--rjm-text);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.rjm-carousel-control:hover,
.rjm-carousel-control:focus-visible {
  border-color: var(--rjm-cyan);
  background: var(--rjm-cyan);
  color: var(--rjm-night);
  outline: none;
}

.rjm-carousel-control:focus-visible {
  box-shadow: 0 0 0 3px rgba(34, 224, 255, 0.35);
}

.rjm-carousel-control:disabled {
  opacity: 0.45;
  cursor: default;
}

.rjm-carousel-toggle {
  font-size: 15px;
  font-weight: 800;
}

.rjm-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (min-width: 640px) {
  .rj-hero-gallery {
    padding: 16px 0 16px 24px;
  }

  .rj-hero-gallery .rj-hero-viewport {
    height: min(70vh, 32rem);
  }

  .rj-hero-gallery .rj-hero-slide--copy {
    flex-basis: min(86vw, 42rem);
    width: min(86vw, 42rem);
  }

  .rj-hero-gallery .rj-hero-copy-inner {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .rj-hero-gallery .rj-hero-eyebrow {
    font-size: 1rem;
  }

  .rj-hero-gallery .rj-hero-title {
    font-size: clamp(3.25rem, 7vw, 6rem);
  }

  .rj-hero-gallery .rj-hero-lede {
    font-size: 1.5rem;
  }

  .rj-hero-gallery .rj-hero-trust {
    margin-top: 1rem;
  }

  .rj-hero-gallery a.rj-hero-cta {
    width: auto;
    margin-top: 2rem;
  }

  .rj-hero-gallery.rjm-effect-fade {
    padding-right: 24px;
  }

  .rjm-carousel-controls {
    right: 24px;
  }
}

/* Soften home block spacing around the hero when plugin owns the markup */
body.home .wp-site-blocks > main {
  margin-top: 0 !important;
}

body.home main > .wp-block-group.alignfull:first-child,
body.home main .entry-content > .wp-block-group.alignfull:first-child {
  padding-top: 0 !important;
}

.rj-home-section,
.wp-block-group.alignfull.rj-home-section {
  position: relative;
  z-index: 0;
  overflow: visible;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.5rem 0 2rem;
  padding-left: 0;
  padding-right: 0;
}

@media (min-width: 768px) {
  .rj-home-section,
  .wp-block-group.alignfull.rj-home-section {
    isolation: isolate;
  }
}

body.home .rj-home-section.alignfull,
body.home .wp-block-group.alignfull.rj-home-section {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0;
  padding-right: 0;
}

.rj-home-section + .rj-home-section {
  margin-top: 0.75rem;
}

.rj-home-section .rj-home-section {
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  overflow: visible;
}

.rj-home-section > .rj-hero-gallery {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (max-width: 767px) {
  .rj-home-section,
  .wp-block-group.alignfull.rj-home-section {
    padding: 1.75rem 0 2.5rem;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
    isolation: auto;
    z-index: auto;
    transform: none;
    contain: none;
  }

  .rj-home-section + .rj-home-section {
    margin-top: 1.25rem;
  }

  .rj-hero-gallery .rj-hero-track {
    will-change: auto;
  }
}

body.home .entry-content.wp-block-post-content {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  .rj-hero-gallery .rj-hero-track {
    will-change: auto;
  }

  .rj-hero-gallery .rj-hero-slide {
    transition-duration: 0ms !important;
  }
}
