/* ==================================================
   Field-X Child Theme – single-posts.css  (2025-06-18)
   CASE FACTORY 導入事例ページ専用スタイル
   ================================================== */

/* ---------- ベースレイアウト ---------- */

/* 中央寄せ用ラッパー */
.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Pタグの処理 ---------- */
.entry-content p.cta-copy {
  margin-bottom: 0;
}

/* コンテンツの最大幅指定 */
.site-main {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}
.post-thumbnail {
  margin: 0 0 25px;
  text-align: center;
}
.post-thumbnail img {
  display: inline-block;
  max-width: 100%;
  height: auto;
}

/* ---------- パンくず ---------- */

/* singleページでは margin を無効化 */
.single .container--flex {
  margin-left: 0;
  margin-right: 0;
}

.breadcrumb-wrapper {
  font-size: 0.7em;         /* テキストサイズを小さく */
  color: #888;              /* 色も控えめに */
  margin-bottom: 10px;      /* 下の余白も少なめに */
  line-height: 1.4;
}

/* ---------- 見出し ---------- */
body.single-post .entry-title {
  font-size: 36px;
  line-height: 1.4;
}

@media (max-width: 767px) {
  body.single-post .entry-title {
    font-size: 24px;
    line-height: 1.4;
  }
}

.columns h2 {
  padding: 20px 10px 20px 20px;
  background: #333;
  color: #fff;
  margin: 60px 0 30px;
  font-size: 28px;
  scroll-margin-top: 100px;
}
.columns h3 {
  padding: 20px 20px 15px 10px;
  border-bottom: 5px solid #333;
  font-size: 24px;
  margin: 40px 0 20px;
  scroll-margin-top: 100px;
}
.columns h4 {
  padding: 10px 0 10px 20px;
  border-left: 7px solid #8c8c8c;
  margin: 30px 0;
  font-size: 22px;
  scroll-margin-top: 100px;
}
.columns h5 {
  padding: 10px 0 10px 20px;
  border-bottom: 3px dotted #8c8c8c;
  margin: 30px 0;
  font-size: 18px;
  scroll-margin-top: 100px;
}

/* ---------- リスト ---------- */
.columns ul {
  list-style: disc;
  list-style-position: outside;
  padding: 1.4em 1.2em 1.4em 2.5em;
  border: 1px solid #ccc;
  margin: 30px 0;
  background: #fff;
  line-height: 1.7;
}
.columns ul li {
  padding: 0.2em 0;
  margin-left: 0;
  display: list-item;
}
.columns ul li::marker {
  color: #8c8c8c;
  font-size: 1.1em;
}

.columns ol {
  list-style: none;
  counter-reset: li;
  padding: 1.2em 1.5em;
  border: 1px solid #ccc;
  margin: 30px 0;
  background: #fff;
  line-height: 1.7;
}
.columns ol li {
  display: flex;
  align-items: center;
  padding: 0.4em 0;
}
.columns ol li::before {
  content: counter(li);
  counter-increment: li;
  display: inline-block;
  min-width: 2em;
  margin-right: 10px;
  border-radius: 50%;
  background: #8c8c8c;
  color: #fff;
  font-weight: bold;
  font-size: 0.9em;
  line-height: 2em;
  text-align: center;
}


.entry-content.columns ul > li {
  list-style: disc;
}


/* ---------- スクロール対応テーブル ---------- */
.table-wrap2 {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 30px 0;
}
.table2 {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}
.table2 th {
  background: #7dabe2;
  color: #fff;
  border: 2px solid #fff;
  padding: 4px 8px;
  font-size: 16px !important;
  text-align: center;
  vertical-align: middle;
}
.table2 td {
  border: 2px solid #7dabe2;
  padding: 4px 8px;
  font-size: 14px !important;
}

/* ---------- CTAリンク共通 ---------- */
.ast-single-post .entry-content a {
  text-decoration: none !important;
}

/* ---------- CTAエリア全体 ---------- */
.cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px 0;
  font-family: "Noto Sans JP", sans-serif;
}

