
/* ============ ПОЛНОЕ скрытие дефолтной .hero-section / .entry-header / page-title ============ */
.page-hero-section,
.entry-header,
.hero-section,
div.hero-section[data-type="type-1"],
.hero-section.is-width-constrained,
.ct-container > .entry-header,
.blocksy-woo-messages-default:empty,
.blocksy-woo-messages-default .woocommerce:empty,
article > header.entry-header,
article > .hero-section {
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  visibility:hidden !important;
  border:0 !important;
}

/* ============ Обнуляем top-spacing у Blocksy data-vertical-spacing на всех страницах ============ */
main#main,
main.site-main,
.site-main,
.ct-container,
.ct-container-full,
.ct-container-full[data-vertical-spacing],
.ct-container-full[data-vertical-spacing*="top"],
main > .ct-container-full,
main > .ct-container,
article.post,
article.page,
article[id^="post-"],
.entry-content,
.entry-content.is-layout-constrained,
.content-area {
  padding-top:0 !important;
  margin-top:0 !important;
  --content-vertical-spacing:0 !important;
  --vertical-spacing:0 !important;
  --theme-vertical-spacing:0 !important;
}

/* ============ FIRST CHILD reset (на всех страницах) ============ */
.entry-content > *:first-child,
.entry-content > p:first-child > *:first-child,
article > *:first-child,
main > *:first-child,
.site-main > *:first-child,
.ct-container-full > *:first-child {
  margin-top:0 !important;
  padding-top:0 !important;
}

/* ============ Empty <p> вокруг .e24-hero ============ */
.entry-content > p:empty,
.entry-content > p:has(> .e24-hero),
.entry-content > p:first-of-type:has(.e24-hero) {
  margin:0 !important;
  padding:0 !important;
  height:auto !important;
  min-height:0 !important;
}

/* ============ Контролируемый margin-top у .e24-hero (24px воздух между header и hero) ============ */
.e24-hero,
.entry-content .e24-hero,
.entry-content > p > .e24-hero,
article .e24-hero {
  margin-top:24px !important;
}
/* На мобильной — меньше */
@media (max-width:600px) {
  .e24-hero,
  .entry-content .e24-hero,
  .entry-content > p > .e24-hero,
  article .e24-hero {
    margin-top:12px !important;
  }
}
