/* ═══════════════════════════════════════════════════════════ */
/* SAMBOTECA — ATO 3: PNSI                                     */
/* ═══════════════════════════════════════════════════════════ */

.section-pnsi {
  /* SEM linha divisória */
  border-top: none !important;

  /* 100vh centralizado */
  min-height: 100vh;
  height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  /* Fundo limpo (sem glow) */
  background: transparent;

  position: relative;
  overflow: hidden;
  padding: 0;
}

.pnsi-hero {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 40px;
  text-align: center;
}

/* Remove a aura e o glow */
.pnsi-aura,
.pnsi-glow {
  display: none !important;
}

.pnsi-content {
  position: relative;
  z-index: auto;
}

.pnsi-icon-hero {
  font-size: 96px;
  display: block;
  margin-bottom: 32px;
  line-height: 1;
}

.pnsi-title {
  font-size: clamp(64px, 12vw, 140px);
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--samba-1) 0%, var(--samba-2) 50%, var(--samba-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pnsi-full {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(14px, 2vw, 18px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
  font-weight: 600;
}

.pnsi-tagline {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .section-pnsi {
    height: auto;
    min-height: 100vh;
  }
  .pnsi-hero { padding: 40px 20px; }
  .pnsi-icon-hero { font-size: 72px; }
}

/* ═══════════════════════════════════════════════════════════ */
/* FADE IN (igual ao ATO 2)                                    */
/* ═══════════════════════════════════════════════════════════ */

@keyframes pnsiFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pnsi-hero {
  opacity: 0;
  transform: translateY(30px);
  animation: pnsiFadeIn 1.5s ease 0.5s forwards;
}

.section-pnsi.visible .pnsi-hero {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

/* ═══════════════════════════════════════════════════════════ */
/* Remove border-top do bloco logo após o PNSI                */
/* ═══════════════════════════════════════════════════════════ */

.section-pnsi + .section {
  border-top: none !important;
}

/* ═══════════════════════════════════════════════════════════ */
/* Remove border-top do bloco logo após o PNSI                */
/* ═══════════════════════════════════════════════════════════ */

.section-pnsi + .section {
  border-top: none !important;
}

/* ═══════════════════════════════════════════════════════════ */
/* PNSI — BADGE DE STATUS                                      */
/* ═══════════════════════════════════════════════════════════ */

.pnsi-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.4s ease;
}

.pnsi-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.pnsi-badge-texto {
  color: var(--muted);
  transition: color 0.3s ease;
  font-weight: 600;
}

/* ─── Estado: ATIVADO ─── */
.pnsi-badge.ativo {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.15);
}

.pnsi-badge.ativo .pnsi-badge-dot {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pnsiPulse 2s ease-in-out infinite;
}

.pnsi-badge.ativo .pnsi-badge-texto {
  color: var(--accent);
}

/* ─── Estado: CONECTADO (A + B) ─── */
.pnsi-badge.conectado {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 32px rgba(34, 197, 94, 0.25);
}

.pnsi-badge.conectado .pnsi-badge-dot {
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

.pnsi-badge.conectado .pnsi-badge-texto {
  color: var(--accent);
}

/* ─── Pulse do dot ─── */
@keyframes pnsiPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── Mobile ─── */
@media (max-width: 480px) {
  .pnsi-badge {
    font-size: 11px;
    padding: 10px 18px;
    letter-spacing: 0.1em;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* PNSI — BADGE DE STATUS                                      */
/* ═══════════════════════════════════════════════════════════ */

.pnsi-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.4s ease;
}

/* ─── Dot base ─── */
.pnsi-badge-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  transition: all 0.4s ease;
  flex-shrink: 0;
  box-shadow: 0 0 12px #ef4444;
}

.pnsi-badge-texto {
  color: #ef4444;
  transition: color 0.3s ease;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════ */
/* DESLIGADO (padrão) — VERMELHO                               */
/* ═══════════════════════════════════════════════════════════ */

.pnsi-badge {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}

/* ═══════════════════════════════════════════════════════════ */
/* ATIVADO — VERDE + AZUL                                      */
/* ═══════════════════════════════════════════════════════════ */

.pnsi-badge.ativo {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow:
    0 0 24px rgba(34, 197, 94, 0.2),
    0 0 48px rgba(14, 165, 233, 0.1);
  background: linear-gradient(135deg,
    rgba(34, 197, 94, 0.05) 0%,
    rgba(14, 165, 233, 0.05) 100%);
}

.pnsi-badge.ativo .pnsi-badge-dot {
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  box-shadow:
    0 0 12px rgba(34, 197, 94, 0.8),
    0 0 24px rgba(14, 165, 233, 0.4);
  animation: pnsiPulse 2s ease-in-out infinite;
}

.pnsi-badge.ativo .pnsi-badge-texto {
  background: linear-gradient(135deg, #22c55e 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ═══════════════════════════════════════════════════════════ */
/* ATIVO · 1 APARELHO — VERDE + AZUL (mais forte)              */
/* ═══════════════════════════════════════════════════════════ */

.pnsi-badge.conectado {
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow:
    0 0 32px rgba(34, 197, 94, 0.3),
    0 0 64px rgba(14, 165, 233, 0.15);
  background: linear-gradient(135deg,
    rgba(34, 197, 94, 0.08) 0%,
    rgba(14, 165, 233, 0.08) 100%);
}

.pnsi-badge.conectado .pnsi-badge-dot {
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  box-shadow:
    0 0 16px rgba(34, 197, 94, 0.9),
    0 0 32px rgba(14, 165, 233, 0.5);
}

.pnsi-badge.conectado .pnsi-badge-texto {
  background: linear-gradient(135deg, #22c55e 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Pulse do dot ─── */
@keyframes pnsiPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.9);
  }
}

/* ─── Mobile ─── */
@media (max-width: 480px) {
  .pnsi-badge {
    font-size: 11px;
    padding: 10px 18px;
    letter-spacing: 0.1em;
  }
  .pnsi-badge-dot {
    width: 8px;
    height: 8px;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* PNSI — LEGENDA DO BADGE                                     */
/* ═══════════════════════════════════════════════════════════ */

.pnsi-badge-legenda {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 16px;
  text-align: center;
  transition: color 0.4s ease;
  opacity: 0.8;
  min-height: 1.4em;
}

.pnsi-badge-legenda.ativo {
  color: var(--accent);
  opacity: 1;
}

@media (max-width: 480px) {
  .pnsi-badge-legenda {
    font-size: 11px;
    letter-spacing: 0.1em;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* PNSI — CARROSSEL DE FILTROS                                 */
/* ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════ */
/* PNSI — CARROSSEL (estrutura)                                */
/* ═══════════════════════════════════════════════════════════ */

.pnsi-filtros {
  margin: 80px auto 0;
  width: 100%;
  max-width: 1100px;
  padding: 0 40px;
}

.pnsi-filtros-titulo {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin: 0 0 12px;
}

.pnsi-filtros-aviso {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(12px, 1.3vw, 14px);
  letter-spacing: 0.05em;
  color: var(--dim);
  text-align: center;
  font-style: italic;
  margin: 0 0 40px;
}

.pnsi-carrossel {
  width: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  padding: 0 60px;
}

.pnsi-janela {
  overflow: hidden;
  width: 100%;
}

.pnsi-carrossel.grabbing { cursor: grabbing; }

.pnsi-trilho {
  display: flex;
  gap: 20px;
  padding: 8px 0 16px;
  width: max-content;
  will-change: transform;
}

/* Animação suave ao clicar em setas/dots */
.pnsi-trilho.animando {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pnsi-card {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 24px;
  min-height: 220px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  pointer-events: none;
}

.pnsi-card-icon {
  width: 40px;
  height: 40px;
  color: var(--samba-1);
  flex-shrink: 0;
}

.pnsi-card-texto {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--text);
  font-weight: 700;
  margin: 0;
}

.pnsi-card-sub {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--muted);
  font-weight: 400;
  margin: 0;
  max-width: 240px;
}

@media (max-width: 1100px) {
  .pnsi-card { flex: 0 0 calc(50vw - 50px); }
}
@media (max-width: 700px) {
  .pnsi-card { flex: 0 0 calc(100vw - 88px); }
}

/* ═══════════════════════════════════════════════════════════ */
/* PNSI — CARROSSEL (estrutura)                                */
/* ═══════════════════════════════════════════════════════════ */

.pnsi-filtros {
  margin: 80px auto 0;
  width: 100%;
  max-width: 1100px;
  padding: 0 40px;
}

.pnsi-carrossel {
  overflow: hidden;
  width: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.pnsi-carrossel.grabbing { cursor: grabbing; }

.pnsi-trilho {
  display: flex;
  gap: 20px;
  width: max-content;
  will-change: transform;
}

.pnsi-card {
  flex: 0 0 320px;
  min-height: 170px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  pointer-events: none;
}

@media (max-width: 1100px) {
  .pnsi-card { flex: 0 0 calc(50vw - 50px); }
}
@media (max-width: 700px) {
  .pnsi-card { flex: 0 0 calc(100vw - 88px); }
}

/* ═══════════════════════════════════════════════════════════ */
/* PNSI — Setas + Dots de navegação                            */
/* ═══════════════════════════════════════════════════════════ */

.pnsi-carrossel { position: relative; }

.pnsi-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.pnsi-arrow:hover {
  border-color: var(--samba-2);
  color: var(--samba-1);
  transform: translateY(-50%) scale(1.08);
}

.pnsi-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.pnsi-arrow-prev { left: 8px; }
.pnsi-arrow-next { right: 8px; }

@media (max-width: 700px) {
  .pnsi-carrossel { padding: 0 50px; }
}

.pnsi-arrow svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.pnsi-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pnsi-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pnsi-dot:hover {
  background: var(--muted);
}

.pnsi-dot.ativo {
  background: var(--samba-1);
  width: 28px;
  border-radius: 100px;
}

@media (max-width: 700px) {
  .pnsi-arrow { width: 36px; height: 36px; }
  .pnsi-arrow svg { width: 16px; height: 16px; }
  .pnsi-carrossel { padding: 0 50px; }
}
