/* ============================================================
   p-news
   お知らせ一覧・詳細ページ
   接頭辞: .p-news
   10px = 1rem / モバイルファースト
   ============================================================ */

/* ----------------------------------------
   p-news
---------------------------------------- */
.p-news {
  padding: 4rem 2rem 8rem;
}

@media (min-width: 48em) {
  .p-news {
    padding: 6rem 4rem 10rem;
  }
}

@media (min-width: 75em) {
  .p-news {
    padding: 8rem 0 12rem;
    max-width: 80rem;
    margin-inline: auto;
  }
}

/* ----------------------------------------
   p-news__list
---------------------------------------- */
.p-news__list {
  margin-top: 4rem;
}

/* ----------------------------------------
   p-news__list-unit
---------------------------------------- */
.p-news__list-unit {
  border-bottom: 1px solid currentColor;
}

.p-news__list-unit:first-child {
  border-top: 1px solid currentColor;
}

/* ----------------------------------------
   p-news__list-link
---------------------------------------- */
.p-news__list-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.8rem 1.6rem;
  padding: 1.6rem 0;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.p-news__list-link:hover {
  opacity: 0.6;
}

@media (min-width: 48em) {
  .p-news__list-link {
    flex-wrap: nowrap;
    gap: 0 2.4rem;
    padding: 2rem 0;
  }
}

/* ----------------------------------------
   p-news__list-date
---------------------------------------- */
.p-news__list-date {
  flex-shrink: 0;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: inherit;
  opacity: 0.6;
}

@media (min-width: 48em) {
  .p-news__list-date {
    font-size: 1.3rem;
    min-width: 10rem;
  }
}

/* ----------------------------------------
   p-news__list-category
---------------------------------------- */
.p-news__list-category {
  flex-shrink: 0;
  display: inline-block;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  padding: 0.2rem 1rem;
  border: 1px solid currentColor;
  line-height: 1.6;
}

@media (min-width: 48em) {
  .p-news__list-category {
    font-size: 1.2rem;
    min-width: 8rem;
    text-align: center;
  }
}

/* ----------------------------------------
   p-news__list-title
---------------------------------------- */
.p-news__list-title {
  font-size: 1.4rem;
  line-height: 1.7;
  letter-spacing: 0.03em;
  flex: 1;
}

@media (min-width: 48em) {
  .p-news__list-title {
    font-size: 1.5rem;
  }
}

/* ----------------------------------------
   p-news__pagination
   functions.php pagination() の出力クラスに対応
   .link_before / .link_page / .current_page / .link_next
---------------------------------------- */
.p-news__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 6rem;
}

/* ページ番号リンク */
.p-news__pagination .link_page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.p-news__pagination .link_page:hover {
  border-color: currentColor;
}

/* 現在ページ */
.p-news__pagination .current_page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  border: 1px solid currentColor;
}

/* 前へ・次へ */
.p-news__pagination .link_before,
.p-news__pagination .link_next {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3.6rem;
  padding-inline: 1.2rem;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.p-news__pagination .link_before:hover,
.p-news__pagination .link_next:hover {
  border-color: currentColor;
}

/* icon left / icon right（functions.phpのspan要素） */
/* テキスト代替として矢印を疑似要素で表示 */
.p-news__pagination .link_before .icon.left::before {
  content: '前へ';
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}

.p-news__pagination .link_next .icon.right::before {
  content: '次へ';
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}
