/* 新テーマ（H-B のデザイン）の一覧のページ（コラム一覧・カテゴリ・アーカイブ・検索）。組み替えは inc/v2/list.php。
   service.css の部品（2段グリッド、帯の進み具合の線）の後に読む。縦積みが土台で、html.is-hscroll のときだけ横の帯にする */

/* --------------------------------------------------------------------------
   縦積み
   -------------------------------------------------------------------------- */
#page-column .mv-area { display: none; }
#page-column > .container { display: grid; gap: clamp(32px, 5vw, 56px); }
#page-column h1 {
  margin: 12px 0 0;
  font-family: var(--h-font-display);
  font-size: clamp(56px, 2rem + 7vw, 160px);
  font-stretch: 75%;
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.h-list-head .text { margin-top: 24px; max-width: 34em; font-size: clamp(0.9375rem, 0.9rem + 0.3vw, 1.0625rem); line-height: 1.9; }

/* パンくず */
.breadcrumb { margin-top: 20px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-family: var(--h-font-mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--h-muted); }
.breadcrumb li + li::before { content: "/"; margin: 0 10px; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 24px; color: var(--h-ink); text-decoration: underline; text-underline-offset: 3px; } /* 押せる範囲を 24px 以上に（点検の低11） */
/* 検索の結果の見出しは、検索した語をそのまま出す（大文字に変えない。点検の低6） */
body.search #page-column .h-list-head h1 { text-transform: none; }

/* カテゴリのナビ */
.column-category-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.column-category-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--h-ink);
  font-size: 0.8125rem;
  font-weight: 700;
  transition: background-color 0.3s var(--h-ease), color 0.3s var(--h-ease);
}
.column-category-nav a:hover { background: var(--h-ink); color: var(--h-bg); }

/* 記事のカード */
.news-grid[data-h-grid] > .news-card { padding: 0; }
.news-card-link { display: flex; flex-direction: column; height: 100%; }
.news-card-image { overflow: hidden; aspect-ratio: 16 / 10; background: var(--h-bg-2); }
.news-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--h-ease); }
.news-card-link:hover .news-card-image img { transform: scale(1.03); }
.news-card-body { padding: 18px 20px 22px; }
.news-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--h-font-mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--h-muted); }
.news-title { margin: 10px 0 0; font-size: 1rem; font-weight: 700; line-height: 1.6; }
.news-card-link:hover .news-title { text-decoration: underline; text-underline-offset: 4px; }

/* ページ送り */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--h-line);
  font-family: var(--h-font-mono);
  font-size: 0.875rem;
}
.pagination a.page-numbers:hover { border-color: var(--h-ink); }
.pagination .page-numbers.current { background: var(--h-ink); border-color: var(--h-ink); color: var(--h-bg); }
.pagination .page-numbers.dots { border-color: transparent; }

/* 記事が0件のとき（検索・空のカテゴリなど） */
.error-page__lead { margin-top: 24px; }
.error-page__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }


/* --------------------------------------------------------------------------
   横の帯（html.is-hscroll）
   -------------------------------------------------------------------------- */
html.is-hscroll .h-track > section#page-column { display: flex; padding: 0; }
html.is-hscroll #page-column > .container { display: flex; gap: 0; height: 100%; }
/* 記事が0件のとき（格子のない見出しのマスだけ）は、マスを画面の幅いっぱいに広げる（帯は動かない） */
html.is-hscroll .h-track > section#page-column:only-child { flex: 1 0 auto; }
html.is-hscroll #page-column > .container:has(> .h-list-head:only-child) { flex: 1 0 auto; }
html.is-hscroll .h-list-head:only-child { flex: 1 0 auto; }

/* 見出しのマス */
html.is-hscroll .h-list-head {
  flex: none;
  width: calc(var(--H) * 1.05);
  display: flex;
  flex-direction: column;
  justify-content: safe flex-end; /* 中身がマスより高いときは、上端を隠さない */
  padding: 40px clamp(28px, 3vw, 48px) var(--h-cell-bottom, 40px);
  overflow-y: auto; /* 縦のホイールをページへ渡すため、overscroll-behavior: contain は付けない */
}

