/* ============================================
   LOGIC NODES GUIDE PAGE
   (mesmo sistema visual do Logic Builder, com um
   toque de canvas de nós pra refletir o produto)
   ============================================ */

.lng-page {
  --lng-evento:   #4C8DFF;
  --lng-condicao: #FFA94D;
  --lng-acao:     #57F287;
  --lng-fluxo:    #9BA8CC;
}

/* --- HERO --- */
.lng-hero {
  padding: 130px 1.5rem 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lng-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(76, 141, 255, 0.14) 0%, transparent 65%);
  pointer-events: none;
}
.lng-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(255, 217, 102, 0.1);
  border: 1px solid var(--border-gold);
  border-radius: 50px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1rem;
}
.lng-hero-badge svg { width: 12px; height: 12px; }
.lng-hero-quote {
  margin-top: 1.5rem;
  font-style: italic;
  color: var(--hair-main);
  font-size: 0.95rem;
}

/* --- STICKY TOC SIDEBAR LAYOUT --- */
.lng-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
  align-items: start;
}
.lng-toc {
  position: sticky;
  top: 90px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.lng-toc-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.lng-toc-list { display: flex; flex-direction: column; gap: 0.15rem; }
.lng-toc-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
}
.lng-toc-item:hover,
.lng-toc-item.active {
  background: rgba(76, 141, 255, 0.1);
  color: #7fa8ff;
}
.lng-toc-item .toc-icon { font-size: 0.85rem; flex-shrink: 0; }
.lng-toc-item .toc-icon svg { width: 13px; height: 13px; display: block; }
.lng-toc-sep { height: 1px; background: var(--border); margin: 0.5rem 0; }

/* --- MAIN CONTENT --- */
.lng-content { min-width: 0; }

/* --- SECTIONS --- */
.lng-section { margin-bottom: 3.5rem; scroll-margin-top: 90px; }
.lng-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.lng-section-icon { font-size: 1.6rem; line-height: 1; }
.lng-section-icon svg { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }
.lng-section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}
.lng-section-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(255, 217, 102, 0.1);
  border: 1px solid var(--border-gold);
  border-radius: 50px;
  padding: 0.2rem 0.65rem;
  white-space: nowrap;
}

.lng-prose {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}
.lng-prose strong { color: var(--text-primary); font-weight: 700; }

/* --- INFO BOX --- */
.lng-info {
  display: flex;
  gap: 0.75rem;
  background: rgba(76, 141, 255, 0.07);
  border: 1px solid rgba(76, 141, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.lng-info-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.lng-info-icon svg { width: 17px; height: 17px; display: block; }
.lng-info p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin: 0; }
.lng-info p strong { color: var(--text-primary); }
.lng-info.gold  { background: rgba(255, 217, 102, 0.06); border-color: rgba(255, 217, 102, 0.2); }
.lng-info.green { background: rgba(87, 242, 135, 0.06); border-color: rgba(87, 242, 135, 0.2); }
.lng-info.beta  { background: rgba(255, 169, 77, 0.07); border-color: rgba(255, 169, 77, 0.25); }

/* --- ANALOGY BOX (comparativo Nodes vs Builder vs Script) --- */
.lng-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.lng-compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}
.lng-compare-card.active {
  border-color: rgba(76, 141, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(76, 141, 255, 0.15);
}
.lng-compare-emoji { font-size: 1.8rem; display: block; margin-bottom: 0.5rem; }
.lng-compare-emoji svg { width: 29px; height: 29px; }
.lng-compare-name { font-family: var(--font-display); font-weight: 700; color: var(--white); margin-bottom: 0.3rem; font-size: 0.95rem; }
.lng-compare-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* --- ITEM GRID (categorias de nós) --- */
.lng-item-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.lng-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--lng-cat, var(--border));
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
.lng-item:hover { background: var(--bg-card-hover); }
.lng-item-icon {
  width: 28px; height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background: color-mix(in srgb, var(--lng-cat, var(--border)) 18%, transparent);
}
.lng-item-icon svg { width: 15px; height: 15px; }
.lng-item-text h4 { font-size: 0.85rem; font-weight: 700; color: var(--white); margin-bottom: 0.15rem; }
.lng-item-text p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

/* --- CATEGORY GROUP HEADER --- */
.lng-cat-group { margin-bottom: 1.75rem; }
.lng-cat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.lng-cat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lng-cat, var(--border)); flex-shrink: 0; }
.lng-cat-name { font-family: var(--font-display); font-weight: 700; color: var(--white); font-size: 0.95rem; }
.lng-cat-name svg { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; }
.lng-cat-count { font-size: 0.75rem; color: var(--text-muted); }

/* --- MINI CANVAS MOCKUP (imita o editor de nós) --- */
.lng-canvas-mock {
  background:
    radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}
.lng-canvas-flow {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
  justify-content: center;
}
.lng-node {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-card);
  border: 1.5px solid var(--lng-cat, var(--border));
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  min-width: 150px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lng-cat, transparent) 12%, transparent);
}
.lng-node-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--lng-cat, var(--border)) 22%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.lng-node-icon svg { width: 14px; height: 14px; }
.lng-node-body { display: flex; flex-direction: column; gap: 0.1rem; }
.lng-node-cat {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lng-cat, var(--text-muted));
}
.lng-node-label { font-size: 0.83rem; font-weight: 700; color: var(--white); white-space: nowrap; }
.lng-node-connector {
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, var(--border), var(--border));
  position: relative;
  flex-shrink: 0;
}
.lng-node-connector::after {
  content: '';
  position: absolute;
  right: -1px; top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--border);
}

/* --- PROPERTIES PANEL MOCKUP --- */
.lng-props-mock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.lng-props-canvas-side { background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem 1rem; display: flex; align-items: center; justify-content: center; }
.lng-props-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
}
.lng-props-panel-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.85rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border); }
.lng-props-field { margin-bottom: 0.75rem; }
.lng-props-field label { display: block; font-size: 0.72rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 0.3rem; }
.lng-props-input {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  color: var(--text-primary);
}
.lng-props-input.muted { color: var(--text-muted); }

/* --- CTA --- */
.lng-cta {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  margin-top: 2rem;
}
.lng-cta-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--white); margin-bottom: 0.6rem; }
.lng-cta-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1.5rem; max-width: 480px; margin-left: auto; margin-right: auto; }
.lng-cta-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .lng-layout { grid-template-columns: 1fr; }
  .lng-toc { display: none; }
  .lng-compare { grid-template-columns: 1fr; }
  .lng-props-mock { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .lng-hero { padding: 110px 1.5rem 40px; }
  .lng-item-grid { grid-template-columns: 1fr; }
  .lng-canvas-flow { flex-direction: column; }
  .lng-node-connector { width: 2px; height: 26px; }
  .lng-node-connector::after { right: 50%; top: auto; bottom: -1px; transform: translateX(50%) rotate(90deg); }
}

@media (max-width: 480px) {
  .lng-cta-buttons { flex-direction: column; align-items: center; }
  .lng-cta-buttons a { width: 100%; justify-content: center; }
}
