/* Header: logo left, links + search together on the right */
.et-l--header .et_pb_column_0_tb_header {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;

}

/* So column flex sees logo and nav as separate items; logo stays left, nav+search group right */
.et-l--header .et_pb_menu_0_tb_header,
.et-l--header .et_pb_menu_0_tb_header .et_pb_menu_inner_container {
    display: contents;
}

.et-l--header .et_pb_menu__logo-wrap {
    order: 1;
    margin-right: auto;
}

.et-l--header .et_pb_menu__wrap,
.et-l--header .et_pb_code_0_tb_header {
    order: 2;
}

/* Header search: icon trigger (desktop) – form is moved to overlay by JS */
.et-l--header .et_pb_code_0_tb_header {
    margin-left: 0.75rem;
    margin-top: 0.45em;
    width: fit-content;
    min-width: 44px;
    flex: 0 0 auto;
    padding-right: 0;
}

.et-l--header .et_pb_code_0_tb_header .et_pb_code_inner {
    display: inline-flex;
    align-items: center;
    width: auto;
    min-width: 44px;
    padding-right: 0;
}

/* Desktop: show trigger; hide code inner form (form moved to overlay) */
.et-l--header .et_pb_code_inner form.searchwp-form {
    display: none !important;
}

.et-l--header .mantena-search-trigger--desktop {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 19px;
    padding: 0.35em;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.et-l--header .mantena-search-trigger--desktop svg {
    width: 18px;
    height: 18px;
}

/* Desktop: align search trigger with menu wrap (same 2px shift) */
@media (min-width: 981px) {
    .et-l--header .et_pb_code_0_tb_header {
        transform: translateY(2px);
    }
}

/* Under 1430px: hide desktop code column (mobile uses trigger in menu wrap) */
@media (max-width: 1429px) {
    .et-l--header .et_pb_code_0_tb_header {
        display: none !important;
    }
}

/* Mobile: search trigger left of hamburger (added by JS inside .et_pb_menu__wrap) */
.et-l--header .et_pb_menu__wrap .mantena-search-trigger--mobile {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.4em;
    margin-right: 4px;
    border: none;
    background: transparent;
    color: #1a1a1a;
    cursor: pointer;
}

.et-l--header .et_pb_menu__wrap .mantena-search-trigger--mobile svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 1429px) {
    .et-l--header .et_pb_menu__wrap {
        display: flex;
        align-items: center;
    }
    .et-l--header .et_pb_menu__wrap .mantena-search-trigger--mobile {
        display: inline-flex;
        align-self: center;
    }
}

@media (min-width: 1430px) {
    .et-l--header .et_pb_menu__wrap .mantena-search-trigger--mobile {
        display: none !important;
    }
}

.et-l--header .et_mobile_nav_menu {
    order: 3;
}

/* Search no longer prepended to menu; overlay used instead */

/* Input: no background icon; padding so text doesn't go under the submit icon */
form.searchwp-form .searchwp-form-input-container .swp-input--search,
.et-l--header .searchwp-form-input-container .swp-input--search {
    background-color: transparent;
    background-image: none !important;
    color: black;
    padding-right: 1.65em;
    font-family: "Open Sans", sans-serif;
    font-size: var(--gvid-bwri1kh4f4);
}

/* Header: more space below text so border-bottom sits further down */
.et-l--header .searchwp-form-input-container .swp-input--search {
    padding-bottom: 0.4em;
}

/* Header: clear (x) button – black, bolder, less default; 2px lower */
.et-l--header .searchwp-form-input-container .swp-input--search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: 2px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M2 2l10 10M12 2L2 12' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    cursor: pointer;
}

/* Input container: relative so the submit button can sit inside on the right */
form.searchwp-form .searchwp-form-input-container,
.et-l--header .searchwp-form-input-container {
    position: relative;
}

/* Header: limit search input length (fixed max so no empty space to the right) */
.et-l--header .searchwp-form-input-container {
   width: 5rem;
    flex-grow: 0;
}

/* Header: form row and col must not grow – removes empty space to the right (purple) */
.et-l--header form.searchwp-form .swp-flex--col {
    flex-grow: 0;
    width: fit-content;
}

.et-l--header form.searchwp-form .swp-flex--row {
    flex-grow: 0;
    width: fit-content;
}

.swp-button {
    cursor: pointer;
    font-weight: 600;
    font-family: "Open Sans", sans-serif;
}

/* SearchWP submit icon inside the input (right side) */
form.searchwp-form .swp-button--icon {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #000;
    cursor: pointer;
}

form.searchwp-form .swp-button--icon svg {
    width: 18px;
    height: 18px;
}

/* Search results page: no side padding on blog posts (beat Divi dynamic late CSS) */
body.search-results #et-boc .et_pb_blog_grid .et_pb_post,
body.search-results #et-boc .et_pb_blog_grid_wrapper .et_pb_post {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.search-results #et-boc .et_pb_blog_grid .et_pb_post .et_pb_image_container,
body.search-results #et-boc .et_pb_blog_grid_wrapper .et_pb_post .et_pb_image_container {
    padding-left: 19px;
    padding-right: 19px;
}

