@charset "utf-8";

/* ハンバーガーボタンの基本設定 */
.hamburger {
  display: none;
}

@media screen and (max-width:767px) {
  .hamburger {
    display: none;
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
    margin: 1em .5em 0;
  }

  .hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transition: all 0.3s ease;
  }

  /* 三本線の位置 */
  .hamburger span:nth-child(1) {
    top: 0;
  }

  .hamburger span:nth-child(2) {
    top: 9px;
  }

  .hamburger span:nth-child(3) {
    bottom: 0;
  }

  /* Xマーク化 */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9.5px;
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 9.5px;
  }

  /* メニュー（nav）の初期状態 */
  #menu {
    display: flex;
    align-items: center;
  }

  #menu {
    display: none;
    position: absolute;
    /* top: 60px; */
    /* ヘッダー高さに合わせて調整 */
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, .95);
    text-align: center;
    padding: 0 0 2em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  #menu ul {
    flex-direction: column;
    gap: 0;
  }

  #menu ul li {
    border-bottom: 1px solid rgba(0, 0, 0, .1);
  }

  #menu a {
    display: block;
    padding: 1em;
    font-size: 16px;
    color: #333;
  }

  .hamburger {
    display: block;
  }
}