@charset "utf-8";

#nav-open {
  z-index: 99999 !important;
}

#nav-input:checked ~ #nav-open {
  z-index: 100000 !important;
}

@media screen and (max-width: 1023px) {

  header {
    width: 100%;
    display: flex;
    z-index: 999;
    box-sizing: border-box;
  }

  #head-bg {
    font-size: 16px;
    background-color: #ffffff;
  }

  .head-nav li span {
    font-family: "arial unicode ms", "Arial Black", Gadget, "sans-serif";
    font-weight: lighter;
    letter-spacing: 0.1em;
    color: #83b98f;
  }

  /* ハンバーガーナビ */
  #nav-drawer {
    position: relative;
    z-index: 99999 !important;
  }

  .nav-unshown {
    display: none;
  }

  #nav-open {
    display: inline-block;
    width: 45px;
    height: 40px;
    text-align: center;
    vertical-align: middle;
    position: fixed;
    right: 10px;
    box-sizing: border-box;
    transition: 0.3s ease-in-out;
    cursor: pointer;
    top: 10px;
    margin-top: 0px;
    padding: 3px;
    z-index: 9998;
    background-color: #fff;
    border-radius: 8px; /* ← 角丸を追加 */
  }

  /* ハンバーガーアイコン */
  #nav-open span:nth-of-type(1),
  #nav-open span:nth-of-type(2),
  #nav-open span:nth-of-type(3) {
    position: absolute;
    height: 3px;
    width: 30px;
    border-radius: 3px;
    background: #000;
    display: block;
    content: '';
    cursor: pointer;
    z-index: 9999;
    left: 8px;
    transition: 0.5s ease-in-out;
  }

  #nav-open span:nth-of-type(1) { top: 10px; }
  #nav-open span:nth-of-type(2) { top: 18px; }
  #nav-open span:nth-of-type(3) { top: 26px; }

  #hamburger-txt {
    color: #fff;
    left: -1px;
    position: relative;
    top: 13px;
    font-family: 'lato', sans-serif;
    font-weight: bold;
    font-size: 10px;
  }

  #nav-input:checked ~ #nav-open {
    position: fixed;
    margin-right: 270px;
    transition: 0.3s ease-in-out;
    cursor: pointer;
    z-index: 10000;
  }

  #nav-input:checked ~ #nav-open span:nth-of-type(1) {
    width: 28px;
    transform: translateY(8px) rotate(-45deg);
    background: #333;
  }

  #nav-input:checked ~ #nav-open span:nth-of-type(2) {
    opacity: 0;
  }

  #nav-input:checked ~ #nav-open span:nth-of-type(3) {
    width: 28px;
    transform: translateY(-8px) rotate(45deg);
    background: #333;
  }

  #nav-input:checked ~ #nav-open #hamburger-txt {
    color: #333 !important;
    z-index: 998;
  }

  #nav-close {
    display: none;
    position: fixed;
    z-index: 99;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    opacity: 0;
    transition: 0.3s ease-in-out;
  }

  #nav-content {
    overflow: auto;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 2000;
    width: 250px;
    max-width: 300px;
    height: 100%;
    background-color: #f57c00; /* ←背景オレンジ */
    transition: 0.3s ease-in-out;
    transform: translateX(105%);
  }

  #nav-input:checked ~ #nav-content {
    transform: translateX(0%);
    box-shadow: 6px 0 25px rgba(0, 0, 0, 0.15);
  }

  #nav-input:checked ~ #nav-close {
    display: block;
    opacity: 0.5;
    z-index: 999;
  }

  #nav-content li {
    background: transparent;
    border: 2px solid #fff; /* 白いボーダー */
    border-radius: 30px;     /* 丸み */
    margin: 10px 15px;
    font-weight: bold;
    overflow: hidden;
  }

  #nav-content li span {
    font-size: 14px;
    font-weight: lighter;
  }

  #nav-content a {
    text-decoration: none;
    display: block;
    padding: 16px 20px;
    color: #fff;
    text-align: center;
  }

  #nav-content a:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }

  #nav-content .hiraku a {
    background-image: none;
  }

  #nav-content .hiraku a:hover {
    background-image: none;
    color: #fff;
  }

  #nav-content a:visited {
    color: #fff;
  }

  /* サブメニュー */
  .navbutton {
    position: relative;
  }

  .child {
    display: none;
  }

  .sub-menu-item_sp {
    border: none !important;
  }

  .sub-menu-item_sp a {
    height: 59px;
    background-color: #efefef;
    color: #000 !important;
    padding-left: 30px;
    display: block;
    width: 100%;
    background-image: none !important;
  }

  .sub-menu-item_sp a:visited {
    color: #000 !important;
  }

  .sub-menu-item_sp a::before {
    content: " - ";
    color: #000;
  }

}
