/* ==========================================================================
   Site header [des_header]
   Reuses .btn / .btn-green / .btn-orange from locations/style.css

   This file loads on every front-end page, so the :root tokens below are the
   single source for brand colours and fonts (location page, tarieven, child style.css).
   ========================================================================== */

:root {
    --des-green: #80bc00;
    --des-green-h: #6fa300;
    --des-tint: #f4f8ed;
    --des-tint-h: #e8f1d6;
    --des-orange: #ff671d;
    --des-orange-h: #ec5609;
    --des-yellow: #faba53;
    --des-purple: #622181;
    --des-ink: #1a171c;
    --des-muted: #6b686e;
    --des-line: #ecece8;
    --des-border: rgba(26, 23, 28, .06);
    --des-shadow: 0 4px 18px rgba(26, 23, 28, .05);
    --des-shadow-strong: 0 10px 30px rgba(26, 23, 28, .12);
    --des-head: var(--et_global_heading_font, Fredoka), Fredoka, sans-serif;
    --des-body: var(--et_global_body_font, Poppins), Poppins, sans-serif;
    --des-ease: .3s ease;

    /* Area around the pill at the top of the page. Set to transparent or #fff per page if needed. */
    --des-wrap-bg: #f4f8ed;

    --des-topbar-h: 36px;
    --des-admin: 0px;
}

body.admin-bar {
    --des-admin: 32px;
}

@media (max-width: 782px) {
    body.admin-bar {
        --des-admin: 46px;
    }
}

@media (max-width: 600px) {
    body.admin-bar {
        --des-admin: 0px; /* admin bar scrolls away on small screens */
    }
}

@media (max-width: 1023px) {
    :root {
        --des-topbar-h: 30px;
    }
}

/* --------------------------------------------------------------------------
   Divi Theme Builder wrapper: make the header sticky, strip section padding
   -------------------------------------------------------------------------- */

/* Sticky is set on the outermost wrapper, so it can stick for the whole page.
   The top bar scrolls away naturally (negative top), so nothing below jumps. */
.et-l--header:has(.des-header.is-sticky),
.des-header.is-sticky {
    position: sticky;
    top: calc(var(--des-admin) - var(--des-topbar-h));
    z-index: 1000;
}

/* An overflow on an ancestor breaks sticky. clip keeps the horizontal guard. */
body:has(.des-header.is-sticky) #page-container,
body:has(.des-header.is-sticky) #et-boc {
    overflow-x: clip !important;
    overflow-y: visible !important;
}

body:has(.des-header) #page-container {
    padding-top: 0 !important;
}

