/*
 * BoostX Blog Article CSS
 * Source: blog_design_enforcer.py CORRECT_STYLE (参照記事: gas-estimate-auto-generate)
 * Version: 1.0.0
 * Date: 2026-04-24
 *
 * 変更禁止（2026-04-19社長直接指示）。
 */

/* v1.0.7: .border-brand-blue を削除（2026-04-27 社長指示）
 * 元々の .border-brand-blue{display:none!important} は記事本文内の特定要素を消す目的だったが、
 * テーマの single-blog.php がタイトル部分に同じクラスを使っており、タイトルが非表示になる事故が発生した。
 * → このルールは完全削除し、必要なら .bx-article 配下にスコープした記述で対応する。*/
.bx-article{font-family:'Hiragino Kaku Gothic ProN','Hiragino Sans',Meiryo,sans-serif;color:#333;line-height:1.9;max-width:800px;margin:0 auto}
.bx-toc{max-height:400px;overflow-y:auto;border:1px solid #e0e0e0;border-radius:8px;padding:25px;margin-bottom:40px;background:linear-gradient(135deg,#f8f9fa 0%,#fff 100%);box-shadow:0 2px 8px rgba(0,0,0,.05)}
.bx-toc__title{font-weight:bold;font-size:18px;margin-bottom:20px;color:#2c3e50;border-bottom:2px solid #2563eb;padding-bottom:10px}
.bx-toc__list{list-style:none;padding-left:0;margin:0}
.bx-toc__item{margin-bottom:12px}
.bx-toc__item a{color:#2563eb;text-decoration:none;font-size:15px}
.bx-h2{font-size:28px;color:#2c3e50;margin-top:60px;margin-bottom:30px;padding-bottom:15px;border-bottom:3px solid #2563eb;font-weight:bold}
.bx-h3{font-size:22px;color:#2c3e50;margin-top:40px;margin-bottom:20px;padding-left:15px;border-left:4px solid #2563eb;font-weight:bold}
.bx-p{font-size:16px;line-height:1.9;color:#333;margin-bottom:25px}
.bx-article p{font-size:16px;line-height:1.9;color:#333;margin-bottom:25px}
.bx-table-wrap{overflow-x:auto;margin:35px 0}
.bx-table{width:100%;border-collapse:collapse;font-size:15px;box-shadow:0 2px 8px rgba(0,0,0,.08);border-radius:8px;overflow:hidden}
.bx-table thead tr{background:linear-gradient(135deg,#2563eb 0%,#1d4ed8 100%)}
.bx-table th{padding:18px 20px;text-align:left;color:#fff;font-weight:bold;border:none}
.bx-table td{padding:16px 20px;border-bottom:1px solid #e0e0e0}
.bx-table tbody tr:nth-child(odd){background-color:#fff}
.bx-table tbody tr:nth-child(even){background-color:#f8f9fa}
.bx-table td:first-child{font-weight:bold;color:#2c3e50}
.bx-faq{margin:40px 0}
.bx-faq__item{background:#fff;border:1px solid #e0e0e0;border-radius:8px;margin-bottom:20px;box-shadow:0 2px 6px rgba(0,0,0,.05);overflow:hidden}
.bx-faq__q{background:linear-gradient(135deg,#f8f9fa 0%,#fff 100%);padding:20px 25px;border-bottom:1px solid #e0e0e0}
.bx-faq__q p{font-weight:bold;font-size:17px;color:#2c3e50;margin:0}
.bx-faq__q-badge{color:#2563eb;margin-right:10px}
.bx-faq__a{padding:20px 25px}
.bx-faq__a p{font-size:15px;color:#444;margin:0;line-height:1.8}
.bx-faq__a-badge{color:#27ae60;font-weight:bold;margin-right:10px}
.bx-matome{background:linear-gradient(135deg,#1e293b 0%,#2d3748 100%);border-radius:12px;padding:35px;margin:50px 0;box-shadow:0 4px 15px rgba(44,62,80,.2)}
.bx-matome__title{font-weight:bold;font-size:20px;color:#fff;margin-bottom:25px;text-align:center}
.bx-matome__list{margin:0;padding-left:25px;color:#fff}
.bx-matome__list li{margin-bottom:15px;line-height:1.7;font-size:15px;color:#fff!important}
.bx-matome li{color:#fff!important}
.bx-matome p{color:#fff!important}
.bx-point{background:#f8fafc;border-left:4px solid #0F172A;border-radius:0 6px 6px 0;padding:22px 28px;margin:35px 0}
.bx-point__title{font-weight:bold;font-size:16px;color:#0F172A;margin-bottom:10px}
.bx-point__text{font-size:15px;color:#444;margin:0;line-height:1.8}
.bx-author{border-top:2px solid #e0e0e0;margin-top:50px;padding-top:30px}
.bx-author__name{font-size:18px;font-weight:bold;color:#2c3e50;margin-bottom:5px}
.bx-author__title{font-size:14px;color:#666;margin-bottom:10px}
.bx-author__desc{font-size:14px;color:#555;line-height:1.8}
.bx-cta-box{background:#0F172A!important;border-radius:12px;padding:36px 40px;margin:56px 0;color:#fff!important;text-align:center}
.bx-cta-box__badge{display:inline-block;background:#f59e0b!important;color:#000!important;font-size:11px;font-weight:700;padding:3px 10px;border-radius:20px;margin-bottom:12px;letter-spacing:1px}
.bx-cta-box__title{font-size:20px;font-weight:700;margin:0 0 10px;color:#fff!important}
.bx-cta-box__desc{font-size:14px;color:#fff!important;margin:0 0 24px;line-height:1.7}
.bx-cta-box__btn{display:inline-block;background:#3b82f6!important;color:#fff!important;font-weight:700;font-size:15px;padding:14px 36px;border-radius:8px;text-decoration:none}
.bx-service-funnel{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:28px 32px;margin:48px 0}
.bx-service-funnel__badge{display:inline-block;font-size:12px;font-weight:700;color:#2563eb;letter-spacing:1px;margin:0 0 12px;text-transform:uppercase}
.bx-service-funnel__title{font-size:18px;font-weight:700;color:#0F172A;margin:0 0 14px;line-height:1.6}
.bx-service-funnel__desc{font-size:14px;color:#475569;line-height:1.85;margin:0 0 18px}
.bx-service-funnel__links{display:flex;flex-wrap:wrap;gap:12px 24px;margin:0;align-items:center}
.bx-service-funnel__link{display:inline-block;color:#2563eb;font-weight:700;font-size:14px;text-decoration:underline;padding:6px 0}
.bx-service-funnel__cta{display:inline-block;background:#2563eb;color:#fff!important;font-weight:700;font-size:14px;padding:12px 22px;border-radius:8px;text-decoration:none}
.bx-service-funnel__cta:hover{background:#1d4ed8}
.bx-dl-cta{background:#0F172A;border-radius:12px;padding:36px 40px;margin:56px 0;display:flex;align-items:center;gap:36px}
.bx-dl-cta__badge{display:inline-block;background:#1e40af;color:#fff!important;font-size:12px;font-weight:700;letter-spacing:.08em;padding:4px 12px;border-radius:4px;margin-bottom:10px}
.bx-dl-cta__title{color:#fff;font-size:20px;font-weight:700;line-height:1.5;margin:0 0 8px}
.bx-dl-cta__desc{color:#94a3b8;font-size:14px;line-height:1.7;margin:0}
.bx-dl-cta__btn{display:inline-block;background:#2563EB;color:#fff;font-weight:700;font-size:15px;padding:16px 28px;border-radius:8px;white-space:nowrap;text-decoration:none;flex-shrink:0}
.bx-date{font-size:13px;color:#999;text-align:right;margin-top:50px;padding-top:20px;border-top:1px solid #e0e0e0}
.bx-img{width:100%;border-radius:8px;margin:20px 0 30px;display:block}
.bx-img-caption{font-size:13px;color:#999;text-align:center;margin-top:-20px;margin-bottom:30px}
pre,.wp-block-code,.wp-block-preformatted{background:#0f172a!important;color:#ffffff!important;padding:20px 24px!important;border-radius:8px!important;overflow-x:auto;font-size:14px!important;line-height:1.7!important;font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace!important;margin:20px 0 30px!important;white-space:pre-wrap;word-wrap:break-word;border:none!important}
pre *,.wp-block-code *,.wp-block-preformatted *{color:#ffffff!important}
code{font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace!important;font-size:14px}
p code,li code,td code{background:#f1f5f9!important;padding:2px 6px!important;border-radius:4px!important;color:#1e293b!important;font-size:13px!important}
pre code,.wp-block-code code,.wp-block-preformatted code{background:none!important;padding:0!important;border-radius:0!important;color:#ffffff!important;font-size:inherit!important}
@media(max-width:768px){.bx-article{padding:0 4px!important}.bx-h2{font-size:22px!important;margin-top:40px!important;margin-bottom:20px!important}.bx-h3{font-size:18px!important;margin-top:28px!important}.bx-p{font-size:15px!important}.bx-toc{padding:18px!important}.bx-toc__item a{font-size:14px!important}.bx-table-wrap{margin:20px -4px!important}.bx-table th,.bx-table td{padding:10px 12px!important;font-size:13px!important}.bx-matome{padding:24px 20px!important;margin:36px 0!important}.bx-matome__title{font-size:18px!important}.bx-matome__list li{font-size:14px!important}.bx-faq__q{padding:16px 18px!important}.bx-faq__q p{font-size:15px!important}.bx-faq__a{padding:16px 18px!important}.bx-faq__a p{font-size:14px!important}.bx-point{padding:16px 18px!important}.bx-author__desc{font-size:13px!important}pre{font-size:12px!important;padding:14px 16px!important;margin:16px 0 24px!important}}

/* =====================================================================
 * 色背景エリア 白文字強制（2026-04-24 社長直接指示）
 * ===================================================================== */
.bx-matome, .bx-matome *,
.bx-cta-box, .bx-cta-box *,
.bx-dl-cta, .bx-dl-cta * {
  color: #fff !important;
}
/* 例外：明示色維持 */
.bx-cta-box__badge { color: #000 !important; background: #f59e0b !important; }
.bx-cta-box__btn { color: #fff !important; background: #3b82f6 !important; }
.bx-dl-cta__btn { color: #fff !important; background: #2563EB !important; }

/* =====================================================================
 * モバイル（〜768px）CTA系の崩れ防止（2026-04-26 追加）
 * v1.0.0/1.0.1 では .bx-cta-box / .bx-dl-cta / .bx-service-funnel の
 * モバイル専用ルールが欠落していたため、padding/flex設定が原因で
 * 375px幅画面でオーバーフロー・ボタンが画面端まで張り付く崩れが発生していた。
 * v1.0.2 で全CTA要素のモバイル最適化を一括適用。
 * ===================================================================== */
@media (max-width: 768px) {
  /* CTAボックス（黒背景・中央寄せ） */
  .bx-cta-box {
    padding: 24px 20px !important;
    margin: 36px 0 !important;
    border-radius: 10px !important;
  }
  .bx-cta-box__title { font-size: 17px !important; line-height: 1.5 !important; }
  .bx-cta-box__desc  { font-size: 13px !important; line-height: 1.7 !important; margin: 0 0 18px !important; }
  .bx-cta-box__btn   {
    font-size: 14px !important;
    padding: 14px 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    white-space: normal !important;
  }
  .bx-cta-box__badge { font-size: 10px !important; padding: 3px 8px !important; }

  /* 資料ダウンロードCTA（横並び→縦積み） */
  .bx-dl-cta {
    padding: 24px 20px !important;
    margin: 36px 0 !important;
    border-radius: 10px !important;
    flex-direction: column !important;
    gap: 18px !important;
    align-items: stretch !important;
    text-align: center !important;
  }
  .bx-dl-cta__title { font-size: 17px !important; line-height: 1.5 !important; }
  .bx-dl-cta__desc  { font-size: 13px !important; line-height: 1.7 !important; }
  .bx-dl-cta__badge { font-size: 11px !important; padding: 3px 10px !important; }
  .bx-dl-cta__btn   {
    font-size: 14px !important;
    padding: 14px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    white-space: normal !important;
    flex-shrink: 1 !important;
  }

  /* サービス導線（料金などへの内部誘導） */
  .bx-service-funnel {
    padding: 20px 18px !important;
    margin: 32px 0 !important;
    border-radius: 10px !important;
  }
  .bx-service-funnel__title { font-size: 16px !important; line-height: 1.5 !important; }
  .bx-service-funnel__desc  { font-size: 13px !important; line-height: 1.8 !important; }
  .bx-service-funnel__badge { font-size: 11px !important; }
  .bx-service-funnel__links {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .bx-service-funnel__link {
    font-size: 13px !important;
    padding: 8px 0 !important;
  }
  .bx-service-funnel__cta {
    font-size: 14px !important;
    padding: 12px 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  /* 共通: 画像横はみ出し防止 + リンクタップ領域確保 */
  .bx-article img,
  .bx-article video,
  .bx-article iframe { max-width: 100% !important; height: auto !important; }
  .bx-article a { word-break: break-word; }
}

/* 小型モバイル（〜480px）のさらに詰めた調整 */
@media (max-width: 480px) {
  .bx-cta-box, .bx-dl-cta { padding: 20px 16px !important; }
  .bx-cta-box__title, .bx-dl-cta__title { font-size: 16px !important; }
  .bx-cta-box__btn, .bx-dl-cta__btn { font-size: 13px !important; padding: 13px 18px !important; }
  .bx-service-funnel { padding: 18px 14px !important; }
  .bx-service-funnel__title { font-size: 15px !important; }
}

/* =====================================================================
 * v1.0.3 全記事統一フォールバック（2026-04-26 社長指示）
 *
 * 既存ブログ記事は .bx-h2 等のクラスが付いていない箇所が72%。
 * .bx-article 内の素の <h2>/<h3>/<p>/<ul>/<table>/<blockquote> 等にも
 * 同じデザインが適用されるよう descendant セレクタでフォールバックを定義。
 *
 * 既存記事のHTML構造は一切変更せず、CSSだけで全記事を統一する。
 * クラス指定（.bx-h2 等）がある場合はそちらが詳細度で優先される。
 * ===================================================================== */

/* 見出し: bx-h2 / bx-h3 と同等のデザインを素のh2/h3にも適用 */
.bx-article h2:not(.bx-h2):not(.bx-author__name):not(.bx-cta-box__title):not(.bx-dl-cta__title):not(.bx-matome__title):not(.bx-faq__q):not(.bx-service-funnel__title){
  font-size:28px;color:#2c3e50;margin-top:60px;margin-bottom:30px;padding-bottom:15px;border-bottom:3px solid #2563eb;font-weight:bold;
}
.bx-article h3:not(.bx-h3):not(.bx-author__title){
  font-size:22px;color:#2c3e50;margin-top:40px;margin-bottom:20px;padding-left:15px;border-left:4px solid #2563eb;font-weight:bold;
}
.bx-article h4{
  font-size:18px;color:#2c3e50;margin-top:30px;margin-bottom:15px;font-weight:bold;
}

/* 段落: bx-p と同等 */
.bx-article > p,
.bx-article > div > p:not(.bx-author__name):not(.bx-author__title):not(.bx-author__desc):not(.bx-cta-box__title):not(.bx-cta-box__desc):not(.bx-dl-cta__title):not(.bx-dl-cta__desc):not(.bx-matome__title):not(.bx-faq__q p):not(.bx-faq__a p){
  font-size:16px;line-height:1.9;color:#333;margin-bottom:25px;
}

/* リスト */
.bx-article > ul,
.bx-article > ol {
  font-size:16px;line-height:1.9;color:#333;margin:0 0 25px;padding-left:25px;
}
.bx-article > ul > li,
.bx-article > ol > li {
  margin-bottom:10px;
}

/* テーブル: bx-table 風（クラスなしテーブル用） */
.bx-article table:not(.bx-table){
  width:100%;border-collapse:collapse;font-size:15px;box-shadow:0 2px 8px rgba(0,0,0,.08);border-radius:8px;overflow:hidden;margin:35px 0;
}
.bx-article table:not(.bx-table) thead tr{
  background:linear-gradient(135deg,#2563eb 0%,#1d4ed8 100%);
}
.bx-article table:not(.bx-table) th{
  padding:18px 20px;text-align:left;color:#fff;font-weight:bold;border:none;
}
.bx-article table:not(.bx-table) td{
  padding:16px 20px;border-bottom:1px solid #e0e0e0;
}
.bx-article table:not(.bx-table) tbody tr:nth-child(odd){background-color:#fff;}
.bx-article table:not(.bx-table) tbody tr:nth-child(even){background-color:#f8f9fa;}
.bx-article table:not(.bx-table) td:first-child{font-weight:bold;color:#2c3e50;}

/* 引用 */
.bx-article blockquote {
  background:#f8fafc;border-left:4px solid #2563eb;padding:20px 24px;margin:30px 0;font-style:italic;color:#475569;border-radius:0 6px 6px 0;
}

/* リンク */
.bx-article a:not(.bx-cta-box__btn):not(.bx-dl-cta__btn):not(.bx-service-funnel__cta):not(.bx-toc__item a){
  color:#2563eb;text-decoration:underline;
}
.bx-article a:not(.bx-cta-box__btn):not(.bx-dl-cta__btn):not(.bx-service-funnel__cta):hover{
  color:#1d4ed8;
}

/* 強調 */
.bx-article strong, .bx-article b {
  font-weight:bold;color:#0F172A;
}

/* 区切り線 */
.bx-article hr {
  border:none;border-top:2px solid #e0e0e0;margin:40px 0;
}

/* モバイル対応（〜768px）：素HTML要素にも適用 */
@media (max-width: 768px) {
  .bx-article h2:not(.bx-h2):not(.bx-author__name):not(.bx-cta-box__title):not(.bx-dl-cta__title):not(.bx-matome__title):not(.bx-faq__q):not(.bx-service-funnel__title){
    font-size:22px !important;margin-top:40px !important;margin-bottom:20px !important;
  }
  .bx-article h3:not(.bx-h3):not(.bx-author__title){
    font-size:18px !important;margin-top:28px !important;
  }
  .bx-article h4 { font-size:16px !important; }
  .bx-article > p,
  .bx-article > div > p:not(.bx-author__name):not(.bx-author__title):not(.bx-author__desc):not(.bx-cta-box__title):not(.bx-cta-box__desc):not(.bx-dl-cta__title):not(.bx-dl-cta__desc):not(.bx-matome__title){
    font-size:15px !important;
  }
  .bx-article > ul, .bx-article > ol { font-size:15px !important; padding-left:20px !important; }
  .bx-article table:not(.bx-table) th,
  .bx-article table:not(.bx-table) td { padding:10px 12px !important; font-size:13px !important; }
  .bx-article blockquote { padding:16px 18px !important; margin:20px 0 !important; }
}


/* v1.0.6: 過剰なh2/h3フォールバックを撤回し、bx-* クラス記事のデザインのみ統一に戻す。社長指示「サイズが変わる」対応 (2026-04-27) */
