/* ==========================================================================
   WeLive — News / Topics
   既存の style.css（デザイントークン）を前提に追加読み込みされます。
   ========================================================================== */

/* --------------------------------------------------------------------------
   共通：カテゴリーバッジ
   -------------------------------------------------------------------------- */
.news-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--badge-bg, var(--accent-pale));
  color: var(--badge-fg, var(--accent-deep));
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   共通：ニュース行リスト（新しいものが上に積み上がる）
   -------------------------------------------------------------------------- */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-light);
}

.news-row { border-bottom: 1px solid var(--border-light); }

.news-row-link {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(112px, auto) 1fr 22px;
  align-items: center;
  gap: var(--space-md);
  padding: 22px 18px 22px 14px;
  text-decoration: none;
  color: inherit;
  transition: background .45s var(--ease-expo), padding-left .45s var(--ease-expo);
}

/* 左端に伸びるアクセントライン */
.news-row-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  background: var(--accent);
  transform: translateY(-50%);
  transition: height .5s var(--ease-expo);
}

.news-row-link:hover,
.news-row-link:focus-visible {
  background: var(--surface-tint);
  padding-left: 24px;
}
.news-row-link:hover::before,
.news-row-link:focus-visible::before { height: 58%; }

.news-row-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.news-row-date {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.news-row-badge { justify-self: start; }

.news-row-title {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  transition: color .35s var(--ease-expo);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-row-link:hover .news-row-title { color: var(--accent-deep); }

.news-row-ext {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.7rem;
  color: var(--ink-faint);
  vertical-align: 2px;
}

.news-row-arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--ink-faint);
  transition: transform .45s var(--ease-expo), color .35s var(--ease-expo);
}
.news-row-arrow svg { width: 16px; height: 16px; }
.news-row-link:hover .news-row-arrow {
  transform: translateX(5px);
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   トップページ：新着情報セクション
   -------------------------------------------------------------------------- */
.news-home {
  position: relative;
  padding: var(--space-2xl) 0;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.news-home-grid {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.news-home-intro { position: sticky; top: 120px; }

.news-home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.news-home-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.news-home-h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, var(--t-xl));
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 var(--space-sm);
}

.news-home-lead {
  font-size: 0.86rem;
  line-height: 1.85;
  color: var(--ink-mid);
  margin: 0 0 var(--space-lg);
}

.news-home-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-mid);
  transition: color .35s var(--ease-expo), border-color .35s var(--ease-expo), gap .35s var(--ease-expo);
}
.news-home-all:hover {
  color: var(--accent-deep);
  border-color: var(--accent);
  gap: 14px;
}
.news-home-all svg { width: 15px; height: 15px; }

.news-home-empty {
  padding: var(--space-xl);
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   一覧ページ：カテゴリー絞り込み
   -------------------------------------------------------------------------- */
.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: var(--space-xl);
}

.news-filter-item {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-full);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--ink-mid);
  text-decoration: none;
  transition: all .35s var(--ease-expo);
}
.news-filter-item:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-pale);
}
.news-filter-item.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.news-filter-count {
  margin-left: 7px;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.55;
}

/* --------------------------------------------------------------------------
   一覧ページ：ページネーション
   -------------------------------------------------------------------------- */
.news-pagination { margin-top: var(--space-xl); }
.news-pagination .screen-reader-text { position: absolute; left: -9999px; }
.news-pagination .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.news-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-mid);
  text-decoration: none;
  transition: all .3s var(--ease-expo);
}
.news-pagination .page-numbers:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-pale);
}
.news-pagination .page-numbers.current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.news-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
}

/* --------------------------------------------------------------------------
   詳細ページ
   -------------------------------------------------------------------------- */
.news-article { max-width: 780px; margin: 0 auto; }

.news-article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.news-article-meta .news-row-date { font-size: 0.86rem; }

.news-article-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 var(--space-lg);
}

.news-article-thumb {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}
.news-article-thumb img { width: 100%; height: auto; display: block; }

.news-article-body {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--ink-mid);
}
.news-article-body > * + * { margin-top: 1.4em; }
.news-article-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  margin-top: 2.4em;
}
.news-article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.6;
  margin-top: 2em;
}
.news-article-body a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.news-article-body a:hover { color: var(--accent); }
.news-article-body ul,
.news-article-body ol { padding-left: 1.4em; }
.news-article-body li + li { margin-top: 0.5em; }
.news-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}
.news-article-body blockquote {
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--accent);
  background: var(--surface-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-mid);
}
.news-article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.news-article-body th,
.news-article-body td {
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  text-align: left;
}
.news-article-body th { background: var(--surface-tint); font-weight: 700; color: var(--ink); }

/* 前後記事ナビ */
.news-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
}
.news-nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-decoration: none;
  transition: all .4s var(--ease-expo);
}
.news-nav-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.news-nav-item.is-next { text-align: right; }
.news-nav-label {
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.news-nav-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-nav-placeholder { visibility: hidden; }

.news-back {
  display: flex;
  justify-content: center;
  margin-top: var(--space-xl);
}

/* --------------------------------------------------------------------------
   レスポンシブ
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .news-home-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .news-home-intro { position: static; }
}

@media (max-width: 768px) {
  .news-home { padding: var(--space-xl) 0; }

  .news-row-link {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "date badge"
      "title title";
    row-gap: 10px;
    column-gap: 12px;
    padding: 18px 12px;
  }
  .news-row-date  { grid-area: date; }
  .news-row-badge { grid-area: badge; justify-self: start; }
  .news-row-title { grid-area: title; font-size: 0.95rem; }
  .news-row-arrow { display: none; }
  .news-row-link:hover { padding-left: 16px; }

  .news-filter-item { padding: 8px 16px; font-size: 0.75rem; }

  .news-nav { grid-template-columns: 1fr; }
  .news-nav-item.is-next { text-align: left; }
  .news-nav-placeholder { display: none; }
}

/* --------------------------------------------------------------------------
   モーション配慮
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .news-row-link,
  .news-row-link::before,
  .news-row-arrow,
  .news-nav-item,
  .news-home-all { transition: none !important; }
  .news-nav-item:hover { transform: none; }
}