/* Search results: title before date */
body.search-results #et-boc .et_pb_blog_grid .et_pb_post,
body.search-results #et-boc .et_pb_blog_grid_wrapper .et_pb_post {
    display: flex;
    flex-direction: column;
}
body.search-results #et-boc .et_pb_blog_grid .et_pb_post .et_pb_image_container,
body.search-results #et-boc .et_pb_blog_grid_wrapper .et_pb_post .et_pb_image_container { order: 1; }
body.search-results #et-boc .et_pb_blog_grid .et_pb_post .entry-title,
body.search-results #et-boc .et_pb_blog_grid_wrapper .et_pb_post .entry-title { order: 2; }
body.search-results #et-boc .et_pb_blog_grid .et_pb_post .post-meta,
body.search-results #et-boc .et_pb_blog_grid_wrapper .et_pb_post .post-meta { order: 3; }
body.search-results #et-boc .et_pb_blog_grid .et_pb_post .post-content,
body.search-results #et-boc .et_pb_blog_grid_wrapper .et_pb_post .post-content { order: 4; }

/* Search results: "Les hele saken" arrow (same as blog more-link) */
body.search-results #et-boc .et_pb_blog_grid .et_pb_post a.more-link,
body.search-results #et-boc .et_pb_blog_grid_wrapper .et_pb_post a.more-link {
    display: flex;
    align-items: center;
    margin-top: 16px;
    transition-duration: .2s;
}
body.search-results #et-boc .et_pb_blog_grid .et_pb_post a.more-link::after,
body.search-results #et-boc .et_pb_blog_grid_wrapper .et_pb_post a.more-link::after {
    content: '$';
    font-family: ETmodules !important;
    margin-left: 10px;
    font-size: 1.6em !important;
    margin-top: 5px !important;
    transition-duration: .2s;
}
body.search-results #et-boc .et_pb_blog_grid .et_pb_post:hover a.more-link::after,
body.search-results #et-boc .et_pb_blog_grid_wrapper .et_pb_post:hover a.more-link::after {
    margin-left: 16px;
    transition-duration: .2s;
}

/* ========== Search results page: form tweaks (with or without results) ========== */
/* Scoped to #searchwp-form-2 so styles apply on no-results page too */

/* Push the line under the search input 5px lower; remove left padding */
#searchwp-form-2 .searchwp-form-input-container .swp-input--search {
    padding-bottom: 5px;
    padding-left: 0;
}

/* Hide popular searches */
#searchwp-form-2 .searchwp-form-quick-search {
    display: none !important;
}

/* Hide advanced search toggle; show filters next to search input */
#searchwp-form-2 .swp-toggle {
    display: none !important;
}

#searchwp-form-2 .swp-flex--col {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

#searchwp-form-2 .searchwp-form-advanced-filters {
    display: flex !important;
}

/* Post type as buttons: hide native select, style button group */
#searchwp-form-2 .searchwp-form-advanced-filters .swp-select[name="swp_post_type_limiter"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#searchwp-form-2 .swp-post-type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

#searchwp-form-2 .swp-post-type-buttons .swp-post-type-btn {
    padding: 0.4em 0.75em;
    border: 1px solid currentColor;
    border-radius: 0;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

#searchwp-form-2 .swp-post-type-buttons .swp-post-type-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

#searchwp-form-2 .swp-post-type-buttons .swp-post-type-btn.is-active {
    background: #2f7591;
    color: #fff;
    border-color: #2f7591;
}

/* Hide date on page results (only posts show date) */
body.search-results .et_pb_blog_grid .et_pb_post.type-page .post-meta,
body.search-results .et_pb_blog_grid_wrapper .et_pb_post.type-page .post-meta {
    display: none;
}

/* Fallback for template/viewport variants: hide date on page-type results */
body.search-results .et_pb_post.type-page .post-meta,
body.search-no-results .et_pb_post.type-page .post-meta {
    display: none !important;
}

/* ========== Search overlay (desktop + mobile) ========== */
/* When overlay is open: block interaction with page (scrollbar stays visible, no layout shift) */
body.mantena-search-overlay-open {
    pointer-events: none;
}
body.mantena-search-overlay-open .mantena-search-overlay {
    pointer-events: auto;
}

.mantena-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem;
    padding-top: 7.5rem; /* 1–2 rem under header */
    box-sizing: border-box;
}

.mantena-search-overlay[hidden] {
    display: none !important;
}

.mantena-search-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.mantena-search-overlay__panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.mantena-search-overlay__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mantena-search-overlay__close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.mantena-search-overlay__close svg {
    width: 24px;
    height: 24px;
}

.mantena-search-overlay__inner {
    padding-right: 2.5rem;
}

.mantena-search-overlay__inner .searchwp-form-input-container {
    position: relative;
    width: 100%;
}

.mantena-search-overlay__inner .swp-input--search {
    width: 100%;
    max-width: none;
    padding: 1rem 3rem 1rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    background: #f0f8ff;
    color: #333;
}

.mantena-search-overlay__inner .swp-input--search::placeholder {
    color: #666;
}

/* Overlay: clear (x) button – black */
.mantena-search-overlay__inner .swp-input--search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: 2px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M2 2l10 10M12 2L2 12' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    cursor: pointer;
}

.mantena-search-overlay__inner .swp-button--icon {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3rem;
    color: #2f7591;
}

.mantena-search-overlay__inner .swp-button--icon svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 782px) {
    .mantena-search-overlay {
        padding-top: 8rem;
    }
}

@media (max-width: 480px) {
    .mantena-search-overlay {
        padding: 1rem;
        padding-top: 7rem;
    }
    .mantena-search-overlay__panel {
        padding: 1.5rem;
    }
}

body.search-results .et_pb_column_0_tb_header,
body.search-no-results .et_pb_column_0_tb_header{
    width:100%;
}

body.search-results .et_pb_row_1_tb_footer,
body.search-no-results .et_pb_row_1_tb_footer{
    display:flex;
    flex-direction: row;
    justify-content: space-between;
}

@media (max-width: 767px) {
    body.search-results .et_pb_post,
    body.search-no-results .et_pb_post{
        width:100%
    }
}

