/* ブログページ専用スタイル */

/* パンくずリスト */
.breadcrumb {
    background-color: var(--bg-color);
    padding: 15px 0;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--text-light);
}

/* ページヘッダー */
.page-header {
    background: var(--accent-beige-light);
    color: var(--text-color);
    padding: 80px 0;
    text-align: center;
    border-bottom: 1px solid var(--accent-beige);
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 18px;
    color: var(--text-light);
}

/* ブログレイアウト */
.blog-layout {
    display: flex;
    gap: 50px;
    padding: 60px 0;
}

.blog-main {
    flex: 1;
    min-width: 0;
}

.blog-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* カテゴリフィルター */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.category-btn {
    padding: 8px 20px;
    border: 1px solid var(--accent-beige);
    background: var(--white);
    border-radius: var(--radius-lg);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-color);
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* 記事グリッド */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* 記事カード */
.post-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.04);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.post-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-thumbnail {
    height: 180px;
    background: var(--bg-color);
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-thumbnail.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 14px;
}

.post-thumbnail.no-image::after {
    content: "No Image";
}

.post-content {
    padding: 20px;
}

.post-category {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.post-title {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.5;
}

.post-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-date {
    font-size: 13px;
    color: var(--text-light);
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination button,
.pagination span {
    padding: 10px 16px;
    border: 1px solid var(--accent-beige);
    background: var(--white);
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.pagination span.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    cursor: default;
}

/* サイドバー */
.sidebar-section {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--accent-beige);
}

.sidebar-section h3 {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-beige);
}

.category-list,
.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li,
.recent-posts li {
    margin-bottom: 0;
}

.category-list a,
.recent-posts a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.category-list li:last-child a,
.recent-posts li:last-child a {
    border-bottom: none;
}

.category-list a:hover,
.recent-posts a:hover {
    color: var(--primary-color);
}

.recent-posts a {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.recent-title {
    line-height: 1.5;
}

.recent-date {
    font-size: 12px;
    color: var(--text-light);
}

/* 記事詳細 */
.post-detail {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--accent-beige);
}

.post-header {
    margin-bottom: 30px;
    text-align: center;
}

.post-header .post-category {
    margin-bottom: 15px;
}

.post-header .post-title {
    font-size: 28px;
    margin-bottom: 20px;
}

.post-meta {
    color: var(--text-light);
    font-size: 14px;
}

.post-thumbnail-large {
    margin: 30px -50px;
    overflow: hidden;
}

.post-thumbnail-large img {
    width: 100%;
    height: auto;
}

.post-body {
    font-size: 16px;
    line-height: 2;
    color: var(--text-color);
}

.post-body h2 {
    font-size: 22px;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-beige);
}

.post-body h3 {
    font-size: 18px;
    margin: 30px 0 15px;
}

.post-body p {
    margin-bottom: 20px;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.post-body ul,
.post-body ol {
    margin: 20px 0;
    padding-left: 25px;
}

.post-body li {
    margin-bottom: 10px;
}

.post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--accent-beige);
}

.tag {
    display: inline-block;
    background: var(--bg-color);
    padding: 6px 14px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    color: var(--text-light);
    margin-right: 8px;
    margin-bottom: 8px;
}

/* 前後記事ナビゲーション */
.post-navigation {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.post-navigation a {
    flex: 1;
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--accent-beige);
    transition: all 0.3s;
}

.post-navigation a:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.post-navigation a span {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

/* ローディング・エラー */
.loading,
.error,
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 16px;
}

/* レスポンシブ */
@media (max-width: 968px) {
    .blog-layout {
        flex-direction: column;
    }

    .blog-sidebar {
        width: 100%;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 40px 0;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .blog-layout {
        padding: 40px 0;
    }

    .post-detail {
        padding: 30px 20px;
    }

    .post-header .post-title {
        font-size: 22px;
    }

    .post-thumbnail-large {
        margin: 20px -20px;
    }

    .post-navigation {
        flex-direction: column;
    }

    .category-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .category-btn {
        white-space: nowrap;
    }
}
