.mega-menu-wrapper {
  display: contents;
  contain: layout;

  &:has(.mega-menu__image) {
    display: block grid;
    inline-size: 100%;
    grid-template-columns: 75% 25%;
    max-inline-size: 120rem;
    margin-inline: auto;
  }
}

.mega-menu__adding-image-content {

  &:has(.mega-menu__image) {
    padding-inline: 10rem;
    background-color: rgba(255, 255, 255, 0.9);
    

    & .mega-menu__list {
      margin-inline: unset;
      grid-template-columns: unset;
      animation: fadeInUp 0.6s ease-out forwards;
      animation-delay: 0.2s;

      & > li {
        inline-size: fit-content;
        opacity: 0;
        animation: fadeInUp 0.3s ease-out forwards;

        &:nth-child(1) { animation-delay: 0.2s; }
        &:nth-child(2) { animation-delay: 0.3s; }
        &:nth-child(3) { animation-delay: 0.4s; }
        &:nth-child(4) { animation-delay: 0.5s; }
        &:nth-child(5) { animation-delay: 0.6s; }
        &:nth-child(6) { animation-delay: 0.7s; }
        &:nth-child(7) { animation-delay: 0.8s; }
        &:nth-child(8) { animation-delay: 0.9s; }
        &:nth-child(9) { animation-delay: 1.0s; }
        &:nth-child(10) { animation-delay: 1.1s; }
        &:nth-child(11) { animation-delay: 1.2s; }
        &:nth-child(12) { animation-delay: 1.3s; }

        & > a {
          font-size: 2rem;
          margin-block-end: 0.25rem;
        }
      }

      
    }

    & .mega-menu__image {
      position: relative;
      opacity: 0;
      animation: fadeInUp 0.8s ease-out forwards;

      &::before {
        content: '';
        display: block flow;
        aspect-ratio: 0.7532;
      }

      & img {
        position: absolute;
        inset: 0;
        object-fit: cover;
        block-size: 100%;
        inline-size: 100%;
      }
    }
  }
}


@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SP用メニューの設定 */
.menu-drawer {
  &:has(.menu-drawer__image) {
    background-color: rgba(255, 255, 255, 0.9);

    & .menu-drawer__menu {
      & > li {
        opacity: 0;
        animation: fadeInUp 0.3s ease-out forwards;

        &:nth-child(1) { animation-delay: 0.2s; }
        &:nth-child(2) { animation-delay: 0.3s; }
        &:nth-child(3) { animation-delay: 0.4s; }
        &:nth-child(4) { animation-delay: 0.5s; }
        &:nth-child(5) { animation-delay: 0.6s; }
        &:nth-child(6) { animation-delay: 0.7s; }
        &:nth-child(7) { animation-delay: 0.8s; }
        &:nth-child(8) { animation-delay: 0.9s; }
        &:nth-child(9) { animation-delay: 1.0s; }
        &:nth-child(10) { animation-delay: 1.1s; }
        &:nth-child(11) { animation-delay: 1.2s; }
        &:nth-child(12) { animation-delay: 1.3s; }
      }
    }
  }
}


/* .menu-drawer__image-wrapper {
  display: block grid;
  grid-template-columns: 1fr 1fr;
  padding-inline: 5rem;
  gap: 1rem;
  margin-block-start: 5rem;
} */

.menu-drawer__image {
  position: relative;

  &::before {
    content: '';
    display: block flow;
    aspect-ratio: 0.7532;
  }

  & img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    block-size: 100%;
    inline-size: 100%;
  }
}