/* Debug */
* {
  /* border: 1px solid black; */
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

li {
  margin-left: 1.5rem;
}

/* body */
body {
  width: 100vw;
  display: flex;
  flex-direction: column;
  background-color: #f6f7fa;
  overflow-x: hidden;
  align-items: center;
  header {
    width: 100vw;
    left: 0;
    right: 0;
    display: flex;
    position: fixed;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    z-index: 2;
    h1 {
      margin-left: 2.5%;
      a {
        text-decoration: none;
        color: black;
      }
    }
    .nav-phone {
      display: none; /* PCでは非表示 (既存) */
      position: relative;
      .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 42px;
        height: 42px;
        padding: 6px;
        background: transparent;
        border: none;
        touch-action: manipulation;
      }
      .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background: #000;
        border-radius: 2px;
        transition: 0.3s;
      }
      ul {
        list-style: none;
        position: absolute;
        top: 110%;
        right: 0;
        background: #ffffff;
        border: 2px solid #8eb9f9;
        border-radius: 0.75rem;
        padding: 0.75rem 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: 0.25s;
        z-index: 20;
        li a {
          text-decoration: none;
          color: #000;
          font-weight: 600;
        }
        li a:hover {
          text-decoration: underline;
        }
      }
      &.open ul {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
      }
      &.open .hamburger span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
      }
      &.open .hamburger span:nth-child(2) {
        opacity: 0;
      }
      &.open .hamburger span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
      }
    }
    .nav-pc {
      display: block;
      ul {
        display: flex;
        gap: 2.5rem;
        li {
          list-style: none;
          a {
            text-decoration: none;
            color: black;
            font-weight: bold;
            font-size: 1.5rem;
            &:hover {
              text-decoration: underline;
            }
          }
        }
      }
    }
  }
  main {
    margin-top: 7%;
    margin-bottom: 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    width: 50%;
    .schedule {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      gap: 1rem;
      background-color: white;
      border: 3px solid #8eb9f9;
      padding: 2.5rem;
      border-radius: 1rem;
      width: 100%;
      h1 {
        background-color: #315bab;
        padding: 1rem;
        border-radius: 1rem;
        a {
          color: white;
        }
      }
      img {
        width: 200px;
      }
    }
    .overview {
      background-color: white;
      border: 3px solid #8eb9f9;
      border-radius: 1rem;
      padding: 2.5rem;
      display: flex;
      flex-direction: column;
      width: 100%;
      gap: 0.5rem;
      h1 {
        text-align: center;
      }
      p {
        margin-left: 5rem;
      }
    }
    .please {
      background-color: white;
      padding: 2.5rem;
      border: 3px solid #fda1e9;
      border-radius: 1rem;
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      .text {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 0.5rem;
      }
      img {
        width: 400px;
        border-radius: 1rem;
      }
      .image {
        margin-top: 1rem;
        display: flex;
        .ok {
          text-align: center;
        }
        .ng {
          text-align: center;
        }
      }
    }
    .regulation {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      gap: 1rem;
      width: 100%;
      .property {
        background-color: white;
        padding: 2.5rem;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
      }
      .attention-one {
        background-color: white;
        padding: 2.5rem;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
      }
      .attention-two {
        background-color: white;
        padding: 2.5rem;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
      }
      .props {
        background-color: white;
        padding: 2.5rem;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        .important {
          color: red;
        }
      }
      .ok {
        background-color: white;
        padding: 2.5rem;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        display: flex;
        gap: 0.5rem;
        align-items: center;
        width: 100%;
        img {
          margin-left: 15%;
          width: 200px;
        }
      }
      .ng {
        background-color: white;
        padding: 2.5rem;
        border: 3px solid red;
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
      }
      .defense {
        background-color: white;
        padding: 2.5rem;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        display: flex;
        gap: 0.5rem;
        align-items: center;
        width: 100%;
        img {
          margin-left: 15%;
          width: 200px;
        }
      }
      .range {
        background-color: white;
        padding: 2.5rem;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
      }
      .if {
        background-color: white;
        padding: 2.5rem;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
      }
      .qanda {
        background-color: white;
        padding: 2.5rem;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        display: flex;
        /* flex-direction: column; */
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        .text {
          display: block;
        }
        .images {
          display: flex;
          justify-content: center;
          align-items: center;
          flex-direction: column;
          img {
            width: 200px;
          }
        }
      }
    }
  }
}

/* モバイル対応: ハンバーガーメニュー表示 */
@media (max-width: 767px) {
  body {
    header {
      .nav-pc {
        display: none !important; /* PC用ナビゲーションを非表示 */
      }
      .nav-phone {
        display: flex !important; /* ハンバーガーメニュー表示 */
        .hamburger {
          cursor: pointer;
          z-index: 102;
          background: transparent;
          border: none;
          padding: 6px;
          display: flex;
          flex-direction: column;
          justify-content: center;
          gap: 6px;
          width: 42px;
          height: 42px;

          span {
            display: block;
            width: 100%;
            height: 3px;
            background: #000;
            border-radius: 2px;
            transition: 0.3s;
          }
        }

        ul {
          position: fixed;
          top: 0;
          right: 0;
          height: 100vh;
          width: 70%;
          max-width: 280px;
          padding: 5rem 1.5rem 2rem;
          background: #ffffff;
          border-left: 3px solid #8eb9f9;
          border-radius: 0;
          display: flex;
          flex-direction: column;
          gap: 1.25rem;
          box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
          transform: translateX(100%);
          opacity: 1;
          pointer-events: none;
          z-index: 101;
          transition: transform 0.3s ease, opacity 0.3s ease;

          li a {
            font-size: 1.1rem;
            font-weight: 600;
          }
        }

        .nav-overlay {
          position: fixed;
          inset: 0;
          background: rgba(0, 0, 0, 0.35);
          opacity: 0;
          pointer-events: none;
          z-index: 100;
          transition: opacity 0.3s ease;
        }

        &.open {
          ul {
            transform: translateX(0%);
            pointer-events: auto;
          }
          .nav-overlay {
            opacity: 1;
            pointer-events: auto;
          }
          .hamburger span:nth-child(1) {
            transform: translateY(9px) rotate(45deg);
          }
          .hamburger span:nth-child(2) {
            opacity: 0;
          }
          .hamburger span:nth-child(3) {
            transform: translateY(-9px) rotate(-45deg);
          }
        }
      }
    }

    main {
      margin-top: 15%;
      .schedule,
      .overview,
      .please,
      .regulation {
        width: 95%;
      }
    }
  }
}
