/*
Theme Name: Anabuki Column
Theme URI: https://anabuki-design.check-site.dev/column/
Description: あなぶきデザイン＆リフォームのコラム用カスタムテーマ（親サイトCSSを継承）
Version: 1.0.0
Author: Anabuki Design & Reform
Author URI: https://www.anabuki-d.co.jp/
Text Domain: anabuki-column
*/

/* ==========================================================================
   WordPress用カスタムスタイル（親サイトCSSを継承）
   ========================================================================== */

/* WordPress管理バー対応 */
.admin-bar #header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar #header {
        top: 46px;
    }
}

/* コンテンツエリアのレイアウト調整 */
#primary.site-main {
    padding: 60px 0;
    min-height: 60vh;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   記事一覧レイアウト
   ========================================================================== */

.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.post-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.post-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.post-content {
    padding: 24px;
}

.post-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-title a {
    color: #333;
    text-decoration: none;
}

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

.post-excerpt {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 16px;
}

.read-more {
    display: inline-block;
    font-size: 14px;
    color: #0066cc;
    font-weight: 500;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* ==========================================================================
   個別記事ページ
   ========================================================================== */

article.single {
    max-width: 800px;
    margin: 0 auto;
}

.entry-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.entry-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
    color: #333;
}

.entry-meta {
    font-size: 14px;
    color: #999;
}

.entry-meta time {
    margin-right: 16px;
}

.entry-meta a {
    color: #0066cc;
    text-decoration: none;
}

.entry-meta a:hover {
    text-decoration: underline;
}

.entry-content {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
}

.entry-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 48px 0 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #0066cc;
}

.entry-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 20px;
}

.entry-content p {
    margin-bottom: 24px;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 24px;
    padding-left: 32px;
}

.entry-content li {
    margin-bottom: 12px;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 24px 0;
}

.entry-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.tags a {
    display: inline-block;
    padding: 4px 12px;
    margin: 4px 4px 4px 0;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}

.tags a:hover {
    background: #e0e0e0;
}

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

.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.nav-links .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-links .page-numbers:hover,
.nav-links .page-numbers.current {
    background: #0066cc;
    color: #fff;
}

/* 記事ナビゲーション */
.post-navigation {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 16px;
    background: #f9f9f9;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: #e9e9e9;
}

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

@media (max-width: 768px) {
    .entry-title {
        font-size: 28px;
    }

    .entry-content h2 {
        font-size: 24px;
    }

    .entry-content h3 {
        font-size: 20px;
    }

    .post-list {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .post-navigation .nav-links {
        flex-direction: column;
    }
}



/* ==========================================
   記事リスト - 2カラムグリッドレイアウト
========================================== */

.newsList--grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 40px 0;
}

/* タブレット以上で2カラム */
@media (min-width: 768px) {
    .newsList--grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 30px;
    }
}

/* 記事アイテム */
.newsList__item {
    list-style: none;
}

.newsList__itemLink {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.newsList__itemLink:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

/* サムネイル */
.newsList__itemThumb {
    position: relative;
    width: 100%;
    padding-top: 60%;
    /* 5:3 アスペクト比 */
    overflow: hidden;
    background: #f5f5f5;
}

.newsList__itemImg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.newsList__itemLink:hover .newsList__itemImg {
    transform: translate(-50%, -50%) scale(1.05);
}

/* コンテンツエリア */
.newsList__itemContent {
    padding: 24px;
}

/* メタ情報 */
.newsList__itemMeta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.newsList__itemDate {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

.newsList__itemCat {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    color: #333;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.newsList__itemLink:hover .newsList__itemCat {
    background: #e0e0e0;
}

/* タイトル */
.newsList__itemTxt {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    color: #333;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .newsList__itemTxt {
        font-size: 18px;
    }
}

/* 抜粋 */
.newsList__itemExcerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* レスポンシブ調整 */
@media (max-width: 767px) {
    .newsList--grid {
        gap: 24px;
    }

    .newsList__itemContent {
        padding: 20px;
    }

    .newsList__itemTxt {
        font-size: 15px;
    }

    .newsList__itemExcerpt {
        font-size: 13px;
    }
}

/* カテゴリー別カラーバリエーション（オプション） */
.newsList__itemCat[href*="category-slug-1"] {
    background: #e3f2fd;
    color: #1976d2;
}

.newsList__itemCat[href*="category-slug-2"] {
    background: #f3e5f5;
    color: #7b1fa2;
}

.newsList__itemCat[href*="category-slug-3"] {
    background: #e8f5e9;
    color: #388e3c;
}

/* ==========================================
   2カラムレイアウト（メインコンテンツ + サイドバー）
========================================== */

.contentWithSidebar {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.mainContent {
    flex: 1;
    min-width: 0;
    /* フレックスアイテムのはみ出し防止 */
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* タブレット以下でサイドバーを下に配置 */
@media (max-width: 1024px) {
    .contentWithSidebar {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }
}

/* index.phpの記事リストを2カラムに変更 */
.contentWithSidebar .newsList--grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* 大きな画面では2カラムを維持 */
@media (min-width: 1400px) {
    .contentWithSidebar .newsList--grid {
        gap: 30px;
    }
}

/* 中サイズの画面では1カラムに */
@media (max-width: 1280px) {
    .contentWithSidebar .newsList--grid {
        grid-template-columns: 1fr;
    }
}

/* 人気記事スタイル */
.popularPosts {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.popularPosts__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.onlypc {
    display: none;
}

@media (max-width: 798px) {
    .onlypc {
        display: block;
    }
    .rank-math-breadcrumb {
        margin-bottom: 10px!important;
}
.lowerArticle__cont{
margin-top: 0px!important;
}
  .lowerArticle__newsNavi.add_cs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .add_cs .lowerArticle__newsNaviItem {
        flex: 0 0 auto;
    }

    .add_cs .lowerArticle__newsNaviItemInner {
        display: block;
        white-space: nowrap;
        padding: 8px 12px;
    }
}
.newsList__item>a, .newsList__item>span {
    padding: 0.2rem;
}

.add_marbt {
    margin-bottom: 10px;
}


@media (min-width: 798px) {
.lowerArticle__cont{
margin-top: 20px;
}

.add_cs1{
padding:.5rem 0 2rem;
}
.add_side{
    margin-top: 40px;
}

}