/* マイクロコピー */
.cta-copy {
  font-size: 14px;
  color: #eb6100;
  margin-bottom: 4px;
  position: relative;
  text-align: center;
}

.cta-copy::before {
  content: '＼';
  margin-right: 0.5em;
}

.cta-copy::after {
  content: '／';
  margin-left: 0.5em;
}

/* ボタンコンテナ */
.button-cta {
  text-align: center;
}

/* ボタン本体 */
.button-cta a {
  position: relative;
  display: inline-block;
  background: #eb6100;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  padding: 1em 2.5em;
  margin-top: 4px;
  border-radius: 9999px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  font-family: "Noto Sans JP", sans-serif;
  min-width: 280px;
  text-align: center;
}

/* テキストをボタン中央に */
.cta-label {
  display: inline-block;
  width: 100%;
  text-align: center;
  pointer-events: none;
}

/* 矢印（右端に固定） */
.cta-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

/* ホバー：矢印スライド */
.button-cta a:hover {
  background: #ee8134;
}
.button-cta a:hover .cta-arrow {
  transform: translate(4px, -50%);
}

/* アクティブ：押し込み風 */
.button-cta a:active {
  top: 2px;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.15);
}

/* ---------- CTAバナー ---------- */
.cta-banner {
  margin: 40px 0;
  text-align: center;
}

.cta-banner img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

/* ---------- ツールチップ ---------- */
.tooltip {
  font-family: "Noto Sans Japanese", sans-serif;
  font-size: 100%;
  font-weight: 500;
  text-align: center;
  color: #eb6100;
  margin-bottom: 0.5rem;
  position: relative;
}
.tooltip:before { content: '＼'; margin-right: 1rem; }
.tooltip:after  { content: '／'; margin-left: 1rem; }
.tooltip-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

/* ─────────  著者ボックス  ───────── */
.author-box.in-content{
  position: relative;
  display:flex !important;
  flex-direction:row !important;
  align-items:center;            /* = アバターを垂直中央に */
  gap:32px;
  margin:64px 0 72px;
  padding:32px 40px;
  background:#F7F8FA;            /* 薄グレー背景 */
  border:1px solid #E4E6EA;
  border-radius:8px;
  box-shadow:0 2px 4px rgba(0,0,0,.03);
  font-family:"Noto Sans JP",sans-serif;
  font-size:15px;                /* 既存より 1pt 程度小さくする */
  line-height:1.8;
}

/* アバター */
.author-box.in-content .avatar{
  flex:0 0 104px;                /* サイズを少し大きめに */
  width:104px; height:104px;
  border-radius:50%;
  box-shadow:0 0 0 4px #fff;     /* 白縁で浮かせる */
}

/* テキスト側 */
.author-box.in-content .author-info{
  flex:1 1 auto;
  min-width:0;
}

/* 著者名 */
.author-box.in-content .author-name{
  font-size:20px;
  font-weight:700;
  margin:0 0 8px;
  padding-bottom:8px;
  display:inline-block;
  border-bottom:2px solid #E4E6EA; 
}

/* モバイルでは縦並びに整列 */
@media (max-width:767px){
  .author-box.in-content{
    flex-direction:column !important;
    text-align:center;
    gap:24px;
    padding:32px 20px;
  }
  .author-box.in-content .avatar{
    margin:0 auto;
  }
  .author-box.in-content .author-name{
    margin:0 auto 8px;
  }
}

/* ---------- 関連記事 ---------- */
.related-posts-wrapper {
  margin: 40px 0;
}
.related-posts-title {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
}
.widget_archive,
.widget_categories {
  display: none;
}

/* ---------- 前後ナビ ---------- */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin: 40px 0;
}
.post-navigation .nav-previous,
.post-navigation .nav-next {
  max-width: 48%;
  word-wrap: break-word;
}

/* ---------- 吹き出しレイアウト（balloon5） ---------- */


.balloon5 {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 40px 0;
}

.balloon5 .faceicon {
  flex-shrink: 0;
  text-align: center;
}

.balloon5 .faceicon img {
  border-radius: 50%;
  width: 80px;
  height: 80px;
}