.et-l--header .et_pb_section:has(.des-header),
.et-l--header .et_pb_row:has(.des-header),
.et-l--header .et_pb_column:has(.des-header),
.et-l--header .et_pb_module:has(.des-header) {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

.des-header,
.des-drawer {
    font-family: var(--des-body);
    color: var(--des-ink);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

.des-header *,
.des-header *::before,
.des-header *::after,
.des-drawer *,
.des-drawer *::before,
.des-drawer *::after {
    box-sizing: border-box;
}

/* !important: Divi styles lists in Theme Builder modules with ID selectors */
/* :not(#des-x):not(#des-y) adds ID weight, so this also beats Divi's #et-boc / #page-container rules */
.des-header :is(ul, ol, li):not(#des-x):not(#des-y),
.des-drawer :is(ul, ol, li):not(#des-x):not(#des-y) {
    list-style: none !important;
    background-image: none;
}

.des-header li:not(#des-x):not(#des-y)::marker,
.des-drawer li:not(#des-x):not(#des-y)::marker {
    content: none !important;
}

/* Spacing reset: low weight, so the component rules below still apply */
.des-header :where(ul, ol, li),
.des-drawer :where(ul, ol, li) {
    margin: 0 !important;
    padding: 0 !important;
}

.des-header :where(a),
.des-drawer :where(a) {
    color: inherit;
    text-decoration: none;
}

.des-header [hidden],
.des-drawer[hidden],
.des-drawer [hidden] {
    display: none !important;
}

.des-header :focus-visible,
.des-drawer :focus-visible,
.des-skip:focus-visible {
    outline: 2px solid var(--des-green);
    outline-offset: 2px;
}

.des-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.des-icon {
    display: block;
    flex: 0 0 auto;
}

.des-skip {
    position: fixed;
    top: -100px;
    left: 12px;
    z-index: 100001;
    background: #fff;
    color: var(--des-green);
    font-family: var(--des-body);
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 999px;
    box-shadow: var(--des-shadow-strong);
    text-decoration: none;
}

.des-skip:focus {
    top: calc(var(--des-admin) + 12px);
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.des-topbar {
    background: var(--des-green);
    height: var(--des-topbar-h);
    overflow: hidden;
}

.des-topbar-inner {
    box-sizing: content-box !important;
    max-width: 1320px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.des-topbar a {
    color: #fff;
    font-size: 13px;
    line-height: 1;
}

.des-topbar a:hover {
    text-decoration: underline;
}

.des-topbar-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.des-topbar-nav {
    margin-left: auto;
}

.des-topbar-list {
    display: flex;
    gap: 28px;
}

.des-topbar :focus-visible {
    outline-color: #fff;
}

/* --------------------------------------------------------------------------
   Bar
   -------------------------------------------------------------------------- */

.des-barwrap {
    /* Fixed height: the bar shrinks inside it, so the page never jumps */
    height: 114px;
    padding: 18px 40px 0;
    pointer-events: none;
    transition: padding var(--des-ease), background-color var(--des-ease);
    margin-bottom: -114px;
}

.des-bar {
    pointer-events: auto;
    position: relative;
    max-width: 1320px;
    height: 78px;
    margin: 0 auto;
    padding: 0 12px 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--des-border);
    border-radius: 999px;
    box-shadow: var(--des-shadow);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: all var(--des-ease);
}

.des-logo {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
}

.des-logo img {
    display: block;
    height: 56px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
    transition: height var(--des-ease);
}

/* Nav */
.des-nav {
    margin: 0 auto;
    --des-sub-gap: 31px;
}

.des-nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
}

.des-item {
    position: relative;
}

.des-pill {
    display: flex;
    align-items: center;
    border-radius: 999px;
    transition: background-color .2s ease, color .2s ease;
}

/* Menu items: Poppins 400 (buttons are Fredoka, see .des-btn) */
.des-nav .des-item--d0 > .des-pill {
    font-family: var(--des-body);
    font-weight: 400;
    font-size: 15.5px;
    line-height: 1.2;
}

.des-nav .des-item--d0 > .des-pill:hover,
.des-nav .des-item--d0.is-current > .des-pill,
.des-nav .des-item--d0.is-open > .des-pill {
    background: var(--des-tint);
    color: var(--des-green);
}

.des-link {
    display: block;
    padding: 10px 16px;
    white-space: nowrap;
}

/* Home item as a house icon: green by default, same hover as the other items */
.des-nav .des-item--home > .des-pill {
    color: var(--des-green);
}

.des-nav .des-item--home .des-link {
    display: flex;
    align-items: center;
    padding: 9px 12px;
}

@media (max-width: 1240px) and (min-width: 1024px) {
    .des-nav .des-item--home .des-link {
        padding: 9px 10px;
    }
}

.des-nav .has-sub > .des-pill > .des-link {
    padding-right: 4px;
}

.des-sub-toggle {
    display: flex;
    align-items: center;
    align-self: stretch;
    padding: 0 14px 0 4px;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border-radius: 0 999px 999px 0;
}

.des-sub-toggle .des-icon {
    transition: transform .2s ease;
}

.is-open > .des-pill > .des-sub-toggle .des-icon {
    transform: rotate(180deg);
}

/* Dropdown */
.des-nav .des-sub {
    position: absolute;
    top: calc(100% + var(--des-sub-gap));
    left: 0;
    z-index: 10;
    min-width: 260px;
    padding: 12px !important;
    background: #fff;
    border: 1px solid var(--des-border);
    border-radius: 20px;
    box-shadow: var(--des-shadow-strong);
    display: none;
}

/* Hover bridge between the pill and the panel */
.des-nav .des-sub::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: var(--des-sub-gap);
}

.des-nav .is-open > .des-sub {
    display: block;
}

/* Without JS: plain hover / focus */
.des-header:not(.des-js) .des-nav .has-sub:hover > .des-sub,
.des-header:not(.des-js) .des-nav .has-sub:focus-within > .des-sub {
    display: block;
}

.des-nav .des-item--d1 > .des-pill {
    border-radius: 12px;
    font-family: var(--des-body);
    font-size: 15px;
}

.des-nav .des-item--d1 .des-link {
    flex: 1;
    padding: 10px 14px;
}

.des-nav .des-item--d1 > .des-pill:hover,
.des-nav .des-item--d1.is-current > .des-pill {
    background: var(--des-tint);
    color: var(--des-green);
}

/* Actions */
.des-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.des-circle {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: var(--des-tint);
    color: var(--des-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--des-ease);
}

.des-circle:hover,
.des-circle[aria-expanded="true"] {
    background: var(--des-tint-h);
}

.des-circle--sm {
    width: 40px;
    height: 40px;
}

/* .btn comes from locations/style.css, sized here for the header. Buttons in Fredoka. */
.des-header .des-btn,
.des-drawer .des-btn {
    height: 52px;
    padding: 0 22px;
    font-family: var(--des-head);
    font-weight: 700;
    font-size: 17px;
    line-height: 1;
    white-space: nowrap;
    color: #fff;
    opacity: 1;
    transform: none;
    transition: all var(--des-ease);
}

.des-header .btn-green:hover,
.des-drawer .btn-green:hover {
    background-color: var(--des-green-h);
    color: #fff;
}

.des-header .btn-orange:hover,
.des-drawer .btn-orange:hover {
    background-color: var(--des-orange-h);
    color: #fff;
}

.des-burger {
    display: none;
}

.des-burger-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.des-burger-lines span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--des-green);
}

.des-burger-lines span:nth-child(2) {
    width: 12px;
    margin-left: 6px;
}

/* --------------------------------------------------------------------------
   Compact (scrolled)
   -------------------------------------------------------------------------- */

.des-header.is-compact .des-barwrap {
    padding-top: 10px;
    background-color: transparent;
}

/* Same width as the full bar, only lower */
.des-header.is-compact .des-bar {
    height: 64px;
    padding: 0 9px 0 24px;
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--des-shadow-strong);
}

