:root {
    /* Header Dimensions */
    --header-height-desktop: 140px;
    --header-height-mobile: 60px;
    --header-topbar-height: 35px;
    --body-width: 80%;
    --body-max-width: 1080px;
    
    /* Logo */
    --logo-width-desktop: 260px;
    --logo-width-mobile: 200px;
    --logo-height: 87%;
    
    /* Menu Spacing */
    --menu-gap: 18px;
    --menu-item-gap: 5px;
    
    /* Mobile Menu */
    --mobile-menu-width: 340px;
    --mobile-menu-move: -280px;
    
    /* Menu Font Sizes */
    --menu-font-size-upper: 17px;
    --menu-font-size-lower: 15px;
    --menu-font-weight-upper: 800;
    --menu-font-weight-lower: 600;
    
    /* Submenu */
    --submenu-padding: 15px 8px;
    --submenu-gap: 9px;
    --submenu-border-radius: 4px;
    --btn-border-radius: 2px;
    
    /* Transitions */
    --menu-transition: all 500ms cubic-bezier(0.000, 0.930, 0.245, 1.020);
}

/* ============================================
   BUTTONS
   ============================================ */

li.header_primary > a,
li.cm_btn > a {
    padding: var(--btn-padding) !important;
    font: 900 var(--btn-font-size) var(--font) !important;
    display: inline-block !important;
    margin-right: var(--btn-margin-right) !important;
    border-radius: var(--btn-border-radius) !important;
    background-color: var(--secondary) !important;
    color: white !important;
}

/* ============================================
   HEADER STRUCTURE
   ============================================ */

.cm_header_desktop_spacer,
.cm_header_wrapper {
    width: 100%;
    height: var(--header-height-desktop);
}

.cm_header_desktop_spacer {
    display: block;
    background-color: white;
}

.cm_header_wrapper {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999999999999999999 !important;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
}

.cm_desktop,
.cm_desktop > * {
    box-sizing: border-box;
}

.cm_desktop {
    width: var(--body-width);
    max-width: var(--body-max-width);
    display: grid;
    grid-template-columns: var(--logo-width-desktop) 1fr;
    grid-gap: var(--menu-item-gap);
    height: calc(100% - var(--header-topbar-height));
}

/* ============================================
   TOPBAR
   ============================================ */

.cm_desktop.stok_header_topbar {
    padding: 4px 0;
    background-color: var(--primary);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    position: relative;
    height: var(--header-topbar-height);
}

.cm_desktop.stok_header_topbar::before,
.cm_desktop.stok_header_topbar::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    background-color: var(--primary);
}

.cm_desktop.stok_header_topbar::before { right: -100%; }
.cm_desktop.stok_header_topbar::after { left: -100%; }

.cm_desktop.stok_header_topbar > span {
    display: flex;
    gap: var(--menu-item-gap);
    align-items: center;
}

.cm_desktop.stok_header_topbar > span > a {
    color: white;
    font: var(--menu-font-weight-upper) 13px var(--font);
}

/* ============================================
   LOGO
   ============================================ */

.cm_logo {
    display: flex;
    align-items: center;
    height: 100%;
    cursor : pointer;
}

.cm_logo img {
    height: var(--logo-height);
    object-fit: contain;
}

/* ============================================
   MENU STRUCTURE
   ============================================ */

div.cm_header_upper > div,
div.cm_header_lower > div {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    position: relative;
}

div.cm_header_upper > div > ul,
div.cm_header_lower > div > ul {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    margin: 0;
    height: 100%;
    width: 100%;
    gap: var(--menu-gap);
    list-style-type: none;
}

div.cm_header_upper > div > ul > li,
div.cm_header_lower > div > ul > li {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    height: 100%;
    /* line-height: 1em; */
}

div.cm_header_upper > div > ul > li > a,
div.cm_header_lower > div > ul > li > a {
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font);
    font-size: var(--menu-font-size-upper);
    font-weight: var(--menu-font-weight-upper);
    padding: 0;
    margin: 0;
}

div.cm_header_upper > div > ul > li > a {
    font-weight: var(--menu-font-weight-upper);
    font-size: var(--menu-font-size-upper);
    color: var(--accent);
}

/* Current Menu Item */
li.header_primary.menu-item.current-menu-item > a { color: white !important; }
.header_primary.current-menu-item > a { color: var(--primary) !important; }

.current-page-ancestor > a,
.current-menu-item > a {
    color: var(--secondary)!important;
}

/* ============================================
   SUBMENU
   ============================================ */

ul.sub-menu {
    position: absolute;
    display: none;
    list-style: none !important;
    padding: var(--submenu-padding) !important;
    background-color: white;
    flex-direction: column;
    gap: var(--submenu-gap);
    border-radius: var(--submenu-border-radius);
    box-shadow: rgba(17, 17, 26, 0.05) 0px 4px 16px, rgba(17, 17, 26, 0.05) 0px 8px 32px;
}

