/* ブログ記事下部：関連記事・事例訴求ブロック（PC表示時のみサイドバー分を含めて画面幅いっぱいに広げる） */
@media (min-width: 960px) {
  .l-articleBottom__section.-related,
  .l-articleBottom__section.-caseSearch,
  .l-articleBottom__section.-caseList,
  .l-articleBottom__section.-moreCases {
    position: relative;
    z-index: 1;
    width: calc(100% + var(--swl-sidebar_margin) + var(--swl-sidebar_width));
  }

  .l-articleBottom__section.-related {
    /* padding-inline: 40px; */
  }

  .l-articleBottom__section.-caseSearch,
  .l-articleBottom__section.-caseList,
  .l-articleBottom__section.-moreCases {
    padding-inline: 0;
  }
}

/* サイドバー追従CTA（#fix_sidebar）の可動域ラッパー
   高さは assets/js/sidebar-follow.js で「監修者ボックスの下端」（なければ記事コンテナの下端）までに設定する */
.js-fixSideBoundary {
  height: auto;
}

/* SWELL標準では、追従サイドバーにウィジェットが複数（.w-fixSide.-multiple）あると
   ウィジェット単位でも個別に内部スクロールする仕様になっている（人気記事だけが狭い枠内でスクロールする状態）。
   .w-fixSide自体の「ビューポート内でひとつの塊としてスクロールする」領域はそのまま活かしつつ、
   ウィジェット単位の二重スクロールだけを解除し、検索・人気記事などが1つのスクロール領域にまとまるようにする */
@media (min-width: 960px) {
  .w-fixSide.-multiple .c-listMenu,
  .w-fixSide.-multiple .widget_swell_index,
  .w-fixSide.-multiple .widget_swell_new_posts,
  .w-fixSide.-multiple .widget_swell_popular_posts {
    min-height: auto !important;
    overflow-y: visible !important;
  }
}

/* 前の記事・次の記事：矢印アイコン + テキストのみのシンプルなナビ（シェアボタンの直後に表示） */
.p-articlePnNav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 40px 0;
}

.p-articlePnNav__link {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #0e254d;
  color: #0e254d;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 2px;
  text-decoration: none;
}

.p-articlePnNav__icon {
  display: block;
  width: 12px;
  height: 9px;
}

.p-articlePnNav__link.-next {
  margin-left: auto;
}

.p-articlePnNav__link.-next .p-articlePnNav__icon {
  transform: scaleX(-1);
}

/* 関連記事：見出し（カラーバー + テキスト） */
.l-articleBottom__section.-related .l-articleBottom__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0;
  border-left: none;
  color: #003959;
  font-size: 24px;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 2px;
}

.l-articleBottom__section.-related .l-articleBottom__title::before {
  content: "";
  position: static;
  flex-shrink: 0;
  width: 6px;
  height: 32px;
  background: #003959;
}

/* 関連記事：カード一覧（3列・白背景・角丸） */
.l-articleBottom__section.-related .p-postList {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 0;
  padding: 0;
}

.l-articleBottom__section.-related .p-postList__item {
  width: calc((100% - 80px) / 3);
  margin: 0;
  padding: 0;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}

.l-articleBottom__section.-related .p-postList__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  border: none;
}

/* サムネイル比率（カード幅に対して約192/411） */
.l-articleBottom__section.-related {
  --card_posts_thumb_ratio: 46.8%;
}

.l-articleBottom__section.-related .p-postList__body {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  padding: 24px 16px;
}

.l-articleBottom__section.-related .p-postList__title {
  color: #003959;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.6;
}

.l-articleBottom__section.-related .p-postList__meta {
  margin: 0;
}

.l-articleBottom__section.-related .p-postList__times {
  color: #948d89;
  font-size: 14px;
}

.l-articleBottom__section.-related .c-postTimes__posted::before,
.l-articleBottom__section.-related .c-postTimes__modified::before {
  content: none;
}

