/* Before/After スライダー */

.before-after-section {
  padding: 60px 0;
  background: #f8f9fa;
}

.before-after-section .section-title {
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  margin-bottom: 12px;
}

.before-after-section .section-subtitle {
  text-align: center;
  font-size: 16px;
  color: #666;
  margin-bottom: 40px;
}

/* Before/After コンテナ */
.before-after-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 40px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.before-after-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
}

.before-after-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.before-after-after {
  clip-path: inset(0 50% 0 0);
  transition: clip-path 0.3s ease;
}

/* スライダーハンドル */
.before-after-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #EB6601;
  cursor: ew-resize;
  transform: translateX(-50%);
  z-index: 10;
  transition: background 0.2s ease;
}

.before-after-handle:hover {
  background: #d45500;
}

.before-after-handle::before {
  content: '◀ ▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #EB6601;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ラベル */
.before-after-label {
  position: absolute;
  bottom: 20px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
}

.before-after-label.before {
  left: 20px;
}

.before-after-label.after {
  right: 20px;
}

/* タイトル */
.before-after-title {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-top: -20px;
  margin-bottom: 20px;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .before-after-section {
    padding: 40px 0;
  }

  .before-after-section .section-title {
    font-size: 24px;
  }

  .before-after-section .section-subtitle {
    font-size: 14px;
  }

  .before-after-container {
    margin-bottom: 30px;
  }

  .before-after-label {
    font-size: 12px;
    padding: 6px 12px;
    bottom: 12px;
  }

  .before-after-label.before {
    left: 12px;
  }

  .before-after-label.after {
    right: 12px;
  }

  .before-after-handle::before {
    font-size: 12px;
    padding: 6px 10px;
  }

  .before-after-title {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .before-after-section .section-title {
    font-size: 20px;
  }

  .before-after-label {
    font-size: 11px;
    padding: 4px 8px;
  }
}
