/* ==========================================
   LOGO CAROUSEL SECTION - BIGGER LOGOS
   ========================================== */

.logo-carousel-section {
  position: relative;
  padding: 80px 0 40px 0;
  overflow: hidden;
  background: transparent;
  max-width: 100vw; /* ← FIX */
}

.logo-carousel-container {
  width: 100%;
  max-width: 100%; /* ← FIX */
  margin: 0 auto;
  overflow: hidden; /* ← FIX */
}

.logo-carousel-header {
  text-align: center;
  margin-bottom: 60px;
  padding: 0 20px;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s ease;
}

.logo-carousel-header.logo-visible {
  opacity: 1;
  transform: translateY(0);
}

.logo-carousel-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #000;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

html[data-theme="dim"] .logo-carousel-title { color: #fff; }

.logo-carousel-subtitle {
  font-size: 1.15rem;
  color: rgba(15, 23, 42, 0.7);
  max-width: 600px;
  margin: 0 auto;
}

html[data-theme="dim"] .logo-carousel-subtitle { color: rgba(255, 255, 255, 0.7); }

/* Carousel Wrapper */
.logo-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  contain: paint; /* ← KEY FIX: hard-clips animated track regardless of transform */
  padding: 60px 0;
}

/* Carousel Track – intentionally wider than viewport, clipped by wrapper */
.logo-carousel-track {
  display: flex;
  gap: 100px;
  animation: scrollLogos 30s linear infinite;
  width: max-content; /* wide by design – clipped by overflow:hidden above */
}

.logo-carousel-wrapper:hover .logo-carousel-track {
  animation-play-state: paused;
}

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

.logo-carousel-item {
  flex-shrink: 0;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.logo-carousel-item:hover {
  opacity: 1;
  transform: scale(1.15);
}

.logo-carousel-item img {
  height: 100%;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  transition: filter 0.3s ease;
  filter: brightness(0) saturate(100%);
}

html[data-theme="dim"] .logo-carousel-item img {
  filter: brightness(0) saturate(100%) invert(1);
}

/* Fade edges */
.logo-carousel-wrapper::before,
.logo-carousel-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  width: 200px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.logo-carousel-wrapper::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.logo-carousel-wrapper::after {
  right: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
}

html[data-theme="dim"] .logo-carousel-wrapper::before {
  background: linear-gradient(90deg, rgba(15,23,42,1) 0%, rgba(15,23,42,0) 100%);
}

html[data-theme="dim"] .logo-carousel-wrapper::after {
  background: linear-gradient(90deg, rgba(15,23,42,0) 0%, rgba(15,23,42,1) 100%);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .logo-carousel-title { font-size: 2rem; }
  .logo-carousel-track { gap: 70px; }
  .logo-carousel-item { height: 90px; }
  .logo-carousel-item img { max-width: 220px; }
  .logo-carousel-wrapper::before,
  .logo-carousel-wrapper::after { width: 80px; }
}

@media (max-width: 480px) {
  .logo-carousel-title { font-size: 1.75rem; }
  .logo-carousel-track { gap: 50px; }
  .logo-carousel-item { height: 70px; }
  .logo-carousel-item img { max-width: 180px; }
}