/*
Theme Name: Cocoon Child
Template: cocoon-master
Version: 1.1.3
*/

/************************************
** サイト共通スタイル（モバイル優先ベース）
************************************/

/* 1. デザイン変数の定義 - モダンなデザインに調整 */
:root {
    --gap: 24px; /* 共通の余白を広げ、ゆとりを持たせる */
    --line-height-base: 1.75; /* 基本の行の高さを設定 (可読性向上) */
    --color-primary: #0073aa; /* メインカラー (ブルー系) */
    --color-primary-dark: #005a8c;
    --color-accent: #e6f7ff; /* ボタン・背景に使うライトブルー */
    --color-border: #e0e0e0; /* ボーダー色 */
    --text: #333333; /* 標準テキスト色 */
    --muted: #666666; /* 控えめなテキスト色 */
    --bg-subtle: #f9f9f9; /* わずかな背景色 */
    --radius: 12px; /* 角丸のサイズを大きくし、モダンに */
    --tap-min: 48px; /* タップ領域の最小サイズを確保 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 2. 基本的なリセットとデザイン設定 */
body {
    /* フォント指定を追加し、OS標準のモダンなフォントを使用 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
    line-height: var(--line-height-base); /* 行間を適用 */
    color: var(--text);
    background-color: var(--bg-subtle);
}

.top-page .spotlight-cards,
.profile-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 3. 基本的なリンクの色 */
a {
    color: var(--color-primary);
    transition: color 0.2s ease, opacity 0.2s ease;
    text-decoration: none; /* デフォルトの下線を削除 */
}
a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline; /* ホバーで下線を出す */
}

/* 4. トップページカスタムセクションのCSS */
/* === .top-page スコープ（トップ専用） === */

/* 4-1. 注目のツール・ガイド（Spotlight Section） */
.top-page .spotlight-section {
    padding: var(--gap) 12px;
    max-width: 1100px; /* PCでの最大幅はそのまま維持 */
    margin: 0 auto var(--gap);
}
.top-page .spotlight-cards {
    /* 【削除・コメントアウト】Bootstrapの.rowと.g-4（gap）に置き換えます */
    /* display: flex; */
    /* gap: var(--gap); */
    /* flex-wrap: wrap; */
    /* align-items: stretch; */
}
.top-page .spot-card {
    /* 【削除・コメントアウト】Bootstrapの.col-*に置き換えます */
    /* flex: 1 1 300px; */
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.top-page .spot-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.top-page .spot-cta {
    display: block;
    text-align: center;
    background: var(--color-primary);
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 700;
    margin-top: 15px;
    min-height: var(--tap-min);
    transition: background-color 0.2s;
}
.top-page .spot-cta:hover {
    background: var(--color-primary-dark);
    text-decoration: none;
}


/* 4-2. カテゴリ誘導セクション */
.category-section {
    padding: 2.5em 1em;
    text-align: center;
}
.category-button-list {
    /* 【削除・コメントアウト】Bootstrapの.rowと.justify-content-centerに置き換えます */
    /* display: flex; */
    /* flex-wrap: wrap; */
    /* gap: var(--gap); */
    /* justify-content: center; */
    margin: 2em auto;
    max-width: 900px;
}
.dp-category-btn {
    /* !! ボタンのデザインを強化 !! */
    display: inline-flex !important; /* 親テーマに負けないよう !important を付与 */
    align-items: center;
    justify-content: center;
    min-height: var(--tap-min);
    padding: 1em 2em;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
    /* 【削除・コメントアウト】Bootstrapの.col-*に置き換えます */
    /* flex-grow: 1; */
}
.dp-category-btn:hover {
    background-color: #d8edff; /* アクセントカラーより少し濃い色 */
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}


/* 4-3. プロフィールセクション */
.profile-section {
    padding: 2.5em 1em;
    text-align: center;
}
.profile-table {
    /* 【削除・コメントアウト】Bootstrapのグリッドまたはユーティリティに置き換えます */
    /* display: flex; */
    /* align-items: center; */
    /* justify-content: center; */
    /* gap: 30px; */
    margin: 2em auto;
    max-width: 600px;
}
.profile-table img {
    border-radius: 50%;
    width: 140px;
    height: 140px;
    object-fit: cover;
    border: 4px solid var(--color-primary);
}
.profile-link-list {
    /* 【削除・コメントアウト】Bootstrapのユーティリティに置き換えます */
    /* display: flex; */
    /* flex-wrap: wrap; */
    /* justify-content: center; */
    /* gap: 12px; */
    margin-top: 20px;
}
.profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap-min);
    padding: .8em 1.2em;
    border-radius: 6px;
    text-decoration: none;
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
    transition: background-color .2s;
}
.profile-btn:hover {
    background-color: var(--color-primary-dark);
    opacity: 1;
}


