/* =========================================
   iMedia Theme Child - blog-cards.css
   ---------------------------------------------
   親テーマの .news-* / .cat-* を一切上書きせず、
   修飾子（--cards / --thumbs / --wide）で別レイアウトを追加。
   親テーマの archive.php や他箇所の表示には影響しない。
   ========================================= */


/* ======== /news_media/ : カード型一覧 ======== */

.news-inner--wide {
  max-width: 1200px;
}

.news-head--cards {
  text-align: center;
  margin-bottom: 48px;
}
.news-head--cards .news-sub {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
}

/* カードグリッド */
.news-list--cards {
  border-top: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 720px) {
  .news-list--cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}
@media (min-width: 1080px) {
  .news-list--cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* カード本体 */
.card-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  height: 100%;
}
.card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .08);
  border-color: transparent;
}

/* サムネ枠（16:9） */
.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  overflow: hidden;
}
.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.card-item:hover .card-thumb-img {
  transform: scale(1.04);
}

/* プレースホルダー（アイキャッチ未設定時） */
.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1B3B5F 0%, #3B82F6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-thumb-placeholder span {
  color: rgba(255, 255, 255, .8);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .15em;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

/* カード本文 */
.card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.card-date {
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 500;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
  /* 3行で省略 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-excerpt {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.75;
  margin: 0;
  /* 3行で省略 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  transition: gap .2s ease;
}
.card-item:hover .card-more {
  gap: 10px;
}


/* ======== ページネーション ======== */

.blog-pagination {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}
.blog-pagination .page-numbers {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}
.blog-pagination .page-numbers li a,
.blog-pagination .page-numbers li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all .2s ease;
}
.blog-pagination .page-numbers li a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.blog-pagination .page-numbers li .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.blog-pagination .page-numbers li .dots {
  border-color: transparent;
}


/* ======== トップ #blog : サムネ付き行型 ======== */
/* 親 .news-item の grid-template-columns:110px 90px 1fr を上書き */

.news-list--thumbs {
  border-top: 1px solid var(--border);
}
.news-item--thumb {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: background .2s;
  cursor: pointer;
}
.news-item--thumb:hover {
  background: var(--surface);
}
.news-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
}
.news-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1B3B5F 0%, #3B82F6 100%);
}
.news-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.news-list--thumbs .news-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .news-item--thumb {
    grid-template-columns: 100px 1fr;
    gap: 14px;
    padding: 16px 4px;
  }
  .news-list--thumbs .news-title {
    font-size: 14px;
  }
}
