/* Trusted Clients CSS - Prefix: .trusted- */

.trusted-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #A31D24 0%, #801419 50%, #600C0F 100%);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

.trusted-container {
  max-width: 1280px;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 24px;
  padding-left: 24px;
}

.trusted-label {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: #FFFFFF;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 40px;
}

/* Slider wrappers for two rows of marquee sliders */
.trusted-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
}

.trusted-row-top {
  margin-bottom: 24px;
}

/* Premium fading overlay on edges */
.trusted-slider-wrapper::before,
.trusted-slider-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  width: 120px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.trusted-slider-wrapper::before {
  left: 0;
  background: linear-gradient(90deg, #91181e 0%, rgba(145, 24, 30, 0) 100%);
}

.trusted-slider-wrapper::after {
  right: 0;
  background: linear-gradient(270deg, #6c0e11 0%, rgba(108, 14, 17, 0) 100%);
}

/* Base marquee track styling */
.trusted-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 24px;
}

.trusted-track-left {
  animation: scrollLeft 28s linear infinite;
}

.trusted-track-right {
  animation: scrollRight 28s linear infinite;
}

/* Pause animations on hover */
.trusted-slider-wrapper:hover .trusted-track {
  animation-play-state: paused;
}

/* White card wrapper for client logo images */
.trusted-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  width: 160px;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0; /* Prevents flex children from shrinking */
}

.trusted-logo-item:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.trusted-logo-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Keyframes: 12px is half of the 24px gap between items */
@keyframes scrollLeft {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(calc(-50% - 12px), 0, 0);
  }
}

@keyframes scrollRight {
  0% {
    transform: translate3d(calc(-50% - 12px), 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .trusted-section {
    padding: 45px 0;
  }
  .trusted-label {
    margin-bottom: 28px;
  }
  .trusted-slider-wrapper::before,
  .trusted-slider-wrapper::after {
    width: 60px;
  }
  .trusted-row-top {
    margin-bottom: 16px;
  }
  .trusted-track {
    gap: 16px;
  }
  .trusted-logo-item {
    height: 55px;
    width: 125px;
    padding: 6px 10px;
    border-radius: 6px;
  }
  /* On mobile, gap is 16px, so we offset by half (8px) for seamless loops */
  @keyframes scrollLeft {
    0% {
      transform: translate3d(0, 0, 0);
    }
    100% {
      transform: translate3d(calc(-50% - 8px), 0, 0);
    }
  }
  @keyframes scrollRight {
    0% {
      transform: translate3d(calc(-50% - 8px), 0, 0);
    }
    100% {
      transform: translate3d(0, 0, 0);
    }
  }
}