/* 4-4. 新着＆人気記事セクションのスタイル */
.article-section {
    padding: 2.5em 1em;
    margin-bottom: var(--gap);
}
.article-section .section-title {
    font-size: 1.8rem;
    padding-bottom: 0.6em;
    border-bottom: 3px solid var(--color-primary);
    margin-bottom: 1.5em;
}

/* モバイルのデフォルト（1カラム）設定 */
.mobile-only-tab {
    display: block;
}
.mobile-only-tab .tab-content {
    display: block;
    margin-bottom: var(--gap);
}


/* 5. メディアクエリ（レスポンシブ調整） */

/* モバイルでの調整 (768px以下) */
@media (max-width: 768px) {
    /* 【削除・コメントアウト】Bootstrapの.col-12に置き換えます */
    /* .category-button-list { flex-direction: column; align-items: stretch; }
    .dp-category-btn { width: 100%; padding: 1em; }  */

    /* 【削除・コメントアウト】Bootstrapの.col-12に置き換えます */
    /* .profile-table { flex-direction: column; gap: 15px; }
    .profile-link-list { flex-direction: column; align-items: stretch; }
    .profile-link-list li { width: 100%; }
    .profile-btn { width: 100%; } */
}

/* --------------------------------- */
/* デスクトップ調整 (769px以上)       */
/* --------------------------------- */
@media screen and (min-width: 769px) {
    
    /* 【削除・コメントアウト】Bootstrapのグリッドで制御するため */
    /* ***** 【カテゴリーボタンの横並び調整を再設定】 *****
    .category-button-list {
        gap: 20px;
    }
    .category-button-list .dp-category-btn {
        flex: 1 1 calc(25% - 20px);  
        min-width: 150px;
        max-width: 250px; 
    } */
    
    /* 【削除・コメントアウト】Bootstrapのグリッドで制御するため */
    /* PC 2カラム設定
    .article-section .tab-content-wrap {
        display: flex;
        gap: var(--gap);
        max-width: 1200px;  
        margin: 0 auto;
    }
    .article-section .tab-content {
        flex: 1 1 50%;
    } */
}

/************************************
** 6. 記事本文の調整（レイアウト以外は維持）
************************************/

/* 記事本文の段落、リスト、引用符の行間と下マージンを適切に設定 */
.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
    /* 行間をvarから取得し、可読性を向上 */
    line-height: var(--line-height-base) !important;
    margin-top: 0 !important;
    margin-bottom: 1.7em !important;  
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* 見出しも上下の余白を適切に確保し、行間の詰まりを防ぐ */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2.5em !important; /* 見出しの上の余白を大きく確保 */
    margin-bottom: 0.8em !important; /* 見出しの下の余白を確保 */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* リストアイテムの行間が詰まりすぎないように調整 */
.entry-content li {
    margin-bottom: 0.6em !important;  
}


/* 記事コンテンツ（content-in / article-page）のレイアウト調整 */
.content-in,  
.article-page {  
    max-width: 750px !important;  
    margin-left: auto !important;  
    margin-right: auto !important;  
      
    /* 記事エリアのデザインを強化 */
    background-color: #fff;
    padding: var(--gap);  
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* PCでのみ幅を拡張 (900px以上で適用) */
@media screen and (min-width: 900px) {
    .content-in,  
    .article-page {
        max-width: 1000px !important;  
    }
}
/************************************
** 7. 記事とアイキャッチの幅統一 (レイアウト以外は維持)
************************************/

/* 記事本文とアイキャッチのコンテナをグループ化して幅を統一 */
.content-in,
.article-page,
#article-eye-catch,
#post-eye-catch,
.article-eye-catch {
    /* モバイル〜タブレットの最大幅 */
    max-width: 750px !important;  
    margin-left: auto !important;
    margin-right: auto !important;
    /* 必要に応じて、両端の余白をリセット */
    padding-left: 0 !important;  
    padding-right: 0 !important;
}

/* PCでの幅拡張（900px以上で適用） */
@media screen and (min-width: 900px) {
    .content-in,
    .article-page,
    #article-eye-catch,
    #post-eye-catch,
    .article-eye-catch {
        /* PCの最大幅 */
        max-width: 1000px !important;  
    }
}
/* Spotlightカードのホバーエフェクト（クラス名: spotlight-card-hover） */
.spotlight-card-hover {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.spotlight-card-hover:hover {
    transform: translateY(-5px); /* 上に少し浮き上がる */
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; /* 影を強調 */
}

/* カテゴリボタンの文字サイズ調整（クラス名: category-badge） */
.category-badge {
    font-size: 0.95rem !important; /* ボタンが大きくなりすぎないように調整 */
}