/**
 * Trusted By The Best People — Open Infinite Marquee Showcase (Boxless & Edge-Faded)
 * Features:
 * - Pure white section background (#ffffff)
 * - Boxless layout: Enclosing container box removed so pills float directly on the open canvas
 * - Super-smooth feathered fade on both left & right edges
 * - 3 horizontal infinite marquee ticker rows moving in alternating directions
 * - Crisp floating white pill cards with circular avatars, dark typography, and delicate elevation
 * - Hover-to-pause spring interaction
 * - 100% responsive for desktop, tablets, and smartphones
 */

.trusted-people-section {
  position: relative;
  width: 100%;
  background: #ffffff;
  color: #121317;
  padding: clamp(60px, 8vw, 100px) 0 clamp(50px, 7vw, 90px);
  overflow: hidden;
  box-sizing: border-box;
}

.trusted-people-header {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 840px;
  margin: 0 auto clamp(32px, 4.5vw, 52px);
  padding: 0 20px;
}

.trusted-people-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: #f1f3f7;
  border: 1px solid #e1e4ea;
  font-family: 'Google Sans Flex', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4b5563;
  margin-bottom: 16px;
}

.trusted-people-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 10px rgba(22, 163, 74, 0.5);
}

.trusted-people-title {
  margin: 0;
  font-family: 'Clash Display', 'Google Sans Flex', -apple-system, sans-serif;
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #121317;
}

.trusted-people-subtitle {
  margin: 14px auto 0;
  font-family: 'Google Sans Flex', -apple-system, sans-serif;
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.6;
  color: #555861;
  max-width: 620px;
}

/* Centered Marquee Stage: Showing ~5 clients in the view with deep left & right feathering */
.trusted-people-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: hidden;
}

/* Deep smooth gradient feathering on left & right edges */
.trusted-people-stage-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.2) 3%, rgba(0, 0, 0, 0.8) 9%, #000000 15%, #000000 85%, rgba(0, 0, 0, 0.8) 91%, rgba(0, 0, 0, 0.2) 97%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.2) 3%, rgba(0, 0, 0, 0.8) 9%, #000000 15%, #000000 85%, rgba(0, 0, 0, 0.8) 91%, rgba(0, 0, 0, 0.2) 97%, transparent 100%);
}

/* Marquee Row Container */
.trusted-marquee-row {
  display: flex;
  width: max-content;
  user-select: none;
}

.trusted-marquee-track {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 16px;
  flex-shrink: 0;
  will-change: transform;
}

/* Direction animations */
.trusted-marquee-left .trusted-marquee-track {
  animation: trustedMarqueeLeft 34s linear infinite;
}

.trusted-marquee-right .trusted-marquee-track {
  animation: trustedMarqueeRight 38s linear infinite;
}

/* Alternating speed variations */
.trusted-row-1 .trusted-marquee-track {
  animation-duration: 44s;
}
.trusted-row-2 .trusted-marquee-track {
  animation-duration: 50s;
}
.trusted-row-3 .trusted-marquee-track {
  animation-duration: 42s;
}

/* Pause on hover */
.trusted-marquee-row:hover .trusted-marquee-track {
  animation-play-state: paused;
}

@keyframes trustedMarqueeLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@keyframes trustedMarqueeRight {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(0);
  }
}

/* Crisp Elevated White Pill Card Component */
.trusted-person-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px 8px 8px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  cursor: default;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.24s ease,
              box-shadow 0.24s ease;
  white-space: nowrap;
}

.trusted-person-pill:hover {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* Avatar Circle */
.trusted-person-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  background: #eef1f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.trusted-person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trusted-person-initials {
  font-family: 'Google Sans Flex', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1e2229;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #e2e6ed 0%, #cbd3e0 100%);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Text Column */
.trusted-person-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.25;
}

.trusted-person-name {
  font-family: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #121317;
  letter-spacing: -0.01em;
}

.trusted-person-role {
  font-family: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 450;
  color: #64748b;
  margin-top: 2px;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 1024px) {
  .trusted-people-stage {
    padding: 6px 0;
  }
}

@media (max-width: 767px) {
  .trusted-people-section {
    padding: 50px 0 40px;
  }

  .trusted-people-stage {
    padding: 4px 0;
  }

  .trusted-people-stage-inner {
    gap: 12px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.4) 2%, #000000 6%, #000000 94%, rgba(0, 0, 0, 0.4) 98%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.4) 2%, #000000 6%, #000000 94%, rgba(0, 0, 0, 0.4) 98%, transparent 100%);
  }

  .trusted-marquee-track {
    gap: 10px;
    padding-right: 10px;
  }

  .trusted-person-pill {
    padding: 6px 16px 6px 6px;
    gap: 9px;
  }

  .trusted-person-avatar {
    width: 32px;
    height: 32px;
  }

  .trusted-person-name {
    font-size: 12.5px;
  }

  .trusted-person-role {
    font-size: 10px;
  }
}