.des-header.is-compact .des-logo img {
    height: 44px;
}

.des-header.is-compact .des-nav {
    --des-sub-gap: 24px;
}

.des-header.is-compact .des-circle {
    width: 44px;
    height: 44px;
}

.des-header.is-compact .des-btn {
    height: 44px;
    padding: 0 18px;
}

/* --------------------------------------------------------------------------
   Search panel (desktop) + shared search form
   -------------------------------------------------------------------------- */

.des-search-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--des-border);
    border-radius: 20px;
    box-shadow: var(--des-shadow-strong);
}

.des-search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 18px;
    background: var(--des-tint);
    border-radius: 999px;
}

.des-search-field:focus-within {
    outline: 2px solid var(--des-green);
    outline-offset: 2px;
}

.des-search-icon {
    color: var(--des-green);
}

.des-search input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-family: var(--des-body);
    font-size: 16px; /* 16px stops iOS zooming in */
    color: var(--des-ink);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.des-search input[type="search"]::placeholder {
    color: var(--des-muted);
    opacity: 1;
}

.des-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.des-spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border: 2px solid rgba(128, 188, 0, .25);
    border-top-color: var(--des-green);
    border-radius: 50%;
    opacity: 0;
    transition: opacity .15s ease;
}

.des-search.is-loading .des-spinner {
    opacity: 1;
    animation: des-spin .7s linear infinite;
}

@keyframes des-spin {
    to { transform: rotate(360deg); }
}

