/* EpicPulls Hero Slider block
   ------------------------------------------------------------------
   Optional carousel wrapper around one or more .ep-hero blocks. The wrapper
   owns the full-bleed breakout (align full); each nested hero fills 100% of a
   slide. Adds branded nav arrows, pagination dots, and a staggered entrance
   animation for the active slide's text + button. */

.ep-hero-slider {
  position: relative;
  overflow: hidden;
}

/* Neutralise the .ep-hero full-bleed breakout when nested — the slider itself
   is the full-width element; each hero must be 100% of its slide, not 100vw.
   The `.entry-content …` selector out-specifies `.entry-content .alignfull`
   from _alignment.scss regardless of stylesheet order. */
.entry-content .ep-hero-slider .ep-hero.alignfull,
.ep-hero-slider .ep-hero {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Slides stretch to a common height within the flex wrapper. */
.ep-hero-slider .swiper-wrapper {
  align-items: stretch;
}
/* Slides must NOT flex-shrink. Our custom slideClass (.ep-hero) does not inherit
   Swiper's default `.swiper-slide { flex-shrink: 0 }`, so without this the flex
   wrapper divides its width across all slides and each collapses to 1/N wide. */
.ep-hero-slider .ep-hero {
  height: auto;
  flex-shrink: 0;
}

/* ---- Entrance animation: text + button rise & fade in on the active slide ----
   Inside the slider the reveal is driven per-slide by `is-active-slide` (below),
   so switch off the Hero block's own load animation (hero.css) here and use a
   transition from the hidden base state instead. */
.ep-hero-slider .ep-hero__content > * {
  animation: none;
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.ep-hero-slider .ep-hero.is-active-slide .ep-hero__content > * {
  opacity: 1;
  transform: none;
}
/* Stagger each child (heading → text → buttons). */
.ep-hero-slider .ep-hero.is-active-slide .ep-hero__content > *:nth-child(1) { transition-delay: 0.15s; }
.ep-hero-slider .ep-hero.is-active-slide .ep-hero__content > *:nth-child(2) { transition-delay: 0.30s; }
.ep-hero-slider .ep-hero.is-active-slide .ep-hero__content > *:nth-child(3) { transition-delay: 0.45s; }
.ep-hero-slider .ep-hero.is-active-slide .ep-hero__content > *:nth-child(4) { transition-delay: 0.60s; }

/* In the editor there's no Swiper active-class, so never hide the content. */
.ep-hero-slider.is-admin .ep-hero__content > * {
  opacity: 1;
  transform: none;
  transition: none;
}
.ep-hero-slider.is-admin .swiper-wrapper {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .ep-hero-slider .ep-hero__content > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Navigation arrows: branded circular, subtle until hover ---- */
.ep-hero-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0.7;
  transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.ep-hero-slider__nav:hover,
.ep-hero-slider__nav:focus-visible {
  opacity: 1;
  background: var(--otg-violet-deep, #6d28d9);
  border-color: transparent;
  outline: none;
}
.ep-hero-slider__nav--prev { left: 18px; }
.ep-hero-slider__nav--next { right: 18px; }

.ep-hero-slider__nav::after {
  font-family: "Font Awesome 7 Free";
  font-weight: 900;
  /* Glyph metric for the fixed-size nav button, not a text size. */
  font-size: 17px;
  line-height: 1;
}
.ep-hero-slider__nav--prev::after { content: "\f053"; } /* fa-chevron-left */
.ep-hero-slider__nav--next::after { content: "\f054"; } /* fa-chevron-right */

.ep-hero-slider__nav.swiper-button-disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Hide chrome when it isn't needed. */
.ep-hero-slider.is-single .ep-hero-slider__nav,
.ep-hero-slider.no-arrows .ep-hero-slider__nav {
  display: none;
}

/* ---- Pagination dots ---- */
.ep-hero-slider__dots {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  z-index: 10;
  text-align: center;
  line-height: 0;
}
.ep-hero-slider__dots .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  margin: 0 5px !important;
  background: #fff;
  opacity: 0.5;
  transition: opacity 0.2s ease, width 0.2s ease;
}
.ep-hero-slider__dots .swiper-pagination-bullet-active {
  opacity: 1;
  width: 26px;
  border-radius: 5px;
}
.ep-hero-slider.is-single .ep-hero-slider__dots,
.ep-hero-slider.no-dots .ep-hero-slider__dots {
  display: none;
}

/* ---- Small screens ---- */
@media (max-width: 575.98px) {
  .ep-hero-slider__nav {
    width: 38px;
    height: 38px;
  }
  .ep-hero-slider__nav--prev { left: 8px; }
  .ep-hero-slider__nav--next { right: 8px; }
  .ep-hero-slider__nav::after { font-size: 15px; }
}
