.interp-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #eef1f5 100%);
  padding: 3rem 1.5rem 4rem;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.05);
}

.interp-section .interp-title {
  font-family: 'Castoro', serif;
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.interp-section .interp-subtitle {
  text-align: center;
  color: #6c757d;
  margin-bottom: 2rem;
  font-size: 1rem;
  font-family: 'Noto Sans', sans-serif;
}

.interp-carousels {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2.5rem;
}

/* One carousel per task. Width = 2 cards + the gap between them. */
.interp-group {
  width: 618px;
  max-width: 100%;
}

.interp-group-title {
  font-family: 'Castoro', serif;
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  color: #1f1f1f;
  margin-bottom: 1.25rem;
}

.interp-viewport {
  overflow: hidden;
  padding: 8px 2px;
}

.interp-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.interp-page {
  min-width: 100%;
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: stretch;
}

.interp-card {
  flex: 0 0 auto;
  width: 300px;
  max-width: 300px;
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.interp-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.interp-card-title {
  font-family: 'Castoro', serif;
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
  color: #1f1f1f;
  margin-bottom: 1.1rem;
}

/* Below the slider: reference image(s) + caption.
   Single ref (editing) -> image left, text right. Two refs (blending) -> images
   in a row with the caption underneath. */
.interp-below {
  margin-top: 1rem;
}

.interp-below.single {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
}

.interp-below.single .interp-caption-text {
  flex: 1;
}

.interp-below.multi .interp-caption-text {
  text-align: center;
}

.interp-refs {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.interp-below.multi .interp-refs {
  margin-bottom: 0.75rem;
}

.interp-ref {
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
  max-width: 108px;
}

.interp-below.single .interp-ref {
  flex: 0 0 auto;
  width: 108px;
}

.interp-ref img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e2e4e8;
}

.interp-ref figcaption {
  margin-top: 4px;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6c757d;
  text-align: center;
}

.interp-frame-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f2f3f5;
  margin-bottom: 1rem;
}

.interp-frame {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.interp-endpoints {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.85rem;
  color: #4a4a4a;
  min-height: 40px;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.interp-endpoint {
  flex: 1;
  max-width: 48%;
}

.interp-endpoint:last-child {
  text-align: right;
}

/* Caption below the slider: input image(s) + instruction / prompt */
.interp-caption {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

.interp-input-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.interp-input-thumb {
  margin: 0;
  width: 64px;
}

.interp-input-thumb img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 0 0 2px #e23b3b; /* red box = input image (Figure 2) */
}

.interp-input-thumb figcaption {
  margin-top: 3px;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: #e23b3b;
  text-align: center;
}

.interp-caption-text {
  margin: 0;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #4a4a4a;
  text-align: left;
}

.interp-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.interp-step {
  font-size: 0.7rem;
  font-weight: 600;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.interp-step.decrement {
  color: #1a63d8;
  background: #e6ecf9;
}

.interp-step.increment {
  color: #1a63d8;
  background: #e6ecf9;
}

.interp-step:hover:not(:disabled) {
  background: #1a63d8;
  color: #ffffff;
  transform: scale(1.08);
}

.interp-step:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.interp-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: #e2e4e8;
  outline: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.interp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a63d8;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(26, 99, 216, 0.35);
  cursor: pointer;
}

.interp-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a63d8;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(26, 99, 216, 0.35);
  cursor: pointer;
}

.interp-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
  color: #2c3e50;
  font-size: 1.1rem;
}

.interp-nav:hover:not(:disabled) {
  background: #1a63d8;
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.interp-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.interp-nav.prev { left: -6px; }
.interp-nav.next { right: -6px; }

.interp-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1.5rem;
}

.interp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e0;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.interp-dot.active {
  background: #1a63d8;
  width: 26px;
  border-radius: 6px;
}

.interp-dot:hover {
  background: #1a63d8;
}

@media (max-width: 992px) {
  .interp-group {
    width: 100%;
  }
  .interp-page {
    flex-direction: column;
    align-items: center;
  }
  .interp-card {
    max-width: 500px;
    width: 100%;
  }
}