.des-results {
    margin-top: 10px;
    max-height: min(60vh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.des-res-group {
    padding: 12px 12px 4px !important;
    font-family: var(--des-body);
    font-weight: 600;
    font-size: 14px;
    color: var(--des-green);
}

.des-res-group:first-child {
    padding-top: 4px !important;
}

.des-res {
    border-radius: 14px;
}

.des-res a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 14px;
    color: var(--des-ink);
}

.des-res[aria-selected="true"] a,
.des-res a:hover {
    background: var(--des-tint);
}

.des-res-thumb {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--des-tint);
    color: var(--des-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.des-res-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.des-res-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.des-res-title {
    font-family: var(--des-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
}

.des-res-meta {
    font-size: 13px;
    line-height: 1.4;
    color: var(--des-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.des-res strong {
    font-weight: 700;
    color: var(--des-green);
}

.des-results-empty {
    padding: 12px;
    font-size: 15px;
    color: var(--des-muted);
}

.des-results-all {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    font-family: var(--des-body);
    font-weight: 600;
    font-size: 15px;
    color: var(--des-green) !important;
}

.des-results-all:hover {
    background: var(--des-tint);
}

/* --------------------------------------------------------------------------
   Drawer (mobile menu)
   -------------------------------------------------------------------------- */

.des-drawer {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.des-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 23, 28, .45);
    opacity: 0;
    transition: opacity var(--des-ease);
}

.des-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 100% - 32px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px 0 0 20px;
    box-shadow: var(--des-shadow-strong);
    transform: translateX(100%);
    transition: transform var(--des-ease);
}

.des-drawer.is-open .des-drawer-overlay {
    opacity: 1;
}

.des-drawer.is-open .des-drawer-panel {
    transform: none;
}

.des-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(var(--des-admin) + 14px) 14px 12px 20px;
}

.des-drawer-logo img {
    display: block;
    height: 34px;
    width: auto;
}

.des-drawer .des-circle {
    width: 44px;
    height: 44px;
}

.des-drawer-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 20px 32px;
}

.des-drawer .des-results {
    max-height: none;
}

/* Accordion menu */
.des-mnav {
    margin-top: 14px;
}

.des-mnav-list > .des-item {
    border-bottom: 1px solid var(--des-line);
}

.des-mnav .des-pill {
    justify-content: space-between;
    min-height: 52px;
}

.des-mnav .des-item--d0 > .des-pill {
    font-family: var(--des-body);
    font-weight: 400;
    font-size: 17px;
}

.des-mnav .des-link {
    flex: 1;
    padding: 12px 4px;
    white-space: normal;
}

.des-mnav .is-current > .des-pill > .des-link {
    color: var(--des-green);
}

.des-mnav .des-sub-toggle {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-self: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    background: var(--des-tint);
    color: var(--des-green);
}

.des-mnav .des-sub-toggle .des-icon {
    width: 13px;
    height: 13px;
}

.des-mnav .des-sub {
    display: none;
    padding: 0 0 12px 8px !important;
}

.des-mnav .is-open > .des-sub {
    display: block;
}

.des-mnav .des-item--d1 .des-pill {
    min-height: 44px;
    border-radius: 12px;
    font-size: 16px;
}

.des-mnav .des-item--d1 .des-link {
    padding: 10px 12px;
}

.des-mnav .des-item--d1 .des-pill:hover {
    background: var(--des-tint);
}

.des-drawer-ctas {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.des-drawer-ctas .des-btn {
    justify-content: space-between;
    padding: 0 14px 0 22px;
}

.des-drawer-quick {
    margin-top: 24px;
    padding: 6px 16px;
    background: var(--des-tint);
    border-radius: 16px;
}

/* Quick links (Ouderportaal, Veelgestelde vragen, ...) stacked, one per row */
.des-drawer-links ul {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.des-drawer-links li {
    margin: 0;
    padding: 0;
}

.des-drawer-links a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.des-drawer-links a:hover {
    color: var(--des-green);
}

.des-drawer-phone {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-weight: 600;
    font-size: 16px;
}

.des-drawer-links + .des-drawer-phone {
    border-top: 1px solid var(--des-tint-h);
}

.des-drawer-phone .des-circle--sm {
    background: #fff;
}

.des-drawer-phone-label {
    display: block;
    font-family: var(--des-body);
    font-weight: 400;
    font-size: 13px;
    color: var(--des-muted);
}

html.des-lock,
html.des-lock body {
    overflow: hidden !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1240px) and (min-width: 1024px) {
    .des-barwrap {
        padding-left: 24px;
        padding-right: 24px;
    }

    .des-bar {
        padding-left: 20px;
    }

    .des-link {
        padding: 10px 11px;
    }

    .des-header .des-btn {
        padding: 0 16px;
    }

    .des-logo img {
        height: 48px;
    }
}

@media (max-width: 1023px) {
    .des-topbar-inner {
        padding: 0 14px;
        justify-content: center;
        gap: 18px;
    }

    /* Mobile top bar: only "Klantcontact 024-..." (tap to call); the quick links are in the drawer */
    .des-topbar-nav {
        display: none;
    }

    .des-topbar-phone {
        font-weight: 500;
    }

    .des-topbar-list {
        gap: 18px;
    }

    .des-topbar a {
        font-size: 11.5px;
    }

    .des-barwrap {
        height: 86px;
        padding: 12px 14px 0;
        margin-bottom: -86px;
    }

    .des-header.is-compact .des-barwrap {
        padding: 8px 10px 0;
    }

    .des-bar,
    .des-header.is-compact .des-bar {
        max-width: none;
        padding: 0 7px 0 18px;
    }

    .des-bar {
        height: 62px;
    }

    .des-header.is-compact .des-bar {
        height: 56px;
    }

    .des-logo img {
        height: 38px;
    }

    .des-header.is-compact .des-logo img {
        height: 32px;
    }

    .des-nav,
    .des-search-toggle,
    .des-cta1,
    .des-search-panel {
        display: none !important;
    }

    .des-actions {
        margin-left: auto;
    }

    .des-header .des-cta2,
    .des-header.is-compact .des-cta2 {
        height: 44px;
        padding: 0 16px;
        font-size: 15px;
    }

    .des-burger,
    .des-header.is-compact .des-burger {
        display: inline-flex;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 360px) {
    .des-header .des-cta2,
    .des-header.is-compact .des-cta2 {
        padding: 0 12px;
        font-size: 14px;
    }

    .des-topbar-list {
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .des-header *,
    .des-drawer * {
        transition: none !important;
        animation-duration: .01ms !important;
    }
}