.menu-item:hover > ul.sub-menu {display: flex;top: 74px;background-color: var(--primary-darker);}

ul.sub-menu > li {
    border-bottom: 2px solid #d1d1d12b;
    padding: 0px 10px;
    padding-bottom: 11px;
}

ul.sub-menu > li:last-child { border-bottom: none; }
ul.sub-menu > li > a {padding-left: 12px;color: white;font-weight: 600;}

/* ============================================
   MOBILE MENU
   ============================================ */

.cm_mobile { display: none; }

.cm_mobile_menu,
.cm_mobile_hitarea {
    position: fixed;
    z-index: 999999999999999999999;
    height: 100vh;
    top: 0;
}

.cm_mobile_menu {
    width: var(--mobile-menu-width);
    background-color: var(--primary);
    right: 0;
    transform: translateX(var(--mobile-menu-width));
    transition: var(--menu-transition);
    padding: 20px;
}

.cm_mobile_menu::before,
.cm_mobile_menu::after {
    content: "";
    position: absolute;
    z-index: -1;
    background-repeat: no-repeat;
}

.cm_mobile_menu::before {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: url('/wp-content/uploads/2025/12/costmanagement-logo.svg');;
    background-size: 200px;
    background-repeat: repeat;
    background-position: center;
    opacity: 0.1;
    filter: saturate(0) brightness(0.4);
}

.cm_mobile_menu::after {
    right: -150px;
    bottom: -110px;
    width: 400px;
    height: 400px;
    background-image: url();
    background-size: contain;
    opacity: 0.2;
}

.cm_mobile_menu_open,
.cm_move_page { transform: translateX(0); }

.cm_mobile_menu > .menu-primary-container { padding: 30px; }

.cm_mobile_menu > .menu-primary-container > ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style-type: none;
}

.cm_mobile_menu > .menu-primary-container > ul > li > a {
    color: white !important;
    font: 800 27px var(--font);
    text-decoration: none;
}

.cm_mobile_menu > .cm_lang_switcher {
    position: absolute;
    bottom: 20px;
    left: 20px;
}

.cm_mobile_menu > .cm_lang_switcher > div.cm_lang {
    display: flex;
    gap: 10px;
}

.cm_mobile_menu > .cm_lang_switcher > div.cm_lang > a > img { width: 40px; }

.cm_mobile_hitarea {
    display: none;
    left: 0;
    width: calc(100% - var(--mobile-menu-width));
    opacity: 0;
    background-color: transparent;
    transition: var(--menu-transition);
}

/* ============================================
   LANGUAGE SWITCHER & SECONDARY MENU
   ============================================ */

.cm_lang > img { height: 17px; }

.cm_lang_switcher {
    display: grid;
    grid-template-columns: auto auto;
    grid-gap: var(--menu-item-gap);
}

.cm_secondary_menu > .menu-cm-secondary-container {
    padding: 0;
    margin: 0;
    width: 100%;
}

.cm_secondary_menu > .menu-cm-secondary-container > ul {
    display: flex;
    align-items: center;
    gap: var(--menu-gap);
    padding: 0;
    margin: 0;
    list-style-type: none;
}

.cm_secondary_menu > .menu-cm-secondary-container > ul > li {
    padding: 0;
    margin: 0;
}

.cm_secondary_menu > .menu-cm-secondary-container > ul > li > a {
    color: white;
    text-decoration: none;
    font: var(--menu-font-weight-lower) var(--menu-font-size-lower) var(--font);
    padding: 0;
    margin: 0;
}

/* ============================================
   ASSORTMENT GRID
   ============================================ */

.cm_assortiment_items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
    padding: 0 !important;
    list-style: none;
}

.cm_assortiment_item {
    background-color: #F5F5F5;
    border-radius: 3px;
    position: relative;
    padding-bottom: 100%;
}

.cm_assortiment_item > img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%, -50%) scale(0.8);
}

img.stok_assortiment_image_placement_align-right {
    left: unset;
    right: 0;
    width: calc(100% - 20px);
    transform: translateY(-50%);
}

li.cm_assortiment_item > h4 {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 19px;
    font: var(--menu-font-weight-lower) var(--btn-font-size) var(--font);
    color: var(--primary);
}
li.cm_btn > a{
    background-color: var(--secondary) !important;
    color: white !important;
    padding: 8px 12px !important;
    font: 700 16px var(--font) !important;
    border-radius: var(--btn-border-radius) !important;
}
li.cm_btn > a:hover {
    background-color: var(--secondary-dark) !important;
    color: white !important;
}

/* ============================================
   VIDEO OVERLAY & MISC
   ============================================ */

