@charset "utf-8";

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #FFFDF5;
  z-index: 99;

  .w1728 {
    display: flex;
    align-items: flex-start;
    padding-bottom: 10px;

    @media(max-width:700px) {
      max-width: calc(369/390*100%);
      width: 100%;
      align-items: center;
    }

    .h_logo {
      max-width: 381px;
      width: 23%;
      margin-top: 19px;

      @media(max-width:700px) {
        max-width: 122px;
        width: 100%;
        margin-top: 0;
      }
    }

    .nav-right {
      display: flex;
      align-items: flex-start;
      justify-content: flex-end;
      margin-left: auto;
      flex: 1;
      gap: 20px;
      height: 78px;

      @media(max-width:700px) {
        gap: 12px;
        height: auto;
        flex: inherit;
        width: 39%;
      }
    }

    .nav-right a {
      transition: .4s ease;
    }

    .nav-right a:hover {
      opacity: 50%;
    }

    .contact-form {
      max-width: 241px;
      width: 40%;
      justify-content: center;
      background-color: var(--cmain);
      border-radius: 0px 0px 30px 30px;
      display: flex;
      align-items: center;
      gap: 15px;
      height: 100%;

      @media(max-width:1150px) {
        display: none;
      }



      p {
        font-size: 18px;
        color: #FFF;
        font-weight: 600;
      }

      img {
        width: 27px;
        height: auto;
      }
    }

    .contact-tel {
      margin-top: auto;

      .f-14 {
        grid-area: 2 / 1 / 3 / 3;
        text-align: right;
      }

      @media(max-width:1150px) {
        display: none;
      }
    }

    .nav-link {
      margin: 11px 0 0;
      --fmin: 9;
      --fmax: 14;
      font-size: clamp(0.563rem, 0.355rem + 0.43vw, 0.875rem);

      p {
        white-space: nowrap;
      }

      @media(max-width:700px) {
        gap: 6px;

        img {
          width: 50%;
        }
      }
    }
  }
}

.contact-tel {
  display: grid;
  grid-auto-columns: auto max-content;
  grid-auto-rows: auto;
  font-family: var(--fmain);
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px 21px;


  p {
    line-height: 1;
  }
}



.nav-link {
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;

  img {
    width: 40px;
    height: auto;
  }
}

.hamburger {
  width: 59px;
  height: 59px;
  background-color: #D5EEFF;
  border-radius: 30px;
  margin-top: 11px;
  margin-left: 20px;
  cursor: pointer;
  position: relative;
  z-index: 110;

  @media(max-width:700px) {
    width: 37px;
    height: 37px;
    margin-left: 16px;
  }

}

.hamburger .line {
  position: absolute;
  width: 36px;
  height: 3px;
  background: #333;
  left: 0;
  right: 0;
  margin: auto;
  transition: .3s ease;

  @media(max-width:700px) {
    width: 22px;
    height: 2px;
  }
}

.hamburger .line:nth-child(1) {
  top: 18px;

  @media(max-width:700px) {
    top: 10px;
  }
}

.hamburger .line:nth-child(2) {
  top: 28px;

  @media(max-width:700px) {
    top: 17px;
  }
}

.hamburger .line:nth-child(3) {
  top: 38px;

  @media(max-width:700px) {
    top: 24px;
  }
}

/* ▼ X の変形 */
.hamburger.active .line:nth-child(1) {
  top: 28px;
  /* 中央に移動 */
  transform: rotate(45deg);

  @media(max-width:700px) {
    top: 18px;
  }
}

.hamburger.active .line:nth-child(2) {
  opacity: 0;
  /* 中央ラインは消す */
}

.hamburger.active .line:nth-child(3) {
  top: 28px;
  /* 中央に移動 */
  transform: rotate(-45deg);

  @media(max-width:700px) {
    top: 18px;
  }
}

/* ▼ メニュー本体（PCもSPもスライド式） */
.menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 390px;
  height: 100vh;
  background: #fff;
  padding: 40px 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  transition: right .4s ease;
  z-index: 100;

  @media(max-width:700px) {
    width: 100vw;
    padding-bottom: 180px;
  }

  .inner {
    max-width: calc(335/390*100%);
    width: 100%;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 32px;

    a {
      display: block;
      font-weight: 500;
      transition: opacity .3s ease;
    }

    a:hover {
      opacity: 50%;
    }

    .menuitem,
    .has-child {
      display: block;
      padding-bottom: 32px;
      border-bottom: 1px solid #dbdbdb;
    }
  }



  .childmenu {
    opacity: 0;
    visibility: hidden;
    height: 0;
    padding: 0;
    transition: height .3s ease, opacity .3s ease;
  }

  .childmenu a {
    transition: opacity .3s ease;
  }



  .childmenu a:hover {
    opacity: 50%;
  }
}

/* 開いた状態 */
.menu.active {
  right: 0;
}

.menu .parent {
  position: relative;
}

.menu .parent::after {
  content: "＋";
  font-size: 20px;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 19px;
  margin: auto;
}

.menu .has-child.open .parent::after {
  content: "−";
}

.menu .has-child.open .childmenu {
  opacity: 1;
  visibility: visible;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-left: 24px;
  padding-top: 38px;

  .child {
    padding-bottom: 17px;
    border-bottom: 1px solid #dbdbdb;
  }

  .child:last-child {
    border: none;
    padding-bottom: 0;
  }

  .child p {
    font-family: var(--fmain);
    font-weight: 500;
    font-size: 16px;
    color: #003657;
  }
}

.menu .has-child {
  position: relative;
}



.gjs-dashed {
  .menu {
    display: flex !important;
    height: 100vh !important;
    top: 100px !important;
    right: 0 !important;
    left: auto !important;
    width: 30% !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
  }
  .header .w1728 .contact-tel,.header .w1728 .contact-form {
display:block;
  }
}