.community-partners-section {
  padding: 80px 0;
  overflow: hidden;
}

.community-partners-section .section-header {
  margin-bottom: 3rem;
}

.community-partners-marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.community-partners-track {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: max-content;
  animation: community-partners-scroll 28s linear infinite;
}

.community-partner-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 340px;
  width: 340px;
  height: 220px;
  padding: 1.25rem 1.5rem;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.community-partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.community-partner-logo {
  width: auto;
  max-width: 100%;
  max-height: 120px;
  height: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.95;
  transition:
    filter 0.3s ease,
    opacity 0.3s ease,
    transform 0.3s ease;
}

.community-partner-card:hover .community-partner-logo {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.04);
}

.community-partner-logo-zawit {
  max-width: 88%;
  max-height: 100px;
}

.community-partners-marquee:hover .community-partners-track {
  animation-play-state: paused;
}

@keyframes community-partners-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 0.625rem));
  }
}

@media (max-width: 768px) {
  .community-partners-section {
    padding: 60px 0;
  }

  .community-partners-marquee {
    mask-image: none;
    -webkit-mask-image: none;
  }

  .community-partners-track {
    gap: 1rem;
    animation-duration: 22s;
  }

  .community-partner-card {
    flex: 0 0 280px;
    width: 280px;
    height: 180px;
    padding: 1rem 1.15rem;
  }

  .community-partner-logo {
    max-height: 96px;
  }

  .community-partner-logo-zawit {
    max-height: 82px;
  }
}

@media (max-width: 480px) {
  .community-partner-card {
    flex: 0 0 220px;
    width: 220px;
    height: 145px;
    padding: 0.9rem 1rem;
  }

  .community-partner-logo {
    max-height: 78px;
  }

  .community-partner-logo-zawit {
    max-height: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-partner-card,
  .community-partner-logo,
  .community-partners-track {
    transition: none !important;
  }

  .community-partners-track {
    animation: none;
  }
}
