/* ==========================================================================
   news-style.css
   お知らせ一覧ページ（page-news.php）専用スタイル
   デザイントークン：ネイビー #004183／コーラル #C63031
   フォント：Zen Old Mincho（見出し）／Zen Kaku Gothic New（本文）
   faq-style.css / company-style.css / privacy-style.css の構成に準拠
   2026-09-05新規作成：自社お知らせ＋外部2ブログRSSの統合タイムライン（A案）
   ========================================================================== */

.nw-page {
  --nw-navy: #004183;
  --nw-coral: #C63031;
  --nw-bg-soft: #F7F9FB;
  --nw-text: #262626;
  --nw-border: #E5E9ED;
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: var(--nw-text);
  line-height: 1.9;
}

.nw-page h1,
.nw-page h2 {
  font-family: "Zen Old Mincho", serif;
  color: var(--nw-navy);
}

.nw-hero__inner,
.nw-body__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- ヒーロー（他ページとメインビジュアル高さ統一・写真なし簡潔版） ---------- */
.nw-hero {
  background: linear-gradient(180deg, #EAF4FF 0%, #fff 100%);
  padding: 88px 0;
  min-height: 300px;
  display: flex;
  align-items: center;
  text-align: center;
}
.nw-hero__eyebrow {
  color: var(--nw-navy);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  margin: 0 0 16px;
}
.nw-hero__title {
  font-size: 2rem;
  margin: 0 0 14px;
}
.nw-hero__sub {
  font-size: 1rem;
  color: #555;
  margin: 0;
}

/* ---------- 一覧本体 ---------- */
.nw-body {
  padding: 56px 0 72px;
}

.nw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--nw-border);
}
.nw-item {
  border-bottom: 1px solid var(--nw-border);
}
.nw-item__link {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 20px 4px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease;
}
.nw-item__link:hover {
  background: var(--nw-bg-soft);
}

