/* ═══════════════════════════════════════════════════════
   Remote Hive - Clients Testimonial Slider
   Class convention: rh-clients-*
   ═══════════════════════════════════════════════════════ */

.rh-clients-section {
  width: 100%;
  padding: 80px 20px;
  background: #ffffff;
  font-family: inherit;
  overflow: hidden;
}

.rh-clients-inner {
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

/* ─── HEADING ─── */
.rh-clients-heading {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 40px;
  line-height: 1.2;
}

.rh-clients-img-area {
  position: relative;
  height: 180px;
}

/* ============================================
   Gradient Orb
   ============================================ */
.rh-clients-gradient-orb {
  pointer-events: none;
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%) scale(1);
  width: 900px;
  height: 900px;
  transition: none;
}

.rh-clients-gradient-orb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 9999px;
  background: radial-gradient(
    circle at 50% 25%,
    rgba(14, 165, 233, 0.28) 0%,
    rgba(20, 184, 166, 0.18) 15%,
    rgba(14, 165, 233, 0.08) 35%,
    rgba(20, 184, 166, 0.03) 55%,
    rgba(14, 165, 233, 0) 70%
  );
}

/* Orb leave LEFT */
.rh-clients-gradient-orb.rh-clients-orb-leave-left {
  animation: rh-clients-orbLeaveLeft 0.35s ease-in forwards;
}

@keyframes rh-clients-orbLeaveLeft {
  0%   { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-65%) scale(0.85); opacity: 0.3; }
}

/* Orb leave RIGHT */
.rh-clients-gradient-orb.rh-clients-orb-leave-right {
  animation: rh-clients-orbLeaveRight 0.35s ease-in forwards;
}

@keyframes rh-clients-orbLeaveRight {
  0%   { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-35%) scale(0.85); opacity: 0.3; }
}

