/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   list.css — 記事一覧・カテゴリ・タグ・検索共通スタイル
   統一感のある洗練されたミニマルデザイン
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.list-page {
  padding-top: var(--space-sm);
  padding-bottom: var(--space-2xl);
}

/* ── ページヘッダー ────────────────────────── */
.list-page__header {
  text-align: center;
  padding: var(--space-md) 0 var(--space-md);
  max-width: 680px;
  margin: 0 auto var(--space-md);
}

.list-page__title {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-top: 0.3em;
  margin-bottom: 0.4em;
  letter-spacing: 0.04em;
}

.list-page__lead {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: var(--leading-normal);
  margin-bottom: 0.4em;
}

.list-page__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
  margin-bottom: 0.5em;
}

.list-page__count {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  color: var(--color-text-light);
  letter-spacing: 0.06em;
  margin-top: 0.5em;
}

/* ── カテゴリナビ・チップ ───────────────────── */
.list-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto var(--space-md);
  max-width: 760px;
  padding-bottom: var(--space-sm);
}

.list-nav__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.35em 0.9em;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.list-nav__item:hover {
  opacity: 1;
  border-color: var(--color-text);
  color: var(--color-text);
  background: var(--color-bg-alt);
}

.list-nav__item.is-current {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.list-nav__item.is-current .list-nav__count {
  opacity: 0.8;
}

.list-nav__count {
  font-family: var(--font-accent);
  font-size: 0.8em;
  opacity: 0.6;
}

/* ── 検索バー ──────────────────────────────── */
.list-search {
  max-width: 440px;
  margin: 0 auto var(--space-xl);
}

.search-form {
  width: 100%;
}

.search-form__inner {
  display: flex;
  align-items: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.search-form__inner:focus-within {
  border-color: var(--color-text);
  box-shadow: 0 0 0 1px var(--color-text);
}

.search-form__input {
  flex: 1;
  padding: 0.65em 1.2em;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: transparent;
  border: none;
  outline: none;
}

.search-form__input::placeholder {
  color: var(--color-text-light);
}

.search-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65em 1.2em;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
}

.search-form__submit:hover {
  color: var(--color-text);
}

/* ── 記事カードグリッド ────────────────────── */
.list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: var(--content-wide);
  margin: 0 auto var(--space-xl);
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.post-card:hover {
  opacity: 1;
  transform: translateY(-4px);
  border-color: var(--color-text-light);
  box-shadow: var(--shadow-md);
}

.post-card__thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-bg-alt);
  overflow: hidden;
}

.post-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-mid) var(--ease-out);
}

.post-card:hover .post-card__thumbnail img {
  transform: scale(1.04);
}

.post-card__thumbnail-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-bg-alt);
}

.post-card__body {
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  flex: 1;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.5em;
  flex-wrap: wrap;
}

.post-card__date {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  letter-spacing: 0.04em;
}

.post-card__category {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: 0.15em 0.5em;
  background: var(--color-bg-alt);
  border-radius: 3px;
}

.post-card__title {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin-bottom: 0.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-top: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 既読バッジ */
.post-card__read-badge {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(4px);
  color: var(--color-white);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  padding: 0.25em 0.6em;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}

.post-card.is-read .post-card__read-badge {
  display: inline-block;
}

.post-card.is-read .post-card__title {
  color: var(--color-text-muted);
}

.post-card.is-read .post-card__thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(250, 250, 250, 0.25);
  pointer-events: none;
}

/* ── 空状態 ────────────────────────────────── */
.list-empty {
  text-align: center;
  padding: var(--space-2xl) 0;
  max-width: 500px;
  margin: 0 auto;
}

.list-empty__text {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* ── ページネーション ──────────────────────── */
.list-pagination {
  text-align: center;
  margin: var(--space-xl) 0 var(--space-md);
}

.list-pagination .page-numbers {
  display: inline-flex;
  gap: 0;
  list-style: none;
  border-radius: 4px;
  overflow: hidden;
}

.list-pagination .page-numbers li {
  margin: 0;
}

.list-pagination .page-numbers a,
.list-pagination .page-numbers span {
  display: inline-block;
  padding: 0.55em 1.1em;
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  margin-left: -1px;
  transition: all var(--duration-fast) var(--ease-out);
}

.list-pagination .page-numbers a:hover {
  opacity: 1;
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.list-pagination .page-numbers .current {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

/* ── レスポンシブ ──────────────────────────── */
@media (max-width: 768px) {
  .list-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .post-card__body {
    padding: var(--space-sm) var(--space-md);
  }
}
