/* =========================================================
   V93 — POST-HERO OVERLAP FIX
   Keeps the gallery statistics and other first content blocks
   fully below the rebuilt V87 hero instead of inheriting legacy
   negative-margin hero overlap rules.
   ========================================================= */

/* Gallery: the legacy gallery used margin-top:-30px to tuck its
   stats into an older hero. The V87 hero is a standalone rounded
   card, so the stats must begin after it with normal document flow. */
body.theme-v38.page-gallery .gallery-intro-stats{
  position:relative;
  z-index:1;
  margin:clamp(24px,3vw,44px) auto clamp(36px,4vw,56px)!important;
  padding-top:0!important;
  transform:none!important;
  clear:both;
}

body.theme-v38.page-gallery .gallery-intro-stats > div{
  min-height:112px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  overflow:visible;
}

/* Ensure the rebuilt hero itself participates in normal layout and
   cannot visually collapse into the content that follows it. */
body.theme-v38.v87-auto-hero .v87-page-hero{
  display:block;
  position:relative;
  z-index:1;
  min-height:0;
  margin-bottom:0!important;
}

/* The first visible block after a hidden legacy hero should never
   be pulled upward by old transform/margin rules. */
body.theme-v38.v87-auto-hero main > .v87-page-hero + .campaign-placement + .campaign-placement + .gallery-intro-stats,
body.theme-v38.v87-auto-hero main > .v87-page-hero + .campaign-placement + .gallery-intro-stats,
body.theme-v38.v87-auto-hero main > .v87-page-hero + .gallery-intro-stats{
  margin-top:clamp(24px,3vw,44px)!important;
}

@media (max-width:1000px){
  body.theme-v38.page-gallery .gallery-intro-stats{
    margin-top:26px!important;
    margin-bottom:38px!important;
  }
}

@media (max-width:700px){
  body.theme-v38.page-gallery .gallery-intro-stats{
    margin-top:20px!important;
    margin-bottom:30px!important;
    padding-left:18px!important;
    padding-right:18px!important;
  }
  body.theme-v38.page-gallery .gallery-intro-stats > div{
    min-height:100px;
  }
}
