/* お知らせ一覧（キー news。Figma お知らせ_PC 1604:218703・お知らせ_SP）
   このファイルの前半は、お知らせ・医療コラム・記事・404 で共通の部品（パンくずと題名・ページ送り・前後の記事）。
   医療コラム一覧（column）・記事（news-single・column-single）・404 のテンプレートもこのファイルを先に読み込む。
   ホバーは PC だけ（@media (hover: hover)）・0.3秒／Ease Out。 */

/* ===== この部品で使う値（色・字は tokens.css の変数。静的 HTML と同じ値） ===== */
.nn-main--news,
.nn-main--column,
.nn-main--news-single,
.nn-main--column-single,
.nn-main--404 {
  --nn-text: var(--color-text-primary, #514c46);
  --nn-accent: var(--color-brand-orange, #e8a477);
  --nn-accent-deep: var(--color-brand-orange-dark, #e88f54);
  --nn-accent-pale: var(--color-brand-orange-light, #f3d0b8);
  --nn-gold: #d7b56d;          /* Brand / Gold */
  --nn-gray: var(--color-extra-939393, #939393);
  --nn-white: #fff;
  --nn-line-green: #65980e;    /* Brand / Green Dark（LINE） */
  --nn-line-green-soft: #76983b; /* Brand / Green（LINE） */
  --nn-shadow-card: 0 0 10px rgb(109 97 61 / 0.15);
  --nn-ff-mincho: var(--font-family-heading, "Shippori Mincho B1", "Noto Serif JP", serif);
  --nn-ff-en: var(--font-family-latin, "Source Serif 4", "Noto Serif JP", serif);
  --nn-gutter: clamp(20px, 4vw, 40px);
  --nn-inner: 1120px;
  display: block;
  color: var(--nn-text);
}
:is(.nn-main--news, .nn-main--column, .nn-main--news-single, .nn-main--column-single, .nn-main--404) :where(ul, ol) { margin: 0; padding: 0; list-style: none; }
:is(.nn-main--news, .nn-main--column, .nn-main--news-single, .nn-main--column-single, .nn-main--404) :where(p, h1, h2, h3, figure) { margin: 0; }
:is(.nn-main--news, .nn-main--column, .nn-main--news-single, .nn-main--column-single, .nn-main--404) :where(a) { color: inherit; text-decoration: none; }
:is(.nn-main--news, .nn-main--column, .nn-main--news-single, .nn-main--column-single, .nn-main--404) :where(img) { max-width: 100%; height: auto; display: block; }

/* ===== パンくずとページの題名（共通。上 20＋パンくず 64・題名 上 60・線まで 30・下 100） ===== */
.nn-pt-crumb { width: min(var(--nn-inner), 100% - var(--nn-gutter) * 2); margin-inline: auto; padding-top: 20px; }
.nn-pt-crumb-list { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.nn-pt-crumb-list > li { flex: none; display: flex; align-items: center; }
.nn-pt-crumb-home {
  display: flex; justify-content: center; align-items: center;
  width: 44px; height: 44px; margin: -10px;
  transition: opacity .3s ease-out;
}
.nn-pt-crumb-home img { width: 24px; height: 24px; }
.nn-pt-crumb-sep img { width: 13px; height: 26px; }
.nn-pt-crumb-link,
.nn-pt-crumb-current span {
  font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: .1em; white-space: nowrap;
}
.nn-pt-crumb-link { display: flex; align-items: center; min-height: 44px; transition: color .3s ease-out; }
/* 今のページ名：長いときは折り返す（スマホは2行まで・あふれたら …） */
.nn-pt-crumb-list > .nn-pt-crumb-current { flex: 0 1 auto; min-width: 0; }
.nn-pt-crumb-current span { color: var(--nn-gray); line-height: 1.4; white-space: normal; }

.nn-pt-title-wrap { width: min(var(--nn-inner), 100% - var(--nn-gutter) * 2); margin-inline: auto; padding: 60px 0 100px; text-align: center; }
.nn-pt-title {
  color: var(--nn-accent-deep);
  font-family: var(--nn-ff-mincho); font-size: 42px; font-weight: 800; line-height: 1.2; letter-spacing: .1em;
}
.nn-pt-title::after {
  content: ""; display: block; width: 200px; height: 2px; margin: 30px auto 0;
  border-radius: 50px; background: var(--nn-accent);
}
/* 記事の題名（長い題名は 2行。行の高さ 50px） */
.nn-pt--article .nn-pt-title { line-height: 50px; }
.nn-main--column-single .nn-pt--article .nn-pt-title { letter-spacing: 0; }

/* ===== ページ送り（共通。丸 50px・1つ 74px。現在のページは橙。PC ではホバーも Active の見た目） ===== */
.nn-pager { display: flex; justify-content: center; align-items: center; margin-top: 56px; }
.nn-pager-list { display: flex; justify-content: center; align-items: center; }
.nn-pager-item { display: flex; justify-content: center; align-items: center; width: 74px; height: 74px; }
.nn-pager-num {
  display: flex; justify-content: center; align-items: center;
  width: 50px; height: 50px; border-radius: 50%; background: var(--nn-white);
  font-family: var(--nn-ff-en); font-size: 18px; line-height: 1; letter-spacing: .8px;
  transition: background-color .3s ease-out, color .3s ease-out;
}
.nn-pager-item.is-current .nn-pager-num { background: var(--nn-accent); color: var(--nn-white); font-weight: 700; }
.nn-pager-item--gap .nn-pager-num { background: none; }
.nn-pager-arrow { display: flex; justify-content: center; align-items: center; width: 44px; height: 74px; transition: opacity .3s ease-out; }
.nn-pager-arrow img { width: 32px; height: 15px; max-width: none; }
.nn-pager-arrow--prev img { transform: scaleX(-1); }

/* ===== 前後の記事・一覧に戻る（共通。x=170・幅 1100px。下の余白 120px） ===== */
.nn-artnav {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  width: min(1100px, 100% - var(--nn-gutter) * 2);
  margin: 100px 0 0 max(var(--nn-gutter), 50% - 550px);
  padding-bottom: 120px;
}
.nn-artnav-row { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 42px; }
.nn-artnav-link {
  display: flex; align-items: center; gap: 8px; min-height: 44px; margin-block: -1px;
  font-family: var(--nn-ff-mincho); font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: 0; white-space: nowrap;
  transition: opacity .3s ease-out;
}
.nn-artnav-arrow { display: flex; justify-content: center; width: 31px; }
.nn-artnav-link--prev .nn-artnav-arrow img { transform: scaleX(-1); }
.nn-artnav-back {
  display: flex; align-items: center; gap: 16px;
  width: 220px; height: 54px; padding: 0 54px 0 20px; border-radius: 4px;
  background: var(--nn-accent); color: var(--nn-white);
  transition: background-color .3s ease-out;
}
.nn-artnav-back-icon { flex: none; width: 20px; height: 20px; transform: rotate(180deg); }
.nn-artnav-back-text {
  flex: 1; text-align: center; white-space: nowrap;
  font-family: var(--nn-ff-mincho); font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: 0;
}

/* ===== お知らせの一覧（1440px で x=170・幅 1100px） ===== */
/* 題名は Figma で行の高さ 100%（字の箱 42px。上 60＋42＋線まで 30＋線 2＋下 100 ＝ 234px）。共通の 1.2 だと 8px 長い。PC だけ */
@media (min-width: 768px) {
  .nn-main--news .nn-pt-title { line-height: 1; }
}
.nn-news {
  width: min(1100px, 100% - var(--nn-gutter) * 2);
  margin-left: max(var(--nn-gutter), 50% - 550px);
  padding-bottom: 120px;
}

/* 絞り込み（白い角丸の箱。押せる所は高さ 44px） */
.nn-news-filter {
  display: flex; flex-wrap: wrap; gap: 8px;
  width: fit-content; max-width: 100%;
  padding: 8px 20px;
  border: 1px solid var(--nn-accent-pale); border-radius: 10px; background: var(--nn-white);
}
.nn-news-tag { display: flex; align-items: center; height: 44px; margin: -11px 0; }
.nn-news-tag-in {
  display: flex; align-items: center; gap: 4px; height: 22px; padding: 4px 8px; border-radius: 4px;
  color: var(--nn-accent); font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: .1em; white-space: nowrap;
  transition: background-color .3s ease-out, color .3s ease-out;
}
.nn-news-tag-in img { width: 13px; height: 13px; flex: none; }
.nn-news-tag.is-active .nn-news-tag-in { border-radius: 5px; background: var(--nn-accent); color: var(--nn-white); }

/* 記事の行（高さ 53px・下に橙の点線） */
.nn-news-list { margin-top: 32px; }
.nn-news-item {
  position: relative;
  display: flex; align-items: center; min-height: 53px; padding: 16px 12px;
  border-bottom: 1px dashed var(--nn-accent-pale);
}
/* 注意書き：PC のホバーで下線を瞬時に変えず、左から右へ滑らかに橙の実線へ切り替える（0.5秒／ease）。スマホはホバー無し */
.nn-news-item::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--nn-accent); transform: scaleX(0); transform-origin: left center;
  transition: transform .5s ease; pointer-events: none;
}
.nn-news-meta { display: flex; align-items: center; gap: 12px; flex: none; width: 200px; }
.nn-news-date { font-family: var(--nn-ff-en); font-size: 14px; line-height: 1; white-space: nowrap; }
.nn-news-cat {
  display: block; padding: 4px 8px; border-radius: 3px; background: var(--nn-accent); color: var(--nn-white);
  font-size: 12px; font-weight: 500; line-height: 10px; white-space: nowrap;
}
.nn-news-title {
  flex: 1; min-width: 0;
  font-family: var(--nn-ff-mincho); font-size: 18px; font-weight: 700; line-height: 1.1; letter-spacing: .05em;
  transition: color .3s ease-out;
}
.nn-news-arrow { display: flex; flex: none; width: 20px; height: 20px; margin-left: 16px; padding: 2px; border-radius: 50%; background: var(--nn-white); }
.nn-news-arrow img { width: 16px; height: 16px; }
.nn-news-empty { margin-top: 32px; }

/* ===== ホバー（PC だけ。0.3秒・Ease Out） ===== */
@media (hover: hover) {
  .nn-pt-crumb-home:hover { opacity: .7; }
  .nn-pt-crumb-link:hover { color: var(--nn-accent); }
  /* 注意書き：現在ページは Active 表示。PC ではホバー時も Active 表示 */
  a.nn-pager-item:hover .nn-pager-num { background: var(--nn-accent); color: var(--nn-white); }
  .nn-pager-arrow:hover { opacity: .7; }
  /* 注意書き：前後の記事は PC ホバーで不透明度 70% */
  .nn-artnav-link:hover { opacity: .7; }
  .nn-artnav-back:hover { background: var(--nn-accent-deep); }
  .nn-news-tag:not(.is-active):hover .nn-news-tag-in { background: #faf0ed; }
  .nn-news-item:hover .nn-news-title { color: var(--nn-accent-deep); }
  .nn-news-item:hover::after { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .nn-news-item::after { transition: none; }
}

/* ===== 間の幅 ===== */
@media (max-width: 1024px) {
  .nn-pt-title { font-size: 36px; }
  .nn-pt--article .nn-pt-title { line-height: 1.3; }
}

/* ===== スマホ（390px の Figma） ===== */
@media (max-width: 767px) {
  .nn-pt-crumb { width: auto; margin: 0 20px; padding-top: 20px; }
  .nn-pt-crumb-list { min-height: 22px; gap: 8px; }
  .nn-pt-crumb-home { margin: -11px; }
  .nn-pt-crumb-home img { width: 20px; height: 20px; }
  .nn-pt-crumb-sep img { width: 10px; height: 20px; }
  .nn-pt-crumb-link, .nn-pt-crumb-current span { font-size: 12px; }
  .nn-pt-crumb-current span {
    display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  }

  .nn-pt-title-wrap { width: auto; margin: 0 20px; padding: 73px 0 72px; }
  .nn-pt-title { font-size: 26px; line-height: 31px; }
  .nn-pt-title::after { width: 150px; margin-top: 20px; }
  /* 記事：左寄せ。線は 120px で中央 */
  .nn-pt--article .nn-pt-title-wrap { margin: 0 10px 0 20px; padding: 46px 0 80px; text-align: left; }
  .nn-pt--article .nn-pt-title { font-size: 26px; line-height: 1.25; }
  .nn-pt--article .nn-pt-title::after { width: 120px; margin-top: 14px; }

  /* ページ送り：丸 30px（押せる所は 44px） */
  .nn-pager { margin-top: 64px; }
  .nn-pager-item { width: 44px; height: 44px; }
  .nn-pager-num { width: 30px; height: 30px; font-size: 14px; }
  .nn-pager-arrow { height: 44px; }
  .nn-pager-arrow img { width: 28px; height: 13px; }

  .nn-artnav { width: calc(100% - 40px); gap: 16px; margin: 70px auto 0; padding-bottom: 76px; }
  .nn-artnav-link { gap: 4px; font-size: 16px; }
  .nn-artnav-arrow { width: 24px; }
  .nn-artnav-back { height: 44px; }
  .nn-artnav-back-text { font-size: 16px; }

  .nn-main--news .nn-pt-title-wrap { padding: 74px 0 98px; }
  .nn-news { width: auto; margin: 0 20px; padding-bottom: 76px; }
  .nn-news-filter { gap: 6px; padding: 5px 12px; }
  .nn-news-tag-in { padding: 4px 6px; font-size: 12px; }
  .nn-news-tag-in img { width: 11px; height: 11px; }

  /* 行：日付と札 → タイトル の2段。矢印は右 */
  .nn-news-list { margin-top: 24px; }
  .nn-news-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 16px 8px; }
  .nn-news-meta { width: auto; grid-column: 1; }
  .nn-news-date { font-size: 13px; }
  .nn-news-cat { padding: 4px 7px; font-size: 10px; }
  .nn-news-title { grid-column: 1; font-size: 15px; line-height: 1.2; letter-spacing: .1em; }
  .nn-news-arrow { grid-column: 2; grid-row: 1 / 3; margin: 0; }
}