/* 日付＋ラベルのメタ列。PCでは固定幅で縦のラインを揃える。 */
.nw-item__meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 250px;
}
.nw-item__date {
  font-size: 0.86rem;
  color: #6B7684;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 出自ラベル（統合タイムラインで「どこの記事か」を示す唯一の手がかり） */
.nw-item__tag {
  flex: 0 0 auto;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.nw-item__tag.is-own {
  color: var(--nw-coral);
  background: rgba(198, 48, 49, 0.06);
}
.nw-item__tag.is-column {
  color: var(--nw-navy);
  background: rgba(0, 65, 131, 0.06);
}
.nw-item__tag.is-blog {
  color: #4A6B3F;
  background: rgba(74, 107, 63, 0.07);
}

.nw-item__title {
  flex: 1 1 auto;
  font-size: 1rem;
  font-weight: 500;
  color: var(--nw-text);
  line-height: 1.7;
}
.nw-item__link:hover .nw-item__title {
  color: var(--nw-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nw-item__ext {
  margin-left: 6px;
  font-size: 0.82em;
  color: #8A94A0;
}

.nw-empty {
  padding: 40px 0;
  text-align: center;
  color: #6B7684;
}

/* ---------- ページ送り ---------- */
.nw-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}
.nw-pager__btn {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--nw-navy);
  border: 1px solid var(--nw-border);
  border-radius: 999px;
  padding: 10px 22px;
  background: #fff;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nw-pager__btn:hover {
  border-color: var(--nw-navy);
}
.nw-pager__btn.is-disabled {
  color: #B6BEC7;
  border-color: #EDF0F3;
  pointer-events: none;
}
.nw-pager__status {
  font-size: 0.9rem;
  color: #6B7684;
  font-variant-numeric: tabular-nums;
}

/* ---------- 外部ブログ本体への導線 ---------- */
.nw-sources {
  margin-top: 56px;
  padding: 26px 28px;
  background: var(--nw-bg-soft);
  border: 1px solid var(--nw-border);
  border-radius: 10px;
  text-align: center;
}
.nw-sources__note {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: #555;
}
.nw-sources__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
}
.nw-sources__links a {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--nw-navy);
  text-decoration: none;
}
.nw-sources__links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- スマートフォン ---------- */
@media (max-width: 700px) {
  /* 【2026-09-05】iPhone実機（16e）確認で、見出し「お知らせ」の上下に
     無駄な余白が大きいと指摘。原因はヒーローの上下パディング64px＋min-height240px
     ＋本文側の上パディング40px が重なり、リード文と1件目の間に100px超の空白が
     できていたこと。PCの余裕ある見え方をSPにそのまま持ち込んでいた。
     min-heightは撤去し（SPでは中身の高さで足りる）、パディングを実測に基づいて詰めた。
     ★他ページ（/faq/ 等）のヒーローも同系の設計のため、同じ現象が出る可能性が高い。
       横展開は未実施（2026-09-05時点でユーザー判断待ち）。 */
  .nw-hero {
    padding: 40px 0 30px;
    min-height: 0;
  }
  .nw-hero__title {
    font-size: 1.7rem;
    margin: 0 0 12px;
  }
  .nw-hero__eyebrow {
    margin: 0 0 10px;
  }
  .nw-hero__sub {
    font-size: 0.98rem;
    line-height: 1.8;
    text-align: left;
  }
  .nw-body {
    padding: 22px 0 56px;
  }

  /* SPでは日付＋ラベルを上段、タイトルを下段の2段組みにする */
  .nw-item__link {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 2px;
  }
  .nw-item__meta {
    width: auto;
    gap: 10px;
  }
  /* 一覧の可読性が低いという指摘にあわせ、SPの文字を一段大きくする */
  .nw-item__date {
    font-size: 0.9rem;
  }
  .nw-item__tag {
    font-size: 0.76rem;
    padding: 6px 11px;
  }
  .nw-item__title {
    font-size: 1.04rem;
    line-height: 1.65;
  }
  .nw-pager {
    gap: 12px;
  }
  .nw-pager__btn {
    padding: 9px 16px;
    font-size: 0.85rem;
  }
  .nw-sources {
    padding: 22px 18px;
  }
}

/* ==========================================================================
   お知らせ記事詳細（single-news.php）
   一覧（page-news.php）と同じ .nw-page トークンを共有し、本文まわりだけ追加定義する。
   SWELL本体CSSはfunctions.php側で除外しているため、本文の基本タイポグラフィも
   ここで最低限定義しておく必要がある（未定義だとブラウザ既定表示になる）。
   ========================================================================== */
.nw-single__date {
  font-size: 0.88rem;
  color: #6B7684;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.nw-single .nw-body__inner {
  max-width: 780px;
}

.nw-single__content {
  font-size: 1rem;
  line-height: 2;
  color: var(--nw-text);
}
.nw-single__content > *:first-child {
  margin-top: 0;
}
.nw-single__content p {
  margin: 0 0 1.6em;
}
/* 見出しはTOP（.sc-h2）と同じ「ネイビー明朝＋短い下線アクセント」のトーンに揃える。
   SWELL既定の紺ベタ帯は当サイトのトーンと合わないため使わない。 */
