.ee-hero-swiper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #0f172a;
  box-sizing: border-box;
  /* Matches inline --ee-hero-min-h from PHP; avoids collapsed heroes in flex layouts */
  min-height: var(--ee-hero-min-h, 50vh);
  flex-shrink: 0;
}

.ee-hero-swiper .swiper-wrapper {
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

.ee-hero-swiper .swiper-slide {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Bottom readability scrim (between image and copy). */
.ee-hero-swiper .swiper-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.82) 0%,
    rgba(15, 23, 42, 0.35) 42%,
    transparent 68%
  );
}

/*
 * Themes often set img { max-width:100%; height:auto }, which breaks absolute
 * full-bleed slides. Keep the hero image filling the slide at all times.
 */
.ee-hero-swiper img.ee-slide-bg,
.ee-hero-swiper .ee-slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 100% !important;
  object-fit: cover;
  object-position: center center;
}

.ee-hero-swiper .ee-slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(100%, 40rem);
  margin: 0;
  padding: 1rem clamp(1.25rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2.5rem);
  box-sizing: border-box;
  text-align: left;
  color: #ffffff;
  --ee-slide-headline-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.ee-hero-swiper .ee-slide-headline {
  margin: 0 0 0.4rem;
  font-size: clamp(1rem, 4vw, 1.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: var(--ee-slide-headline-shadow);
}

/* Subtitle: title case, slightly muted vs headline (reference: light grey). */
.ee-hero-swiper .ee-slide-subline {
  margin: 0;
  max-width: 36rem;
  font-size: clamp(0.8rem, 2vw, 1.25rem);
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: rgba(248, 250, 252, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Text layers: JS toggles .is-visible with stagger (see data-text-* on container). */
.ee-hero-swiper .ee-slide-content--anim .ee-slide-text-layer {
  opacity: 0;
  transform: translateY(var(--ee-text-fade-y, 16px));
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

.ee-hero-swiper .ee-slide-content--anim .ee-slide-text-layer.is-visible {
  opacity: 1;
  transform: none;
}

.ee-hero-swiper .swiper-pagination-bullet {
  background: #464646;
  opacity: 1;
}

.ee-hero-swiper .swiper-pagination-bullet-active {
  background: #c7c7c7;
  opacity: 1;
}

.ee-hero-swiper .swiper-button-next,
.ee-hero-swiper .swiper-button-prev {
  color: #f8fafc;
}

.ee-hero-swiper.swiper-coverflow .swiper-slide {
  width: 75%;
  max-width: 900px;
}

/*
 * Mobile: height tracks width — visible area height = 80% of slider width (5:4 box).
 * Overrides inline min-height/height from the shortcode so the hero stays proportional.
 */
@media (max-width: 768px) {
  .ee-hero-swiper {
    min-height: unset !important;
    height: auto !important;
    aspect-ratio: 5 / 3;
    --ee-hero-min-h: unset !important;
  }

  .ee-hero-swiper .swiper-wrapper,
  .ee-hero-swiper .swiper-slide {
    min-height: 100%;
  }

  /* Title + subtitle slightly higher from the bottom edge on small screens */
  .ee-hero-swiper .ee-slide-content {
    margin-bottom: 14px;
  }

  /* Smaller pagination dots on small screens */
  .ee-hero-swiper .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
  }

  .ee-hero-swiper.swiper-horizontal
    > .swiper-pagination-bullets
    .swiper-pagination-bullet,
  .ee-hero-swiper
    .swiper-pagination-horizontal.swiper-pagination-bullets
    .swiper-pagination-bullet {
    margin: 0 3px;
  }
}
