/* ============================================================
   ZYNTEK — faq.css
   Estilo integrado aos tokens de background e footer oficiais
   Reaproveita o mesmo padrão visual de politica-privacidade.css
   ============================================================ */

/* Alinhamento estrutural para respeitar o header glass */
.faq-main {
  padding-top: 140px;
  position: relative;
  z-index: 10;
}

/* 1. Estilização do Hero */
.faq-hero {
  padding: 3rem clamp(1.5rem, 5vw, 4rem) 2rem;
  text-align: center;
}

.faq-hero-container {
  max-width: 850px;
  margin: 0 auto;
}

.faq-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-top: 0.75rem;
  margin-bottom: 1.2rem;
}

.faq-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* Barra de busca */
.faq-search-wrapper {
  position: relative;
  max-width: 560px;
  margin: 0 auto 1rem;
}

.faq-search-icon {
  position: absolute;
  top: 50%;
  left: 1.1rem;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

.faq-search-input {
  width: 100%;
  padding: 0.95rem 1.25rem 0.95rem 2.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  transition: border-color var(--t-fast) var(--ease-standard), box-shadow var(--t-fast) var(--ease-standard);
}

.faq-search-input::placeholder {
  color: var(--text-subtle);
}

.faq-search-input:focus {
  outline: none;
  border-color: var(--primary-light, #a78bfa);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

body.light-mode .faq-search-input {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

/* 2. Grid Bifurcado (Categorias + Conteúdo) — herda nomes do padrão policy-* */
.policy-content-section {
  padding: 2rem clamp(1.5rem, 5vw, 4rem) 7rem;
}

.policy-grid-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 5rem;
  align-items: start;
}

/* Sidebar Estilo Glassmorphism Combinado */
.policy-sidebar {
  position: sticky;
  top: 120px;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

body.light-mode .policy-sidebar {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--border-medium);
}

.policy-toc h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 1.25rem;
}

.policy-toc ul {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  list-style: none;
  padding: 0;
}

.toc-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-standard), transform var(--t-fast) var(--ease-standard);
  display: block;
}

.toc-link:hover {
  color: var(--primary-light);
  transform: translateX(5px);
}

body.light-mode .toc-link { color: #4B5563; }
body.light-mode .toc-link:hover { color: var(--primary); }

.toc-link.active {
  color: var(--primary-light, #a78bfa);
  font-weight: 700;
  transform: translateX(5px);
}

body.light-mode .toc-link.active {
  color: var(--primary);
}

/* Bloco de Conteúdo */
.policy-text-block {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.policy-section-item h2 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.policy-section-item h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--primary-light);
  margin-top: 0.6rem;
  border-radius: var(--radius-pill);
}

body.light-mode .policy-section-item h2::after {
  background: var(--primary);
}

.section-icon {
  flex-shrink: 0;
  color: var(--primary-light, #a78bfa);
}

.policy-text-block strong {
  color: var(--text-primary);
}

.policy-text-block a {
  color: var(--primary-light, #a78bfa);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.light-mode .policy-text-block a {
  color: var(--primary);
}

/* ============================================================
   3. ACCORDION DE PERGUNTAS E RESPOSTAS
   ============================================================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.faq-item {
  background: rgba(17, 24, 39, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease-standard);
}

body.light-mode .faq-item {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--border-medium);
}

.faq-item.open {
  border-color: rgba(124, 58, 237, 0.4);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.faq-question-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-subtle);
  transition: transform var(--t-fast) var(--ease-standard), color var(--t-fast) var(--ease-standard);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary-light, #a78bfa);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-standard, ease);
}

.faq-answer p {
  margin: 0;
  padding: 0 1.4rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.faq-no-results {
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
  padding: 2rem 0;
}

/* ============================================================
   4. BARRA DE PROGRESSO DE LEITURA
   ============================================================ */
.policy-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 200;
}

.policy-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light, #a78bfa));
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.6);
  transition: width 0.1s linear;
}

/* ============================================================
   5. SELOS DE CONFIANÇA (HERO)
   ============================================================ */
.policy-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  transition: all var(--t-fast) var(--ease-standard);
}

