/* ============================================================
   投稿記事専用 (Navy & Gold Premium Style)
   ※ .single クラスにより投稿ページ以外には干渉しません
   ============================================================ */

/* --- 1. 本文内の見出し (Headings) --- */

/* H2: 重厚感のある帯デザイン */
.single .entry-content h2 {
    position: relative;
    margin: 3em 0 1.5em;
    padding: 1.2em 1.5em !important;
    background: #111827 !important;
    color: #ffffff !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    border-radius: 8px;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}



.single .entry-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 6px;
    background: #f59e0b;
    border-radius: 0 4px 4px 0;
}

/* H3: 下線とドットアクセント */
.single .entry-content h3 {
    position: relative;
    margin: 2.5em 0 1.2em;
    padding: 0.5em 0 0.5em 1.2em !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
    line-height: 1.4 !important;
    border-bottom: 2px solid #e5e7eb !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

.single .entry-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 24px;
    background: #f59e0b;
    border-radius: 2px;
}

/* H4: シンプルなアンダーライン */
.single .entry-content h4 {
    margin: 2em 0 1em;
    padding: 0 0 0.3em !important;
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
    border-bottom: 1px solid #111827 !important;
    display: inline-block;
}

/* --- 2. 本文テキスト・リンク・画像 --- */

.single .entry-content p {
    line-height: 1.8;
    margin-bottom: 1.8em;
    color: #374151;
}

.single .entry-content img {
    border-radius: 12px !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1) !important;
}

/* 記事内のリンク装飾 */
.single .entry-content p a, 
.single .entry-content li a {
    color: #f59e0b !important;
    text-decoration: none !important;
    font-weight: 700;
    border-bottom: 1px solid #f59e0b;
    transition: all 0.3s ease;
    padding: 0 2px;
}

.single .entry-content p a:hover, 
.single .entry-content li a:hover {
    color: #ffffff !important;
    background-color: #f59e0b !important;
    border-radius: 3px;
}

/* --- 3. リスト (ul/ol) & 引用 --- */

.single .entry-content ul, 
.single .entry-content ol {
    margin: 2em 0 !important;
    padding: 25px 30px !important;
    background: #f8fafc !important;
    border-radius: 12px;
    list-style: none !important;
}

.single .entry-content ul li, 
.single .entry-content ol li {
    position: relative;
    padding: 0.5em 0 0.5em 1.8em !important;
    line-height: 1.6 !important;
    color: #374151 !important;
    border-bottom: 1px dashed #e2e8f0;
}

/* 「style属性を持っていない」liにだけドットをつける */
.single .entry-content ul li:not([style])::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 8px;
    height: 8px;
    background: #f59e0b; 
    border-radius: 50%;
}

.single .entry-content ol { counter-reset: my-counter; }
.single .entry-content ol li::before {
    counter-increment: my-counter;
    content: counter(my-counter);
    position: absolute;
    left: 0; top: 0.6em;
    width: 20px; height: 20px;
    background: #111827 !important;
    color: #ffffff !important;
    font-size: 11px;
    text-align: center;
    line-height: 20px;
    border-radius: 4px;
}

