header {
    background-color: var(--fc-white) !important;
    font-family: var(--ff-body) !important;
}

header > .container {
    position: relative !important;
    height: var(--height-header) !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#header_1 {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 999 !important;
    display: flex !important;
    align-items: center !important;
}

#header_1 .component.logo,
#header_1 .imgcontent,
#header_1 a {
    display: flex !important;
    align-items: center !important;
}

#header_1 img {
    height: 35px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
}

#header_2 {
    width: 100% !important;
}

#header_2 nav {
    width: 100% !important;
}

#header_2 nav > ul.level_1 {
    width: 100% !important;
    height: var(--height-header) !important;
    display: flex !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#header_2 nav > ul.level_1 > li.level_1 {
    flex: 1 1 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

#header_2 nav > ul.level_1 > li.level_1 > a {
    height: var(--height-header) !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    color: var(--fc-primary) !important;
    font-family: var(--ff-body) !important;
    font-size: var(--fs-400) !important;
    font-weight: var(--fw-regular) !important;
    white-space: nowrap !important;
}

#header_2 nav > ul.level_1 > li.level_1 > a:hover,
#header_2 nav > ul.level_1 > li.level_1 > a.active_tree {
    color: var(--fc-primary) !important;
}

#header_2 nav > ul.level_1 > li.logo-spacer {
    flex: 0 0 var(--logo-gap, 220px) !important;
    pointer-events: none !important;
}






ul.level_2 {
    z-index: 3 !important;
}



/* =========================================================
   MEGA MENU 
   ========================================================= */

/* Mega menu */
header{
  position: relative;
  z-index: 9999;
  background: var(--fc-white);
}

/* Hide old dropdowns */
#header ul.level_2{ display: none !important; }
li.level_1.levels:hover ul.level_2{ display: none !important; }

/* Panel */
header .mega-menu{
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--fc-white);
  box-shadow: 0 18px 30px rgba(0,0,0,.12);
  border-radius: 0;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;

  z-index: 9999;
}

header.mega-open .mega-menu{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Inner */
header .mega-menu .mega-inner{
  width: min(1400px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0;
  box-sizing: border-box;
}

/* Grid */
header .mega-menu .mega-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  column-gap: 56px;
  row-gap: 22px;
  align-items: start;
}

/* Columns */
header .mega-menu .mega-col{
  position: relative;
  padding-right: 32px;
  box-sizing: border-box;
}

header .mega-menu .mega-col:first-child::after{
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--clr-accent);
  opacity: .9;
}

/* Head */
header .mega-menu .mega-head{
  display: inline-block;
  margin-bottom: 18px;
  font-family: var(--ff-body);
  font-size: var(--fs-400);
  font-weight: var(--fw-bold);
  color: #2f2f2f;
  text-decoration: none;
}

/* List */
header .mega-menu ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

header .mega-menu li{
  margin: 0;
  padding: 0;
}

/* Items */
header .mega-menu .mega-item{
  display: block;
  padding: 10px 0;
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: var(--fw-regular);
  color: #6a6a6a;
  text-decoration: none;
}

header .mega-menu .mega-item p{ margin: 0; }
header .mega-menu .mega-item .nav_description{ display: none; }

header .mega-menu .mega-item:hover{
  color: var(--clr-accent);
}

/* View all */
header .mega-menu .mega-viewall{
  display: inline-block;
  margin-top: 14px;
  color: var(--clr-accent);
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: var(--fw-regular);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}


/* Hide old dropdowns (fix selector: no #header id in markup) */
header ul.level_2 { 
  display: none !important; 
}

/* Open mega menu ONLY when header has mega-open (already in your code) */

/* Green text on hover */
#header_2 nav > ul.level_1 > li.level_1 > a:hover {
  color: var(--clr-accent) !important;
}

/* Green text when mega is open and item is active */
#header_2 nav > ul.level_1 > li.level_1.is-mega-active > a {
  color: var(--clr-accent) !important;
}






/* Keep logo above */
#header_1{ z-index: 10000; }

/* Responsive */
@media (max-width: 1200px){
  header .mega-menu .mega-inner{
    width: calc(100% - 24px);
    padding: 28px 0;
  }
  header .mega-menu .mega-grid{ column-gap: 34px; }
}

@media (max-width: 980px){
  header .mega-menu{ display: none; }
}






@media (max-width: 980px){
  header .mega-menu{
    display: none;
  }

  header.mega-open .mega-menu{
    display: none;
  }

  header .hamburger-menu{
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--fc-white);
    box-shadow: 0 18px 30px rgba(0,0,0,.12);
    z-index: 9999;
  }

  header .hamburger-menu ul.level_1{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: 14px 18px;
    list-style: none;
    box-sizing: border-box;
  }

  header .hamburger-menu li.level_1{
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }

  header .hamburger-menu li.level_1:last-child{
    border-bottom: 0;
  }

  header .hamburger-menu li.level_1 a{
    display: block;
    width: 100%;
    padding: 12px 2px;
    text-decoration: none;
    color: #2f2f2f;
    font-family: var(--ff-body);
    font-size: 16px;
    font-weight: var(--fw-regular);
    box-sizing: border-box;
  }

  header .hamburger-menu li.level_1 a:hover{
    color: var(--clr-accent);
  }
}


@media (max-width: 500px){
  header > .container{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  #header_1{
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 0 !important;
    padding-left: 12px !important;
    z-index: 10000 !important;
  }

  #header_1 img{
    height: 28px !important;
    width: auto !important;
    max-width: 160px !important;
  }

  #toggle_navigation{
    position: static !important;
    margin-left: auto !important;
    padding-right: 12px !important;
    z-index: 10001 !important;
  }
}
