/* ==========================================================================
   Clients Section — Modern 3-Row Infinite Floating Logo Marquee UI
   (Direct logo display without card boxes)
   ========================================================================== */

:root {
  --client-primary: #6D28D9;
  --client-secondary: #E11D48;
  --client-accent: #EC4899;
  --client-dark: #1E1B4B;
  --client-muted: #4B5563;
}

#clients.clients-section,
.clients-section {
  position: relative;
  overflow: hidden;
  padding: 50px 0 54px;
  background: linear-gradient(180deg, #F9FAFB 0%, #FAF7FC 100%);
  border-top: 1px solid rgba(109, 40, 217, 0.05);
  border-bottom: 1px solid rgba(109, 40, 217, 0.05);
}

/* Background Ambient Glows & Grid Pattern */
.clients-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.clients-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  opacity: 0.3;
}

.clients-blob--1 {
  width: 460px;
  height: 460px;
  top: -90px;
  left: -70px;
  background: radial-gradient(circle, rgba(109, 40, 217, 0.2) 0%, rgba(79, 70, 229, 0.03) 70%);
}

.clients-blob--2 {
  width: 400px;
  height: 400px;
  bottom: -80px;
  right: -50px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.16) 0%, rgba(236, 72, 153, 0.03) 70%);
}

.clients-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(109, 40, 217, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.clients-section .container {
  position: relative;
  z-index: 2;
}

/* Heading Wrap */
.clients-heading-wrap {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.clients-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--client-primary);
  background: rgba(109, 40, 217, 0.08);
  border: 1px solid rgba(109, 40, 217, 0.18);
  padding: 5px 18px;
  border-radius: 50px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.06);
}

.clients-heading {
  margin: 0 auto 10px;
  font-family: inherit;
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--client-dark);
}

.clients-heading-gold {
  background: linear-gradient(135deg, var(--client-primary) 0%, var(--client-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.clients-subtitle {
  margin: 0 auto 10px;
  max-width: 680px;
  color: var(--client-muted);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
}

.clients-heading-underline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 6px;
}

.clients-heading-underline::before,
.clients-heading-underline::after {
  content: "";
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(109, 40, 217, 0.4));
}

.clients-heading-underline::after {
  background: linear-gradient(90deg, rgba(109, 40, 217, 0.4), transparent);
}

.clients-heading-diamond {
  width: 10px;
  height: 10px;
  margin: 0 12px;
  background: linear-gradient(135deg, var(--client-primary), var(--client-accent));
  transform: rotate(45deg);
  border-radius: 2px;
}

/* ==========================================================================
   3-Row Marquee Styling (No Box/Card Background)
   ========================================================================== */
.clients-marquee-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 6px 0;
  z-index: 1;
}

/* Soft Edge Fade Gradients */
.clients-fade-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(60px, 12vw, 160px);
  z-index: 3;
  pointer-events: none;
}

.clients-fade-edge--left {
  left: 0;
  background: linear-gradient(to right, #F9FAFB 25%, rgba(249, 250, 251, 0) 100%);
}

.clients-fade-edge--right {
  right: 0;
  background: linear-gradient(to left, #FAF7FC 25%, rgba(250, 247, 252, 0) 100%);
}

/* Marquee Rows */
.clients-marquee-row {
  display: flex;
  overflow: hidden;
  user-select: none;
  padding: 8px 0;
}

.clients-marquee-row + .clients-marquee-row {
  margin-top: 20px;
}

.clients-marquee-track {
  display: flex;
  width: max-content;
  gap: 36px;
}

.clients-marquee-group {
  display: flex;
  gap: 36px;
  align-items: center;
  flex-shrink: 0;
  will-change: transform;
}

/* Keyframe Animations */
@keyframes clientsScrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% - 36px));
  }
}

@keyframes clientsScrollRight {
  0% {
    transform: translateX(calc(-100% - 36px));
  }
  100% {
    transform: translateX(0);
  }
}

.clients-marquee-row--left .clients-marquee-group {
  animation: clientsScrollLeft 60s linear infinite;
}

.clients-marquee-row--right .clients-marquee-group {
  animation: clientsScrollRight 60s linear infinite;
}

/* Pause On Hover */
.clients-marquee-row:hover .clients-marquee-group {
  animation-play-state: paused;
}

/* Direct Floating Logo (No Box Container) */
.client-card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  min-width: 120px;
  max-width: 180px;
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
}

.client-card:hover {
  transform: scale(1.12);
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

.client-card img {
  max-height: 48px;
  max-width: 145px;
  width: auto;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: grayscale(15%) opacity(0.88);
  transition: filter 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.client-card:hover img {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.05);
}

/* ==========================================================================
   Mobile & Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
  #clients.clients-section,
  .clients-section {
    padding: 38px 0 42px;
  }

  .clients-heading-wrap {
    margin-bottom: 20px;
  }

  .clients-marquee-row + .clients-marquee-row {
    margin-top: 14px;
  }

  .clients-marquee-track {
    gap: 22px;
  }

  .clients-marquee-group {
    gap: 22px;
  }

  @keyframes clientsScrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-100% - 22px)); }
  }

  @keyframes clientsScrollRight {
    0% { transform: translateX(calc(-100% - 22px)); }
    100% { transform: translateX(0); }
  }

  .client-card {
    height: 44px;
    min-width: 90px;
    max-width: 130px;
    padding: 4px 8px;
  }

  .client-card img {
    max-height: 36px;
    max-width: 105px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clients-marquee-group {
    animation: none !important;
  }
  .clients-marquee-row {
    overflow-x: auto;
    scrollbar-width: thin;
  }
}
