/* -------------------------------------------------------

NEWS お知らせ

------------------------------------------------------- */
.page_header_title {
  @media (max-width: 1024px) {
    grid-column: 1 / -1;
  }
}

.page_header_image {
  @media (max-width: 1024px) {
    aspect-ratio: 3 / 2;
  }
}

.news {
  width: 100%;
  max-width: 1240px;
  margin: clamp(3rem, 1.699rem + 5.55vw, 6rem) auto clamp(8rem, 6.266rem + 7.4vw, 12rem);
  padding: 0 1rem;

  @media (max-width: 1024px) {
    margin: 0 auto 8rem;
    padding: 0 var(--pad_side-sp);
  }
}

/* カテゴリタグ */
.news_tag {
  margin-bottom: 4rem;

  @media (max-width: 1024px) {
    margin-bottom: 2.5rem;
  }
}

.news_tag_list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;

  @media (max-width: 1024px) {
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: 0.5rem;
  }
}

.news_tag_link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.5rem 1.25rem;
  border: solid 1px var(--text_black);
  background: var(--base_color);
  font-family: inherit;
  font-size: var(--font_text-sm);
  color: var(--text_black);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;

  @media (max-width: 1024px) {
    padding: 0.5rem 0.75rem;
    font-size: var(--font_text-xs);
  }
}

.news_tag_link:hover,
.news_tag_link.is_active {
  background: var(--main_color);
  border-color: var(--main_color);
  color: var(--text_white);
}

/* ニュース一覧 */
.news_contents_container {
  width: 100%;
}

.news_list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: solid 1px var(--base_color-border);
}

.news_item {
  border-bottom: solid 1px var(--base_color-border);
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  justify-items: start;
  flex-direction: column;

  @media (max-width: 1024px) {
    padding: 1.25rem 0;
  }
}

.news_meta {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.news_date {
  font-size: var(--font_base);
  font-weight: var(--font_bold);
  color: var(--main_color);
  line-height: 1.2;
}

.news_category {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
}

.news_category_item {
  display: flex;
  align-items: center;
  min-width: 6.5rem;
  padding: 0.25rem 0.75rem;
  border: solid 1px var(--text_black);
  font-size: var(--font_text-xs);
  line-height: 1.2;
  white-space: nowrap;
  color: var(--text_black);
  justify-content: center;

  @media (max-width: 1024px) {
    min-width: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
  }
}

.news_link {
  display: block;
  width: 100%;
  color: var(--text_black);
  transition: .2s;

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

  &.external {
    position: relative;

    &::after {
      content: "";
      vertical-align: text-top;
      display: inline-block;
      flex: 0 0 auto;
      width: 1.25rem;
      height: 1.25rem;
      background-color: currentColor;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M15 3h6v6'/%3E%3Cpath stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M10 14L21 3'/%3E%3C/svg%3E") center / contain no-repeat;
      -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M15 3h6v6'/%3E%3Cpath stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M10 14L21 3'/%3E%3C/svg%3E") center / contain no-repeat;
    }
  }
}

.news_title {
  font-size: var(--font_text-md);
  line-height: 1.6;

  @media (max-width: 1024px) {
    font-size: var(--font_base);
  }
}

/* 各種記事ページ article.html */
.news_article {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 4rem;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto clamp(8rem, 6.266rem + 7.4vw, 12rem);
  padding: 0 1rem;

  @media (max-width: 1024px) {
    display: block;
    margin: 0 auto 8rem;
    padding: 0 var(--pad_side-sp);
  }

  .page_toolbar {
    grid-column: 1 / -1;
  }

  .page_header {
    grid-column: 1 / 2;
    position: sticky;
    top: calc(var(--header_height) + 1.5rem);
    align-self: start;
    z-index: 1;

    @media (max-width: 1024px) {
      position: static;
      top: auto;
      align-self: auto;
      z-index: auto;
    }
  }

  .page_body {
    grid-column: 2 / -1;

    @media (max-width: 1024px) {
      margin-top: 4rem;
    }
  }

  .page_footer {
    grid-column: 2 / -1;
    margin-top: 4rem;

    @media (max-width: 1024px) {
      margin-top: 3rem;
    }
  }
}

.news_article_header {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.news_article_date {
  font-size: var(--font_base);
  font-weight: var(--font_bold);
  color: var(--main_color);
  line-height: 1.1;
}

.news_article_title {
  font-size: var(--font_text-2xl);
  font-weight: var(--font_regular);
  text-wrap: auto;
  line-height: 1.3;
}

.news_article_category {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
}

.news_article_category_item {
  display: flex;
  align-items: center;
  min-width: 6.5rem;
  padding: 0.25rem 0.75rem;
  border: solid 1px var(--text_black);
  font-size: var(--font_text-sm);
  line-height: 1.2;
  white-space: nowrap;
  color: var(--text_black);
  justify-content: center;

  @media (max-width: 1024px) {
    min-width: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
  }
}

.news_article_body {
  margin-top: 2rem;
}

/* 記事ナビ（prev / back / next） */
.news_article_nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas: "prev back next";
  width: 100%;
  border-top: solid 1px var(--base_color-border);
  padding-top: 2rem;

  @media (max-width: 1024px) {
    padding-top: 1.5rem;
  }
}

.news_article_nav_link {
  font-size: var(--font_base);
  font-weight: var(--font_bold);
  color: var(--text_black);
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.4;
}

.news_article_nav_link--prev {
  justify-self: start;
  grid-area: prev;
}

.news_article_nav_link--back {
  justify-self: center;
  grid-area: back;
}

.news_article_nav_link--next {
  grid-area: next;
  justify-self: end;
}

.news_article_nav_link:hover,
.news_article_nav_link:focus-visible {
  color: var(--main_color);
}

.news_article_nav_link:focus-visible {
  outline: 2px solid var(--main_color);
  outline-offset: 4px;
}