/* sitemap */

.sitemap__container .inner {
  max-width: 64.25rem;
  width: 100%;
  margin: 0 auto;
  padding-inline: 1rem;
}

.sitemap__container {
  margin-top: 5rem;
  padding-bottom: 7.5rem;
}

.sitemap_inner_title {
  margin-top: 3.5rem;
}

.sitemap_inner_title:first-child {
  margin-top: 0;
}

.sitemap_inner_title a {
  background: var(--colorLightGray);
  display: block;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  line-height: 1.5;
  transition: color 0.35s ease-out;
  padding: 1rem;
  position: relative;
}

@media (hover: hover) {
  .sitemap_inner_title a:hover {
    color: var(--colorMain);
  }
}

.sitemap_inner_title a::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  display: block;
  background-image: url(../../images/common/img-arrow-white.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1rem 1rem;
  width: 1rem;
  height: 1rem;
  z-index: 2;
}

.sitemap_inner_title a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  display: block;
  background-color: var(--colorMain);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  z-index: 1;
}

.sitemap_sub_list_container {
  margin-top: 1.5rem;
}

.sitemap_sub_list_title {
  border-bottom: var(--colorMediumLightGray) solid 1px;
  padding-bottom: 1rem;
}

.sitemap_sub_list_title a {
  color: var(--colorBlack);
  display: inline-block;
  font-size: clamp(0.875rem, 2vw, 1rem);
  font-weight: 700;
  line-height: 1.5;
  transition: color 0.35s ease-out;
  padding-right: 2.7rem;
  position: relative;
}

@media (hover: hover) {
  .sitemap_sub_list_title a:hover {
    color: var(--colorMain);
  }
}

.sitemap_sub_list_title a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: block;
  background-image: url(../../images/common/img-arrow-red.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: 1.45rem;
  height: 1.45rem;
  z-index: 2;
}

.sitemap_sub_list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.sitemap_sub_list li {
  line-height: 1.5;
}

.sitemap_sub_list li a {
  color: var(--colorGray);
  font-size: clamp(0.875rem, 2vw, 1rem);
  text-decoration: underline;
  transition: color 0.35s ease-out;
}

@media (hover: hover) {
  .sitemap_sub_list li a:hover {
    color: var(--colorMain);
  }

  .sitemap_inner_title a:hover::before {
    animation: arrow-hover 0.5s forwards;
  }

  .sitemap_sub_list_title a:hover::after {
    animation: arrow-inner-hover 0.5s forwards;
  }
}

/* --- アニメーション設定 --- */

@keyframes arrow-hover {
  0% {
    transform: translate(0, -50%);
    opacity: 1;
  }
  50% {
    transform: translate(150%, -50%);
    opacity: 1;
  }
  51% {
    transform: translate(-150%, -50%);
    opacity: 0;
  }
  52% {
    transform: translate(-150%, -50%);
    opacity: 1;
  }
  100% {
    transform: translate(0, -50%);
    opacity: 1;
  }
}

@keyframes arrow-inner-hover {
  0% {
    background-position: center;
    opacity: 1;
  }
  50% {
    background-position: 1.5rem center;
    opacity: 1;
  }
  51% {
    background-position: -1.5rem center;
    opacity: 0;
  }
  52% {
    background-position: -1.5rem center;
    opacity: 1;
  }
  100% {
    background-position: center;
    opacity: 1;
  }
}

/* --- 767px以下の調整 --- */

@media screen and (max-width: 767px) {
  .sitemap__container {
    margin-top: 3.25rem;
    padding-bottom: 6rem;
  }
  .sitemap__container .inner {
    padding-inline: 0;
  }
  .sitemap_inner_title {
    margin-top: 2rem;
  }

  /* スマホ用の大見出し矢印：中見出しと同じ1.5remの「マスク領域」を作る */
  .sitemap_inner_title a::before {
    background-image: url(../../images/common/img-arrow-red.png);
    right: 1.25rem;
    width: 1.5rem;
    height: 1.5rem;
  }

  .sitemap_inner_title a::after {
    background-color: unset;
    height: 1.5rem;
    width: 1.5rem;
  }

  .sitemap_sub_list {
    gap: 0.8rem 1.5rem;
  }
}

/* スマホ時（767px以下）は要素を移動させず、背景画像をループさせる */
@media screen and (max-width: 767px) and (hover: hover) {
  .sitemap_inner_title a:hover::before {
    animation: arrow-inner-hover 0.5s forwards;
  }
}
