/* =========================================================
   CDC Modern Styles - header consistency + responsive fixes
   Makes the home-page header and the inner-page header look and
   fit the same, and stops the logo covering the menu.
   Desktop only (1025px and up). The mobile header (1024px and
   below) is left to the theme + your Additional CSS.
   Remove the "header fixes" checkbox in Appearance > CDC Modern
   Styles to switch this whole file off.
   ========================================================= */

@media (min-width:1025px){

  /* 1. Same full-width layout on every page (home used a boxed grid) */
  body .mkdf-page-header .mkdf-menu-area,
  body .mkdf-page-header .mkdf-sticky-holder{
    padding-left:0!important;padding-right:0!important;
  }
  body .mkdf-page-header .mkdf-menu-area .mkdf-grid,
  body .mkdf-page-header .mkdf-sticky-holder .mkdf-grid{
    width:100%!important;max-width:none!important;
    padding:0!important;margin:0!important;
  }
  body .mkdf-page-header .mkdf-vertical-align-containers{
    box-sizing:border-box;
    width:100%!important;
    max-width:1920px;
    margin-left:auto!important;margin-right:auto!important;
    padding-left:clamp(20px,3.2vw,64px)!important;
    padding-right:clamp(20px,3.2vw,64px)!important;
    gap:clamp(12px,2vw,32px)!important;
  }

  /* 2. Logo scales with the screen, same size in the normal and sticky bars */
  body .mkdf-page-header .mkdf-menu-area .mkdf-logo-wrapper a{
    height:clamp(44px,4.6vw,70px)!important;
  }
  body .mkdf-page-header .mkdf-sticky-header .mkdf-logo-wrapper a{
    height:clamp(40px,3.8vw,56px)!important;
  }
  body .mkdf-page-header .mkdf-position-left{flex:0 0 auto!important;}

  /* 3. Menu text, spacing and letter-spacing shrink smoothly so all 7 items
        always fit beside the logo (no more text hiding behind it) */
  body .mkdf-page-header .mkdf-main-menu > ul > li > a{
    padding-left:clamp(5px,calc(1.3vw - 7px),22px)!important;
    padding-right:clamp(5px,calc(1.3vw - 7px),22px)!important;
  }
  body .mkdf-page-header .mkdf-main-menu > ul > li > a .item_text{
    font-size:clamp(10.5px,calc(.4vw + 6.4px),14px)!important;
    letter-spacing:.05em!important;
    white-space:nowrap;
  }
  body .mkdf-page-header .mkdf-position-right{min-width:0!important;}

  /* 4. Search icon: same size + spacing in every header */
  body .mkdf-page-header .mkdf-search-opener,
  body .mkdf-page-header .cdc-search-btn{
    margin:0 0 0 clamp(10px,1.2vw,20px)!important;
    flex:0 0 auto;
  }
  /* the home page's normal header has no search icon in the theme; a small script
     (assets/js/cdc-header.js) adds one that opens the same search bar */
  body .mkdf-page-header .cdc-search-btn{
    display:inline-flex;align-items:center;justify-content:center;
    width:26px;height:26px;color:#fff;cursor:pointer;text-decoration:none;
  }
  body .mkdf-page-header .cdc-search-btn svg{width:22px;height:22px;display:block;}
  body .mkdf-page-header .cdc-search-btn svg path{fill:#fff!important;transition:fill .2s ease;}
  body .mkdf-page-header .cdc-search-btn:hover svg path{fill:var(--cdc-lilac,#e7c8ff)!important;}
  body .mkdf-page-header .cdc-search-btn:focus-visible{outline:2px solid var(--cdc-lilac,#e7c8ff);outline-offset:3px;}
}

/* a little more breathing room once the screen is wide */
@media (min-width:1280px){
  body .mkdf-page-header .mkdf-main-menu > ul > li > a .item_text{letter-spacing:.1em!important;}
}
