/* News Section */
.news-list-section {
  padding: 2rem 0 var(--space-section-bottom);
}

.news-detail-section {
  padding: 7rem 0 var(--space-section-bottom);
  background-color: #fefefe;
}

@media (min-width: 768px) {
  .news-list-section {
    padding-top: 3rem;
  }
  .news-detail-section {
    padding-top: 9rem;
  }
}

.news-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  margin-bottom: 2rem;
}
.news-breadcrumb__link,
.news-breadcrumb__separator {
  flex-shrink: 0;
  white-space: nowrap;
}
/* 最後の段（記事タイトル）は 1 行で省略表示。長いタイトルでも折り返さず末尾「…」 */
.news-breadcrumb__current {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 768px) {
  .news-breadcrumb {
    margin-bottom: 2.5rem;
  }
}


/* News List
   Query Loop が <ul.wp-block-post-template><li.wp-block-post> を自動生成するので、
   その WP デフォルトを完全リセットしてから、内側の .news-list__item に
   トップページの news-section と同じ flex/border/padding を当てる。 */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-list .wp-block-post-template {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

.news-list .wp-block-post {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

.news-list__item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(42, 42, 42, 0.1);
}

@media (min-width: 768px) {
  .news-list__item {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 1rem;
  }
}

/* :first-child / :last-child は li (.wp-block-post) 側で判定する */
.news-list .wp-block-post:first-child .news-list__item {
  padding-top: 0;
}

.news-list .wp-block-post:last-child .news-list__item {
  padding-bottom: 0;
  border-bottom: none;
}

/* ホバー時：タイトル文字色を青へ滑らかに変化 */
.news-list__link-title a {
  color: inherit;
  transition: color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .news-list__item:hover .news-list__link-title a {
    color: var(--color--accent);
  }
}

.news-list__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .news-list__meta {
    width: 12rem;
  }
}

.news-list__date {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.news-list__category {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.75rem;
  background: var(--gradient--accent);
  color: #ffffff;
  border-radius: 100px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
  line-height: 1.2;
}

/* WP の wp:post-terms は <div class="...__category"><a>term</a></div> を出すので、
   内側の <a> に文字色継承 + 下線除去を当てて pill 全体を同じ見た目にする。 */
.news-list__category a {
  color: inherit;
  text-decoration: none;
}

.news-list__category:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(27, 110, 188, 0.3);
}

.news-list__link-title {
  font-size: 0.875rem;
  line-height: 1.6;
  transition: color 0.3s ease;
}

@media (min-width: 768px) {
  .news-list__link-title {
    font-size: 1rem;
  }
}

/* ===== 一覧ページネーション（前へ / 1 2 3 / 次へ）— ミニマル =====
   WP の wp:query-pagination が出すクラス
   （wp-block-query-pagination-previous / -next / .page-numbers）に当てる。 */
.news-list__pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: 3rem;
}
@media (min-width: 768px) {
  .news-list__pagination {
    margin-top: 4rem;
  }
}

/* 前へ / 次へ：Cormorant イタリック + 青グラデ文字 */
.news-list__pagination .wp-block-query-pagination-previous,
.news-list__pagination .wp-block-query-pagination-next {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.9375rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  background: var(--gradient--accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: opacity 0.3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .news-list__pagination .wp-block-query-pagination-previous:hover,
  .news-list__pagination .wp-block-query-pagination-next:hover {
    opacity: 0.6;
  }
}

/* 数字グループ */
.news-list__pagination .wp-block-query-pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* 各数字 */
.news-list__pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  font-family: var(--font--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--color--ink);
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .news-list__pagination a.page-numbers:hover {
    background-color: rgba(27, 110, 188, 0.08);
    color: var(--color--accent);
  }
}

/* 現在ページ：青グラデ塗り + 白文字 */
.news-list__pagination .page-numbers.current {
  background: var(--gradient--accent);
  color: #ffffff;
}

/* …（省略記号） */
.news-list__pagination .page-numbers.dots {
  min-width: auto;
  padding: 0 0.2rem;
  color: var(--color--ink--light);
}

/* News Detail */
.news-detail {
  max-width: 48rem;
  margin: 0 auto;
}

.news-detail__header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(42, 42, 42, 0.1);
}

.news-detail__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.news-detail__author {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
}

.news-detail__author img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 0.5rem;
  object-fit: cover;
}

.news-detail__date {
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.news-detail__category {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.75rem;
  background: var(--gradient--accent);
  color: #ffffff;
  border-radius: 100px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
  line-height: 1.2;
}

.news-detail__category a {
  color: inherit;
  text-decoration: none;
}

.news-detail__category:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(27, 110, 188, 0.3);
}

.news-detail__title {
  font-size: 1.35rem;
  letter-spacing: 0.1em;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .news-detail__title {
    font-size: 1.8rem;
  }
}