.trust-badge svg {
  color: var(--primary-light, #a78bfa);
  flex-shrink: 0;
}

.trust-badge:hover {
  border-color: var(--primary-light, #a78bfa);
  color: var(--text-primary);
  transform: translateY(-2px);
}

body.light-mode .trust-badge {
  background: rgba(124, 58, 237, 0.06);
  border-color: var(--border-medium);
  color: #4B5563;
}

/* ============================================================
   6. PAINEL HUD — ÍNDICE DA CENTRAL DE AJUDA
   ============================================================ */
.policy-hud-wrapper {
  position: relative;
  max-width: 1240px;
  margin: 1rem auto 0;
  background: rgba(14, 11, 24, 0.65);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 1.75rem;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(124, 58, 237, 0.12),
    inset 0 0 30px rgba(124, 58, 237, 0.04);
}

body.light-mode .policy-hud-wrapper {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--border-medium);
}

.policy-hud-wrapper .cyber-scanline {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.7), transparent);
  animation: faq-scan 4s linear infinite;
  pointer-events: none;
}

@keyframes faq-scan {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.policy-hud-wrapper .tech-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(167, 139, 250, 0.55);
  pointer-events: none;
}

.tech-corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.tech-corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.tech-corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.tech-corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.hud-glitch-title {
  font-family: monospace, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.hud-stats {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hud-ping {
  font-family: monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--primary-light, #a78bfa);
}

.hud-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: faq-pulse 1.6s ease-in-out infinite;
}

@keyframes faq-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hud-data-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.hud-data-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hud-data-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.hud-data-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.hud-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(124, 58, 237, 0.2);
}

.hud-terminal-line {
  font-family: monospace, monospace;
  font-size: 0.75rem;
  color: #10b981;
  letter-spacing: 0.03em;
}

@media (max-width: 768px) {
  .hud-data-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   7. BOTÃO EXPANDIR/RECOLHER TUDO (SIDEBAR)
   ============================================================ */
.policy-print-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 10px);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-standard);
}

.policy-print-btn:hover {
  color: var(--text-primary);
  border-color: var(--primary-light, #a78bfa);
}

/* ============================================================
   8. CARD DE CTA FINAL
   ============================================================ */
.policy-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 2rem clamp(1.5rem, 4vw, 2.5rem);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(124, 58, 237, 0.03));
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-lg);
}

.policy-cta-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.policy-cta-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.policy-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: var(--primary, #7c3aed);
  border-radius: 8px;
  text-decoration: none !important;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
  transition: all var(--t-fast) var(--ease-standard);
}

.policy-cta-btn:hover {
  background: #6d28d9;
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.5);
  transform: translateY(-2px);
}

.policy-cta-btn .code-symbol {
  font-family: monospace, monospace;
}

/* ============================================================
   9. BOTÃO VOLTAR AO TOPO
   ============================================================ */
.policy-back-top {
  position: fixed;
  right: 1.75rem;
  bottom: 1.75rem;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--primary, #7c3aed);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
  transition: all var(--t-fast) var(--ease-standard);
  z-index: 150;
}

.policy-back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.policy-back-top:hover {
  background: #6d28d9;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.55);
}

/* ============================================================
   AJUSTES DE ALINHAMENTO DO FOOTER (mesmo padrão do site)
   ============================================================ */
.main-footer .footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}

.footer-col ul a {
  color: var(--text-muted) !important;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--t-fast) var(--ease-standard);
}

.footer-col ul a:hover {
  color: var(--primary-light) !important;
}

body.light-mode .footer-col ul a:hover {
  color: var(--primary) !important;
}

/* ============================================================
   10. RESPONSIVIDADE ADAPTATIVA
   ============================================================ */
@media (max-width: 1100px) {
  .footer-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
  .footer-col:first-child {
    grid-column: span 3;
    max-width: 500px;
  }
}

@media (max-width: 992px) {
  .policy-grid-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .policy-sidebar {
    position: relative;
    top: 0;
    width: 100%;
  }
  .policy-toc ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
  }
  .policy-toc ul li {
    width: calc(50% - 0.75rem);
  }
}

@media (max-width: 650px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-col:first-child {
    grid-column: span 2;
  }
  .policy-toc ul {
    flex-direction: column;
    gap: 0.85rem;
  }
  .policy-toc ul li {
    width: 100%;
  }
  .faq-question-text {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
  .footer-col:first-child {
    grid-column: span 1;
  }
  .main-footer .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}