/* ================================================================
   NISSYO GLOBAL HEADER / CLEAN INTEGRATED PC + ORIGINAL SP
   Scope: #nissyoGlobalHeader only. Does NOT restyle company content.
   Edit colors here; edit labels/URLs in site-header.html.
   ================================================================ */
#nissyoGlobalHeader {
  --nh-blue: #0876a9;
  --nh-blue-bright: #069aca;
  --nh-navy: #103c5b;
  --nh-line: #dbeaf3;
  --nh-max: 1380px;
  --nh-gutter: clamp(18px, 4vw, 64px);
  display: block !important;
  position: relative !important;
  z-index: 900 !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: #fff !important;
  color: var(--nh-navy);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#nissyoGlobalHeader,
#nissyoGlobalHeader * {
  box-sizing: border-box;
}

#nissyoGlobalHeader a {
  text-decoration: none !important;
}

#nissyoGlobalHeader img {
  display: block;
  max-width: 100%;
  object-fit: contain;
  border: 0;
}

#nissyoGlobalHeader .nh-container {
  width: min(calc(100% - var(--nh-gutter)*2), var(--nh-max));
  margin-inline: auto;
}

/* Brand/utility bar: use original emblem and preserve all utility links. */
#nissyoGlobalHeader .nh-topbar {
  position: relative;
  background: linear-gradient(105deg, #075a89 0%, #087aaf 57%, #079cc3 100%);
  color: #fff;
}

#nissyoGlobalHeader .nh-topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, .18);
}

#nissyoGlobalHeader .nh-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 79px;
}

#nissyoGlobalHeader .nh-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 13px;
  min-width: 0;
  flex: 0 1 auto;
  color: white !important;
  background: transparent !important;
  white-space: nowrap;
}

#nissyoGlobalHeader .nh-brand-emblem {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

#nissyoGlobalHeader .nh-brand-emblem img {
  width: 54px;
  height: 54px;
}

#nissyoGlobalHeader .nh-brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

#nissyoGlobalHeader .nh-brand-text strong {
  font-family: "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 750;
  letter-spacing: .035em;
  line-height: 1.2;
  color: white;
}

#nissyoGlobalHeader .nh-brand-text small {
  display: block;
  max-width: 440px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, .85);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.4;
}

#nissyoGlobalHeader .nh-utilities {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

#nissyoGlobalHeader .nh-utilities a {
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
}

#nissyoGlobalHeader .nh-goals {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding-right: 16px;
  border-right: 1px solid rgba(255, 255, 255, .25);
}

#nissyoGlobalHeader .nh-goals img {
  width: 34px;
  height: 34px;
  border-radius: 3px;
  background: #fff;
}

#nissyoGlobalHeader .nh-utility-link {
  display: inline-flex !important;
  padding: 10px 4px;
}

#nissyoGlobalHeader .nh-utility-link:hover {
  text-decoration: underline !important;
}

#nissyoGlobalHeader .nh-contact {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 42px;
  margin-left: 8px;
  padding: 10px 17px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  background: #fff !important;
  color: #075b8c !important;
  box-shadow: 0 4px 10px rgba(0, 58, 107, .12);
  transition: transform .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}

#nissyoGlobalHeader .nh-contact span {
  color: #075b8c;
}

#nissyoGlobalHeader .nh-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(0, 58, 107, .22);
}

#nissyoGlobalHeader .nh-contact svg {
  flex: 0 0 auto;
}

/* Clean, readable horizontal navigation. */
#nissyoGlobalHeader .nh-navrow {
  background: #EAF6FC;
  border-bottom: 1px solid var(--nh-line);
  box-shadow: 0 5px 18px rgba(24, 72, 105, .055);
}

#nissyoGlobalHeader .nh-navinner {
  display: flex;
  align-items: stretch;
  min-height: 64px;
  gap: 24px;
}

#nissyoGlobalHeader .nh-navtag {
  display: flex;
  align-items: center;
  min-width: 145px;
  flex: 0 0 auto;
  color: #6c93a7;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .16em;
  white-space: nowrap;
}

#nissyoGlobalHeader .nh-nav {
  display: flex !important;
  align-items: stretch;
  float: none !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 0 0 auto !important;
  background: transparent !important;
}

#nissyoGlobalHeader ul.nh-menu {
  display: flex !important;
  flex-direction: row;
  align-items: stretch;
  gap: clamp(2px, .5vw, 11px);
  float: none !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  list-style: none !important;
}

#nissyoGlobalHeader ul.nh-menu>li {
  display: flex !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  position: relative;
  border: 0 !important;
  background: none !important;
  list-style: none !important;
}

