/* ════════════════════════════════════════════════════════
   Brands / Partners  –  3D rotating carousel
   ════════════════════════════════════════════════════════ */

/* ── Section wrapper ─────────────────────────── */
#brands-section {
  position: relative;
  background: #050d1f;
  overflow: hidden;
}

/* Ambient background blobs */
.brands-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: brandsBlobPulse 10s ease-in-out infinite alternate;
}

@keyframes brandsBlobPulse {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  100% {
    opacity: 0.85;
    transform: scale(1.12);
  }
}

/* Dot grid */
.brands-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px
  );
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ── Badge ───────────────────────────────────── */
.brands-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5fcdf8;
  background: rgba(95, 205, 248, 0.1);
  border: 1px solid rgba(95, 205, 248, 0.28);
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  margin-bottom: 1.1rem;
}

.brands-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5fcdf8;
  box-shadow: 0 0 8px #5fcdf8;
  flex-shrink: 0;
}

/* ── Heading ─────────────────────────────────── */
.brands-headline {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.brands-headline .brands-hl {
  background: linear-gradient(90deg, #5fcdf8, #1e43f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brands-subline {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
  max-width: 420px;
  line-height: 1.7;
}

/* ════════════════════════════════════════════
   3D CAROUSEL CORE
   ════════════════════════════════════════════ */

/* Scene — sets the perspective vanishing point */
.carousel-scene {
  width: 100%;
  height: 360px;
  perspective: 900px;
  perspective-origin: 50% 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  cursor: grab;
}

.carousel-scene:active {
  cursor: grabbing;
}

/* The rotating cylinder */
.carousel-cylinder {
  width: 220px;
  height: 200px;
  position: relative;
  transform-style: preserve-3d;
  /* JS will update the inline rotate angle */
  transition: none;
}

/* Pause rotation when hovered via JS class */
.carousel-cylinder.paused {
  animation-play-state: paused !important;
}

/* ── Each logo card (face of the cylinder) ── */
.brand-card {
  position: absolute;
  width: 220px;
  height: 200px;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Shimmer top edge */
.brand-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(95, 205, 248, 0.5),
    transparent
  );
  opacity: 0.6;
}

/* Logo image */
.brand-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(1) saturate(1);
  transition:
    filter 0.3s ease,
    transform 0.3s ease;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* ── Ground reflection shadow ─────────────── */
.carousel-shadow {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 30px;
  background: radial-gradient(
    ellipse,
    rgba(30, 67, 246, 0.35) 0%,
    transparent 72%
  );
  border-radius: 50%;
  pointer-events: none;
  animation: shadowPulse 4s ease-in-out infinite alternate;
}

@keyframes shadowPulse {
  from {
    opacity: 0.5;
    transform: translateX(-50%) scaleX(1);
  }
  to {
    opacity: 0.8;
    transform: translateX(-50%) scaleX(1.1);
  }
}

/* ── Navigation dots ─────────────────────── */
.brands-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  /* margin-top: 2rem; */
}

.brands-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
  border: none;
  padding: 0;
}

.brands-dot.active {
  background: #5fcdf8;
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(95, 205, 248, 0.6);
}

/* ── Prev / Next btns ────────────────────── */
.brands-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
  flex-shrink: 0;
}

.brands-nav-btn:hover {
  background: rgba(95, 205, 248, 0.15);
  border-color: rgba(95, 205, 248, 0.4);
  color: #5fcdf8;
}

/* ── Count label ─────────────────────────── */
.brands-counter {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.06em;
}

.brands-counter span {
  color: #5fcdf8;
}

/* ── Trust strip under carousel ──────────── */
.brands-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.brands-trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
}

.brands-trust-icon {
  font-size: 1.1rem;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 640px) {
  .carousel-scene {
    height: 280px;
    perspective: 700px;
  }

  .carousel-cylinder,
  .brand-card {
    width: 160px;
    height: 150px;
  }

  .carousel-shadow {
    width: 160px;
  }
}
