/* ============================================================
 * AnsPress: hide the theme's duplicate page title.
 *
 * AnsPress pages (body has .anspress-content) render their own
 * titles (.ap-q-title for questions, .ap-list-head for lists).
 * Most WordPress themes also output a title in their template
 * (single.php / page.php) *before* the_content(), creating two
 * identical-looking titles.
 *
 * We hide the theme's title with CSS so only AnsPress' own
 * title remains visible.
 * ============================================================ */

/* ---- Single question page ---- */
body.anspress-content.ap-page-question

  /* Classic themes */
  .entry-title,
  .post-title,
  .single-title,
  .article-title,
  .headline,
  .page-title,
  .content-title,
  .main-title,
  .hero-title,
  .post-heading,
  .post-header h1,
  .entry-header h1,
  .entry-header h2,
  .article-header h1,
  .article-header h2,
  .post-meta-title,
  .title-bar h1,
  .title-area h1,

  /* Block themes (Full Site Editing) */
  .wp-block-post-title,
  .wp-block-post-title-link,

  /* Divi / Elementor / BeaverBuilder / Oxygen */
  .et_post_title,
  .elementor-heading-title,
  .fl-heading,
  .oxy-heading,

  /* GeneratePress / Astra / OceanWP / Neve / Hestia */
  .page-header h1,
  .page-header h2,
  .entry-header .entry-title-link,
  .ast-article-single .entry-title,
  .single-post-title,

  /* Generic: any direct h1 inside the main content area
     BUT NOT inside AnsPress own .ap-q-header / .ap-list-head */
  .content-area > h1:first-child,
  .entry-content > h1:first-child,
  .site-content > h1:first-child,
  main > h1:first-child,
  article > header > h1,
  article > header > h2,
  .single-content > h1:first-child,
  .single-content > h2:first-child {

	display: none !important;
}

/* ---- Other AnsPress pages ---- */
body.anspress-content:not(.ap-page-question-basepage)

  .entry-title,
  .post-title,
  .page-title,
  .entry-header h1,
  .entry-header h2,
  .wp-block-post-title,
  .content-area > h1:first-child,
  .entry-content > h1:first-child,
  main > h1:first-child,
  article > header > h1,
  article > header > h2,
  .page-header h1,
  .page-header h2,
  .elementor-heading-title {

	display: none !important;
}

/* ---- Safety: always show AnsPress own titles ---- */
.ap-q-title,
.ap-q-header .ap-q-title,
.ap-list-head .ap-title,
.ap-list-head .ap-q-list-title {

	display: block !important;
}