.news-detail__content {
  font-size: 1rem;
  line-height: 2;
  color: var(--color--ink);
}

/* ----- 見出し h2: 薄い青背景 + 4px 青グラデバー（角直角） ----- */
.news-detail__content h2,
.wp-block-heading h2 {
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background-color: rgba(27, 110, 188, 0.025);
  border-radius: 0;
  position: relative;
  font-weight: 700;
  color: var(--color--ink);
}

.news-detail__content h2::before,
.wp-block-heading h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient--accent);
  border-radius: 0;
}

@media (min-width: 768px) {
  .news-detail__content h2,
  .wp-block-heading h2 {
    font-size: 1.5rem;
    padding: 1rem 1.5rem;
  }
}

/* ----- 見出し h3: 下罫線 + 左下に短い青グラデアクセント ----- */
.news-detail__content h3,
.wp-block-heading h3 {
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  position: relative;
  font-weight: 700;
  color: var(--color--ink);
}

.news-detail__content h3::before,
.wp-block-heading h3::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--gradient--accent);
}

@media (min-width: 768px) {
  .news-detail__content h3,
  .wp-block-heading h3 {
    font-size: 1.25rem;
  }
}

/* ----- 見出し h4: 左に細い 2px 青グラデバー ----- */
.news-detail__content h4,
.wp-block-heading h4 {
  position: relative;
  font-size: 1rem;
  letter-spacing: 0.06em;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  padding-left: 0.875rem;
  font-weight: 700;
  color: var(--color--ink);
}

.news-detail__content h4::before,
.wp-block-heading h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  bottom: 0.25em;
  width: 2px;
  background: var(--gradient--accent);
}

/* ----- 箇条書き: 薄い青背景ボックス（角丸） + 丸ポチ + 下線区切り ----- */
.news-detail__content ul,
.wp-block-list {
  list-style: none;
  padding: 1.5rem 1.75rem;
  margin: 1rem 0 1.5rem;
  background-color: rgba(27, 110, 188, 0.04);
  border-radius: 8px;
}

.news-detail__content li,
.wp-block-list li {
  position: relative;
  padding-left: 1.5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(27, 110, 188, 0.12);
  line-height: 1.9;
  color: var(--color--ink);
}

.news-detail__content li:last-child,
.wp-block-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.news-detail__content li::before,
.wp-block-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gradient--accent);
}

.news-detail__content p,
.wp-block-paragraph {
  margin-bottom: 1.5rem;
}

/* Pagination */
.news-detail__footer {
  margin-top: 5rem;
}

/* --- 記事下 prev / next（WP wp:post-navigation-link 用） ---
   wp:post-navigation-link は内側に独自構造の span を生成するので、
   矢印は ::before / ::after で外側から表現し、内側の "Previous:" / "Next:" 等の
   ラベル文字色とタイトル文字色は親 <a> の color 継承で制御する。 */
.article-pagination-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(42, 42, 42, 0.1);
  border-bottom: 1px solid rgba(42, 42, 42, 0.1);
}

@media (min-width: 768px) {
  .article-pagination-text {
    flex-direction: row;
    align-items: stretch;
    gap: 2rem;
    padding: 2.5rem 0;
  }
}

.article-pagination-text__link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  text-decoration: none;
  color: inherit;
  /* タイトルを明朝で揃える（モックアップ準拠）。
     wp:post-navigation-link は内側 span にクラスを付けないため、リンク全体に適用。 */
  font-family: var(--font--serif);
  font-size: 0.9375rem;
  letter-spacing: 0.05em;
  line-height: 1.5;
  transition: color 0.3s ease;
  min-width: 0;
}

.article-pagination-text__prev {
  justify-content: flex-start;
}

.article-pagination-text__next {
  justify-content: flex-end;
  text-align: right;
}

/* "← Previous" / "Next →" を疑似要素で挿入（モックアップ準拠：
   Cormorant Garamond イタリック + 青グラデ塗り）。
   :not(:empty) でリンク中身が空（=対象記事が無い）のときは出さない。 */
.article-pagination-text__prev:not(:empty)::before,
.article-pagination-text__next:not(:empty)::after {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  background: var(--gradient--accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.3s ease;
}

.article-pagination-text__prev:not(:empty)::before {
  content: '← Previous';
  margin-right: 0.5rem;
}

.article-pagination-text__next:not(:empty)::after {
  content: 'Next →';
  margin-left: 0.5rem;
}

@media (hover: hover) and (pointer: fine) {
  .article-pagination-text__link:hover {
    color: var(--color--accent);
  }
  .article-pagination-text__prev:hover::before {
    transform: translateX(-4px);
  }
  .article-pagination-text__next:hover::after {
    transform: translateX(4px);
  }
}

/* prev / next 直下の「一覧へ戻る」ボタン用ラッパ */
.article-back-action {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}
@media (min-width: 768px) {
  .article-back-action {
    margin-top: 3.5rem;
  }
}
