/* Site header and WordPress primary navigation. */
/* Header */
.nef-site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #FFF8E8;
  border-bottom: 1px solid rgba(18,61,42,.06);
}
.nef-header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 34px;
}
.nef-logo-link { justify-self:start; display:inline-flex; align-items:center; line-height:0; text-decoration:none; min-width:0; }
.nef-logo { display:block; width:auto; height:auto; max-width:100px; max-height:75px; object-fit:contain; }
.nef-logo-spacer { justify-self:start; width:100px; height:1px; }

.nef-nav { justify-self:center; }
.nef-menu,
.nef-menu .sub-menu { list-style:none; margin:0; padding:0; }
.nef-menu { display:flex; align-items:center; gap:38px; }
.nef-menu > li { position:relative; margin:0; padding:0; display:flex; align-items:center; }
.nef-menu a { display:inline-flex; align-items:center; min-height:76px; text-decoration:none; font-size:13px; line-height:1; font-weight:600; color:#202820; transition:color .18s ease; white-space:nowrap; }
.nef-menu > li.menu-item-has-children > a { padding-right:15px; position:relative; }
.nef-menu > li.menu-item-has-children > a::after {
  content:"";
  position:absolute;
  right:1px;
  top:50%;
  width:6px;
  height:6px;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:translateY(-68%) rotate(45deg);
  transition:transform .18s ease;
}
.nef-menu a:hover,
.nef-menu .current-menu-item > a,
.nef-menu .current-menu-ancestor > a { color:var(--nef-lime); }

.nef-menu .sub-menu {
  position:absolute;
  z-index:1000;
  top:calc(100% - 6px);
  left:50%;
  min-width:210px;
  padding:9px;
  background:#fff;
  border:1px solid #eceee8;
  border-radius:10px;
  box-shadow:0 14px 36px rgba(18,61,42,.12);
  opacity:0;
  visibility:hidden;
  transform:translate(-50%, 8px);
  transition:opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.nef-menu .sub-menu li { position:relative; display:block; margin:0; }
.nef-menu .sub-menu a { min-height:0; display:block; padding:11px 12px; border-radius:7px; font-size:13px; line-height:1.35; color:#263029; }
.nef-menu .sub-menu a:hover,
.nef-menu .sub-menu .current-menu-item > a { background:#f7f9ef; color:var(--nef-lime); }
.nef-menu > li:hover > .sub-menu,
.nef-menu > li:focus-within > .sub-menu { opacity:1; visibility:visible; transform:translate(-50%, 0); }
.nef-menu .sub-menu .sub-menu { top:-9px; left:calc(100% + 7px); transform:translate(8px,0); }
.nef-menu .sub-menu li:hover > .sub-menu,
.nef-menu .sub-menu li:focus-within > .sub-menu { opacity:1; visibility:visible; transform:translate(0,0); }
.nef-menu .sub-menu .menu-item-has-children > a { padding-right:30px; }
.nef-menu .sub-menu .menu-item-has-children > a::after {
  content:"";
  position:absolute;
  right:14px;
  top:50%;
  width:6px;
  height:6px;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:translateY(-50%) rotate(-45deg);
}

.nef-header-actions { justify-self:end; display:flex; align-items:center; gap:10px; }
.nef-whatsapp-header {
  min-height:38px;
  padding:0 17px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid var(--nef-lime);
  border-radius:999px;
  color:#223326 !important;
  text-decoration:none;
  text-transform:uppercase;
  font-size:12px;
  line-height:1;
  font-weight:500;
  letter-spacing:.01em;
  transition:background-color .18s ease, color .18s ease, border-color .18s ease;
  white-space:nowrap;
}
.nef-whatsapp-header svg { width:14px; height:14px; fill:currentColor; flex:0 0 auto; }
.nef-whatsapp-header:hover { background:#f8fbe9; border-color:#93b52e; color:var(--nef-green)!important; }
.nef-menu-toggle { display:none; width:30px; height:30px; padding:4px; border:0; background:transparent; color:var(--nef-green); cursor:pointer; }
.nef-menu-toggle-bars { display:block; position:relative; width:22px; height:18px; }
.nef-menu-toggle-bars i { position:absolute; left:0; width:22px; height:2.5px; border-radius:2px; background:currentColor; transition:transform .2s ease, opacity .15s ease, top .2s ease; }
.nef-menu-toggle-bars i:nth-child(1){ top:1px; }
.nef-menu-toggle-bars i:nth-child(2){ top:8px; }
.nef-menu-toggle-bars i:nth-child(3){ top:15px; }
.nef-menu-toggle.is-open .nef-menu-toggle-bars i:nth-child(1){ top:8px; transform:rotate(45deg); }
.nef-menu-toggle.is-open .nef-menu-toggle-bars i:nth-child(2){ opacity:0; }
.nef-menu-toggle.is-open .nef-menu-toggle-bars i:nth-child(3){ top:8px; transform:rotate(-45deg); }
.nef-submenu-toggle { display:none; }

@media (max-width:900px) {
  .nef-site-header { position:sticky; }
  .nef-header-inner { min-height:64px; display:flex; justify-content:space-between; gap:12px; position:relative; }
  .nef-logo-link { margin-right:auto; }
  .nef-logo { max-width:75px; max-height:55px; }
  .nef-logo-spacer { margin-right:auto; width:75px; }
  .nef-header-actions { gap:7px; }
  .nef-whatsapp-header { min-height:34px; padding:0 12px; gap:6px; font-size:10px; }
  .nef-whatsapp-header svg { width:13px; height:13px; }
  .nef-menu-toggle { display:inline-grid; place-items:center; flex:0 0 auto; }
}

/* --------------------------------------------------------------------------
 * Mobile/tablet navigation refinement
 * Full-width page-builder style menu with NEF brand interaction colours.
 * ----------------------------------------------------------------------- */
@media (max-width: 900px) {
  /* Prevent Astra/global button states from introducing the default blue. */
  .nef-menu-toggle,
  .nef-menu-toggle:hover,
  .nef-menu-toggle:active,
  .nef-menu-toggle:focus,
  .nef-menu-toggle:focus-visible,
  .nef-menu-toggle.is-open {
    color: var(--nef-lime) !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }

  .nef-menu-toggle:focus-visible {
    outline: 2px solid rgba(168, 201, 58, .45);
    outline-offset: 2px;
  }

  /* The nav must span the viewport, not inherit the centred desktop width. */
  .nef-nav {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    right: auto !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    padding: 12px !important;
    background: #f7f6f3 !important;
    border: 0 !important;
    border-top: 1px solid #f0efe9 !important;
    box-shadow: 0 14px 28px rgba(18,61,42,.08) !important;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 64px);
  }

  .nef-nav:not(.is-open) {
    display: none !important;
  }

  .nef-nav.is-open {
    display: block !important;
  }

  /* White rounded menu card like the supplied mobile reference. */
  .nef-menu {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    border: 1px solid #eeeeea !important;
    border-radius: 12px !important;
    box-shadow: 0 5px 18px rgba(20, 32, 24, .05) !important;
    overflow: hidden !important;
  }

  .nef-menu > li,
  .nef-menu .sub-menu > li {
    width: 100% !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 46px !important;
    align-items: stretch !important;
    border: 0 !important;
    border-bottom: 1px solid #eeeeea !important;
    background: #fff !important;
  }

  .nef-menu > li:last-child,
  .nef-menu .sub-menu > li:last-child {
    border-bottom: 0 !important;
  }

  .nef-menu li:not(.menu-item-has-children) > a {
    grid-column: 1 / -1;
  }

  .nef-menu a,
  .nef-menu .sub-menu a {
    width: 100% !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #2c312d !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    box-shadow: none !important;
  }

  .nef-menu a:hover,
  .nef-menu a:focus,
  .nef-menu .current-menu-item > a,
  .nef-menu .current-menu-ancestor > a,
  .nef-menu .submenu-open > a {
    color: var(--nef-lime) !important;
    background: transparent !important;
  }

  /* Separate arrow cell on the right, matching the reference rows. */
  .nef-submenu-toggle,
  .nef-submenu-toggle:hover,
  .nef-submenu-toggle:active,
  .nef-submenu-toggle:focus,
  .nef-submenu-toggle:focus-visible {
    display: grid !important;
    place-items: center !important;
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    border: 0 !important;
    border-left: 1px solid #eeeeea !important;
    border-radius: 0 !important;
    background: #fafaf8 !important;
    color: var(--nef-lime) !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer !important;
  }

  .nef-submenu-toggle span {
    width: 7px !important;
    height: 7px !important;
    border-right: 1.5px solid currentColor !important;
    border-bottom: 1.5px solid currentColor !important;
    transform: translateY(-2px) rotate(45deg) !important;
    transition: transform .18s ease !important;
  }

  .menu-item-has-children.submenu-open > .nef-submenu-toggle span {
    transform: translateY(2px) rotate(225deg) !important;
  }

  /* Submenus stay inside the full-width card and are visibly indented. */
  .nef-menu .sub-menu,
  .nef-menu .sub-menu .sub-menu {
    grid-column: 1 / -1 !important;
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #f7f7f5 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    overflow: visible !important;
  }

  .nef-menu .sub-menu {
    display: none !important;
  }

  .nef-menu .submenu-open > .sub-menu {
    display: block !important;
  }

  .nef-menu .sub-menu > li {
    background: #f7f7f5 !important;
  }

  .nef-menu .sub-menu a {
    min-height: 42px !important;
    padding-left: 24px !important;
    color: #666b67 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
  }

  .nef-menu .sub-menu .sub-menu a {
    padding-left: 38px !important;
  }

  .nef-menu .sub-menu .menu-item-has-children > a::after,
  .nef-menu > li.menu-item-has-children > a::after {
    display: none !important;
  }
}
