/* Ensure the hero takes full width and height */
.dynamic-hero-block {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
  background: var(--white);
}

.dynamic-hero-block.sticky-marquee .hero-marquee-mask {
  padding-bottom: 0;
  margin-bottom: -3px;
}

.hero-static-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-marquee-mask {
  position: relative;
  z-index: 2;
  height: 100%;
  background: var(--white);
  /* MAGIC: This makes black text transparent, showing the image behind */
  mix-blend-mode: screen;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: var(--spacer-xl);
}
.dynamic-hero-block.no-image .hero-marquee-mask {
  mix-blend-mode: normal;
}

.marquee-row {
  display: flex;
  width: fit-content;
  white-space: nowrap;
  animation: marquee linear infinite;
}

.marquee-row span {
  font-size: inherit;
  line-height: 0.8;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--black);
  padding-right: 10rem;
}
.marquee-row.is-compact span {
  padding-right: 5rem;
}

/* Different Speeds */
.row-1 {
  animation-duration: 10s;
}
.row-2 {
  animation-duration: 20s;
  animation-direction: reverse;
}

/* Full Height Mode */
.marquee-inner-container.is-full-height {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 80vh; /* This is your fixed "stage" height */
  width: 100%;
}

.is-full-height .marquee-row {
  flex: 1; /* Each row takes an equal share of the 80vh */
  display: flex;
  align-items: center; /* Centers text vertically within its slice */
}

.is-full-height .marquee-row span {
  /* 80vh divided by number of rows, then multiplied by a safety factor (0.9) */
  font-size: calc((120vh / var(--total-rows)));
  line-height: 80%;
}

/* Linked Marquee Block */
a.dynamic-hero-block {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* Optional: Hover effect for clickable hero */
a.dynamic-hero-block:hover .hero-static-bg {
  transform: scale(1.02);
  transition: transform 0.8s ease;
}
