/* ==========================================================================
   Nomad but Digital — Floating 3D Client Testimonials
   ========================================================================== */

.nbd-testimonials {
  background: linear-gradient(180deg, #E8F8FF 0%, #DCF3FF 100%);
  border-top: 1px solid rgba(26, 27, 23, 0.06);
  padding: 86px 0 80px;
  overflow: hidden;
}

.nbd-testimonials__head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px;
}

.nbd-testimonials__head .nbd-pill {
  margin-bottom: 14px;
}

.nbd-testimonials__lead {
  margin: 14px auto 0;
  font-size: 1.02rem;
  color: rgba(26, 27, 23, 0.74);
}

.nbd-t3d-wrapper {
  position: relative;
}

/* Subtle Layered Decorative Accents */
.nbd-t3d-deco {
  position: absolute;
  border-radius: 22px;
  pointer-events: none;
  z-index: 0;
}
.nbd-t3d-deco--yellow {
  width: 140px;
  height: 92px;
  top: 22px;
  left: 6%;
  background: rgba(255, 187, 2, 0.24);
  transform: rotate(-7deg);
}
.nbd-t3d-deco--pink {
  width: 110px;
  height: 76px;
  bottom: 58px;
  right: 7%;
  background: rgba(255, 5, 135, 0.14);
  transform: rotate(8deg);
}

/* Desktop 3D Stage */
.nbd-t3d-stage {
  position: relative;
  z-index: 1;
  height: 360px;
  perspective: 1400px;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.nbd-t3d-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(460px, 42vw);
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  opacity: 0;
  z-index: 1;
  will-change: transform, opacity;
  -webkit-tap-highlight-color: transparent;
}
.nbd-t3d-card.is-active {
  opacity: 1;
  z-index: 5;
}

.nbd-t3d-card:focus-visible {
  outline: none;
}

.nbd-t3d-card:focus-visible .nbd-t3d-surface {
  outline: 2.5px solid #1A1B17;
  outline-offset: 3px;
}

.nbd-t3d-float {
  display: block;
  width: 100%;
  will-change: transform;
}

.nbd-t3d-surface {
  display: block;
  width: 100%;
  background: #FFFEFE;
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid rgba(26, 27, 23, 0.08);
  box-shadow: 0 18px 42px rgba(26, 27, 23, 0.12);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.nbd-t3d-card.is-active .nbd-t3d-surface {
  border-color: rgba(255, 5, 135, 0.32);
  box-shadow: 0 26px 56px rgba(26, 27, 23, 0.18);
}

.nbd-t3d-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* Refined Progress Indicator Bar */
.nbd-t3d-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 20px auto 0;
  max-width: 480px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 254, 254, 0.88);
  border: 1px solid rgba(26, 27, 23, 0.09);
  box-shadow: 0 8px 22px rgba(26, 27, 23, 0.06);
}

.nbd-t3d-bar__name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #1A1B17;
  min-width: 96px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nbd-t3d-bar__track {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  align-items: center;
}

.nbd-t3d-bar__seg {
  position: relative;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  touch-action: manipulation;
}

.nbd-t3d-bar__seg::before {
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(26, 27, 23, 0.15);
}

.nbd-t3d-bar__fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #FF0587 0%, #FFBB02 100%);
}

.nbd-t3d-bar__seg.is-active .nbd-t3d-bar__fill {
  transform: translateY(-50%) scaleX(1);
}

.nbd-t3d-bar__seg:focus-visible {
  outline: 2px solid #1A1B17;
  outline-offset: 2px;
  border-radius: 4px;
}

.nbd-t3d-bar__count {
  font-size: 0.74rem;
  font-weight: 800;
  color: rgba(26, 27, 23, 0.62);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Dedicated Mobile & Tablet Experience (< 960px) */
@media (max-width: 959px) {
  .nbd-testimonials {
    padding: 62px 0 58px;
  }
  .nbd-testimonials__head {
    margin-bottom: 26px;
  }
  .nbd-t3d-deco--yellow {
    width: 96px;
    height: 64px;
    top: -6px;
    left: 4px;
  }
  .nbd-t3d-deco--pink {
    width: 82px;
    height: 54px;
    bottom: 58px;
    right: 6px;
  }
  .nbd-t3d-stage {
    height: clamp(220px, 60vw, 320px);
    perspective: 900px;
  }
  .nbd-t3d-card {
    width: min(460px, 100%);
  }
  .nbd-t3d-surface {
    border-radius: 16px;
  }
  .nbd-t3d-bar {
    gap: 10px;
    padding: 9px 13px;
    margin-top: 14px;
  }
  .nbd-t3d-bar__name {
    min-width: 84px;
    font-size: 0.74rem;
  }
}

/* Reduced Motion Static Layout */
@media (prefers-reduced-motion: reduce) {
  .nbd-t3d-surface {
    transition: none !important;
  }
}
