@charset "UTF-8";
/* =========================================================
   症例（カスタム投稿 case）一覧・詳細
   色は下の変数を医院のテーマカラーに合わせて変更してください
========================================================= */
.p-case {
  /* 現サイトのテーマ（bp_dental_clinic）の色に合わせています */
  --case-main: #463724;   /* --main-dark：文字・強調 */
  --case-sub: #aea388;    /* --main：線・背景のアクセント */
  --case-light: #f0eee7;  /* --main-light */
  --case-link: #463724;
  --case-border: #d3d3d3; /* --gray */
  --case-th-bg: #f0eee7;
  --case-muted: #6b6560;
  --case-text: #3e3a39;   /* --base-color */
  --case-before: #5c5c5c;
  --case-after: #463724;
}

/* ---------- 一覧 ---------- */
.p-case__archiveTitle {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 40px 0 20px;
  padding: 0;
  color: var(--case-main);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  border: 0;
}
/* 小さな英字の見出し */
.p-case__archiveTitle::before {
  content: "CASE";
  flex-shrink: 0;
  color: var(--case-sub);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
}
/* 右へ伸びる細い線 */
.p-case__archiveTitle::after {
  content: "";
  flex: 1;
  align-self: center;
  height: 1px;
  background: linear-gradient(90deg, var(--case-sub), rgba(174, 163, 136, 0));
}
.p-case__none {
  padding: 40px 0;
  text-align: center;
}

.p-caseList {
  padding-bottom: 40px;
}
.p-caseList__item {
  padding: 20px 0 30px;
  background-color: #fff;
}
.p-caseList__item + .p-caseList__item {
  border-top: 1px solid var(--case-border);
}
.p-caseList__link {
  display: flex;
  column-gap: 20px;
  color: var(--case-text);
  text-decoration: none;
  transition: opacity 0.3s ease;
}
.p-caseList__link:hover {
  opacity: 0.7;
}
.p-caseList__thumb {
  flex-shrink: 0;
  width: 200px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #f3f3f3;
}
.p-caseList__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 治療前・治療後を並べたサムネイル */
.p-caseList__pair {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 400px;
}
.p-caseList__ba {
  position: relative;
  margin: 0;
}
.p-caseList__baLabel {
  display: inline-block;
  margin-bottom: 4px;
  padding: 1px 10px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.1em;
}
.p-caseList__ba--before .p-caseList__baLabel {
  background: var(--case-before);
}
.p-caseList__ba--after .p-caseList__baLabel {
  background: var(--case-after);
}
.p-caseList__baImg {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 6px;
  background-color: #f3f3f3;
}
.p-caseList__baImg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* 2枚の間の矢印 */
.p-caseList__ba--before::after {
  content: "";
  position: absolute;
  top: calc(50% + 12px);
  right: -12px;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='%23463724' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transform: translateY(-50%);
}
.p-caseList__noimage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--case-muted);
  font-size: 12px;
}
.p-caseList__txt {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.p-caseList__title {
  position: relative;
  margin: 0 0 14px;
  padding: 0 0 12px;
  color: var(--case-main);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.06em;
  background: none;
  border: 0;
}
/* テーマ側の見出しの装飾を打ち消し、下に短いアクセントの線を引く */
.p-caseList__title::before {
  content: none;
}
.p-caseList__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--case-sub);
  transition: width 0.3s ease;
}
.p-caseList__link:hover .p-caseList__title::after,
.p-caseList__link:focus-visible .p-caseList__title::after {
  width: 64px;
}
.p-caseList__excerpt {
  margin-bottom: 15px;
  font-size: 14px;
  line-height: 1.8;
  word-break: break-all;
}
.p-caseList__continue {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
}
.p-caseList__more {
  color: var(--case-link);
  text-decoration: underline;
}
.p-caseList__date {
  color: var(--case-muted);
  font-size: 12px;
  line-height: 1;
}