#nissyoGlobalHeader ul.nh-menu>li>a {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  position: relative;
  width: auto !important;
  height: 100% !important;
  min-height: 64px;
  padding: 0 clamp(7px, .7vw, 13px) !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #214862 !important;
  background: transparent !important;
  font-size: clamp(12px, .72vw, 14px);
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}

#nissyoGlobalHeader ul.nh-menu>li>a::after {
  content: "";
  display: block;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  background: #078ec7;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}

#nissyoGlobalHeader ul.nh-menu>li>a:hover,
#nissyoGlobalHeader ul.nh-menu>li>a.is-active {
  color: #006ca6 !important;
  background: #f3faff !important;
}

#nissyoGlobalHeader ul.nh-menu>li>a:hover::after,
#nissyoGlobalHeader ul.nh-menu>li>a.is-active::after {
  transform: scaleX(1);
}

#nissyoGlobalHeader ul.nh-menu>li>a:focus-visible,
#nissyoGlobalHeader .nh-contact:focus-visible,
#nissyoGlobalHeader .nh-menu-toggle:focus-visible {
  outline: 3px solid #53bee3;
  outline-offset: 3px;
}

#nissyoGlobalHeader .nh-instagram-item>a {
  gap: 7px;
}

#nissyoGlobalHeader .nh-instagram-item img {
  width: 18px;
  height: 18px;
}

#nissyoGlobalHeader ul.nh-menu>li.nh-mobile-utility {
  display: none !important;
}

#nissyoGlobalHeader .nh-menu-toggle {
  display: none;
}

/* ================================================================
   PC HEADER: FINAL INTEGRATED DESIGN (1020px and wider)
   - Original NISSYO emblem file; NO extra CSS ring
   - Four matching actions: SDGs / factory or recruit / Instagram / contact
   - Seven navigation items with evenly distributed widths
   - Nothing here targets #wrapper, #contents or /sp pages
   ================================================================ */
