/* ============================================================
   掃除事例・お客様の声ページ専用 — 2カラムのカードグリッド
   .p-casestudy にスコープ
   ============================================================ */

.p-casestudy .cs-wrap {
  padding: 48px 0 8px;
}

.p-casestudy .cs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---- カード ---- */
.p-casestudy .cs-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid #e7e1d7;
  border-radius: 10px;
  padding: 24px 24px 22px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ---- 見出し（場所＋年代/性別） ---- */
.p-casestudy .cs-card__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--primary-color-light);
}
.p-casestudy .cs-card__loc {
  font-family: var(--serif-family);
  font-size: 21px;
  font-weight: 700;
  color: #2c2c2c;
  line-height: 1.3;
  position: relative;
  padding-left: 16px;
}
.p-casestudy .cs-card__loc::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 3px;
  background: var(--primary-color);
}
.p-casestudy .cs-card__meta {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-color);
  background: var(--primary-color-light);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ---- 掃除場所 ---- */
.p-casestudy .cs-card__place {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin: -4px 0 16px;
}
.p-casestudy .cs-card__place-label {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #6b7785;
  border-radius: 4px;
  padding: 3px 9px;
  line-height: 1;
}

/* ---- ビフォーアフター（スライダー） ---- */
.p-casestudy .cs-card__bas {
  margin: 0 0 16px;
}
.p-casestudy .cs-slider {
  position: relative;
}
.p-casestudy .cs-slider__viewport {
  position: relative;
}
.p-casestudy .cs-slider__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.p-casestudy .cs-slider__track::-webkit-scrollbar { display: none; }
.p-casestudy .cs-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}
.p-casestudy .cs-ba-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 矢印（2セット以上のときのみ表示・画像エリアの外端に小さく配置） */
.p-casestudy .cs-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e0dacf;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  z-index: 2;
  padding: 0;
  transition: opacity 0.2s ease;
}
.p-casestudy .cs-slider__arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--primary-color);
  border-right: 2px solid var(--primary-color);
}
.p-casestudy .cs-slider__arrow--prev { left: -6px; }
.p-casestudy .cs-slider__arrow--prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.p-casestudy .cs-slider__arrow--next { right: -6px; }
.p-casestudy .cs-slider__arrow--next::before { transform: translate(-70%, -50%) rotate(45deg); }
.p-casestudy .cs-slider__arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

/* ドット */
.p-casestudy .cs-slider__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}
.p-casestudy .cs-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d8d2c8;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
.p-casestudy .cs-slider__dot.is-active { background: var(--primary-color); }
.p-casestudy .cs-ba {
  position: relative;
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f0ece5;
  aspect-ratio: 4 / 3;
}
.p-casestudy .cs-ba img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.p-casestudy .cs-ba__tag {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  line-height: 1;
}
.p-casestudy .cs-ba__tag--before { background: #6b7785; }
.p-casestudy .cs-ba__tag--after  { background: var(--primary-color); }

/* ---- お客様の声（行数クランプ＋もっと見る） ---- */
.p-casestudy .cs-card__voice {
  font-size: 14px;
  line-height: 1.85;
  color: #444;
  margin: 0;
}
.p-casestudy .cs-card__voice p {
  margin: 0;
}
.p-casestudy .cs-card__voice.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}
.p-casestudy .cs-card__more {
  align-self: flex-start;
  margin-top: 8px;
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.p-casestudy .cs-card__more::after {
  content: "▼";
  font-size: 9px;
  margin-left: 6px;
  vertical-align: middle;
}
.p-casestudy .cs-card__more.is-open::after { content: "▲"; }

/* ---- レポートボタン ---- */
.p-casestudy .cs-card__foot {
  margin-top: auto;
  padding-top: 18px;
}
.p-casestudy .cs-card__report {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--primary-color);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.p-casestudy .cs-card__report::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url(../img/icon_document_01.svg) no-repeat center / contain;
  mask: url(../img/icon_document_01.svg) no-repeat center / contain;
}
@media (hover: hover) {
  .p-casestudy .cs-card__report:hover {
    background: var(--primary-color);
    color: #fff;
  }
}

.p-casestudy .cs-empty {
  text-align: center;
  color: #777;
  padding: 40px 0;
}

/* ============================================================
   スマホ：1カラム
   ============================================================ */
@media screen and (max-width: 767px) {
  .p-casestudy .cs-wrap {
    padding: 28px 16px 4px;
  }
  .p-casestudy .cs-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .p-casestudy .cs-card {
    padding: 18px 16px 18px;
  }
  .p-casestudy .cs-card__loc { font-size: 19px; }
  .p-casestudy .cs-card__voice { font-size: 14px; }
}
