.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-white);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-100%);
  transition: all 0.3s ease;

  &[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
  }

  .headerContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-inline: auto;
    max-width: 1200px;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;

    figure {
      width: 150px;
      height: auto;

      img {
        width: 100%;
        height: auto;
      }
    }
  }

  .navMenu {
    /* 共通のベーススタイル */
    ul {
      list-style: none;
    }

    /* PCメニュー */
    @media (width >= 768px) {
      ul {
        display: flex;
        gap: 2rem;
        align-items: center;

        li a {
          color: var(--color-black);
          text-decoration: none;
          font-weight: 500;
          transition: color 0.3s ease;

          &:hover {
            color: var(--color-primary);
          }
        }
      }
    }

    /* スマホメニュー */
    @media (width < 768px) {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100vh;
      background-color: rgba(251, 251, 251, 0.95);
      padding: 5rem 2rem;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.3s ease, visibility 0.3s ease;

      ul {
        display: block;

        li {
          opacity: 0;
          transform: translateY(20px);
          transition: opacity 0.3s ease, transform 0.3s ease;
          margin-bottom: 2rem;

          a {
            display: block;
            color: var(--color-black);
            text-decoration: none;
            font-size: 1.25rem;
            font-weight: 500;
          }
        }
      }

      &.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        ul li {
          opacity: 1;
          transform: translateY(0);
        }
      }
    }
  }

  .menuButton {
    display: none;

    @media (width < 768px) {
      display: flex;
      position: relative;
      width: 30px;
      height: 24px;
      background: none;
      border: none;
      cursor: pointer;
      z-index: 100;

      span {
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: var(--color-black);
        transition: all 0.3s ease;

        &:nth-child(1) {
          top: 0;
        }
        &:nth-child(2) {
          top: 50%;
          transform: translateY(-50%);
        }
        &:nth-child(3) {
          bottom: 0;
        }
      }

      &.active {
        span {
          &:nth-child(1) {
            transform: rotate(45deg);
            top: 50%;
          }
          &:nth-child(2) {
            opacity: 0;
          }
          &:nth-child(3) {
            transform: rotate(-45deg);
            top: 50%;
          }
        }
      }
    }
  }
}
