/* ============================================================
   ケーススタディ（support_case）詳細ページ
   blog_content.css の記事レイアウトに乗せる前提で、差分だけを定義する
   ============================================================ */

/* 記事タイトル・関連記事見出し。blog_content.css では letter-spacing: .3rem だが、
   ケーススタディはタイトルが長めなので詰める。
   このCSSはケーススタディでしか読み込まないので他の記事種別には影響しない */
.article-title,
.related-articles-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: .2rem;
}

/* パンくず：ワイヤーに合わせて記事上部に置く */
.cs-breadcrumb {
  margin-bottom: 1rem;
}

/* 種別・支援サービス・業種のタグ */
.cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 1rem;
}

.cs-tag {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1.6;
  padding: 2px 10px;
  border: 1px solid #888;
  color: #333;
}

.cs-tag--type {
  background: #222;
  border-color: #222;
  color: #fff;
  font-weight: 600;
}

.cs-tag--industry {
  border-style: dashed;
  color: #555;
}

.cs-date {
  font-size: 0.75rem;
  color: #7d7c7c;
  font-weight: 600;
  margin: 0.4rem 0 1.5rem;
}

/* アイキャッチ。未設定のときは枠だけ出して、入れ忘れが分かるようにする */
.cs-eyecatch img {
  width: 100%;
  height: auto;
}

.cs-eyecatch__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  margin: 0;
  background: #F5F6F8;
  border: 1px dashed #c4c4bf;
  color: #888;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.8;
  text-align: center;
}

.cs-eyecatch__placeholder small {
  font-size: 0.75rem;
  font-weight: 400;
}

/* 冒頭注記（企業名を伏せている旨の定型文）
   必須表示だが主張させたくないので、装飾は付けず小さく置くだけにする */
.cs-notice {
  font-size: 0.75rem;
  line-height: 1.8;
  color: #7d7c7c;
  margin: 1.5rem 0 1em;
}

/* 目次：ACFの構成から組み立てているため、本文を解析するプラグイン（ez-toc）は使えない。
   開閉と階層のインデントを自前で持たせ、記事の目次と同じ操作感にそろえる */
.cs-mokuji {
  background-color: #ebf6f9;
  border: 2px solid #cbedf7;
  padding: 1.5rem 1.2rem;
  margin: 1.5rem 0 2rem;
}

.cs-mokuji > summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

/* ブラウザ標準の三角マークを消す（Safari対策含む） */
.cs-mokuji > summary::-webkit-details-marker {
  display: none;
}

.cs-mokuji > summary::before {
  content: "▶";
  font-size: 0.7em;
  transition: transform 0.2s;
}

.cs-mokuji[open] > summary::before {
  transform: rotate(90deg);
}

.cs-mokuji > summary:focus-visible {
  outline: 2px solid #1591b6;
  outline-offset: 3px;
}

.cs-mokuji ul {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.cs-mokuji ul li {
  padding-bottom: 0.9rem;
  line-height: 1.6;
}

.cs-mokuji ul li:last-child {
  padding-bottom: 0;
}

/* H3は一段下げる */
.cs-mokuji ul li.cs-mokuji__h3 {
  padding-left: 1.5rem;
  font-size: 0.9em;
  position: relative;
}

.cs-mokuji ul li.cs-mokuji__h3::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.75em;
  width: 0.6rem;
  height: 1px;
  background: #9fc9d6;
}

/* 企業概要 */
.cs-summary {
  background: #f3f3f3;
  padding: 1.5rem;
  margin: 2rem 0;
}

.cs-summary p {
  margin: 0 0 1em;
  line-height: 1.9;
}

.cs-summary p:last-child {
  margin-bottom: 0;
}

.cs-summary .cs-summary__title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #333;
  margin: 0 0 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dcdcdc;
}

.cs-section {
  margin-bottom: 2rem;
}

/* セクション見出し（背景・課題・支援内容・成果・この事例のポイント）。
   黄色の縦ラインで、記事内の最上位の区切りであることを示す */
