header {
  position: relative;
}

.header-jds-icon {
  position: absolute;
  top: 20px;
  left: 40px;
  height: 150px;
  width: 150px;
  opacity: 0.9;
  z-index: 50;
  font-size: initial;
  font-weight: initial;
}

.header-jice-img {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  padding-right: 10px;
}

.header-jice-img a:hover {
  opacity: var(--opacity);
}

.header-menus {
  /* メニュー全体のスタイル */
  width: 100%;
  position: relative;
}

.header-menus > ul {
  /* header-jds-imgのサイズ、leftの値、隙間を引いている */
  width: calc(100% - 150px - 40px - 10px);
  margin: 0 0 0 auto;
  padding-right: 10px;
  text-align: right;
}

.header-menus li {
  display: inline-block;
}

.header-menus a {
  display: block;
}

.header-menu > a {
  padding: 4px;
  color: rgb(var(--blue));
  font-weight: bold;
}

.header-menu:hover a {
  background: rgb(var(--blue));
  color: rgb(var(--white));
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.has-not-child-menu:hover > a {
  background-color: inherit;
  color: rgb(var(--blue));
  opacity: var(--opacity);
}

.header-child-menu {
  width: 100%;
  min-height: 130px;
  position: absolute;
  z-index: 150;
  /* 親項目の直下に配置 */
  top: 100%;
  left: 0;
  background: rgb(var(--blue));
  color: rgb(var(--white));
  /* 下層メニューを非表示 */
  visibility: hidden;
}

.header-menu:hover .header-child-menu {
  /* 親メニューホバー時、子メニューを表示 */
  visibility: visible;
}

.header-child-menu-box {
  display: flex;
  margin: 30px auto;
}

.header-child-menu-title {
  width: 20%;
  padding-right: 16px;
  border-right: 1px solid rgba(var(--light-gray), var(--opacity));
}

.header-child-menu ul {
  width: 80%;
  text-align: start;
  display: flex;
  flex-wrap: wrap;
  padding: 0 16px;
  font-size: 90%;
}

.header-child-menu li {
  padding: 0 10px 20px 10px;
}

.divide-third li {
  width: calc(33% - 20px);
}

.header-child-menu img {
  vertical-align: middle;
  margin-right: 5px;
}

.header-child-menu a {
  color: rgb(var(--white));
}

.header-child-menu a:hover,
.header-privacies a:hover {
  opacity: var(--opacity);
}

.child-menu-sub {
  color: rgb(var(--white));
  font-size: 80%;
  padding-left: 4px;
  width: 100%;
}

.child-menu-sub li {
  width: 100%;
  padding: 0;
}
.child-menu-sub li:first-child {
  padding-top: 8px;
}

#sp-menu-check {
  display: none;
}

.child-menu-btn {
  display: none;
}

@media screen and (max-width: 960px) {
  .header-jds-icon {
    height: 130px;
    width: 130px;
    left: 20px;
    font-size: 80%;
  }

  .header-jice-img {
    padding-top: 0;
    padding-right: 70px;
    min-height: 45px;
  }

  .header-jice-img a {
    margin: auto 0;
  }

  .sp-menu-btn {
    position: absolute;
    top: 0;
    right: 0;
    height: 45px;
    width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30;
    background-color: rgb(var(--white));
    border-radius: 3px;
  }

  .sp-menu-btn span,
  .sp-menu-btn span:before,
  .sp-menu-btn span:after {
    content: "";
    display: block;
    height: 3px;
    width: 20px;
    border-radius: 3px;
    background-color: rgb(var(--blue));
    position: absolute;
  }

  .sp-menu-btn span:before {
    bottom: 8px;
  }
  .sp-menu-btn span:after {
    top: 8px;
  }

  #sp-menu-check:checked ~ .sp-menu-btn span {
    background-color: rgba(255, 255, 255, 0);
  }
  #sp-menu-check:checked ~ .sp-menu-btn span::before {
    bottom: 0;
    transform: rotate(45deg);
  }
  #sp-menu-check:checked ~ .sp-menu-btn span::after {
    top: 0;
    transform: rotate(-45deg);
  }

  #sp-menu-check:checked ~ .header-menus {
    opacity: 1;
    width: 100%;
  }

  .header-menus {
    opacity: 0;
    width: 0;
    position: absolute;
    top: 0;
    right: 0;
    overflow: hidden;
    padding: 160px 0 0 0;
    background: rgb(var(--white));
    transition: all 0.5s ease;
    transform-origin: left center;
    z-index: 20;
  }

  .header-menus ul {
    width: 100%;
    padding: 0;
  }

  .header-menus li {
    display: block;
  }

  .header-menu {
    width: 100%;
    position: relative;
  }

  .header-menu:hover a {
    background: rgb(var(--white));
    color: rgb(var(--blue));
  }

  .header-menu > a {
    text-align: left;
  }

  .header-menu > a,
  .header-child-menu li,
  .header-privacies li {
    width: 80vw;
    margin: 0 auto;
    padding: 8px 0;
  }

  .header-menu > a,
  .header-child-menu a {
    border-bottom: 1.5px solid rgba(var(--blue), 0.5);
  }

  .header-privacies a {
    text-align: left;
    font-size: 90%;
    color: rgb(var(--blue));
  }

  .header-privacies li:first-child {
    margin-top: 40px;
  }

  .header-child-menu {
    visibility: visible;
    position: sticky;
    background-color: inherit;
    color: rgb(var(--blue));
  }

  .header-child-menu a {
    color: rgb(var(--blue));
    padding: 4px;
    text-indent: 20px;
  }

  .header-child-menu-title {
    display: none;
  }

  .header-child-menu-box {
    margin: 4px auto;
    display: block;
  }

  .child-menu-label {
    width: 40px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    position: absolute;
    top: 0;
    left: 80%;
  }

  .child-menu-label span,
  .child-menu-label span::before {
    content: "";
    display: block;
    height: 3px;
    width: 16px;
    border-radius: 3px;
    background-color: rgb(var(--blue));
    position: absolute;
  }

  .child-menu-label span::before {
    transform: rotate(90deg);
  }

  .child-menu-label span {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: all 0.3s;
  }

  .header-child-menu {
    display: none;
  }

  .child-menu-btn:checked + .child-menu-label + .header-child-menu {
    display: block;
  }

  .child-menu-btn:checked + .child-menu-label span::before {
    display: none;
  }

  .child-menu-sub {
    color: rgb(var(--blue));
  }

  .child-menu-sub a {
    text-indent: 40px;
  }

  .close-menu {
    padding: 8px 0;
    font-weight: bold;
    width: 100%;
    color: rgb(var(--white));
    background-color: rgb(var(--blue));
    margin: 80px auto 0 auto;
    text-align: center;
    font-size: 200%;
    display: block;
  }
}
