/* ============================================
   SECTION CONTAINER
   ============================================ */
.trusted-by-section {
  background: linear-gradient(135deg, #E8D5B7 0%, #D4B896 100%);
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

/* Add subtle texture overlay */
.trusted-by-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139,90,43,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.trusted-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ============================================
   HEADER SECTION
   ============================================ */
.trusted-header {
  text-align: center;
  margin-bottom: 80px;
}

.trusted-title {
  font-family: 'Bungee', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #3A2E1F;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.trusted-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #5C4A3A;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================
   BRAND CAROUSEL WRAPPER
   ============================================ */
.brand-carousel-wrapper {
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

/* ============================================
   BRAND CAROUSEL (The magic happens here)
   ============================================ */
.brand-carousel {
  display: flex;
  align-items: center;
  gap: 100px;
  animation: brandScrollLoop 20s linear infinite;
  will-change: transform;
}

/* Pause animation on hover */
.brand-carousel:hover {
  animation-play-state: paused;
}

/* ============================================
   BRAND ITEMS
   ============================================ */
.brand-item {
  font-family: 'Bungee', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #3A2E1F;
  text-transform: uppercase;
  letter-spacing: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Orbital animation setup */
  animation: brandOrbital 4s ease-in-out infinite;
  animation-play-state: running;
}

/* Stagger orbital animation for each item */
.brand-item:nth-child(1) { animation-delay: 0s; }
.brand-item:nth-child(2) { animation-delay: 0.5s; }
.brand-item:nth-child(3) { animation-delay: 1s; }
.brand-item:nth-child(4) { animation-delay: 1.5s; }
.brand-item:nth-child(5) { animation-delay: 2s; }
.brand-item:nth-child(6) { animation-delay: 2.5s; }
.brand-item:nth-child(7) { animation-delay: 3s; }
.brand-item:nth-child(8) { animation-delay: 3.5s; }

/* Duplicate items (for seamless loop) - same delays */
.brand-item:nth-child(9) { animation-delay: 0s; }
.brand-item:nth-child(10) { animation-delay: 0.5s; }
.brand-item:nth-child(11) { animation-delay: 1s; }
.brand-item:nth-child(12) { animation-delay: 1.5s; }
.brand-item:nth-child(13) { animation-delay: 2s; }
.brand-item:nth-child(14) { animation-delay: 2.5s; }
.brand-item:nth-child(15) { animation-delay: 3s; }
.brand-item:nth-child(16) { animation-delay: 3.5s; }

/* Hover/Focus state */
.brand-item:hover,
.brand-item:focus {
  transform: scale(1.15) translateY(-8px);
  color: #6DE75D;
  text-shadow: 
    0 4px 20px rgba(109, 231, 93, 0.4),
    0 0 40px rgba(109, 231, 93, 0.2);
  animation-play-state: paused;
  outline: none;
}

/* Active state (click) */
.brand-item:active {
  transform: scale(1.05);
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

/* Horizontal scroll loop */
@keyframes brandScrollLoop {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%); /* Move by 50% since we duplicated items */
  }
}

/* Orbital/floating animation (subtle vertical + rotation) */
@keyframes brandOrbital {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-15px) rotate(5deg);
  }
  50% {
    transform: translateY(-25px) rotate(0deg);
  }
  75% {
    transform: translateY(-15px) rotate(-5deg);
  }
}

/* ============================================
   BRAND STATS (Optional bottom section)
   ============================================ */
.brand-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
  margin-top: 80px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 20px;
}

.stat-number {
  display: block;
  font-family: 'Bungee', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #3A2E1F;
  margin-bottom: 8px;
  line-height: 1;
}

.stat-label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: #5C4A3A;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   WAVE SEPARATOR STYLING
   ============================================ */
.wave-separator {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.wave-separator-bottom {
  transform: rotate(180deg);
}

/* ============================================
   ACCESSIBILITY: REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .brand-carousel {
    animation: none;
  }
  
  .brand-item {
    animation: none;
  }
  
  .brand-item:hover {
    transform: scale(1.05);
    animation: none;
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
  .trusted-by-section {
    padding: 80px 0;
  }
  
  .trusted-header {
    margin-bottom: 60px;
  }
  
  .brand-carousel {
    gap: 60px;
    animation-duration: 15s; /* Faster on mobile */
  }
  
  .brand-stats {
    gap: 40px;
    margin-top: 60px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .trusted-by-section {
    padding: 60px 0;
  }
  
  .trusted-header {
    margin-bottom: 40px;
  }
  
  .brand-carousel {
    gap: 40px;
  }
  
  .brand-stats {
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
  }
  
  .stat-item {
    padding: 10px;
  }
}

/* ============================================
   DARK MODE (Optional - if you implement later)
   ============================================ */
@media (prefers-color-scheme: dark) {
  .trusted-by-section {
    background: linear-gradient(135deg, #2A2317 0%, #1F1A12 100%);
  }
  
  .trusted-title,
  .stat-number {
    color: #E8D5B7;
  }
  
  .trusted-subtitle,
  .stat-label {
    color: #C4B5A0;
  }
  
  .brand-item {
    color: #E8D5B7;
  }
  
  .brand-item:hover,
  .brand-item:focus {
    color: #6DE75D;
  }
}