/* アーカイブページカードレイアウト */
.archive-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 32px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.archive-post-card {
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.archive-post-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.archive-post-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 画像部分 */
.archive-post-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.archive-post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.archive-post-card:hover .archive-post-thumbnail img {
  transform: scale(1.05);
}

/* コンテンツ部分 */
.archive-post-content {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* タイトル部分 */
.archive-post-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  padding-bottom: 10px;
  margin-bottom: 10px;
  color: #333;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  position: relative;
  transition: color 0.3s ease;
}

.archive-post-card:hover .archive-post-title {
  color: #6FA3D2;
}

/* タイトル下の装飾的な境界線 */
.archive-post-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--btn-color, #6FA3D2) 20%, 
    var(--btn-color, #6FA3D2) 80%, 
    transparent 100%);
}

/* 記事概要 */
.archive-post-excerpt {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
  padding-bottom: 25px;
  transition: color 0.3s ease;
}

.archive-post-card:hover .archive-post-excerpt {
  color: #6FA3D2;
}

/* カテゴリー部分 - 画像の右上に配置 */
.archive-post-category {
  position: absolute;
  top: 5px;
  right: 5px;
  text-align: center;
  font-size: 10px;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid #dbd8d8;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.95);
  font-weight: bold;
  white-space: nowrap;
  z-index: 2;
  transition: all 0.3s ease;
}

/* カテゴリー別の色設定 */
.archive-post-category.category-spiritual {
  border-color: var(--category-spiritual, #8B5CF6);
  background-color: var(--category-spiritual, #8B5CF6);
}

.archive-post-category.category-health {
  border-color: var(--category-health, #10B981);
  background-color: var(--category-health, #10B981);
}

.archive-post-category.category-positive {
  border-color: var(--category-positive, #3B82F6);
  background-color: var(--category-positive, #3B82F6);
}

/* タブレット対応 */
@media (max-width: 1024px) {
  .archive-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* モバイル対応 */
@media (max-width: 768px) {
  .archive-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 15px;
  }

  .archive-post-content {
    padding: 16px;
  }

  .archive-post-title {
    font-size: 1rem;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  .archive-post-excerpt {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    padding-bottom: 25px;
  }

  .archive-post-category {
    top: 4px;
    right: 4px;
    font-size: 9px;
    padding: 3px 8px;
  }
}

/* スマートフォン対応 */
@media (max-width: 480px) {
  .archive-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 10px;
  }

  .archive-post-content {
    padding: 12px;
  }

  .archive-post-title {
    font-size: 0.95rem;
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  .archive-post-excerpt {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .archive-post-category {
    top: 3px;
    right: 3px;
    font-size: 8px;
    padding: 2px 6px;
  }
}