@charset "UTF-8";
/* ============================================
   ブログカードグリッド共通スタイル
   blog-cards.css
   ============================================ */

/* --------------------------------------------------
   ブログ一覧ページ（index.php）コンテナ
-------------------------------------------------- */
.blog-grid-container {
  width: 960px;
  max-width: 96%;
  margin: 0 auto 80px auto;
}

/* --------------------------------------------------
   カードグリッド（3列）
   index.php / front-page.php 共通
-------------------------------------------------- */
.blog-card-grid,
.top-blog-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 60px;
}

/* --------------------------------------------------
   カード本体
-------------------------------------------------- */
.blog-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 104, 55, 0.10);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 104, 55, 0.18);
}

.blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.blog-card-link:hover,
.blog-card-link:visited,
.blog-card-link:active {
  text-decoration: none;
  color: inherit;
}

/* --------------------------------------------------
   サムネイル部分
-------------------------------------------------- */
.blog-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #e8f5e9;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

/* サムネイルなし時のプレースホルダー */
.blog-card-no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
}

.blog-card-no-thumb-icon {
  font-size: 48px;
  opacity: 0.5;
}

/* カテゴリーバッジ */
.blog-card-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: #006837;
  color: #ffffff;
  font-size: 10pt;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.blog-card-cat:empty {
  display: none;
}

/* --------------------------------------------------
   カード本文部分
-------------------------------------------------- */
.blog-card-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blog-card-date {
  font-size: 10pt;
  color: #888888;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.blog-card-title {
  font-size: 13pt;
  font-weight: 400;
  line-height: 1.6;
  color: #333333;
  margin: 0;
  padding: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 10pt;
  color: #666666;
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-more {
  display: inline-block;
  margin-top: 6px;
  font-size: 10pt;
  color: #006837;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.blog-card-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------
   ページネーション余白調整
-------------------------------------------------- */
.blog-pagination {
  margin-top: 20px;
}

/* --------------------------------------------------
   記事なし表示
-------------------------------------------------- */
.blog-not-found {
  text-align: center;
  padding: 60px 0;
}

/* --------------------------------------------------
   トップページ ブログセクション（3枚）
-------------------------------------------------- */
.top-blog-card-grid {
  width: 960px;
  max-width: 94%;
  margin: 20px auto 30px auto;
}

/* --------------------------------------------------
   レスポンシブ対応
-------------------------------------------------- */

/* 2列: 960px以下 */
@media only screen and (max-width: 960px) {
  .blog-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .top-blog-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 94%;
  }
  /* トップページ3枚目を中央寄せ */
  .top-blog-card-grid .blog-card:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }
}

/* 1列: 640px以下 */
@media only screen and (max-width: 640px) {
  .blog-card-grid,
  .top-blog-card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    width: 92%;
    margin-left: auto;
    margin-right: auto;
  }

  .top-blog-card-grid .blog-card:nth-child(3) {
    grid-column: auto;
    max-width: 100%;
    margin: 0;
  }

  .blog-card-thumb {
    aspect-ratio: 16 / 9;
  }

  .blog-card-title {
    font-size: 12pt;
  }

  .blog-card-body {
    padding: 14px 16px 18px;
  }

  .blog-grid-container {
    width: 96%;
    max-width: 96%;
  }
}
