/**
 * アーカイブページ スタイル
 */

/* アーカイブページ独自のヘッダースタイルは削除（共通ヘッダーを使用） */

/* アーカイブコンテンツ */
.archive-content {
    padding: 0 0 100px;
    background-color: white;
}

/* 投稿グリッド */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 0;
    margin-bottom: 80px;
    border-top: 1px solid #e5e5e5;
    opacity: 0;
    animation: fade-in 0.8s ease-out 0.3s forwards;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

/* 投稿カード */
.post-card {
    background-color: white;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    position: relative;
    opacity: 0;
    animation: fade-in-scale 0.6s ease-out forwards;
}

/* 各カードに遅延を追加 */
.post-card:nth-child(1) { animation-delay: 0.4s; }
.post-card:nth-child(2) { animation-delay: 0.5s; }
.post-card:nth-child(3) { animation-delay: 0.6s; }
.post-card:nth-child(4) { animation-delay: 0.7s; }
.post-card:nth-child(5) { animation-delay: 0.8s; }
.post-card:nth-child(6) { animation-delay: 0.9s; }
.post-card:nth-child(n+7) { animation-delay: 1s; }

@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.post-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.post-card:hover::after {
    opacity: 1;
}

.post-card:hover {
    background-color: #fafbfc;
}

/* サムネイル */
.post-thumbnail {
    aspect-ratio: 21 / 9;
    overflow: hidden;
    background-color: #f0f2f4;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* 投稿メタ情報 */
.post-meta {
    margin-bottom: 16px;
}

.post-meta time {
    font-size: 12px;
    color: #666;
    letter-spacing: 0.08em;
    font-weight: 600;
    text-transform: uppercase;
}

/* 投稿タイトル */
.post-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.post-title a {
    color: var(--color-text);
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a:hover {
    color: var(--color-primary);
}

/* 抜粋 */
.post-excerpt {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-excerpt p {
    margin: 0;
}

/* 続きを読むリンク */
.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.read-more::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 1px;
    background-color: var(--color-text);
    margin-left: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.read-more:hover {
    color: var(--color-primary);
}

.read-more:hover::after {
    width: 32px;
    background-color: var(--color-primary);
}

/* ページネーション */
.pagination {
    text-align: center;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
    opacity: 0;
    animation: fade-in-up 0.6s ease-out 1.2s forwards;
}

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

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: var(--color-text);
    font-size: 15px;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.pagination .current {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

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

.no-posts p {
    font-size: 18px;
    color: var(--color-text-light);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .page-header {
        padding: 60px 0 40px;
    }
    
    .archive-content {
        padding: 0 0 60px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .post-content {
        padding: 30px 20px;
    }
    
    .post-title {
        font-size: 20px;
    }
    
    .post-excerpt {
        font-size: 14px;
    }
    
    .pagination .nav-links {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination a,
    .pagination span {
        min-width: 35px;
        height: 35px;
        font-size: 14px;
        padding: 0 10px;
    }
}