.nw-single__content h2 {
  font-family: "Zen Old Mincho", serif;
  color: var(--nw-navy);
  font-size: 1.35rem;
  line-height: 1.6;
  margin: 2.8em 0 1em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--nw-border);
  position: relative;
}
.nw-single__content h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 56px;
  height: 3px;
  background: var(--nw-coral);
}
.nw-single__content h3 {
  font-family: "Zen Old Mincho", serif;
  color: var(--nw-navy);
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 2em 0 0.7em;
}
.nw-single__content a {
  color: var(--nw-navy);
  text-underline-offset: 3px;
}
.nw-single__content ul,
.nw-single__content ol {
  margin: 0 0 1.6em;
  padding-left: 1.4em;
}
.nw-single__content li {
  margin-bottom: 0.4em;
}
.nw-single__content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.6em auto;
  border-radius: 8px;
}
.nw-single__content figure {
  margin: 1.6em 0;
}
.nw-single__content figcaption {
  font-size: 0.85rem;
  color: #6B7684;
  text-align: center;
  margin-top: 8px;
}
.nw-single__content blockquote {
  margin: 1.6em 0;
  padding: 16px 20px;
  background: var(--nw-bg-soft);
  border-left: 3px solid var(--nw-navy);
}
.nw-single__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.94rem;
}
.nw-single__content th,
.nw-single__content td {
  border: 1px solid var(--nw-border);
  padding: 10px 12px;
  text-align: left;
}
.nw-single__content th {
  background: var(--nw-bg-soft);
  color: var(--nw-navy);
  font-weight: 700;
  white-space: nowrap;
  width: 30%;
}

/* Gutenbergのテーブルブロックは figure でラップされる。
   スマホで横に溢れる表は、ページ全体ではなく表の中だけをスクロールさせる。 */
.nw-single__content .wp-block-table {
  margin: 1.8em 0;
  overflow-x: auto;
}
.nw-single__content .wp-block-table table {
  margin: 0;
}

/* リストマーカーをブランドカラーに。本文の黒丸だけが浮くのを防ぐ。 */
.nw-single__content ul {
  list-style: none;
  padding-left: 0;
}
.nw-single__content ul > li {
  position: relative;
  padding-left: 1.3em;
}
.nw-single__content ul > li::before {
  content: "";
  position: absolute;
  left: 0.25em;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nw-navy);
}
.nw-single__content ol {
  padding-left: 1.5em;
}
.nw-single__content strong {
  font-weight: 700;
  color: var(--nw-navy);
}

/* ---------- SWELL既定パーツの打ち消し ----------
   single-news.php はSWELLのテンプレートを使わないため、テンプレート由来の
   シェアボタン・関連記事等はそもそも出力されない。
   ただしSWELLの目次は the_content フィルタで本文に差し込まれるため、
   テンプレートを差し替えてもここだけは残る。当ページの構成（H2が5本程度・
   ヒーロー直下から読み始める設計）では目次は不要なので隠す。
   ★目次のクラスが .p-toc であることは 2026-09-05 に実機のDOMで確認済み
     （出力は <div class="p-toc -double">）。推定ではない。
   ★このCSSは functions.php によりお知らせ関連ページでしか読み込まれないため、
     セレクタをページ全体にかけても他ページには影響しない。
     画面左端に固定表示されるシェアバーは <main> の外に出力されるため、
     .nw-single 配下に限定すると消せない。だからここは非スコープで書いている。 */
.p-toc,
.c-shareBtns,
.c-shareBtns--sideFix,
.p-fixBtnWrap,
.l-fixSide {
  display: none !important;
}

.nw-single__back {
  margin-top: 48px;
  text-align: center;
}

@media (max-width: 700px) {
  /* 【2026-09-05】iPhone実機で「本文が小さくて読めない」と指摘。
     従来はPC基準1remに対しSPで0.95rem＝約15pxまで縮めていたが、
     読み手に高齢の飼い主が多いことを踏まえ、SPではPCより大きくする方針へ反転。
     1.06rem＝約17px。行間は文字を大きくした分わずかに詰める。 */
  .nw-single__content {
    font-size: 1.06rem;
    line-height: 1.95;
  }
  .nw-single__content h2 {
    font-size: 1.28rem;
  }
  .nw-single__content h3 {
    font-size: 1.14rem;
  }
  .nw-single__content table {
    font-size: 1rem;
  }
  .nw-single__content th,
  .nw-single__content td {
    padding: 12px 10px;
  }
  /* SPは横幅が足りないため、ラベル列の固定幅と折り返し禁止を解除する */
  .nw-single__content th {
    width: 34%;
    white-space: normal;
  }
}
