/* ===================================
   カテゴリーアーカイブページ スタイル
   =================================== */

/* コンテナ */
.category-archive {
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* アーカイブヘッダー */
.archive-header {
    margin-bottom: 40px;
    text-align: center;
}

.archive-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}

.archive-description {
    font-size: 2.4rem;
    color: #666;
    line-height: 1.6;
        margin: 5.4rem;
}

/* 投稿グリッド */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* 投稿カード */
.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* アイキャッチ画像 */
.post-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 アスペクト比 */
    overflow: hidden;
    background: #f0f0f0;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* 画像なしプレースホルダー */
.post-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.post-thumbnail-placeholder span {
    position: absolute;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

/* 投稿コンテンツ */
.post-content {
    padding: 20px;
}

.post-title {
    font-size: 2.25rem;
    font-weight: 600;
    margin: 0 0 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.post-date {
    display: block;
    font-size: 0.875rem;
    color: #999;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination .nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.pagination .current {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
    font-weight: 600;
}

/* 投稿なし */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-posts p {
    font-size: 1.125rem;
}

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

/* タブレット (768px以下) */
@media screen and (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .archive-title {
        font-size: 2rem;
    }

    .post-title {
        font-size: 2.4rem;
    }

    .category-archive {
        padding: 30px 0;
    }

    .archive-header {
        margin-bottom: 30px;
    }
}

/* スマートフォン (480px以下) */
@media screen and (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .container {
        padding: 0 16px;
    }

    .archive-title {
        font-size: 1.75rem;
    }

    .archive-description {
        font-size: 1.6rem;
    }

    .post-content {
        padding: 16px;
    }

    .post-title {
        font-size: 2rem;
    }

    .category-archive {
        padding: 20px 0;
    }

    .archive-header {
        margin-bottom: 24px;
    }

    .posts-grid {
        margin-bottom: 40px;
    }

    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
}

/* 超小型デバイス (360px以下) */
@media screen and (max-width: 360px) {
    .archive-title {
        font-size: 1.5rem;
    }

    .post-thumbnail {
        padding-top: 75%; /* 4:3 アスペクト比に変更 */
    }
}
