.blog-hero-wrapper {
  overflow: hidden;
}

.blog-hero {
  display: grid;
  gap: .5rem clamp(1.3em, 3vw, 3em);
  {# overflow: hidden; #} 
}

.blog-hero--parallax {
  grid-template-rows: 1fr repeat(calc(var(--blog-hero-content-count) + 2), auto) 1fr;
  min-height: 70vh;
}

.blog-hero-wrapper .blog-hero--parallax.container {
  position: static;
}



@media (min-width: 900px) {
  .blog-hero--overlapped {
    row-gap: 0;
  }
}

@media (min-width: 1400px) { {# Changed from 700 to 1400 to fix x overflow issue#}

  .blog-hero--list,
  .blog-hero--list-reverse {
    grid-template: 1fr repeat(calc(var(--blog-hero-content-count) + 2), auto) 1fr / 1fr 1fr;
  }
}

.blog-hero--list::before,
.blog-hero--list-reverse::before,
.blog-hero--parallax::before,
.blog-hero--list::after,
.blog-hero--list-reverse::after,
.blog-hero--parallax::after {
  content: '';
}

.blog-hero> :not(.blog-hero__image-wrapper) {
  margin: 0;
  position: relative;
  z-index: 1;
}

@media (min-width: 700px) {
  .blog-hero--list> :not(.blog-hero__image-wrapper) {
    grid-column: 2 / -1;
  }

  .blog-hero--list-reverse> :not(.blog-hero__image-wrapper) {
    grid-column: 1 / 2;
  }
}

@media (min-width: 900px) {
  .blog-hero--overlapped> :not(.blog-hero__image-wrapper) {
    background-color: rgb(var(--color-background, var(--site-background-color)));
    padding: .5rem 0 .5rem 1.5rem;
  }

  .blog-hero--overlapped.blog-hero--list-reverse> :not(.blog-hero__image-wrapper) {
    padding-left: 0;
    padding-right: 1.5rem;
  }

  .blog-hero--overlapped> :first-child {
    padding-top: 1.5rem;
  }

  .blog-hero--overlapped> :nth-last-child(2) {
    padding-bottom: 1.5rem;
  }
}

.blog-hero a:not(.button) {
  color: currentColor;
}

.blog-hero a:not(.button):hover,
.blog-hero a:not(.button):focus-visible {
  text-decoration: underline;
  opacity: 1;
}

.blog-hero__image-wrapper {
  aspect-ratio: var(--bh-media-aspect-ratio, 4 / 3);
  display: block;
  position: relative;
  z-index: 0;
}

.blog-hero--stacked .blog-hero__image-wrapper,
.blog-hero--list .blog-hero__image-wrapper,
.blog-hero--list-reverse .blog-hero__image-wrapper {
  margin-top: .5rem;
}

.blog-hero--stacked-reverse .blog-hero__image-wrapper {
  margin-bottom: .5rem;
  order: -1;
}

@media (min-width: 1400px) { {# Changed from 700 to 1400 #}
  .blog-hero--list .blog-hero__image-wrapper {
    grid-column: 1 / 2;
    grid-row: 1 / calc(var(--blog-hero-content-count) + 5);
    margin-top: 0;
  }

  .blog-hero--list-reverse .blog-hero__image-wrapper {
    grid-column: 2 / 3;
    grid-row: 1 / calc(var(--blog-hero-content-count) + 5);
    margin-top: 0;
  }
}

.blog-hero--parallax .blog-hero__image-wrapper {
  aspect-ratio: unset;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.blog-hero__image {
  aspect-ratio: var(--bh-media-aspect-ratio, 4 / 3);
  border-radius: var(--media-radius);
  object-fit: cover;
  width: 100%;
}

.blog-hero--parallax .blog-hero__image {
  aspect-ratio: unset;
  border-radius: 0;
  filter: blur(var(--blur, 0));
  height: 150%;
}

.blog-hero--overlapped .blog-hero__image-wrapper:after,
.blog-hero--parallax .blog-hero__image-wrapper:after {
  /* background: linear-gradient(90deg, transparent, rgb(var(--color-background, var(--site-background-color)), .3)); */
  content: '';
  height: 100%;
  position: absolute;
  right: -30%;
  top: 0;
  width: 100%;
}

.blog-hero--parallax .blog-hero__image-wrapper:after {
  background: rgb(var(--color-background, var(--site-background-color)), .85);
  right: 0;
}

@media (min-width: 900px) {
  .blog-hero--overlapped .blog-hero__image-wrapper:after,
  .blog-hero--overlapped .blog-hero__image {
    max-width: none;
    width: 130%;
  }

  .blog-hero--overlapped.blog-hero--list-reverse .blog-hero__image-wrapper:after,
  .blog-hero--overlapped.blog-hero--list-reverse .blog-hero__image {
    margin-left: -30%;
  }
}

.blog-hero__teaser {
  color: rgb(var(--color-foreground, var(--site-foreground-color)), .8);
  line-height: 1.4;
}

@media (min-width: 900px) {
  .blog-hero__teaser {
    font-size: 1.15rem;
  }
}