/* =========================================================================
   過去ブログ一覧 記事カード（画像主体・カード型）
   - template-parts/article-card.php とセットで使用
   - 既存 custom.css を上書きせず、この1ファイルに隔離（custom.css の後に読込）
   - ブランド配色: 緑 #3E672B / 黄 #F9D635 / 青 #6AA5E4
   ========================================================================= */

/* --- グリッド（一覧のカード配置。列数は幅に応じ自動。サイドバー内でも破綻しない） --- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.6rem;
  margin: 1.5rem 0;
}

/* --- カード本体 --- */
.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
  transition: transform .18s ease, box-shadow .18s ease;
}

.post-card:hover,
.post-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .14);
}

/* --- メディア（画像主体：4:3・cover・ホバーで微ズーム） --- */
.post-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef1ee;
}

.post-card__media img,
.post-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.post-card:hover .post-card__media img {
  transform: scale(1.06);
}

/* 画像なし時：ステンドグラス風プレースホルダ（グレー箱をやめる） */
.post-card__noimg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: .5rem;
  background: linear-gradient(135deg, #3E672B 0%, #6AA5E4 55%, #F9D635 100%);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .06em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

/* --- 本文 --- */
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: .95rem 1.05rem 1.15rem;
  flex: 1 1 auto;
}

/* メタ（カテゴリ + 日付） */
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .5rem;
  font-size: .76rem;
  line-height: 1.4;
}

.post-card__cats a {
  display: inline-block;
  padding: .12em .7em;
  border-radius: 999px;
  background: #eef4ee;
  color: #3E672B;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.post-card__cats a:hover {
  background: #3E672B;
  color: #fff;
}

.post-card__date {
  margin-left: auto;
  color: #8b8b8b;
  font-weight: 600;
  white-space: nowrap;
}

/* タイトル（下線を廃止・2行でクランプ） */
.post-card__title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.5;
  font-weight: 700;
}

.post-card__title a {
  color: #2b2b2b;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__title a:hover {
  color: #3E672B;
}

/* 抜粋（3行クランプ・薄色） */
.post-card__excerpt {
  font-size: .84rem;
  line-height: 1.75;
  color: #5a5a5a;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__excerpt p {
  margin: 0;
}

.post-card__excerpt a {
  color: #3E672B;
  font-weight: 600;
}

/* --- サブカテゴリ・チップナビ（発見軸・一覧上部／3ブログ共通） --- */
.subcat-nav {
  margin: 0 0 1.2rem;
}

.subcat-nav__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
}

/* 横スクロール（モバイルでチップが多い芸術家への道等） */
@media (max-width: 575.98px) {
  .subcat-nav__list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .4rem;
  }
  .subcat-nav__item {
    flex: 0 0 auto;
  }
}

.subcat-nav__item a {
  display: inline-block;
  padding: .3em 1em;
  border-radius: 999px;
  background: #eef4ee;
  color: #3E672B;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

.subcat-nav__item a:hover {
  background: #3E672B;
  color: #fff;
}

.subcat-nav__item.is-current a {
  background: #3E672B;
  color: #fff;
}

/* --- 3ブログ入口カード（トップページの回遊入口・Phase 3c） --- */
.blog-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin: 0 0 1rem;
}

.blog-entry-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}

.blog-entry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
  text-decoration: none;
}

.blog-entry-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef1ee;
}

.blog-entry-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.blog-entry-card:hover .blog-entry-card__media img {
  transform: scale(1.05);
}

/* 画像なし時のステンドグラス風プレースホルダ（Phase 2 と統一） */
.blog-entry-card__noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #3E672B 0%, #6AA5E4 55%, #F9D635 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: .08em;
}

.blog-entry-card__count {
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  padding: .2em .8em;
  border-radius: 999px;
  background: rgba(62, 103, 43, .92);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
}

.blog-entry-card__body {
  display: block;
  padding: .9rem 1rem 1.1rem;
}

.blog-entry-card__title {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2b2b2b;
  margin-bottom: .3rem;
}