.cm_header_video_overlay {
    position: absolute;
    width: 50%;
    height: 100%;
    right: 0;
    top: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.cm_header_video_overlay > video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


#page-container {
    width: 100vw !important;
    overflow: hidden !important;
}
.cm_desktop.stok_header_topbar > span {
    padding: 0;
    background-color: var(--primary);
    display: flex;
}

.cm_desktop.stok_header_topbar > span > #menu-cm-secondary {
    display: flex;
    gap: var(--menu-g dap);
    list-style: none;
    padding: 0;
    margin: 0;
}

.cm_desktop.stok_header_topbar > span > #menu-cm-secondary > li {
    display: flex;
    align-items: center;
}

.cm_desktop.stok_header_topbar > span > #menu-cm-secondary > li > a {
    color: white!important;
    text-decoration: none;
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

@media screen and (max-width: 920px) {
    .cm_desktop { grid-template-columns: var(--logo-width-mobile) 1fr; }
}

@media screen and (max-width: 900px) {
    .cm_logo img {height: calc(100% - 0px);}
    
    .stok_header_topbar,
    .cm_desktop { display: none !important; }
    
    .cm_header_desktop_spacer,
    .cm_header_wrapper { height: var(--header-height-mobile); }
    
    .cm_mobile {
        display: flex !important;
        width: var(--body-width) !important;
        height: 100% !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .cm_mobile > * {
        height: 100%;
        display: flex;
        align-items: center;
    }
    
    .cm_mobile_header {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 10px;
    }
    
    .cm_mobile > .cm_logo { padding: 10px 0; }
    /*.cm_move_page { transform: translateX(var(--mobile-menu-move)); }*/
    .cm_ease_page { transition: var(--menu-transition); }
    
    .cm_mobile_hitarea {
        width: calc(100% - var(--mobile-menu-width));
    }
    
    .cm_mobile_hitarea.cm_mobile_hitarea_open {
        display: block;
        opacity: 0.6;
        background-color: black;
    }
    
    .cm_slider_controlls { display: none !important; }
    
    .cm_header_wrapper.cm_header_scroll > .cm_mobile_header > .cm_mobile_btn {
        background-color: #fbba00;
        height: 37px;
        width: 37px;
        border-radius: var(--btn-border-radius);
    }
}

@media screen and (max-width: 768px) {
    .cm_assortiment_items { grid-template-columns: repeat(2, 1fr); }
    
    .cm_header_video_overlay {
        left: 0;
        width: 100%;
        height: 330px;
    }
    
    .et_pb_section.cm_header_video { padding-top: 350px; }
    
    ul.cm_diensten_items.cm_inkoop_items > li > a {
        grid-template-columns: 1fr;
        grid-template-rows: 250px 1fr;
    }
}

@media screen and (max-width: 380px) {
    .cm_assortiment_items { grid-template-columns: 1fr; }
}

.cm_hero_wrapper.cm_hero_no_image > div.cm_hero_content_wrapper {
    padding-right: 10%;
}




/* Mobile Menu Container */
.menu-cm-mobile-container #menu-cm-mobile.menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style-type: none;
}

.menu-cm-mobile-container #menu-cm-mobile.menu > li {
    padding: 0;
    margin: 0;
}

.menu-cm-mobile-container #menu-cm-mobile.menu > li > a {
    color: white;
    font: 800 27px var(--font);
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.menu-cm-mobile-container #menu-cm-mobile.menu > li > a:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

.menu-cm-mobile-container #menu-cm-mobile.menu > li > a:active {
    color: var(--accent);
}

.menu-cm-mobile-container #menu-cm-mobile.menu > li > a:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 4px;
}

.menu-cm-mobile-container #menu-cm-mobile.menu > li.current-menu-item > a {
    color: var(--secondary);
    font-weight: 900;
}

.menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    margin-left: 3px;
    width: 15px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cpath%20fill%3D%22%23243151%22%20d%3D%22M15.0857864%2C12.5%20L6.79289322%2C20.7928932%20C6.40236893%2C21.1834175%206.40236893%2C21.8165825%206.79289322%2C22.2071068%20C7.18341751%2C22.5976311%207.81658249%2C22.5976311%208.20710678%2C22.2071068%20L17.2071068%2C13.2071068%20C17.5976311%2C12.8165825%2017.5976311%2C12.1834175%2017.2071068%2C11.7928932%20L8.20710678%2C2.79289322%20C7.81658249%2C2.40236893%207.18341751%2C2.40236893%206.79289322%2C2.79289322%20C6.40236893%2C3.18341751%206.40236893%2C3.81658249%206.79289322%2C4.20710678%20L15.0857864%2C12.5%20Z%22%20transform%3D%22rotate(90%2012%2012.5)%22%2F%3E%0A%3C%2Fsvg%3E%0A');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translateY(4px);
}