/**
 * Theme layout reset when a page uses [dealerstools_hero_banner].
 * Navigation/header stays visible; page title and content padding are removed.
 */

body.has-dealerstools-hero {
  --dt-header-height: 0px;
  overflow-x: hidden;
}

/* Hide page / entry titles (keep header nav + logo intact). */
body.has-dealerstools-hero .entry-title,
body.has-dealerstools-hero .page-title,
body.has-dealerstools-hero .wp-block-post-title,
body.has-dealerstools-hero .page-header,
body.has-dealerstools-hero .entry-header,
body.has-dealerstools-hero .post-title,
body.has-dealerstools-hero .hentry > header,
body.has-dealerstools-hero .site-main .site-title,
body.has-dealerstools-hero .content-area .site-title,
body.has-dealerstools-hero .entry-content .site-title,
body.has-dealerstools-hero article .site-title,
body.has-dealerstools-hero .wp-block-group.alignfull + .entry-header,
body.has-dealerstools-hero .ast-archive-description,
body.has-dealerstools-hero .ast-single-entry-banner,
body.has-dealerstools-hero .ast-page-title-wrap,
body.has-dealerstools-hero .ast-title-bar-wrap,
body.has-dealerstools-hero .ast-breadcrumbs-wrapper,
body.has-dealerstools-hero h1.entry-title,
body.has-dealerstools-hero .elementor-widget-theme-post-title {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

/* Remove default theme content spacing above hero. */
body.has-dealerstools-hero .site-main,
body.has-dealerstools-hero .content-area,
body.has-dealerstools-hero #content,
body.has-dealerstools-hero .site-content,
body.has-dealerstools-hero article,
body.has-dealerstools-hero .entry-content,
body.has-dealerstools-hero .page-content,
body.has-dealerstools-hero .ast-separate-container .site-content,
body.has-dealerstools-hero .ast-separate-container .ast-article-single,
body.has-dealerstools-hero .ast-separate-container .ast-article-post,
body.has-dealerstools-hero #primary,
body.has-dealerstools-hero #main,
body.has-dealerstools-hero .container,
body.has-dealerstools-hero .wrap,
body.has-dealerstools-hero .wp-block-group.alignwide,
body.has-dealerstools-hero .wp-block-group.alignfull {
  margin: 0 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  padding-top: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

body.has-dealerstools-hero .site-main > article,
body.has-dealerstools-hero .content-area > article,
body.has-dealerstools-hero #primary > article {
  margin: 0 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  padding-top: 0 !important;
}

/* Hide default page content block above hero (title + empty paragraphs). */
body.has-dealerstools-hero .entry-content > *:not(#dealerstools-hero-banner):not(.dt-ai-hero-banner-root) {
  display: none !important;
}

body.has-dealerstools-hero .entry-content > #dealerstools-hero-banner,
body.has-dealerstools-hero .entry-content > .dt-ai-hero-banner-root {
  display: block !important;
}

/* Full-width hero — flush under navigation. */
body.has-dealerstools-hero #dealerstools-hero-banner,
body.has-dealerstools-hero .dt-ai-hero-banner-root {
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 !important;
  margin-top: 0 !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: 0 !important;
  padding-top: 0 !important;
  min-height: calc(100vh - var(--dt-header-height, 0px)) !important;
  position: relative;
  z-index: 1;
}

body.has-dealerstools-hero .hero-banner,
body.has-dealerstools-hero #dealerstools-hero-banner .hero-banner {
  min-height: calc(100vh - var(--dt-header-height, 0px));
  width: 100%;
  max-width: none;
  margin: 0 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  padding-top: 0 !important;
  border: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body.has-dealerstools-hero #dealerstools-hero-banner .dt-hb-bg {
  width: 100%;
  height: 100%;
  background-size: var(--dt-hb-bg-size, cover);
  background-position: var(--dt-hb-bg-position, center center);
  background-repeat: no-repeat;
}

body.has-dealerstools-hero #dealerstools-hero-banner .dt-hb-bg::after {
  background: var(--dt-hb-overlay-color, #0f172a);
  opacity: var(--dt-hb-overlay-opacity, 0.2);
}
