.news-list {
  padding-bottom: 80px;
  background-color: #fff;
  color: #665f53;
  font-family: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 400;

  @media screen and (min-width: 769px) {
    padding-bottom: 100px;
  }

  @media screen and (min-width: 1024px) {
    padding-bottom: 120px;
  }
}

/* ========================================
   インナー
======================================== */

.news-list__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 1250px;
  margin-inline: auto;
}

/* ========================================
   説明文
======================================== */

.news-list__lead {
  margin: 60px 0 0;
  padding-inline: 20px;
  color: #665f53;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.875;
  letter-spacing: 0.05em;
  text-align: center;

  @media screen and (min-width: 769px) {
    margin-top: 80px;
  }
}

.news-list__lead br {
  display: none;
}

@media screen and (max-width: 627px) {
  .news-list__lead br {
    display: inline;
  }
}

/* ========================================
   カテゴリー一覧
======================================== */

.news-list__categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 80px;
  padding-inline: 20px;

  @media screen and (min-width: 769px) {
    gap: 35px;
    margin-top: 120px;
    padding-inline: 25px;
  }
}

/* Smoooothが生成するカテゴリー用記事ブロック */
.news-list__categories > .webgene-blog,
.news-list__categories > .news-list__category-block,
.news-list__categories > .webgene-component {
  display: contents;
}

/* CMSから取得する各カテゴリー */
.news-list__categories .news-category__item {
  box-sizing: border-box;
  flex: 0 0 150px;
  width: 150px;
  max-width: none;
  margin: 0;
}

/* ========================================
   カテゴリーボタン
======================================== */

.news-list__categories .news-category__link {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 60px;
  padding: 10px;
  border: 1px solid #665f53;
  background-color: #fff;
  color: #665f53;
  font-family: "Shippori Mincho", serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 2.5;
  letter-spacing: 0.05em;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.3s,
    color 0.3s;

  /* 選択中のカテゴリー */
  &.is-active {
    background-color: #665f53;
    color: #fff;
  }

  /* リンク内の段落 */
  p {
    margin: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    text-decoration: none;
  }

  /* 下線を解除 */
  &,
  &:hover,
  &:focus-visible {
    text-decoration: none;
  }

  /* ホバー */
  @media (hover: hover) {
    &:hover {
      background-color: #665f53;
      color: #fff;
    }
  }

  /* キーボード操作 */
  &:focus-visible {
    outline: 2px solid #665f53;
    outline-offset: 3px;
  }
}

/* 固定リンクブロック「すべて」 */
.news-list__categories > .news-category__link {
  flex: 0 0 150px;

  @media (hover: hover) {
    &:hover {
      opacity: 0.8;
    }
  }
}

/* ========================================
   お知らせ一覧
======================================== */

.news-list__body {
  box-sizing: border-box;
  width: 100%;
  max-width: 950px;
  margin: 70px auto 0;
  padding-inline: 20px;

  @media screen and (min-width: 769px) {
    margin-top: 100px;
    padding-inline: 25px;
  }
}

.news-list__articles,
.news-list__items {
  width: 100%;
}

/* 各記事 */
.news-list__item {
  margin: 0;
  border-bottom: 1px solid #c0b1a3;
}

/* ========================================
   記事リンク
======================================== */

.news-list__link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 15px;
  padding: 20px 10px;
  color: #665f53;
  text-decoration: none;
  transition: opacity 0.3s;

  @media screen and (min-width: 769px) {
    flex-wrap: nowrap;
    gap: 30px;
    padding: 25px 15px;
  }

  @media (hover: hover) {
    &:hover {
      opacity: 0.6;
    }
  }
}

/* リンクの下線を解除 */
.news-list .news-list__link,
.news-list .news-list__link:hover,
.news-list .news-list__link:focus-visible,
.news-list .news-list__date,
.news-list .news-list__title {
  text-decoration: none;
}

/* ========================================
   日付
======================================== */

.news-list__date {
  flex-shrink: 0;
  color: #665f53;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;

  @media screen and (min-width: 769px) {
    font-size: 16px;
  }
}

/* ========================================
   カテゴリーラベル
======================================== */

.news-list__category {
  box-sizing: border-box;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-width: 85px;
  padding: 4px 12px;
  border-radius: 100px;
  background-color: #c0b1a3;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;

  @media screen and (min-width: 769px) {
    min-width: 90px;
  }
}

/* ========================================
   記事タイトル
======================================== */

.news-list__title {
  width: 100%;
  margin: 0;
  color: #665f53;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;

  @media screen and (min-width: 769px) {
    flex: 1;
    width: auto;
  }
}

/* ========================================
   ページネーション
======================================== */

.news-list .webgene-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 60px;

  @media screen and (min-width: 769px) {
    margin-top: 90px;
  }

  /* ページ番号・前後リンク */
  a,
  span {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 4px;
    border: 1px solid #665f53;
    color: #665f53;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    transition:
      background-color 0.3s,
      color 0.3s;
  }

  /* ホバー */
  @media (hover: hover) {
    a:hover {
      background-color: #665f53;
      color: #fff;
    }
  }
}

/* ニュースページ下部の相談・予約ボタン */
@media screen and (max-width: 1023px) {
  .news-list ~ .page-contact .page-contact__buttons {
    width: 100%;
    max-width: 350px;
    margin-inline: auto;
  }

  .news-list ~ .page-contact .page-contact__buttons > .contact__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 15px 32px;
  }

  .news-list ~ .page-contact .page-contact__buttons > .contact__button::before {
    position: static;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    transform: none;
  }
}

/* Keep content clear of the fixed desktop buttons. */
@media screen and (min-width: 1024px) and (max-width: 1399px) {
  .news-list__inner {
    width: calc(100% - 135px);
    margin-inline-end: 110px;
  }
}
