#article {
    padding: 2rem 0;
}
#article #product .inr{
    display: block;
}
#article .inr {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
#article.archive h2,
#article.archive p{
    margin: 0;
}

#article .head {
    padding: 3rem 0;
}

#article .head h1 {
    font-size: 2.8rem;
    font-weight: 600;
}

#article .main {
    width: calc(100% - 29rem);
}

#article .sidebar {
    width: 27rem;
}

/* 記事カードスタイル */
.section_article {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article_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;
}

.article_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.article_link {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
}

.article_image {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    overflow: hidden;
    border-radius: 4px;
}

.article_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.article_tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    font-size: 1.2rem;
    border-radius: 4px;
    font-weight: 500;
}

.tag_new {
    background: #FFD700;
    color: #333;
}

.tag_category {
    background: #9370DB;
    color: #fff;
}

.tag_webmaking {
    background: #90EE90;
    color: #333;
}

.article_title {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
}

.article_description {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
    flex: 1;
}

.article_footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.btn_read {
    background: #333;
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn_read:hover {
    background: #555;
}

/* サイドバースタイル */
.sidebar_section {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar_title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.sidebar_content {
    min-height: 10rem;
}

.sidebar_banner {
    min-height: 15rem;
    background: #f0f0f0;
    border-radius: 4px;
}

/* ページネーション */
.pagination {
    margin-top: 4rem;
    text-align: center;
}

.pagination .page-numbers {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers li {
    display: inline-block;
}

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

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

.pagination .current {
    background: #333;
    color: #fff;
    border-color: #333;
}

.no_posts {
    padding: 4rem;
    text-align: center;
    font-size: 1.6rem;
    color: #666;
}

/* サイドバー - ランキングリスト */
.ranking_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking_item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ranking_item:last-child {
    border-bottom: none;
}

.rank_number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: #333;
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
}

.ranking_item a {
    text-decoration: none;
    color: #333;
    font-size: 1.4rem;
    line-height: 1.4;
}

.ranking_item a:hover {
    color: #666;
}

/* サイドバー - カテゴリーリスト */
.category_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category_item {
    border-bottom: 1px solid #eee;
}

.category_item:last-child {
    border-bottom: none;
}

.category_item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    text-decoration: none;
    color: #333;
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.category_item a:hover {
    color: #666;
}

.post_count {
    color: #999;
    font-size: 1.2rem;
}

/* サイドバー - バナー */
.sidebar_banner a {
    display: block;
}

.sidebar_banner img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #article .inr {
        flex-direction: column;
    }
    
    #article .main {
        width: 100%;
    }
    
    #article .sidebar {
        width: 100%;
    }
    
    .article_link {
        flex-direction: column;
    }
    
    .article_image {
        width: 100%;
        height: 200px;
    }
}



/* シングルページ - 基本レイアウト */
#article_single {
    padding: 2rem 0;
}

#article_single .inr {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

#article_single .main {
    width: calc(100% - 29rem);
}

#article_single .sidebar {
    width: 27rem;
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

/* 記事ヘッダー */
#article_single .head {
    margin-bottom: 3rem;
}

#article_single .meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

#article_single .date {
    font-size: 1.4rem;
    color: #666;
    margin: 0;
}

#article_single .categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#article_single .category_tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #9370DB;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

#article_single .category_tag:hover {
    background: #7B68BB;
}

#article_single .article_title {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 2rem 0;
    color: #333;
}

#article_single .article_thumbnail {
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
}

#article_single .article_thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* 記事コンテンツ */
.article_content {
    font-size: 1.6rem;
    line-height: 1.8;
    color: #333;
}

.article_content h2 {
    font-size: 2.4rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #333;
}

.article_content h3 {
    font-size: 2rem;
    font-weight: 600;
    margin: 2.5rem 0 1.5rem 0;
    padding-left: 1rem;
    border-left: 4px solid #333;
}

.article_content p {
    margin: 1.5rem 0;
}

.article_content ul,
.article_content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article_content li {
    margin: 0.5rem 0;
}

.article_content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2rem 0;
}

.article_content a {
    color: #0066cc;
    text-decoration: underline;
}

.article_content a:hover {
    color: #0052a3;
}

.article_content code {
    background: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
}

.article_content pre {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 2rem 0;
}

.article_content pre code {
    background: none;
    padding: 0;
}

/* 前後の記事ナビゲーション */
.post_navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid #ddd;
}

.nav_prev,
.nav_next {
    flex: 1;
}

.nav_prev a,
.nav_next a {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.nav_prev a:hover,
.nav_next a:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.nav_next a {
    text-align: right;
}

.nav_label {
    font-size: 1.2rem;
    color: #999;
    font-weight: 500;
}

.nav_title {
    font-size: 1.5rem;
    font-weight: 600;
}

/* 関連記事 */
.related_posts {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid #ddd;
}

.section_title {
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.related_posts_list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.related_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;
}

.related_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.related_card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related_image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

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

.related_card:hover .related_image img {
    transform: scale(1.05);
}

.related_title {
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.no_related {
    text-align: center;
    color: #999;
    padding: 2rem;
}

/* サイドバー - 目次 */
.toc_section {
    position: sticky;
    top: 2rem;
}

.toc_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc_item {
    margin: 0;
}

.toc_item a {
    display: block;
    padding: 0.8rem 0;
    text-decoration: none;
    color: #333;
    font-size: 1.4rem;
    line-height: 1.4;
    border-bottom: 1px solid #eee;
    transition: color 0.3s ease;
}

.toc_item a:hover {
    color: #666;
}

.toc_h3 a {
    padding-left: 1.5rem;
    font-size: 1.3rem;
    color: #666;
}

.no_toc {
    font-size: 1.4rem;
    color: #999;
}

/* サイドバー - 共通スタイル（archive-article.phpと同じ） */
.sidebar_section {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar_title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.sidebar_content {
    min-height: auto;
}

.ranking_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking_item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ranking_item:last-child {
    border-bottom: none;
}

.rank_number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: #333;
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
}

.ranking_item a {
    text-decoration: none;
    color: #333;
    font-size: 1.4rem;
    line-height: 1.4;
}

.ranking_item a:hover {
    color: #666;
}

.category_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category_item {
    border-bottom: 1px solid #eee;
}

.category_item:last-child {
    border-bottom: none;
}

.category_item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    text-decoration: none;
    color: #333;
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.category_item a:hover {
    color: #666;
}

.post_count {
    color: #999;
    font-size: 1.2rem;
}

.sidebar_banner a {
    display: block;
}

.sidebar_banner img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #article_single .inr {
        flex-direction: column;
    }
    
    #article_single .main {
        width: 100%;
    }
    
    #article_single .sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }
    
    #article_single .article_title {
        font-size: 2.4rem;
    }
    
    .related_posts_list {
        grid-template-columns: 1fr;
    }
    
    .post_navigation {
        flex-direction: column;
    }
}