/* ビフォーアフターセクション用のスタイル */
.before-after-section {
  margin-bottom: 4rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.swipe-instruction {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-gray-600);
  text-align: center;
}

/* スライダーコンテナのスタイル */
.testimonials-slider-container {
  position: relative;
  overflow: hidden;
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.5rem 0;
}

/* スライダーの矢印ボタン */
.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: flex;
  height: 2rem;
  width: 2rem;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.slider-arrow:hover {
  background-color: #ffffff;
}

.slider-arrow-left {
  left: 0;
}

.slider-arrow-right {
  right: 0;
}

@media (min-width: 768px) {
  .slider-arrow-left {
    left: 0.5rem;
  }
  .slider-arrow-right {
    right: 0.5rem;
  }
}

.slider-arrow svg {
  color: #f43f72;
}

/* スライダー本体 */
.testimonials-slider {
  display: flex;
  overflow-x: auto;
  padding-bottom: 2rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 1rem;
  -webkit-overflow-scrolling: touch;
}

.testimonials-slider::-webkit-scrollbar {
  display: none;
}

/* カードのスタイル */
.testimonial-card {
  min-width: 280px;
  max-width: 85vw;
  flex-shrink: 0;
  scroll-snap-align: center;
  padding: 1rem;
  height: auto;
  overflow: hidden;
  border-radius: 0.75rem;
  background-color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #ffd5b8;
  transition: all 0.3s;
  opacity: 1 !important;
  display: block !important;
  visibility: visible !important;
}

.testimonial-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

@media (min-width: 640px) {
  .testimonial-card {
    min-width: 320px;
  }
}

@media (min-width: 768px) {
  .testimonial-card {
    min-width: 360px;
  }
}

@media (min-width: 1024px) {
  .testimonial-card {
    min-width: 400px;
  }
}

/* カードヘッダー */
.testimonial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.testimonial-client {
  font-weight: 700;
  font-size: 0.875rem;
}

.testimonial-period {
  font-size: 0.75rem;
  color: #64748b;
}

/* ビフォーアフター画像 */
.testimonial-images {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.testimonial-image-container {
  position: relative;
  width: 50%;
}

.testimonial-image-label {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  z-index: 10;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  color: #ffffff;
}

.before-label {
  background-color: rgba(0, 0, 0, 0.6);
}

.after-label {
  background-color: #ff5a1f;
}

.testimonial-image-wrapper {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid #fdba8c;
}

.testimonial-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 結果表示 */
.testimonial-results {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.testimonial-result-container {
  text-align: center;
}

.testimonial-result-label {
  font-size: 0.75rem;
  color: #64748b;
}

.testimonial-result-value {
  font-weight: 700;
  font-size: 0.875rem;
}

.testimonial-result-detail {
  font-size: 0.625rem;
  color: #64748b;
}

.testimonial-result-arrow {
  color: #ff5a1f;
}

/* 達成表示 */
.testimonial-achievement {
  margin-top: 0.5rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.testimonial-achievement span {
  display: inline-block;
  border-radius: 9999px;
  background-color: #feecdc;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #b43403;
}

.testimonial-achievement-detail {
  font-size: 0.625rem;
  margin-left: 0.25rem;
}

/* コメント */
.testimonial-comment {
  padding: 0.75rem;
  background-color: #fff8f1;
  border-radius: 0.5rem;
  border: 1px solid #feecdc;
  height: 7.5rem;
  overflow-y: auto;
}

.testimonial-comment p {
  font-size: 0.75rem;
  color: #334155;
  margin: 0;
}

/* ドット */
.slider-dots {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 0.25rem;
}

.slider-dot {
  width: 2rem;
  height: 0.25rem;
  border-radius: 9999px;
  background-color: #fdba8c;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
}

.slider-dot.active {
  background-color: #ff5a1f;
}

/* モバイル表示の最適化 */
@media (max-width: 768px) {
  .testimonials-slider-container {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    width: auto;
  }

  .testimonial-card {
    min-width: 260px;
    padding: 0.75rem;
  }

  .testimonial-images {
    gap: 0.25rem;
  }

  .testimonial-comment {
    height: 6rem;
  }
}