/* サイドバーなし：テーマの .l-archiveMain（幅 75%）を横幅いっぱいにする */
.p-case--noSide .l-archiveMain {
  width: 100%;
}

/* ---------- サイドバー ---------- */
.p-caseSide__block + .p-caseSide__block {
  margin-top: 30px;
}
.p-caseSide__title {
  margin-bottom: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 0.1em;
  background-color: var(--case-sub);
}
.p-caseSide__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.p-caseSide__list li {
  border-bottom: 1px dotted var(--case-border);
}
.p-caseSide__list a {
  display: block;
  padding: 10px 4px;
  color: var(--case-text);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.3s ease;
}
.p-caseSide__list a:hover {
  color: var(--case-link);
}
.p-caseSide__list--cat .children {
  margin: 0;
  padding: 0 0 0 1.25em;
  list-style: none;
}
.p-caseSide__list--cat .children li:last-child {
  border-bottom: none;
}
.p-caseSide__list .current-cat > a {
  color: var(--case-main);
  font-weight: bold;
}

/* ---------- カテゴリーのアイコンナビ ---------- */
.p-caseCats {
  margin: 0 0 32px;
}
.p-caseCats__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.p-caseCats__link {
  box-sizing: border-box; /* height: 100% に余白を含める（はみ出し防止） */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 16px 8px 12px;
  border: 1px solid var(--case-border);
  border-radius: 12px;
  color: var(--case-text);
  text-align: center;
  text-decoration: none;
  background: #fff;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.p-caseCats__link:hover {
  border-color: var(--case-sub);
}
.p-caseCats__link[aria-current="page"] {
  color: #fff;
  border-color: var(--case-main);
  background: var(--case-main);
}
.p-caseCats__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--case-main);
  background: var(--case-light);
}
.p-caseCats__link[aria-current="page"] .p-caseCats__icon {
  color: var(--case-main);
  background: #fff;
}
.p-caseCats__svg {
  width: 34px;
  height: 34px;
  stroke-width: 1; /* 線の太さ（SVGの1マス＝24分の1。数字を小さくすると細くなる） */
}
.p-caseCats__img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.p-caseCats__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.p-caseCats__count {
  font-size: 11px;
  line-height: 1;
  opacity: 0.75;
}
@media (max-width: 768px) {
  .p-caseCats__list {
    display: flex;
    gap: 8px;
    margin: 0 -16px;
    padding: 0 16px 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }
  .p-caseCats__item {
    flex: 0 0 108px;
    scroll-snap-align: start;
  }
  .p-caseCats__link {
    padding: 12px 6px 10px;
  }
  .p-caseCats__icon {
    width: 46px;
    height: 46px;
  }
  .p-caseCats__svg {
    width: 28px;
    height: 28px;
  }
  .p-caseCats__name {
    font-size: 11px;
  }
}
.p-case__termDesc {
  margin: 0 0 24px;
  line-height: 1.9;
}

/* ---------- スマートフォン ---------- */
@media screen and (max-width: 767px) {
  .p-caseList__link {
    column-gap: 12px;
  }
  .p-caseList__thumb {
    width: 110px;
  }
  /* 2枚並びのときは、写真を上・文章を下にする */
  .p-caseList__link--pair {
    flex-direction: column;
    row-gap: 12px;
  }
  .p-caseList__pair {
    width: 100%;
    gap: 8px;
  }
  .p-caseList__title {
    margin-bottom: 10px;
    padding-bottom: 10px;
    font-size: 16px;
  }
  /* スマホ：「CASE」を1行目、見出しを2行目に置く（長い見出しでも崩れないように） */
  .p-case__archiveTitle {
    flex-wrap: wrap;
    gap: 2px 0;
    margin-top: 28px;
    font-size: 17px;
  }
  .p-case__archiveTitle::before {
    flex-basis: 100%;
  }
  .p-case__archiveTitle::after {
    display: none;
  }
  .p-caseList__excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.6;
  }
}
