/* =========================================================
   CAPSTONE PROJECTS
   Remove Roofix / WordPress auto title banner on project pages
   Keeps the custom Capstone project hero intact
   ========================================================= */

body.single-capstone_project .entry-banner,
body.single-capstone_project .entry-banner-after,
body.single-capstone_project .inner-page-banner.bg-common,
body.single-capstone_project .inner-page-top-margin {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Remove any leftover spacing the theme may leave before the custom project page */
body.single-capstone_project #content,
body.single-capstone_project .site-content,
body.single-capstone_project main.cpb-single-project {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Make sure the custom Capstone project hero still displays normally */
body.single-capstone_project .cpb-single-project,
body.single-capstone_project .cpb-project-hero,
body.single-capstone_project .cpb-project-single-hero {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
/* =========================================================
   CAPSTONE PROJECTS ARCHIVE / PROJECTS PAGE
   Remove Roofix / WordPress auto title banner on the main
   Projects page while keeping the custom Capstone archive hero
   ========================================================= */

/* Native Capstone projects archive */
body.post-type-archive-capstone_project .entry-banner,
body.post-type-archive-capstone_project .entry-banner-after,
body.post-type-archive-capstone_project .inner-page-banner.bg-common,
body.post-type-archive-capstone_project .inner-page-top-margin,

/* Projects page using the Capstone archive shortcode/widget */
body:has(.cpb-projects-archive) .entry-banner,
body:has(.cpb-projects-archive) .entry-banner-after,
body:has(.cpb-projects-archive) .inner-page-banner.bg-common,
body:has(.cpb-projects-archive) .inner-page-top-margin {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Remove leftover spacing before the custom Projects page layout */
body.post-type-archive-capstone_project #content,
body.post-type-archive-capstone_project .site-content,
body.post-type-archive-capstone_project .content-area,
body.post-type-archive-capstone_project main.cpb-projects-archive,
body:has(.cpb-projects-archive) #content,
body:has(.cpb-projects-archive) .site-content,
body:has(.cpb-projects-archive) .content-area,
body:has(.cpb-projects-archive) main.cpb-projects-archive {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Make sure the custom Capstone Projects archive still displays normally */
body.post-type-archive-capstone_project .cpb-projects-archive,
body.post-type-archive-capstone_project .cpb-archive-hero,
body:has(.cpb-projects-archive) .cpb-projects-archive,
body:has(.cpb-projects-archive) .cpb-archive-hero {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Pull the custom archive hero tight to the header */
body.post-type-archive-capstone_project .cpb-projects-archive,
body:has(.cpb-projects-archive) .cpb-projects-archive {
  margin-top: 0 !important;
}