.balloon5 .faceicon facecaption {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: #444;
}

.balloon5 .chatting {
  position: relative;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 15px 20px;
  max-width: 100%;
  font-size: 16px;
  line-height: 1.6;
}

.balloon5 .says p:last-child {
  margin-bottom: 0;
}
/* 吹き出しの三角部分 */
.balloon5 .chatting::before {
  content: "";
  position: absolute;
  top: 24px;
  left: -14px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 14px solid #f5f5f5;
}

/* ---------- 目次（TOC）除外スタイル ---------- */
#toc_container {
  margin: 0 auto;
}

#toc_container ul {
  list-style: none !important;
  border: none !important;
  padding-left: 0.2em;
}
#toc_container ul li {
  padding-left: 0.1em;
}
#toc_container ul li::marker {
  content: none;
}

/* YARPP リスト型 カード表示（サムネイル＋タイトル）*/
.yarpp-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0;
  list-style: none;
  margin: 1.5em 0;
}

.yarpp-list-item {
  flex: 0 0 calc(33.333% - 20px);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease;
}

.yarpp-list-item:hover {
  transform: translateY(-4px);
}

.yarpp-list-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.yarpp-list-thumbnail img {
  width: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.yarpp-list-title {
  padding: 0.6em 0.8em;
  min-width: 60%;
  line-height: 1.4;
  max-height: 5em; /* 3行で切り取る */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* --------- */
/* スマホ対応（1列表示） */
/* --------- */
@media (max-width: 767px) {
  .yarpp-list-item {
    flex: 0 0 100%;
  }
}


@media (max-width: 767px) {

  /* コンテンツ余白を強調（読みやすさ） */
  .content-wrapper,
  .site-main {
    padding: 0 16px;
  }

  /* パンくず：小さくてOK */
  .breadcrumb-wrapper {
    font-size: 0.65em;
  }

  /* 見出しの階層ごとにフォントサイズ縮小 */
  .columns h2 {
    font-size: 20px;
    padding: 16px 10px;
  }

  .columns h3 {
    font-size: 18px;
    padding: 14px 10px;
  }

  .columns h4 {
    font-size: 16px;
    padding: 10px 10px;
  }

  .columns h5 {
    font-size: 14px;
    padding: 10px 10px;
  }
  .columns ul,
  .columns ol {
    padding-left: 2em;
    padding-right: 1em;
    margin-left: 0;
    margin-right: 0;
    border-width: 1px;
    border-radius: 6px;
  }

  .columns ul li::marker {
    font-size: 1.2em;
    margin-right: 0.4em;
  }

  /* h2〜h4 の直後にリストが詰まらないようにマージン調整 */
  .columns h2 + ul,
  .columns h3 + ul,
  .columns h4 + ul {
    margin-top: 1em;
  }

  /* 表の文字サイズ拡大＆余白確保 */
  .table2 th,
  .table2 td {
    font-size: 15px !important;
    padding: 6px 10px;
  } 0;
  }

  /* CTAボタン・マイクロコピーのサイズ */
  .cta-copy {
    font-size: 13px;
  }

  .button-cta a {
    font-size: 14px;
    padding: 0.9em 2em;
    min-width: auto;
  }

  /* 関連記事：3列→1列表示（既に対応済みだが念押し） */
  .yarpp-list-item {
    flex: 0 0 100%;
  }


  /* 吹き出しのバランス調整 */
 .balloon5 {
    flex-direction: row;
  }

  .balloon5 .faceicon {
    order: 0;
  }

  .balloon5 .chatting::before {
    left: -14px;
    right: auto;
    border-right: 14px solid #f5f5f5;
    border-left: none;
  }

  /* 右向き用クラス（必要に応じて個別指定） */
  .balloon5.right .faceicon {
    order: 1;
  }
/* 吹き出しの直後にある段落のマージンをリセット */
.balloon5 + p {
  margin-top: 0;
}
  .balloon5.right .chatting::before {
    left: auto;
    right: -14px;
    border-left: 14px solid #f5f5f5;
    border-right: none;
  }
}