@media screen and (min-width: 1020px) {

  /* Brand: enlarge the original artwork without editing the file itself. */
  #nissyoGlobalHeader .nh-topbar-inner {
    min-height: 92px;
    gap: 20px;
  }

  #nissyoGlobalHeader .nh-brand {
    gap: 15px;
    flex: 0 1 auto;
  }

  #nissyoGlobalHeader .nh-brand-emblem {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #nissyoGlobalHeader .nh-brand-emblem img {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: contain;
  }

  #nissyoGlobalHeader .nh-brand-text {
    gap: 4px;
    justify-content: center;
  }

  #nissyoGlobalHeader .nh-brand-text strong {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: .012em;
    line-height: 1.12;
  }

  #nissyoGlobalHeader .nh-brand-text small {
    max-width: none;
    font-size: 11px;
    font-weight: 550;
    letter-spacing: .018em;
    line-height: 1.5;
    color: rgba(255, 255, 255, .92);
    overflow: visible;
    text-overflow: clip;
  }

  /* Unified desktop buttons. Keep each anchor's existing href intact. */
  #nissyoGlobalHeader .nh-utilities {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
    flex: 0 0 auto;
    margin-left: auto;
  }

  #nissyoGlobalHeader .nh-utilities>a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 50px;
    min-height: 50px;
    margin: 0;
    border-radius: 10px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .02em;
    line-height: 1.2;
    transition: background-color .2s ease, border-color .2s ease,
      transform .2s ease, box-shadow .2s ease;
  }

  /* bo khung vien goal */
  #nissyoGlobalHeader .nh-goals {
    gap: 10px;
    padding: 4px 12px 4px 5px;
    border: 1px solid rgba(255,255,255,.42);
    background: rgba(255,255,255,.1);
    box-shadow: none;
  }

  /* #nissyoGlobalHeader .nh-goals {
    gap: 10px;
    padding: 4px 8px;
    border: none;
    background: transparent;
    box-shadow: none;
  } */

  #nissyoGlobalHeader .nh-goals img {
    display: block;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 2px;
    border-radius: 7px;
    background: #fff;
  }

  #nissyoGlobalHeader .nh-goals span {
    font-size: 13px;
    font-weight: 800;
  }

  /* Recruit CTA: works with the current, unchanged HTML anchor. */
  #nissyoGlobalHeader .nh-utilities>a.nh-utility-link {
    min-width: 158px;
    gap: 8px;
    padding: 0 11px 0 8px;
    border: 1px solid #b8eaff;
    background: linear-gradient(135deg, #e5f7ff 0%, #bceaff 100%);
    color: #07577d !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(1, 34, 61, .14);
  }

  #nissyoGlobalHeader .nh-utilities>a.nh-utility-link::before {
    content: "";
    display: block;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 8px;
    background-color: #0b87ba;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M3 12c3 2 15 2 18 0M11 12v2h2v-2'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 19px 19px;
  }

  #nissyoGlobalHeader .nh-utilities>a.nh-utility-link::after {
    content: "↗";
    display: inline-block;
    margin-left: auto;
    font-size: 15px;
    line-height: 1;
    color: #07577d;
  }

  /* bo khung vien insta */
  #nissyoGlobalHeader .nh-instagram-top {
    gap: 9px;
    min-width: 139px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .1);
    color: #fff !important;
  }

  /* #nissyoGlobalHeader .nh-instagram-top img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
  } */

  #nissyoGlobalHeader .nh-instagram-top span {
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .045em;
  }

  #nissyoGlobalHeader .nh-contact {
    min-width: 169px;
    gap: 13px;
    padding: 0 9px 0 17px;
    border: 1px solid #b8eaff;
    background: linear-gradient(135deg, #e5f7ff 0%, #bceaff 100%) !important;
    color: #07577d !important;
    box-shadow: 0 5px 14px rgba(1, 34, 61, .12);
  }

  #nissyoGlobalHeader .nh-contact span {
    color: #075780;
    font-size: 13px;
    font-weight: 800;
  }

  #nissyoGlobalHeader .nh-contact svg {
    display: block;
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    box-sizing: border-box;
    padding: 6px;
    border-radius: 7px;
    background: #0b87ba;
    color: #ffffff;
  }

  #nissyoGlobalHeader .nh-goals:hover,
  #nissyoGlobalHeader .nh-instagram-top:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .2);
  }

  #nissyoGlobalHeader .nh-utilities>a.nh-utility-link:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #f4fbff 0%, #d1f1ff 100%);
    border-color: #e4f8ff;
    box-shadow: 0 6px 15px rgba(1, 34, 61, .20);
    text-decoration: none !important;
  }

  #nissyoGlobalHeader .nh-contact:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #f4fbff 0%, #d1f1ff 100%) !important;
    box-shadow: 0 7px 17px rgba(1, 34, 61, .18);
  }

  #nissyoGlobalHeader .nh-utilities>a:focus-visible {
    outline: 3px solid #b4ecff;
    outline-offset: 3px;
  }

  /* Subtle NISSYO blue baseline: same navigation, no layout changes. */
  #nissyoGlobalHeader .nh-navinner {
    position: relative;
  }

  #nissyoGlobalHeader .nh-navinner::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: #00a5d5;
    pointer-events: none;
  }

  /* Equal navigation width; hide the duplicate desktop Instagram item. */
  #nissyoGlobalHeader .nh-navtag {
    min-width: 145px;
  }

  #nissyoGlobalHeader .nh-nav {
    flex: 1 1 auto;
    min-width: 0;
  }

  #nissyoGlobalHeader ul.nh-menu {
    flex: 1 1 auto;
    width: 100% !important;
    gap: 0;
  }

  #nissyoGlobalHeader ul.nh-menu>li {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
  }

  #nissyoGlobalHeader ul.nh-menu>li>a {
    width: 100% !important;
    padding: 0 5px !important;
    text-align: center;
    font-size: clamp(12px, .84vw, 14px);
  }

  #nissyoGlobalHeader ul.nh-menu>li.nh-instagram-item {
    display: none !important;
  }
}

/* Tighter laptop widths: preserve large-screen layout without collisions. */
@media screen and (min-width: 1020px) and (max-width: 1199px) {
  #nissyoGlobalHeader .nh-topbar-inner {
    gap: 11px;
  }

  #nissyoGlobalHeader .nh-brand {
    gap: 10px;
  }

  #nissyoGlobalHeader .nh-brand-emblem {
    width: 51px;
    height: 51px;
    flex-basis: 51px;
  }

  #nissyoGlobalHeader .nh-brand-emblem img {
    width: 49px;
    height: 49px;
  }

  #nissyoGlobalHeader .nh-brand-text strong {
    font-size: 25px;
  }

  #nissyoGlobalHeader .nh-brand-text small {
    font-size: 9px;
  }

  #nissyoGlobalHeader .nh-utilities {
    gap: 7px;
  }

  #nissyoGlobalHeader .nh-utilities>a {
    height: 47px;
    min-height: 47px;
  }

  #nissyoGlobalHeader .nh-goals {
    gap: 7px;
    padding: 4px 9px 4px 4px;
  }

  #nissyoGlobalHeader .nh-goals img {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  #nissyoGlobalHeader .nh-utilities>a.nh-utility-link {
    min-width: 132px;
    padding: 0 8px;
    gap: 6px;
    font-size: 11px;
  }

  #nissyoGlobalHeader .nh-utilities>a.nh-utility-link::before {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    background-size: 16px 16px;
  }

  #nissyoGlobalHeader .nh-instagram-top {
    min-width: 44px;
    padding: 0 7px;
  }

  #nissyoGlobalHeader .nh-instagram-top span {
    display: none;
  }

  #nissyoGlobalHeader .nh-contact {
    min-width: 145px;
    padding: 0 7px 0 10px;
    gap: 8px;
  }

  #nissyoGlobalHeader ul.nh-menu>li>a {
    font-size: 12px;
  }
}