/* Orb enter from RIGHT */
.rh-clients-gradient-orb.rh-clients-orb-enter-right {
  animation: rh-clients-orbEnterRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes rh-clients-orbEnterRight {
  0%   { transform: translateX(-35%) scale(0.85); opacity: 0.3; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* Orb enter from LEFT */
.rh-clients-gradient-orb.rh-clients-orb-enter-left {
  animation: rh-clients-orbEnterLeft 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes rh-clients-orbEnterLeft {
  0%   { transform: translateX(-65%) scale(0.85); opacity: 0.3; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* Orb idle float */
.rh-clients-gradient-orb.rh-clients-orb-idle {
  animation: rh-clients-orbFloat 4s ease-in-out infinite;
}

@keyframes rh-clients-orbFloat {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50%      { transform: translateX(-50%) scale(1.03) translateY(-4px); }
}

.rh-clients-avatar-mask {
  position: relative;
  height: 180px;
  -webkit-mask-image: linear-gradient(0deg, transparent, #fff 20%, #fff);
  mask-image: linear-gradient(0deg, transparent, #fff 20%, #fff);
}

/* ============================================
   Avatar Slides
   ============================================ */
.rh-clients-avatar-slide {
  position: absolute;
  inset: 0;
  height: 100%;
  z-index: -1;
}

.rh-clients-avatar-slide img {
  position: absolute;
  top: 40px;
  left: 50%;
  border-radius: 9999px;
  width: 88px;
  height: 88px;
  object-fit: cover;
  display: block;
  transform: translateX(-50%);
}

.rh-clients-avatar-slide.rh-clients-enter-from-right {
  z-index: 2;
  animation: rh-clients-avatarEnterRight 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes rh-clients-avatarEnterRight {
  0%   { opacity: 0; transform: translateX(80px) scale(0.3) rotate(90deg); }
  50%  { opacity: 0.7; transform: translateX(10px) scale(1.1) rotate(-10deg); }
  100% { opacity: 1; transform: translateX(0) scale(1) rotate(0deg); }
}

.rh-clients-avatar-slide.rh-clients-enter-from-left {
  z-index: 2;
  animation: rh-clients-avatarEnterLeft 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes rh-clients-avatarEnterLeft {
  0%   { opacity: 0; transform: translateX(-80px) scale(0.3) rotate(-90deg); }
  50%  { opacity: 0.7; transform: translateX(-10px) scale(1.1) rotate(10deg); }
  100% { opacity: 1; transform: translateX(0) scale(1) rotate(0deg); }
}

.rh-clients-avatar-slide.rh-clients-leave-to-left {
  z-index: 1;
  animation: rh-clients-avatarLeaveLeft 0.6s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes rh-clients-avatarLeaveLeft {
  0%   { opacity: 1; transform: translateX(0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translateX(-100px) scale(0.3) rotate(-60deg); }
}

.rh-clients-avatar-slide.rh-clients-leave-to-right {
  z-index: 1;
  animation: rh-clients-avatarLeaveRight 0.6s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes rh-clients-avatarLeaveRight {
  0%   { opacity: 1; transform: translateX(0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translateX(100px) scale(0.3) rotate(60deg); }
}

.rh-clients-avatar-slide.rh-clients-show {
  z-index: 2;
  opacity: 1;
}

.rh-clients-avatar-slide.rh-clients-show img {
  animation: rh-clients-avatarFloat 3s ease-in-out infinite;
}

@keyframes rh-clients-avatarFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-6px); }
}

.rh-clients-avatar-slide.rh-clients-hidden {
  opacity: 0;
  z-index: -1;
}

/* ============================================
   Quote Text
   ============================================ */
.rh-clients-quote-outer {
  margin-bottom: 36px;
  transition: height 0.15s ease-in-out 0.3s;
  overflow: hidden;
}

.rh-clients-quote-inner {
  position: relative;
  display: flex;
  flex-direction: column;
}

.rh-clients-quote-slide {
  width: 100%;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.3s ease-out 0.3s, transform 0.3s ease-out 0.3s;
  position: absolute;
  top: 0;
  left: 0;
}

.rh-clients-quote-slide.rh-clients-show {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.5s ease-in-out 0.2s, transform 0.5s ease-in-out 0.2s;
  position: relative;
}

.rh-clients-quote-slide.rh-clients-leaving {
  opacity: 0;
  transform: translateX(-16px);
}

.rh-clients-quote-slide p {
  font-size: 24px;
  font-weight: 700;
  color: #164e63;
  line-height: 1.5;
  margin: 0;
}

.rh-clients-quote-slide p::before { content: "\201C"; }
.rh-clients-quote-slide p::after  { content: "\201D"; }

/* ============================================
   Nav Pills
   ============================================ */
.rh-clients-nav-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: -4px;
}

.rh-clients-pill {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  border-radius: 9999px;
  padding: 6px 12px;
  margin: 4px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background-color 0.15s ease, color 0.15s ease;
  outline: none;
  line-height: 1.4;
}

.rh-clients-pill:focus-visible {
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.5);
}

.rh-clients-pill-off { background: #ffffff; color: #164e63; }
.rh-clients-pill-off:hover { background: #ecfeff; }
.rh-clients-pill-off .rh-clients-pill-dash { color: #67e8f9; }

.rh-clients-pill-on {
  background: linear-gradient(135deg, #0ea5e9, #14b8a6);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.2);
}

.rh-clients-pill-on .rh-clients-pill-dash { color: rgba(255, 255, 255, 0.4); }
.rh-clients-pill-dash { margin: 0 3px; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .rh-clients-heading { margin-bottom: 30px; }
}

@media (max-width: 640px) {
  .rh-clients-section { padding: 50px 12px; }
  .rh-clients-inner { padding: 0 16px; }
  .rh-clients-img-area { height: 140px; }
  .rh-clients-gradient-orb { width: 580px; height: 580px; top: -30px; }
  .rh-clients-avatar-mask { height: 140px; }
  .rh-clients-avatar-slide img { top: 28px; width: 72px; height: 72px; }
  .rh-clients-quote-outer { margin-bottom: 24px; }
  .rh-clients-quote-slide p { font-size: 18px; padding: 0 8px; }
  .rh-clients-pill { padding: 4px 8px; font-size: 11px; }
}