.m-mainvisual__wrapper {
  background-image: url(/recruit/project-story/resource/img/bg_mv.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 80rem;
  position: relative;
}

.m-nav__breadcrumb {
  padding-top: 2rem;
}

.m-mainvisual__inner {
  left: max(2rem, calc((100% - 120rem) / 2));
  position: absolute;
  top: 49.5%;
  transform: translateY(-50%);
}

.m-mainvisual__title {
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.m-mainvisual__lead {
  display: grid;
  gap: 1.2rem;
  margin-top: 3rem;
}

.m-mainvisual__lead-line {
  display: inline-block;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.5rem 1rem;
  position: relative;
  width: fit-content;
  z-index: 1;
}

.m-mainvisual__lead-line::before {
  background-color: var(--color-black);
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: calc(100% - 2rem);
  z-index: -1;
}

.m-mainvisual__lead-line:nth-of-type(2)::before {
  width: calc(100% - 1.5rem);
}

@media screen and (max-width: 767px) {
  .m-nav__breadcrumb {
    padding-top: 1rem;
  }

  .m-mainvisual__wrapper {
    background-image: url(/recruit/project-story/resource/img/bg_mv_sp.png);
    background-position: 0 -7rem;
    height: 73rem;
  }

  .m-mainvisual__inner {
    top: 16.5%;
    transform: unset;
  }

  .m-mainvisual__title {
    font-size: 2.6rem;
    letter-spacing: 0.1em;
  }

  .m-mainvisual__lead-line {
    font-size: 2rem;
  }
}

/* main content */
.l-grid-toc-content-wrap {
  position: relative;
}

.l-grid-toc-content-wrap::before {
  background-image: url(/recruit/project-story/resource/img/bg_star.png);
  background-position: center;
  background-repeat: repeat-y;
  background-size: contain;
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -1;
}

.l-grid-toc-content-wrap::after {
  background-image: url(/recruit/project-story/resource/img/bg_bottom.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  bottom: 0;
  content: "";
  height: 214.8rem;
  left: 0;
  position: absolute;
  width: 100%;
  z-index: -1;
}

.l-grid-toc-content {
  display: grid;
  grid-template-columns: 24rem 1fr;
  position: relative;
}

@media screen and (max-width: 767px) {
  .l-grid-toc-content.container {
    gap: 4rem;
    grid-template-columns: 1fr;
  }
}

/* 目次 */
.m-toc {
  height: fit-content;
  padding-block: 13.5rem;
  position: sticky;
  top: 6rem;
  z-index: 2;
}

.m-toc__hdg {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 2.4px;
  line-height: 3.5;
}

.m-toc__item {
  align-items: center;
  display: flex;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  opacity: 0.5;
  padding-block: 1.75rem;
  padding-left: 2rem;
  transition: background-color 0.3s;
}

.m-toc__item:hover {
  background-color: rgba(240, 240, 240, 0.1);
  border-right: 1px solid rgba(240, 240, 240, 1);
  opacity: 1;
}

.m-toc__item::before {
  aspect-ratio: 1;
  background-color: var(--color-white);
  border-radius: 50%;
  content: "";
  display: inline-block;
  margin-right: 2rem;
  width: 1rem;
}

.m-toc__list a {
  color: #fff;
  display: block;
  transition: all 0.3s;
}

.m-toc__item.current {
  background-color: rgba(240, 240, 240, 0.1);
  border-right: 1px solid rgba(240, 240, 240, 1);
  opacity: 1;
}

.l-content {
  border-left: 1px solid var(--color-white3);
  padding: 15rem 0 22rem 5.56%;
}

@media screen and (max-width:1024px) {
  .l-grid-toc-content {
    grid-template-columns: 1fr;
  }

  .m-toc {
    padding: 4rem 2rem 0;
  }

  .m-toc__hdg {
    align-items: center;
    background-color: var(--color-white);
    border-radius: 1rem;
    color: var(--color-black);
    cursor: pointer;
    display: flex;
    font-size: 1.4rem;
    justify-content: space-between;
    letter-spacing: 2.8px;
    line-height: 2.14;
    padding: 1rem 2rem;
    position: relative;
  }

  .a-expand::before, .a-expand::after {
    background-color: var(--color-black);
    content: "";
    display: inline-block;
    height: 0.2rem;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.1rem;
  }

  .m-toc__hdg.close .a-expand::after {
    content: "";
    transform: translateY(-50%) rotate(-270deg);
  }

  .m-toc__hdg .a-expand::after {
    content: "";
    transform: translateY(-50%);
    transition: transform 0.3s;
  }

  .a-expand::after {
    content: "";
    transform: translateY(-50%) rotate(-90deg);
  }

  .a-expand {
    border-left: 1px solid rgba(17, 17, 17, 0.3);
    display: inline-block;
    height: 3rem;
    position: relative;
    width: 3rem;
  }

  .m-toc__list {
    background-color: #272727;
    border-radius: 1rem;
    margin-top: 1rem;
    max-height: 200vh;
    overflow: hidden;
    padding: 2rem 1rem;
    position: absolute;
    transition: max-height 0.3s, padding 0.3s;
    width: calc(100% - 6rem);
    z-index: 10;
  }

  .m-toc__list.close {
    max-height: 0;
    padding-block: 0;
  }

  .m-toc__item {
    padding-block: 0.85rem;
  }

  .m-toc__item a {
    color: var(--color-white5);
    font-size: 1.3rem;
    font-weight: 500;
    opacity: 1;
  }

  .m-toc__item::before {
    background-color: var(--color-white5);
    margin-right: 1rem;
    width: 0.8rem;
  }

  .m-toc__item.current {
    background-color: transparent;
  }

  .m-toc__item.current a {
    color: var(--color-white);
  }

  .m-toc__item.current::before {
    background-color: var(--color-white);
  }

  .l-content {
    border-left: none;
    padding: 0 2rem 30rem;
  }
}

.m-history {
  padding-top: 9rem;
}

.m-history:nth-child(1) {
  padding-top: 0;
}


.m-history:nth-child(8) {
  padding-top: 8rem;
}

.m-history__image {
  position: relative;
}

.m-history:nth-child(7) .m-history__image {
  width: 94%;
}

.m-history:nth-child(4) {
  padding-top: 10rem;
}

.m-history:nth-child(6) {
  padding-top: 7.5rem;
}

.m-history__inner {
  align-items: center;
  display: grid;
  gap: 6.3%;
  grid-template-columns: 44% auto;
}

.m-history--reverse .m-history__inner {
  grid-template-columns: auto 44%;
}

.m-history:nth-child(4) .m-history__inner {
  gap: 8%;
  grid-template-columns: auto 41%;
} 

.m-history__content {
  position: relative;
}

.m-history:nth-child(5) .m-history__content {
  top: -1rem;
}

.m-history:nth-child(6) .m-history__content {
  top: -1rem;
}

.m-history:nth-child(7) .m-history__content {
  top: -1rem;
}

.m-history__year {
  font-size: 6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.m-history__title {
  background-color: var(--color-black);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
  margin-top: 3.5rem;
  padding: 0.2rem 0.8rem;
  width: fit-content;
}

.m-history__title-em {
  letter-spacing: -0.2em;
}

.m-history__lead {
  background-color: var(--color-black);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.6;
  margin-top: 1rem;
  padding: 0.2rem 0.8rem;
  width: fit-content;
}

.m-history__text {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.5rem;
  line-height: 2;
  margin-top: 3.2rem;
}

.m-history-list {
  display: grid;
  gap: 1.65rem;
  margin: 8.8rem auto 0;
  width: fit-content;
}

.m-history:nth-child(6) .m-history-list {
  margin-top: 7.5rem;
} 

.m-history:nth-child(7) .m-history-list {
  margin-top: 7.5rem;
}

.m-history:nth-child(8) .m-history-list {
  margin-top: 8rem;
}

.m-history-list__item {
  align-items: center;
  display: grid;
  gap: 7rem;
  grid-template-columns: 9rem auto;
}

.m-history-list__year {
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.m-history-list__month {
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.m-history-list__text {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.5rem;
  line-height: 2;
  position: relative;
}

.m-history-list__text::before {
  background-color: var(--color-white);
  content: "";
  height: 0.1rem;
  left: -5rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
}

.m-continues {
  padding-block: 19rem 0;
}

.m-continues-title {
  font-size: 4rem;
  font-weight: 700;
  text-align: center;
}

.m-continues-text {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 2.2;
  margin-top: 5rem;
  text-align: center;
}

@media screen and (max-width: 767px) {
  .m-history, .m-history:nth-child(4) {
    padding-top: 6.5rem;
  }

  .m-history__inner, .m-history--reverse .m-history__inner {
    display: flex;
    flex-direction: column;
    gap: 3rem;
  }

  .m-history:nth-child(4) .m-history__inner {
    gap: 3rem;
  }

  .m-history:nth-child(6) .m-history__inner, .m-history:nth-child(8) .m-history__inner {
    gap: 2rem;
  }

  .m-history--reverse .m-history__inner {
    flex-direction: column-reverse;
  }

  .m-history__image {
    width: 85%;
  }

  .m-history:nth-child(4) .m-history__image {
    width: 81%;
  }

  .m-history:nth-child(7) .m-history__image {
    width: 82%;
  }

  .m-history:nth-child(5) .m-history__content, .m-history:nth-child(6) .m-history__content {
    top: 0;
  }

  .m-history__year {
    font-size: 4.5rem;
  }

  .m-history__title {
    letter-spacing: 0;
    margin-top: 2rem;
    padding-block: 0;
  }

  .m-history__lead {
    letter-spacing: -0.05em;
  }

  .m-history__text {
    margin-top: 2rem;
  }

  .m-history:nth-child(7) .m-history-list {
    margin-top: 5.5rem;
  }

  .m-history-list, .m-history:nth-child(8) .m-history-list {
    margin-left: 0;
    margin-top: 6.8rem;
  }

  .m-history-list__item {
    grid-template-columns: 1fr;
  }

  .m-history-list__item {
    gap: 2.8rem;
  }

  .m-history-list__text::before {
    left: 0;
    top: -1rem;
  }

  .m-continues {
    padding-block: 28rem 0;
    padding-left: 4rem;
  }

  .m-continues-title, .m-continues-text {
    text-align: start;
  }

  .m-continues-title {
    line-height: 1.6;
  }

  .m-continues-text {
    margin-top: 3rem;
  }
}