/* At narrower widths show a reliable touch-friendly menu. */
@media(max-width:1179px) {
  #nissyoGlobalHeader .nh-navtag {
    display: none;
  }

  #nissyoGlobalHeader .nh-navinner {
    justify-content: center;
  }

  #nissyoGlobalHeader .nh-nav {
    margin: 0 !important;
  }
}

@media(max-width:1019px) {
  #nissyoGlobalHeader .nh-topbar-inner {
    min-height: 72px;
  }

  #nissyoGlobalHeader .nh-utilities {
    display: none !important;
  }

  #nissyoGlobalHeader .nh-brand-text strong {
    font-size: 29px;
    font-weight: 750;
    letter-spacing: .01em;
    line-height: 1.15;
  }

  #nissyoGlobalHeader .nh-menu-toggle {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 47px;
    width: 47px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 9px;
    color: #fff;
    background: rgba(255, 255, 255, .09);
    cursor: pointer;
  }

  #nissyoGlobalHeader .nh-menu-toggle span {
    display: block;
    width: 23px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform .2s ease, opacity .2s ease;
  }

  #nissyoGlobalHeader .nh-menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(8px) rotate(45deg);
  }

  #nissyoGlobalHeader .nh-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  #nissyoGlobalHeader .nh-menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-8px) rotate(-45deg);
  }

  #nissyoGlobalHeader .nh-navrow {
    display: none;
  }

  #nissyoGlobalHeader .nh-navrow.is-open {
    display: block;
  }

  #nissyoGlobalHeader .nh-navinner {
    width: 100%;
    display: block;
    min-height: 0;
  }

  #nissyoGlobalHeader .nh-nav {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #nissyoGlobalHeader ul.nh-menu {
    display: block !important;
    width: 100% !important;
    padding: 8px var(--nh-gutter) 18px !important;
  }

  #nissyoGlobalHeader ul.nh-menu>li {
    display: block !important;
    width: 100% !important;
    border-bottom: 1px solid #e8f1f7 !important;
  }

  #nissyoGlobalHeader ul.nh-menu>li>a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 51px;
    height: auto !important;
    width: 100% !important;
    padding: 13px 8px !important;
    font-size: 15px;
    font-weight: 700;
  }

  #nissyoGlobalHeader ul.nh-menu>li>a::after {
    left: 0;
    right: auto;
    top: 11px;
    bottom: 11px;
    width: 3px;
    height: auto;
    transform: scaleY(0);
  }

  #nissyoGlobalHeader ul.nh-menu>li>a.is-active::after {
    transform: scaleY(1);
  }

  #nissyoGlobalHeader ul.nh-menu>li.nh-mobile-utility {
    display: block !important;
  }

  #nissyoGlobalHeader .nh-instagram-item>a {
    justify-content: flex-start;
  }
}

@media(max-width:560px) {
  #nissyoGlobalHeader .nh-topbar-inner {
    min-height: 66px;
  }

  #nissyoGlobalHeader .nh-brand {
    gap: 9px;
  }

  #nissyoGlobalHeader .nh-brand-emblem {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  #nissyoGlobalHeader .nh-brand-emblem img {
    width: 30px;
    height: 30px;
  }

  #nissyoGlobalHeader .nh-brand-text strong {
    font-size: 19px;
  }

  #nissyoGlobalHeader .nh-brand-text small {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .025em;
    line-height: 1.6;
    max-width: 210px;
  }
}

@media(prefers-reduced-motion:reduce) {
  #nissyoGlobalHeader * {
    transition: none !important;
  }
}

/* =========================================
   NISSYO SP - Instagram icon alignment
========================================= */
@media (max-width: 900px) {

    #nissyoGlobalHeader .nh-nav a[href*="instagram.com"] {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }

    #nissyoGlobalHeader .nh-nav a[href*="instagram.com"] img {
        display: inline-block !important;
        width: 18px !important;
        height: 18px !important;
        margin: 0 !important;
        float: none !important;
        position: static !important;
        transform: none !important;
        flex: 0 0 auto;
    }

}