.article-content .cs-section > h2 {
  font-size: 1.4rem;
  margin: 1rem 0 1rem;
  font-weight: 600;
  letter-spacing: .2rem;
  padding: 0.25em 0.5em 0.25em 0;
  background: transparent;
  border-bottom: solid 2px #d4d8db;
}

/* セクション内のH3。WYSIWYGの中に書かれたものも含めて、
   blog_content.css の .blog_txt h3（黄色の縦ライン）を打ち消す。
   黄色ラインはセクション見出し（H2）だけに使う */
.article-content .cs-section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .1rem;
  margin: 1.5rem 0 0.8rem;
  padding: 0;
  background: none;
  border: none;
}

/* セクション内のH4も、支援内容と同じ水色の細ラインにそろえる */
.article-content .cs-section h4 {
  margin: .4rem 0 0.8rem;
  padding: 0em 0.5em;
  background-color: #ebf6f9;
  border-radius: 0;
  border-left: none;
  color: #333;
  font-weight: 600;
  font-size: 110%;
  display: inline-block;
  letter-spacing: .1em;
}

.article-content .cs-section h4::after {
  content: none;
}

/* 背景のリード見出し。セクション見出しの直下に置く引きの一文なので少し大きく */
.article-content .cs-section > h3.cs-subheading {
  font-size: 1.25rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.cs-lead {
  line-height: 1.9;
}

/* 課題・支援内容：01, 02 … の自動採番
   blog_content.css の `.article-content ol { list-style: decimal; padding-left: 2.5em }` が
   効いて標準の採番と二重になるため、同じ詳細度以上で打ち消す */
.article-content .cs-problems,
.article-content .cs-blocks {
  list-style: none;
  counter-reset: cs-num;
  margin: 1.5rem 0 0;
  padding: 0;
}

.article-content .cs-problems > li,
.article-content .cs-blocks > li {
  counter-increment: cs-num;
  position: relative;
  padding-left: 3.4rem;
  margin-bottom: 2rem;
}

.article-content .cs-blocks > li {
  margin-bottom: 1.5rem;
}

.article-content .cs-problems > li::before,
.article-content .cs-blocks > li::before {
  content: counter(cs-num, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.2rem;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  color: #67AEC3;
  letter-spacing: 0.05em;
}

.article-content .cs-problems > li > h3,
.article-content .cs-blocks > li > h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .1rem;
  margin: 0 0 0.8rem;
  padding: 0;
  background: none;
  border: none;
  color: #47adce;
}

/* 課題の本文は1段落のみ（テキストエリア＋nl2br）なので余白は不要 */
.article-content .cs-problems > li p {
  margin: 0 0 4px;
  line-height: 1.9;
}

/* 支援内容はWYSIWYG。H3・H4・Pの間隔をそろえる
   （指定しないと .blog_txt p の margin:2rem、.blog_txt h4 の margin:2rem が効いて広くなる） */
.article-content .cs-blocks > li p {
  margin: 0 0 4px;
  line-height: 1.9;
}

/* この事例のポイント。見出しは枠の外に出し、本文だけをグレーの枠に入れる */
.cs-point {
  background: #F5F6F8;
  padding: 1.8rem;
}

/* ポイントは枠付きなので、見出しの下線は点線にして区別する */
.article-content .cs-point > h2 {
  margin-top: 0;
  border-bottom: 2px dotted #c9ced1;
}

.article-content .cs-point > :last-child {
  margin-bottom: 0;
}

/* 記事末尾のCTA。紺地に、ロゴのモチーフを分解した円弧を四隅に配置する */
.cs-cta {
  position: relative;
  overflow: hidden;
  background: #172448;
  color: #fff;
  padding: 3rem 2rem;
  margin: 3rem 0;
  text-align: center;
  border-radius: 12px;
}

/* 左上＝黄緑、右下＝青の輪。太いborderでリングを作り、はみ出しは overflow で切る */
.cs-cta::before,
.cs-cta::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.cs-cta::before {
  width: 320px;
  height: 320px;
  top: -140px;
  left: -130px;
  border: 56px solid #2196F3;
}

.cs-cta::after {
  width: 340px;
  height: 340px;
  right: -150px;
  bottom: -170px;
  border: 56px solid #00BCD4;
}

/* 中身は輪より前面に */
.cs-cta > * {
  position: relative;
  z-index: 1;
}

.cs-cta p {
  line-height: 1.9;
  margin: 0 auto 1.5rem;
  max-width: 44em;
  text-align: left;
}

.cs-cta__btns {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* 1つ目＝黄色、2つ目＝白。どちらも紺文字 */
.cs-cta__btns .blbtn,
.cs-cta__btns .whbtn {
  border: none;
  border-radius: 50px;
  color: #172448;
  font-weight: 700;
  padding: 1rem 2rem;
  line-height: 1.5;
}

.cs-cta__btns .blbtn {
  background: #ffff05;
}

.cs-cta__btns .whbtn {
  background: #fff;
}

.cs-cta__btns .blbtn:hover,
.cs-cta__btns .whbtn:hover {
  opacity: 0.85;
}

@media screen and (max-width: 991px) {
  .cs-cta__btns .whbtn,
  .cs-cta__btns .blbtn {
    padding: 0.8rem 1.6rem;
    font-size: .95rem;
    width: 80%;
    font-weight: 800;
  }
}

@media screen and (max-width: 768px) {
  .cs-cta {
    padding: 2rem 1.2rem;
  }

  .cs-cta::before,
  .cs-cta::after {
    width: 200px;
    height: 200px;
    border-width: 36px;
  }

  .cs-cta__btns {
    flex-direction: column;
  }

  .cs-cta__btns br {
    display: none;
  }
}

/* 関連ケーススタディ */
.cs-related {
  margin-top: 3rem;
}

.cs-related-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.cs-related-list a {
  display: block;
}

.cs-related-img {
  aspect-ratio: 16 / 9;
  background: #F5F6F8;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.cs-related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-related-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.6;
  margin: 0.4rem 0 0;
}

@media screen and (max-width: 768px) {
  .cs-summary {
    padding: 1.2rem;
  }

  .article-content .cs-problems > li,
  .article-content .cs-blocks > li {
    padding-left: 2.8rem;
  }

  .article-content .cs-problems > li::before,
  .article-content .cs-blocks > li::before {
    font-size: 1.2rem;
  }

  .cs-cta {
    padding: 1.5rem;
  }

  .cs-related-list {
    grid-template-columns: 1fr;
  }
}

/* 本文中の強調。ハイライト風にして拾い読みしやすくする */
.article-content strong {
  background-color: #ebf6f9;
  font-weight: 500;
  color: #000000;
}

/* ============================================================
   ケーススタディ一覧のFV。他ページは中央寄せだが、ここは見出しと
   説明文を左に置き、右に飾りのリングを入れる
   ============================================================ */
.cs-fv .wrapper {
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cs-fv__box {
  text-align: left;
  align-items: flex-start;
  margin: 0;
  padding: 3.5rem 0 3rem;
}

.cs-fv__lead {
  font-size: 1rem;
  line-height: 2;
  color: #444;
  margin: 1.2rem 0 0;
  max-width: 34em;
}

/* 背景の円。白い円を大小散らし、中央は空けて文字を読みやすくする。
   奥行きを出すため、大きい円ほどゆっくり・小さく動かす（視差） */
.cs-fv__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cs-fv__bg span {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  will-change: transform;
}

/* 円はすべて右半分に置く。左は見出しと説明文の場所なので空けておく。
   横位置は % なので、画面幅が変わっても散らばり方は保たれる */
.cs-fv__bg .c1  { width: 190px; height: 190px; top: -100px;    right: -60px; animation: cs-drift-a 11s ease-in-out infinite alternate; }
.cs-fv__bg .c5  { width: 200px; height: 200px; bottom: -120px; right: -40px; animation: cs-drift-a 12s ease-in-out infinite alternate; }
.cs-fv__bg .c8  { width: 126px; height: 126px; top: 88px;      right: 6%;    animation: cs-drift-b 9s  ease-in-out infinite alternate; }
.cs-fv__bg .c6  { width: 88px;  height: 88px;  top: -48px;     right: 15%;   animation: cs-drift-b 8s  ease-in-out infinite alternate; }
.cs-fv__bg .c2  { width: 104px; height: 104px; bottom: -44px;  right: 19%;   animation: cs-drift-b 7s  ease-in-out infinite alternate; }
.cs-fv__bg .c3  { width: 54px;  height: 54px;  top: 44px;      right: 27%;   animation: cs-drift-c 5s  ease-in-out infinite alternate; }
.cs-fv__bg .c7  { width: 62px;  height: 62px;  bottom: 18px;   right: 31%;   animation: cs-drift-c 6s  ease-in-out infinite alternate; }
.cs-fv__bg .c4  { width: 150px; height: 150px; top: -40px;     right: 35%;   animation: cs-drift-a 13s ease-in-out infinite alternate; }

/* 輪郭だけの円。重なりに奥行きを足す */
.cs-fv__bg .c9,
.cs-fv__bg .c10 {
  background: none;
  box-shadow: none;
  border: 1px solid rgba(23, 36, 72, 0.07);
}

.cs-fv__bg .c9  { width: 280px; height: 280px; top: -130px;    right: 17%; animation: cs-drift-c 15s ease-in-out infinite alternate; }
.cs-fv__bg .c10 { width: 320px; height: 320px; bottom: -190px; right: 3%;  animation: cs-drift-a 17s ease-in-out infinite alternate; }

/* ロゴの黄色を10%で差す */
.cs-fv__bg .c11,
.cs-fv__bg .c12 {
  background: rgba(244, 208, 31, 0.1);
  box-shadow: none;
}

.cs-fv__bg .c11 { width: 72px; height: 72px; bottom: 36px; right: 41%; animation: cs-drift-b 6.5s ease-in-out infinite alternate; }
.cs-fv__bg .c12 { width: 44px; height: 44px; top: 16px;    right: 46%; animation: cs-drift-c 5.5s ease-in-out infinite alternate; }

/* 振れ幅と向きを3種類に分け、同じ動きに見えないようにする */
@keyframes cs-drift-a {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-8px, -12px, 0); }
}

@keyframes cs-drift-b {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(12px, 10px, 0); }
}

