/**
 * Secao de Patrocinadores -- "Mural com carrossel" (NB-3346).
 *
 * Layout aprovado no Claude Design ("Patrocinadores Natural Bot", opcao C):
 * a identidade de papel da secao de depoimentos (pontilhado, recortes com
 * fita, manuscrito em Caveat) com o titulo e as faixas rolando da opcao A.
 *
 * Tudo e CSS: o giro do selo e as faixas nao dependem de JS, e param com
 * prefers-reduced-motion.
 */

.nb-spn {
  /* Paleta do tema, a mesma da secao de depoimentos */
  --nb-spn-magenta: #ff007c;
  --nb-spn-purple: #702cfb;
  --nb-spn-ink: #231f20;
  --nb-spn-text: #475467;
  --nb-spn-gray: #68727d;
  --nb-spn-paper: #fbf9ff;
  --nb-spn-paper-2: #f8f4ff;
  --nb-spn-lilac: #ebe1ff;
  --nb-spn-shadow: 0 6px 18px rgba(35, 31, 32, 0.08);
  --nb-spn-shadow-hover: 0 18px 40px rgba(112, 44, 251, 0.18);

  position: relative;
  overflow: hidden;
  padding: 104px 0 96px;
  font-family: 'Cairo', sans-serif;
  color: var(--nb-spn-ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(112, 44, 251, 0.09) 1px, transparent 1.6px) 0 0 / 9px 9px,
    linear-gradient(var(--nb-spn-paper), var(--nb-spn-paper-2));
}

.nb-spn__body {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* ---------- Cabecalho ---------- */

.nb-spn__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.nb-spn__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

.nb-spn__eyebrow {
  width: fit-content;
  font-family: 'Caveat', cursive;
  font-size: 30px;
  line-height: 1;
  color: var(--nb-spn-magenta);
  transform: rotate(-3deg);
}

/* Classe triplicada: o style.css estiliza h2 e p da home com seletores
   aninhados em body.page-template-page-home, mais especificos que uma classe
   (mesmo recurso da secao de depoimentos) */
.nb-spn.nb-spn.nb-spn .nb-spn__title {
  margin: 0;
  padding: 0;
  font-size: 62px;
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-align: left;
  color: var(--nb-spn-ink);
}

.nb-spn__highlight {
  display: inline-block;
  padding: 0 14px;
  background: var(--nb-spn-magenta);
  color: #ffffff;
  transform: rotate(-1.5deg);
}

.nb-spn.nb-spn.nb-spn .nb-spn__lead {
  margin: 0;
  font-size: 19px;
  font-weight: 400;
  text-align: left;
  line-height: 1.55;
  color: var(--nb-spn-text);
}

/* ---------- Selo Meta Tech Provider ---------- */

.nb-spn__badge {
  position: relative;
  flex-shrink: 0;
  display: block;
  width: 220px;
  height: 220px;
  color: var(--nb-spn-purple);
  text-decoration: none;
}

.nb-spn__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: nb-spn-spin 24s linear infinite;
}

.nb-spn__ring text {
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 4px;
  fill: var(--nb-spn-purple);
}

.nb-spn__seal {
  position: absolute;
  inset: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(112, 44, 251, 0.18);
}

.nb-spn__seal-img {
  max-width: 72px;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.nb-spn__seal-meta {
  font-size: 20px;
  font-weight: 800;
  color: var(--nb-spn-ink);
}

.nb-spn__seal-text {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: var(--nb-spn-text);
}

/* ---------- Grade de patrocinadores ---------- */

.nb-spn__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
}

.nb-spn__card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  padding: 24px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--nb-spn-shadow);
  color: var(--nb-spn-ink);
  text-decoration: none;
  transform: rotate(var(--nb-spn-tilt, 0deg));
  transition: transform 0.3s, box-shadow 0.3s;
}

/* Fita adesiva segurando o recorte */
.nb-spn__card::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 84px;
  height: 24px;
  margin-left: -42px;
  background: rgba(235, 225, 255, 0.85);
  transform: rotate(-4deg);
}

.nb-spn__card:hover,
.nb-spn__card:focus-visible {
  transform: rotate(0deg) translateY(-6px) scale(1.03);
  box-shadow: var(--nb-spn-shadow-hover);
  color: var(--nb-spn-ink);
  text-decoration: none;
}

.nb-spn__card .nb-spn__logo {
  max-width: 100%;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.nb-spn__logo-text {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: var(--nb-spn-text);
}

/* ---------- Faixas de apoiadores ---------- */

.nb-spn__supporters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nb-spn__note {
  width: fit-content;
  font-family: 'Caveat', cursive;
  font-size: 28px;
  line-height: 1;
  color: var(--nb-spn-purple);
  transform: rotate(-2deg);
}

.nb-spn__lanes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.nb-spn__track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding: 14px 0 6px;
  animation: nb-spn-left 38s linear infinite;
}

.nb-spn__track--rev {
  animation-name: nb-spn-right;
  animation-duration: 46s;
}

.nb-spn__lanes:hover .nb-spn__track,
.nb-spn__lanes:focus-within .nb-spn__track {
  animation-play-state: paused;
}

.nb-spn__chip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 196px;
  height: 88px;
  padding: 16px 20px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(35, 31, 32, 0.07);
  color: var(--nb-spn-gray);
  text-decoration: none;
  filter: grayscale(1);
  opacity: 0.7;
  transform: rotate(var(--nb-spn-tilt, 0deg));
  transition: filter 0.3s, opacity 0.3s, transform 0.3s, box-shadow 0.3s;
}

.nb-spn__chip:hover,
.nb-spn__chip:focus-visible {
  filter: none;
  opacity: 1;
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 14px 30px rgba(112, 44, 251, 0.16);
  color: var(--nb-spn-ink);
  text-decoration: none;
}

.nb-spn__chip .nb-spn__logo {
  max-width: 100%;
  max-height: 52px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.nb-spn__chip .nb-spn__logo-text {
  font-size: 14px;
}

/* ---------- CTA ---------- */

.nb-spn__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.nb-spn__cta .nb-spn__note {
  font-size: 26px;
}

.nb-spn__button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 80px;
  background: var(--nb-spn-magenta);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.nb-spn__button:hover,
.nb-spn__button:focus-visible {
  background: #e00070;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ---------- Animacoes ---------- */

@keyframes nb-spn-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes nb-spn-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes nb-spn-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nb-spn__ring,
  .nb-spn__track {
    animation: none;
  }

  /* Sem rolagem, a faixa vira uma lista que quebra linha; a copia sai */
  .nb-spn__track {
    flex-wrap: wrap;
    width: auto;
  }

  .nb-spn__track [aria-hidden='true'],
  .nb-spn__track--rev {
    display: none;
  }

  .nb-spn__lanes {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ---------- Responsivo ---------- */

@media (max-width: 992px) {
  .nb-spn__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768.98px) {
  .nb-spn {
    padding: 72px 0 64px;
  }

  .nb-spn__body {
    gap: 40px;
  }

  .nb-spn__head {
    gap: 28px;
  }

  .nb-spn.nb-spn.nb-spn .nb-spn__title {
    font-size: 40px;
    line-height: 1.08;
  }

  .nb-spn.nb-spn.nb-spn .nb-spn__lead {
    font-size: 17px;
  }

  .nb-spn__badge {
    width: 168px;
    height: 168px;
  }

  .nb-spn__seal {
    inset: 34px;
  }

  .nb-spn__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }

  .nb-spn__card {
    height: 120px;
    padding: 18px;
  }

  .nb-spn__chip {
    width: 156px;
    height: 72px;
  }
}