/* 大見出しは、マスの高さに合わせて大きさを抑える（英語のカテゴリ名のような長い見出しでも、行が増えすぎない。
   文字の読み込みの前後で行数が変わるときの、レイアウトのずれも小さくする） */
html.is-hscroll #page-column h1 { font-size: min(clamp(56px, 2rem + 7vw, 160px), calc(var(--H) * 0.13)); text-wrap: balance; }

/* カードの格子: 2段×n列。カードは上に写真・下に日付と題 */
html.is-hscroll #page-column .news-grid[data-h-grid] {
  grid-auto-columns: calc(var(--H) * 0.46);
  border-top: 0;
}
html.is-hscroll .news-grid[data-h-grid] > .news-card { overflow: hidden; }
html.is-hscroll .news-card-image { flex: none; height: 58%; aspect-ratio: auto; }
/* 本文があふれたら、カード（overflow: hidden）の scrollHeight に出る（マスのあふれの検査が見つける） */
html.is-hscroll .news-card-body { flex: 1; min-height: 0; padding: 14px 18px 16px; }
html.is-hscroll .news-title { font-size: 0.9375rem; line-height: 1.55; }

/* ページ送りのマス */
html.is-hscroll .h-list-tail {
  flex: none;
  width: calc(var(--H) * 0.5);
  display: grid;
  align-content: end;
  padding: 40px clamp(28px, 3vw, 48px) var(--h-cell-bottom, 40px);
}

/* 背の低い画面（1280×680・1366×768 など） */
@media (max-height: 820px) {
  html.is-hscroll .h-list-head { width: calc(var(--H) * 1.3); }
  html.is-hscroll #page-column .news-grid[data-h-grid] { grid-auto-columns: calc(var(--H) * 0.56); }
  html.is-hscroll .news-card-image { height: 52%; }
  html.is-hscroll .news-card-body { padding: 10px 16px 12px; }
  html.is-hscroll .news-title { margin-top: 6px; font-size: 0.875rem; }
}


/* ==========================================================================
   ニュース一覧（archive-the_n_news。組み替えは inc/v2/news.php）
   ========================================================================== */
/* 縦積み */
.site-news-archive .site-news-page__container { max-width: 72rem; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--h-gutter) 0; display: grid; gap: clamp(28px, 4vw, 48px); }
.site-news-page__eyebrow {
  font-family: var(--h-font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--h-muted);
}
.site-news-archive h1 {
  margin: 12px 0 0;
  font-family: var(--h-font-display);
  font-size: min(clamp(56px, 2rem + 7vw, 160px), 13vw);
  font-stretch: 75%;
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.site-news-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--h-ink); }
.site-news-list__item { border-bottom: 1px solid var(--h-line); }
.site-news-list__article { padding: 18px 4px; }
.site-news-list__meta { display: flex; gap: 14px; font-family: var(--h-font-mono); font-size: 0.75rem; color: var(--h-muted); }
.site-news-list__title { margin: 8px 0 0; font-size: 1rem; font-weight: 700; line-height: 1.6; }
.site-news-list__link { display: inline-flex; gap: 10px; align-items: baseline; }
.site-news-list__link:hover span:first-child { text-decoration: underline; text-underline-offset: 4px; }
.site-news-page__empty { font-size: 0.9375rem; line-height: 1.9; }

/* 横の帯: 見出しのマス → ニュースの並び（2段グリッド）→ ページ送りのマス → 無料診断 */
html.is-hscroll .h-track > section.site-news-archive { display: flex; padding: 0; }
html.is-hscroll .site-news-archive .site-news-page__container { display: flex; gap: 0; height: 100%; max-width: none; margin: 0; padding: 0; }
html.is-hscroll .site-news-archive h1 { font-size: min(clamp(56px, 2rem + 7vw, 160px), calc(var(--H) * 0.13)); }
html.is-hscroll .site-news-list[data-h-grid] { grid-auto-columns: calc(var(--H) * 0.5); border-top: 0; }
html.is-hscroll .site-news-list__item { display: flex; flex-direction: column; justify-content: flex-end; }
html.is-hscroll .site-news-list__article { padding: 0; }
html.is-hscroll .site-news-list__title { font-size: 1.0625rem; }
