/* Override v73's unconditional hide. */
body.pz-clean-post .pz-injected-hero {
  display: block !important;
}

/* Conditional hide via :has() — only when an editorial post-hero
   is actually present in the page. Modern browser support is
   universal (Chrome 105+, FF 121+, Safari 15.4+). */
body.pz-clean-post:has(.pz-post-hero) .pz-injected-hero {
  display: none !important;
}

/* Fallback for older browsers — JS adds .pz-has-post-hero to body
   when a .pz-post-hero element exists. */
body.pz-clean-post.pz-has-post-hero .pz-injected-hero {
  display: none !important;
}

/* Ensure whichever hero is visible takes proper size */
body.pz-clean-post .pz-injected-hero,
body.pz-clean-post .pz-post-hero {
  max-width: 1100px;
  margin: 0 auto 2.4rem;
}

body.pz-clean-post .pz-injected-hero img,
body.pz-clean-post .pz-post-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  filter: saturate(0.97) contrast(1.04);
  opacity: 1 !important;
}


/* ============================================================
   Hide stray .wp-block-image figures that render in the header
   region (immediately after the hero, before the first H2).
   These are the *-lm-1.jpg or wp-*.jpg landmark images that
   stack with the hero on rio, maui, guatemala, vancouver,
   medellin and a few others.
   ============================================================ */

/* When a post-hero or injected-hero is present, hide any plain
   wp-block-image figure that appears directly after, before the
   first H2. We do this by hiding figures that are immediate
   siblings of the hero figure inside .entry-content. */

body.pz-clean-post .entry-content > .pz-post-hero ~ figure.wp-block-image:not(.pz-figure):not(.pz-section-img),
body.pz-clean-post .entry-content > .pz-injected-hero ~ figure.wp-block-image:not(.pz-figure):not(.pz-section-img) {
  /* Only hide the FIRST such sibling — others may be legitimate inline figures */
}

/* Actually, the cleanest approach: hide every .wp-block-image
   that's the second figure in entry-content (the first being
   the hero), since hand-curated .pz-figure injections are
   always placed after at least one asterism break, not directly
   after the hero. */

body.pz-clean-post .entry-content > figure.wp-block-image:not(.pz-figure):not(.pz-section-img):not(.pz-post-hero):not(.pz-injected-hero) {
  /* Plain wp-block-image figures sitting alone in entry-content
     ARE legitimate inline imagery. Don't hide blanket. We need a
     more specific signal. */
}

/* Hide the specific landmark duplicates by URL pattern */
body.pz-clean-post .entry-content figure.wp-block-image img[src*="-lm-1"],
body.pz-clean-post .entry-content figure.wp-block-image img[src*="-lm-2"],
body.pz-clean-post .entry-content figure.wp-block-image img[src*="-lm-3"] {
  display: none;
}

body.pz-clean-post .entry-content figure.wp-block-image:has(img[src*="-lm-1"]),
body.pz-clean-post .entry-content figure.wp-block-image:has(img[src*="-lm-2"]),
body.pz-clean-post .entry-content figure.wp-block-image:has(img[src*="-lm-3"]) {
  display: none !important;
}

/* Hide -wp-N.jpg style landmark/section images that medellin has */
body.pz-clean-post .entry-content figure.wp-block-image:has(img[src*="-wp-1"]),
body.pz-clean-post .entry-content figure.wp-block-image:has(img[src*="-wp-2"]),
body.pz-clean-post .entry-content figure.wp-block-image:has(img[src*="-wp-3"]),
body.pz-clean-post .entry-content figure.wp-block-image:has(img[src*="-wp-4"]) {
  display: none !important;
}