@keyframes cs-drift-c {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-14px, 16px, 0); }
}

/* 動きが苦手な人には止めて見せる */
@media (prefers-reduced-motion: reduce) {
  .cs-fv__bg span {
    animation: none !important;
  }
}

/* FVの中身は円より前に出す */
.cs-fv .wrapper {
  position: relative;
  z-index: 1;
}

@media screen and (max-width: 991px) {
  .cs-fv__bg .c3,
  .cs-fv__bg .c7,
  .cs-fv__bg .c9,
  .cs-fv__bg .c11 {
    display: none;
  }

  .cs-fv__box {
    padding: 2.5rem 0 2rem;
  }
}


/* ============================================================
   ケーススタディ一覧（archive-support_case.php）
   ============================================================ */
.cs-archive {
  width: 100%;
  padding-bottom: 4rem;
}

.cs-result-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #555;
  margin: 1.5rem 0 1rem;
}

/* D. ほかの事例への回遊導線。薄いグレー地のボックスを2列に並べる */
.cs-other {
  margin-top: 3.5rem;
}

.cs-other__title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 1.2rem;
}

.cs-other__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.2rem 2.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.cs-other__list a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-height: 9rem;
  background: #ffffff;
  padding: 2.2rem 3rem;
  text-decoration: none;
  color: #333;
  border-radius: 12px;
  transition: box-shadow 0.2s ease;
}

/* 影はカード（.case_content）と同じものを、ホバー時だけ出す */
.cs-other__list a:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.cs-other__name {
  font-weight: 700;
  font-size: 1.05rem;
}

.cs-other__desc {
  font-size: 0.9rem;
  line-height: 1.9;
  color: #555;
}

@media screen and (max-width: 768px) {
  .cs-other__list {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .cs-other__list a {
    min-height: 0;
    padding: 1.6rem 1.8rem;
  }
}
