/*
Theme Name: AFFINGER Child
Template: affinger
Description: AFFINGER6 対応
Version: 20210719
*/

/*media Queries スマートフォンとタブレットサイズ（959px以下）で適応したいCSS - スマホ・タブレット
---------------------------------------------------------------------------------------------------*/
@media only screen and (max-width: 959px) {


	/*-- ここまで --*/
}
	
/*media Queries タブレットサイズ（600px～959px）のみで適応したいCSS -タブレットのみ
---------------------------------------------------------------------------------------------------*/
@media only screen and (min-width: 600px) and (max-width: 959px) {


	/*-- ここまで --*/
}	
	
/*media Queries タブレット（600px）以上で適応したいCSS -タブレット・PC
---------------------------------------------------------------------------------------------------*/
@media only screen and (min-width: 600px) {


	/*-- ここまで --*/
}

/*media Queries PCサイズ（960px）以上で適応したいCSS - PCのみ
---------------------------------------------------------------------------------------------------*/
@media print, screen and (min-width: 960px) {


	/*-- ここまで --*/
}

/*media Queries スマホサイズ（599px）以下で適応したいCSS - スマホのみ
---------------------------------------------------------------------------------------------------*/
@media print, screen and (max-width: 599px) {

	
	/*-- ここまで --*/
}


/* 横スクロール */
.is-scroll {
	overflow: auto;
	white-space: nowrap;
}

/* 超シンプル版カテゴリページ + 統一サイドバー用CSS */

/* 基本レイアウト */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    margin-bottom: 60px;
}

/* パンくずリスト */
.breadcrumb {
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.breadcrumb a {
    color: #217346;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* カテゴリヘッダー */
.category-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #217346;
}

.category-title {
    font-size: 2rem;
    color: #217346;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-description {
    color: #666;
    font-size: 1rem;
    margin-bottom: 10px;
}

.category-count {
    color: #888;
    font-size: 0.9rem;
}

/* 記事一覧ヘッダー */
.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.posts-count {
    color: #666;
    font-weight: 500;
}

.sort-select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

/* テーブルヘッダー */
.posts-table-header {
    display: grid;
    grid-template-columns: 1fr 100px 80px;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 2px solid #217346;
    font-weight: 600;
    color: #217346;
    font-size: 0.9rem;
}

/* 記事一覧 */
.posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-item {
    display: grid;
    grid-template-columns: 1fr 100px 80px;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    transition: background-color 0.2s ease;
}

.post-item:hover {
    background-color: #f9f9f9;
}

.post-main {
    min-width: 0;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #217346;
}

.post-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.post-meta {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    gap: 10px;
    align-items: center;
}

.post-category {
    background: #217346;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.75rem;
}

.post-views {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.post-date {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* 空の状態 */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-posts-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #555;
}

.back-to-home {
    display: inline-block;
    background: #217346;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 20px;
}

.back-to-home:hover {
    background: #0F5132;
    text-decoration: none;
    color: white;
}

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

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #217346;
    color: white;
    border-color: #217346;
}

.pagination .current {
    background: #217346;
    color: white;
    border-color: #217346;
}

/* 統一サイドバー */
.sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.widget {
    margin-bottom: 30px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #217346;
    border-bottom: 1px solid #217346;
    padding-bottom: 5px;
}

/* 検索ボックス */
.search-form {
    display: flex;
    gap: 5px;
}

.search-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.search-btn {
    background: #217346;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.search-btn:hover {
    background: #0F5132;
}

/* 人気記事リスト */
.popular-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.popular-post-item {
    padding: 8px 0;
    border-bottom: 1px dotted #ddd;
    font-size: 0.9rem;
}

.popular-post-item:last-child {
    border-bottom: none;
}

.popular-post-item a {
    color: #333;
    text-decoration: none;
    display: block;
}

.popular-post-item a:hover {
    color: #217346;
}

.popular-post-item::before {
    content: "▸ ";
    color: #217346;
    font-weight: bold;
}

/* カテゴリリスト */
.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dotted #ddd;
    font-size: 0.9rem;
}

.category-item:last-child {
    border-bottom: none;
}

.category-name {
    color: #333;
    text-decoration: none;
}

.category-name:hover {
    color: #217346;
}

.category-count {
    background: #eee;
    color: #666;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .posts-table-header {
        display: none;
    }
    
    .post-item {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px 0;
    }
    
    .post-views,
    .post-date {
        text-align: left;
    }
    
    .posts-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .sidebar {
        position: static;
    }
}