/* Prevent original featured image from flashing on page load */
body:has(.hs-elevate-blog-post)
.hs-elevate-blog-image-container {
  display: none !important;
}

/* Existing working behavior: hide original featured image, author and date */
html.hide-blog-default-elements .hs-elevate-blog-image-container,
html.hide-blog-default-elements .hs-elevate-blog-meta,
html.hide-blog-default-elements .hs-elevate-blog-meta__date-container {
  display: none !important;
}

/* New full-bleed blog hero */
html.celerant-blog-hero-ready .celerant-blog-hero {
  background: #e0f1ff;
  width: 100vw;
  max-width: none;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-right: 0;
  box-sizing: border-box;
  padding: 44px 0;
}

html.celerant-blog-hero-ready .celerant-blog-hero__inner {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

html.celerant-blog-hero-ready .celerant-blog-hero__title {
  margin: 0;
  width: auto;
  max-width: none;
}

html.celerant-blog-hero-ready .celerant-blog-hero__media {
  min-width: 0;
  height: 320px;
  overflow: hidden;
  border-radius: 14px;
}

html.celerant-blog-hero-ready .celerant-blog-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 767px) {
  html.celerant-blog-hero-ready .celerant-blog-hero {
    padding: 28px 0;
  }
  html.celerant-blog-hero-ready .celerant-blog-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  html.celerant-blog-hero-ready .celerant-blog-hero__media {
    height: 230px;
  }
}

/* Hero details below the H1, in the requested order */
html.celerant-blog-hero-ready .celerant-blog-hero__description {
  margin: 18px 0 14px;
  font-size: 18px;
  line-height: 1.55;
}
html.celerant-blog-hero-ready .celerant-blog-hero__date,
html.celerant-blog-hero-ready .celerant-blog-hero__author {
  font-size: 14px;
  line-height: 1.6;
  margin-top: 6px;
}

/* Author avatar and name, extracted from the hidden original metadata */
html.celerant-blog-hero-ready .celerant-blog-hero__author {
  display: flex;
  align-items: center;
  gap: 10px;
}
html.celerant-blog-hero-ready .celerant-blog-hero__avatar {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  object-fit: cover;
}
