/* Only the page containing [hollandinspecties_homepage] gets this adapter.
   Divi and WordPress still render their normal hooks and page content.
   All original pages, forms and Theme Builder assignments remain in place. */

/* The homepage supplies its own header and footer. */
body.hi-premium-homepage #top-header,
body.hi-premium-homepage #main-header,
body.hi-premium-homepage #main-footer,
body.hi-premium-homepage .et-l--header,
body.hi-premium-homepage .et-l--footer {
    display: none !important;
}

/* Remove only the theme's outer canvas spacing and sidebar. */
body.hi-premium-homepage #page-container,
body.hi-premium-homepage #et-boc,
body.hi-premium-homepage #et-main-area,
body.hi-premium-homepage #main-content,
body.hi-premium-homepage #main-content > article,
body.hi-premium-homepage #main-content > article > .entry-content,
body.hi-premium-homepage #main-content #left-area > article.page,
body.hi-premium-homepage #main-content #left-area > article.page > .entry-content,
body.hi-premium-homepage #main-content > .container,
body.hi-premium-homepage #content-area,
body.hi-premium-homepage #left-area {
    box-sizing: border-box !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

body.hi-premium-homepage #main-content #sidebar,
body.hi-premium-homepage #main-content > .container::before,
body.hi-premium-homepage #content-area::before {
    display: none !important;
}

/* An optional page title outside our root must not duplicate the hero title. */
body.hi-premium-homepage #main-content > article > .entry-title,
body.hi-premium-homepage #main-content > article > header.entry-header,
body.hi-premium-homepage #main-content #left-area > article.page > .entry-title,
body.hi-premium-homepage #main-content #left-area > article.page > header.entry-header {
    display: none !important;
}

/* Divi may wrap a Code/Text module in sections, rows and columns. Match those
   ancestors, while explicitly excluding every element inside the new design. */
body.hi-premium-homepage #main-content :is(
    .et-l--post,
    .et_builder_inner_content,
    .et_pb_section,
    .et_pb_row,
    .et_pb_column,
    .et_pb_code,
    .et_pb_code_inner,
    .et_pb_text,
    .et_pb_text_inner
):not(#hi-premium-home):not(#hi-premium-home *) {
    box-sizing: border-box !important;
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    transform: none !important;
    animation: none !important;
}

/* Divi's optional back-to-top control would duplicate the new page navigation. */
body.hi-premium-homepage .et_pb_scroll_top {
    display: none !important;
}

/* Keep the new sticky header below WordPress' toolbar during draft previews. */
body.hi-premium-homepage.admin-bar #hi-premium-home .hi-header {
    top: 32px;
}
@media (max-width: 782px) {
    body.hi-premium-homepage.admin-bar #hi-premium-home .hi-header { top: 46px; }
}
@media (max-width: 600px) {
    body.hi-premium-homepage.admin-bar #hi-premium-home .hi-header { top: 0; }
}