/* 引用 */
.single .entry-content blockquote {
    position: relative;
    margin: 3em 0 !important;
    padding: 40px 40px 30px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-left: 5px solid #111827 !important;
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

/* --- 4. テーブル & ボタン (Mobile Optimized) --- */

.single .entry-content .wp-block-table {
    margin: 2em 0 !important;
    overflow-x: auto !important;
    display: block !important;
}

.single .entry-content .wp-block-table table {
    min-width: 600px !important;
    border-collapse: collapse !important;
}

.single .entry-content .wp-block-table th {
    background: #111827 !important;
    color: #ffffff !important;
}

/* ボタン */
.single .wp-block-button__link {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    padding: 16px 40px !important;
    border-radius: 50px !important;
    font-weight: 800 !important;
    transition: 0.3s;
}

@media screen and (max-width: 600px) {
    .single .wp-block-button, .single .wp-block-button__link { width: 100% !important; }
}

/* --- 5. 記事パーツ (Summary, TOC, CTA, Related) --- */

/* 3行まとめ */
.single .summary-box {
    margin: 30px 0;
    background: #ffffff;
    border-radius: 12px;
    border-left: 8px solid #111827;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}

/* 目次 */
.single .custom-toc {
    margin: 40px 0;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

/* ============================================================
   記事下エリア専用 (Post Footer Specific)
   ============================================================ */

/* 記事下エリア全体のコンテナ */
.single .custom-post-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #f3f4f6;
    clear: both;
}

/* --- 1. SNSシェアエリア --- */
.single .custom-post-footer .share-container {
    margin-bottom: 50px;
    text-align: center;
}

.single .custom-post-footer .share-label {
    font-size: 0.75rem;
    font-weight: 900;
    color: #9ca3af;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
}

.single .custom-post-footer .share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* SNS自作ボタンの基本スタイル */
.single .custom-post-footer .share-btn {
    width: 50px !important;
    height: 50px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    color: #ffffff !important;
    font-size: 1.2rem !important;
    transition: transform 0.2s !important;
    border: none !important;
}

.single .custom-post-footer .x-btn { background: #000000 !important; }
.single .custom-post-footer .fb-btn { background: #1877f2 !important; }
.single .custom-post-footer .line-btn { background: #06c755 !important; }
.single .custom-post-footer .copy-btn { background: #6b7280 !important; }

/* SNSボタンの矢印を消す */
.single .custom-post-footer .share-btn::after {
    display: none !important;
    content: none !important;
}

/* ============================================================
   記事下エリア専用：高級CTAデザイン (Navy & Gold)
   ============================================================ */

/* 1. 外枠のコンテナ */
.single .custom-post-footer .cta-box {
    margin: 60px 0 40px;
    padding: 60px 30px;
    background: #111827 !important;
    border-radius: 20px;
    border: 2px solid #f59e0b !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    text-align: center;
    position: relative;
    overflow: hidden; /* 透かし文字のはみ出し防止 */
}

/* 2. 背景の透かし文字（位置調整版） */
.single .custom-post-footer .cta-watermark {
    position: absolute;
    /* 位置を上から中央付近へ移動 */
    top: 10%; 
    right: -10px;
    font-size: 100px;
    color: rgba(245, 158, 11, 0.05); /* 薄いゴールド */
    font-weight: 900;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    /* z-indexを低くして他の要素の背面に配置 */
    z-index: 1; 
}

/* 3. サブタイトル (SPECIAL OFFER) の重なり調整 */
.single .custom-post-footer .cta-sub {
    position: relative;
    z-index: 2; /* 透かし文字より前面に出す */
    display: inline-block !important;
    background: #f59e0b !important;
    color: #111827 !important;
    padding: 4px 20px !important;
    border-radius: 50px !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    margin-bottom: 25px !important;
    letter-spacing: 0.1em;
}

/* 4. メインタイトルも前面へ */
.single .custom-post-footer .cta-title {
    position: relative;
    z-index: 2;
    /* ...他のスタイルはそのまま... */
}

/* 3. サブタイトル (SPECIAL OFFER) */
.single .custom-post-footer .cta-sub {
    display: inline-block !important;
    background: #f59e0b !important;
    color: #111827 !important;
    padding: 4px 20px !important;
    border-radius: 50px !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    margin-bottom: 25px !important;
    letter-spacing: 0.1em;
}

/* 4. メインタイトル（本文デザイン干渉を完全リセット） */
.single .custom-post-footer .cta-title {
    color: #ffffff !important;
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    margin: 0 0 20px 0 !important;
    line-height: 1.4 !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}
.single .custom-post-footer .cta-title::before,
.single .custom-post-footer .cta-title::after {
    display: none !important; /* 本文H3の棒やドットを消す */
}

/* 5. 説明文 */
.single .custom-post-footer .cta-desc {
    color: #9ca3af !important;
    font-size: 1rem !important;
    line-height: 1.8 !important;
    margin-bottom: 30px !important;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* 6. ボタン設定（矢印干渉対策込み） */
.single .custom-post-footer .cta-button {
    display: inline-block !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    padding: 18px 50px !important;
    border-radius: 50px !important;
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3) !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

/* 外部リンク用の矢印アイコンを強制的に消す */
.single .custom-post-footer .cta-button::after {
    content: none !important;
    display: none !important;
}

.single .custom-post-footer .cta-button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.5) !important;
    opacity: 1 !important;
}

/* 7. 注意書き */
.single .custom-post-footer .cta-note {
    color: #6b7280 !important;
    font-size: 0.8rem !important;
    margin-top: 25px !important;
}

/* スマホ対応：改行の調整 */
@media screen and (max-width: 600px) {
    .pc-only { display: none; }
    .single .custom-post-footer .cta-title { font-size: 1.4rem !important; }
    .single .custom-post-footer .cta-button { width: 100%; padding: 18px 20px !important; font-size: 1.1rem !important; }
}

/* ============================================================
   関連記事エリア：完全独立リセット（ID指定で優先順位を最大化）
   ============================================================ */

/* 1. 外枠とタイトルのリセット */
#custom-related-area {
    margin-top: 50px !important;
    padding-top: 30px !important;
    border-top: 1px solid #e5e7eb !important;
}

#custom-related-area .related-list-title {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
    margin-bottom: 20px !important;
    padding-left: 15px !important;
    border-left: 5px solid #f59e0b !important;
    background: transparent !important; /* 本文見出しの背景を消す */
}

/* 2. 本文用リストの「背景」「丸ドット」「余白」を根こそぎ消去 */
#custom-related-area ul, 
#custom-related-area ul.related-list {
    background: transparent !important; /* グレーの背景を消す */
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    list-style: none !important;
}

#custom-related-area li {
    position: static !important; /* 本文の relative を解除 */
    padding: 15px 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border-bottom: 1px solid #e5e7eb !important; /* 下線だけ残す */
}

/* 本文用の「ゴールドの丸ドット」を物理的に消す */
#custom-related-area li::before {
    content: none !important;
    display: none !important;
}

/* 3. 本文用リンクの「色」「下線」「ホバー背景」を根こそぎ消去 */
#custom-related-area a {
    color: #374151 !important;    /* リンク色をダークグレーに強制 */
    text-decoration: none !important;
    border-bottom: none !important; /* 本文の下線を消す */
    background: transparent !important; /* ホバー時の背景色を消す */
    font-weight: 600 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
}

/* 本文用リンクの「斜め上矢印」も消す */
#custom-related-area a::after {
    content: none !important;
    display: none !important;
}

/* 4. 関連記事専用の「▶」アイコンを設置 */
#custom-related-area a::before {
    content: "▶" !important;