@media (max-width: 767px) {
  .l-articleBottom__section.-related .p-postList__item {
    width: 100%;
  }
}

/* 事例訴求ブロック：関連記事の下に40px間隔で「事例を探す」→「関連事例」→「他の成功事例を見る」を並べる */
.l-articleBottom__section.-caseSearch,
.l-articleBottom__section.-caseList,
.l-articleBottom__section.-moreCases {
  margin-top: 40px;
}

/* 事例を探す：コールアウトボックス */
.p-caseSearchBox {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 680px;
  margin-inline: auto;
  padding: 32px 120px;
  background: #eff4f8;
}

.p-caseSearchBox__heading {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.p-caseSearchBox__icon {
  display: block;
  width: 32px;
  height: 32px;
}

.p-caseSearchBox__title {
  margin: 0;
  color: #0e254d;
  font-size: 24px;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 2px;
}

/* 事例を探す：業種／成果・効果 切り替えボタン */
.p-caseSearchBox__toggle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.p-caseSearchBox__toggleBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: #c3cce8;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
}

.p-caseSearchBox__toggleBtn.is-active {
  background: #46578f;
}

.p-caseSearchBox__toggleIcon {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-bottom: 3px;
}

.p-caseSearchBox__divider {
  width: 100%;
  height: 1px;
  background: #d6dbe5;
}

/* 事例を探す：業種／成果・効果 タグ一覧（ボタン押下時のみ表示。表示/非表示はhidden属性で制御） */
.p-caseSearchBox__panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.p-caseSearchBox__panel[hidden] {
  display: none;
}

.p-caseSearchBox__tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border: 1px solid #0e254d;
  border-radius: 999px;
  color: #0e254d;
  font-size: 14px;
  text-decoration: none;
}

/* 業種タグは成果・効果タグと見分けやすいよう、黒背景・白文字・角丸を小さくする */
.p-caseSearchBox__tag.-industry {
  border: none;
  border-radius: 4px;
  background: #46578f;
  color: #fff;
}

@media (max-width: 767px) {
  .p-caseSearchBox {
    gap: 16px;
    padding: 24px;
  }

  .p-caseSearchBox__toggle {
    flex-direction: column;
    width: 100%;
  }

  .p-caseSearchBox__toggleBtn {
    flex: 1 1 0;
    justify-content: center;
  }
}

/* 関連事例：見出し（カラーバー + テキスト） */
.p-caseList__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 32px;
  color: #003959;
  font-size: 24px;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 2px;
}

.p-caseList__headingBar {
  flex-shrink: 0;
  width: 6px;
  height: 32px;
  background: #003959;
}

/* 関連事例：カード一覧（3列グリッド・白背景・角丸） */
.p-caseList {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.p-caseList__item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}

.p-caseList__link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.p-caseList__thumb {
  aspect-ratio: 411 / 192;
  overflow: hidden;
}

.p-caseList__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-caseList__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 16px 0;
}

.p-caseList__tagsWrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 16px 24px;
  margin-top: auto;
}

.p-caseList__title {
  display: -webkit-box;
  min-height: calc(1.6em * 2);
  margin: 0;
  overflow: hidden;
  color: #003959;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.p-caseList__company {
  margin: 0;
  color: #948d89;
  font-size: 14px;
}

.p-caseList__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.p-caseList__tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border: 1px solid #0e254d;
  color: #0e254d;
  font-size: 14px;
  text-decoration: none;
}

/* 業種タグは成果・効果タグと見分けやすいよう塗りつぶしにする */
.p-caseList__tags.-industry .p-caseList__tag {
  border: none;
  background: #46578f;
  color: #fff;
}

@media (max-width: 767px) {
  .p-caseList {
    grid-template-columns: 1fr;
  }
}

/* 他の成功事例を見る：ボタン */
.l-articleBottom__section.-moreCases {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.p-moreCasesBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 40px;
  background: #0e254d;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 2px;
  text-align: center;
  text-decoration: none;
}