.blog-entry-card__desc {
  display: block;
  font-size: .9rem;
  line-height: 1.5;
  color: #5a5a5a;
}

@media (max-width: 767.98px) {
  .blog-entry-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
}

/* --- シリーズナビ（同サブカテゴリ内 時系列前後・Phase 3d） --- */
.series-nav {
  border: 1px solid #d7e3d0;
  border-radius: 14px;
  padding: 1rem 1.1rem 1.2rem;
  background: #f7faf5;
}

.series-nav__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .9rem;
}

.series-nav__label {
  flex: 0 0 auto;
  padding: .2em .8em;
  border-radius: 999px;
  background: #3E672B;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.series-nav__cat {
  color: #3E672B;
  font-weight: 700;
  text-decoration: none;
}

.series-nav__cat:hover {
  text-decoration: underline;
}

.series-nav__links {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: .7rem;
}

.series-nav__item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .6rem .8rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e4ece0;
  text-decoration: none;
  color: #2b2b2b;
  transition: background .15s ease, border-color .15s ease;
}

a.series-nav__item:hover {
  background: #eef4ee;
  border-color: #3E672B;
}

.series-nav__next {
  text-align: right;
}

.series-nav__dir {
  font-size: .8rem;
  font-weight: 700;
  color: #3E672B;
}

.series-nav__pt {
  font-size: .9rem;
  line-height: 1.4;
  color: #2b2b2b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.series-nav__item.is-disabled {
  opacity: .5;
}

.series-nav__item.is-disabled .series-nav__pt {
  color: #8b8b8b;
}

.series-nav__index {
  align-self: center;
  padding: .5em 1em;
  border-radius: 999px;
  background: #3E672B;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  white-space: nowrap;
}

.series-nav__index:hover {
  background: #2e4f20;
  color: #fff;
}

@media (max-width: 575.98px) {
  .series-nav__links {
    grid-template-columns: 1fr;
  }
  .series-nav__next {
    text-align: left;
  }
  .series-nav__index {
    order: 3;
    justify-self: center;
  }
}

/* --- レスポンシブ微調整 --- */
@media (max-width: 575.98px) {
  .post-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
  .post-card__title {
    font-size: 1.05rem;
  }
}

/* =========================================================
   投稿アーカイブ・ナビ（年→月リンク集 / Phase 3e）
   フッター（背景=ブランド緑 #3E672B）上に置く白カード。
   ========================================================= */
.archive-nav {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

.archive-nav__title {
  margin: 0 0 .9rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #3E672B;
  border-bottom: 2px solid #F9D635;
  padding-bottom: .5rem;
}

.archive-nav__blog {
  font-size: .85rem;
  font-weight: 600;
  color: #6b6b6b;
  margin-left: .35em;
}

.archive-nav__years {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .35rem 1.25rem;
}

.archive-nav__year {
  border-bottom: 1px solid #eee;
}

.archive-nav__summary {
  display: flex;
  align-items: center;
  gap: .4em;
  cursor: pointer;
  list-style: none;
  padding: .5em .2em;
  font-weight: 700;
  color: #3E672B;
  user-select: none;
}

.archive-nav__summary::-webkit-details-marker {
  display: none;
}

.archive-nav__summary::before {
  content: "▸";
  font-size: .8em;
  color: #6AA5E4;
  transition: transform .15s ease;
}

.archive-nav__year[open] > .archive-nav__summary::before {
  transform: rotate(90deg);
}

.archive-nav__count {
  font-size: .8rem;
  font-weight: 600;
  color: #999;
}

.archive-nav__months {
  list-style: none;
  margin: 0 0 .5rem;
  padding: 0 0 0 1.2em;
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .6rem;
}

.archive-nav__months a {
  display: inline-flex;
  align-items: baseline;
  gap: .25em;
  padding: .2em .5em;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
  font-size: .9rem;
  line-height: 1.4;
}

.archive-nav__months a:hover {
  background: #3E672B;
  color: #fff;
}

.archive-nav__mc {
  font-size: .75rem;
  color: #999;
}

.archive-nav__months a:hover .archive-nav__mc {
  color: #eaeaea;
}
