/* ND78 — pages.css
 * Páginas internas geradas por assets/js/page.js: cada rota do menu/rodapé
 * abre a sua própria página. A home continua no DOM (oculta só em rotas
 * internas) e o rodapé/modais continuam visíveis e funcionando.
 */

/* A home fica escondida quando existe uma página interna (#nd-page). */
.nd-hide { display: none !important; }

.nd-page {
  max-width: var(--nd-max, 1440px);
  margin: 0 auto;
  padding: 34px 24px 72px;
  min-height: 60vh;
}

/* ------------------------------- breadcrumb ------------------------------ */
.nd-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--nd-muted, #6b6f7d);
  margin-bottom: 18px;
}
.nd-crumb a { color: var(--nd-muted, #6b6f7d); text-decoration: none; }
.nd-crumb a:hover { color: var(--nd-orange, #ff782d); }
.nd-crumb-sep { opacity: 0.5; }
.nd-crumb-current { color: var(--nd-ink, #17191d); font-weight: 600; }

/* --------------------------------- hero --------------------------------- *
 * O hero das páginas internas é um <header>. Ele NÃO pode herdar o
 * position:sticky/z-index do header do site (layout.css), senão, ao rolar,
 * fica colado em cima do menu topo e dos submenus. Fica estático e por baixo.
 */
.nd-page-hero {
  position: static;
  z-index: auto;
  background: none;
  backdrop-filter: none;
  border-bottom: 0;
  padding-top: 0;
}
.nd-page-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--nd-ink, #17191d);
}
.nd-page-lead {
  margin: 16px 0 0;
  max-width: 760px;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  color: var(--nd-muted, #6b6f7d);
}
.nd-page-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* -------------------------------- botões -------------------------------- */
.nd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.nd-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff782d, #ff9d28);
  box-shadow: 0 14px 34px rgba(255, 120, 45, 0.32);
}
.nd-btn-primary:hover { transform: translateY(-3px); }
.nd-btn-ghost {
  color: var(--nd-ink, #17191d);
  background: #fff;
  border-color: var(--nd-line, #e6e8f0);
  box-shadow: 0 6px 18px rgba(23, 25, 29, 0.06);
}
.nd-btn-ghost:hover { transform: translateY(-3px); background: var(--nd-bg-soft, #f7f8fd); }

/* --------------------------------- corpo -------------------------------- */
.nd-page-body { margin-top: 40px; display: flex; flex-direction: column; gap: 44px; }
.nd-page-sec { display: flex; flex-direction: column; gap: 18px; }
.nd-sec-title {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--nd-ink, #17191d);
}
.nd-page-note { margin: 0; color: var(--nd-muted, #6b6f7d); font-size: 14px; }

/* ---------------------------- cards de links ---------------------------- */
.nd-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.nd-link-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--nd-line, #e6e8f0);
  border-radius: 16px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.nd-link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--nd-shadow, 0 14px 34px rgba(23, 25, 29, 0.09));
  border-color: #ffd9c2;
}
.nd-link-card-title { font-weight: 700; font-size: 15px; color: var(--nd-ink, #17191d); }
.nd-link-card-sub { font-size: 12.5px; color: var(--nd-muted, #6b6f7d); }

/* --------------------------------- tabs --------------------------------- */
.nd-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.nd-tabs::-webkit-scrollbar { display: none; }
.nd-tab {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--nd-line, #e6e8f0);
  background: #fff;
  color: var(--nd-muted, #6b6f7d);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.nd-tab:hover { color: var(--nd-ink, #17191d); }
.nd-tab.active { background: var(--nd-ink, #17191d); border-color: var(--nd-ink, #17191d); color: #fff; }

.nd-search-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--nd-bg-soft, #f7f8fd);
  border-radius: 12px;
  font-size: 14px;
  color: var(--nd-ink, #17191d);
}
.nd-search-note a { color: var(--nd-orange, #ff782d); font-weight: 700; text-decoration: none; }

/* ------------------------------- preços --------------------------------- */
.nd-price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.nd-price-grid .nd-plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--nd-line, #e6e8f0);
  border-radius: 20px;
  box-shadow: var(--nd-shadow-sm, 0 6px 18px rgba(23, 25, 29, 0.06));
}
.nd-price-grid .nd-plan .nd-plan-name { font-size: 17px; font-weight: 800; }
.nd-price-grid .nd-plan .nd-plan-price { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.nd-price-grid .nd-plan .nd-plan-desc { font-size: 14px; color: var(--nd-muted, #6b6f7d); flex: 1; }
.nd-price-grid .nd-plan .nd-btn { margin-top: 8px; width: 100%; }

.nd-faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.nd-faq-item {
  background: #fff;
  border: 1px solid var(--nd-line, #e6e8f0);
  border-radius: 14px;
  padding: 16px 20px;
}
.nd-faq-item summary { font-weight: 700; cursor: pointer; color: var(--nd-ink, #17191d); }
.nd-faq-item p { margin: 10px 0 0; color: var(--nd-muted, #6b6f7d); font-size: 14.5px; line-height: 1.6; }

/* -------------------------------- editor -------------------------------- */
.nd-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.nd-editor-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 240px;
  padding: 30px;
  text-align: center;
  background: var(--nd-bg-soft, #f7f8fd);
  border: 2px dashed var(--nd-line, #e6e8f0);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.nd-editor-drop:hover { border-color: var(--nd-orange, #ff782d); background: #fff7f2; }
.nd-editor-drop strong { font-size: 17px; color: var(--nd-ink, #17191d); }
.nd-editor-drop span { font-size: 13px; color: var(--nd-muted, #6b6f7d); }
.nd-editor-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.nd-editor-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 240px;
  padding: 24px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--nd-line, #e6e8f0);
  border-radius: 20px;
  color: var(--nd-muted, #6b6f7d);
  font-size: 14.5px;
}
.nd-editor-media { max-width: 100%; max-height: 320px; border-radius: 12px; }
.nd-editor-file { font-size: 13px; font-weight: 700; color: var(--nd-ink, #17191d); }

/* ------------------------------ ferramenta ------------------------------ *
 * Componente real de /tools/* e /ai/* (assets/js/tool.js): drop de arquivo,
 * metadados reais, pré-visualização e processamento no navegador.
 */
.nd-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--nd-line, #e6e8f0);
  border-radius: 22px;
  box-shadow: var(--nd-shadow, 0 14px 34px rgba(23, 25, 29, 0.09));
}
.nd-tool-head { grid-column: 1 / -1; }
.nd-tool-head .nd-sec-title { margin: 0; }
.nd-tool-lead { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--nd-muted, #6b6f7d); }
.nd-tool-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.nd-tool-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 180px;
  padding: 26px;
  text-align: center;
  background: var(--nd-bg-soft, #f7f8fd);
  border: 2px dashed var(--nd-line, #e6e8f0);
  border-radius: 18px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.nd-tool-drop:hover,
.nd-tool-drop.nd-drag { border-color: var(--nd-orange, #ff782d); background: #fff7f2; }
.nd-tool-drop.nd-has-file { min-height: 0; padding: 14px 18px; flex-direction: row; gap: 10px; }
.nd-tool-drop.nd-has-file strong { font-size: 14px; }
.nd-tool-drop strong { font-size: 16.5px; color: var(--nd-ink, #17191d); }
.nd-tool-drop span { font-size: 13px; color: var(--nd-muted, #6b6f7d); }
.nd-tool-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.nd-tool-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 180px;
  padding: 18px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--nd-line, #e6e8f0);
  border-radius: 18px;
  color: var(--nd-muted, #6b6f7d);
  font-size: 14.5px;
}
.nd-tool-preview.nd-error { border-color: #f0b4b4; background: #fff6f6; color: #b4413f; }
.nd-tool-preview.nd-busy { opacity: 0.75; }
.nd-tool-preview .nd-preview-img,
.nd-tool-preview .nd-preview-media { max-width: 100%; max-height: 300px; border-radius: 12px; }

.nd-tool-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
  padding: 14px 16px;
  background: var(--nd-bg-soft, #f7f8fd);
  border-radius: 14px;
  font-size: 13.5px;
}
.nd-tool-meta:empty { display: none; }
.nd-tool-meta dt { color: var(--nd-muted, #6b6f7d); }
.nd-tool-meta dd { margin: 0; font-weight: 600; color: var(--nd-ink, #17191d); word-break: break-word; }

.nd-tool-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--nd-bg-soft, #f7f8fd);
  border-radius: 18px;
}
.nd-tool-controls:empty { display: none; }
.nd-tool-title { font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--nd-muted, #6b6f7d); }
.nd-tool-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nd-tool-row > label { font-size: 14px; font-weight: 600; color: var(--nd-ink, #17191d); }
.nd-tool-row > input[type="number"],
.nd-tool-row > input[type="text"],
.nd-tool-row > select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 62%;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  color: var(--nd-ink, #17191d);
  background: #fff;
  border: 1px solid var(--nd-line, #e6e8f0);
  border-radius: 10px;
}
.nd-tool-row > input[type="range"] { flex: 1 1 auto; min-width: 0; accent-color: var(--nd-orange, #ff782d); }
.nd-tool-row > input[type="color"] { width: 46px; height: 34px; padding: 2px; border: 1px solid var(--nd-line, #e6e8f0); border-radius: 8px; background: #fff; }
.nd-tool-row > input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--nd-orange, #ff782d); }
.nd-tool-range { display: flex; flex-direction: column; gap: 4px; }
.nd-tool-range .nd-tool-row { gap: 10px; }
.nd-tool-val { font-size: 12.5px; font-weight: 700; color: var(--nd-orange, #ff782d); text-align: right; }

.nd-tool-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.nd-tool-status { margin: 0; min-height: 20px; font-size: 13.5px; color: var(--nd-muted, #6b6f7d); }
.nd-tool-status:empty { display: none; }
.nd-tool-result { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.nd-tool-result:empty { display: none; }
.nd-tool-size { font-size: 13px; color: var(--nd-muted, #6b6f7d); }

/* --------------------------------- auth --------------------------------- */
.nd-auth-card {
  max-width: 460px;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--nd-line, #e6e8f0);
  border-radius: 22px;
  box-shadow: var(--nd-shadow, 0 14px 34px rgba(23, 25, 29, 0.09));
}
.nd-auth-card h2 { margin: 0 0 8px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.nd-auth-card .nd-page-cta { margin-top: 20px; }

/* ------------------------------- artigos -------------------------------- */
.nd-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.nd-article-lead {
  margin: 0;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.7;
  color: var(--nd-ink-soft, #393f4f);
}
/* capa real no topo do artigo (data/article-covers.json) */
.nd-article-hero-wrap {
  margin: 0;
  border-radius: var(--nd-radius, 16px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, #eef1fb, #e3e8f8);
  box-shadow: var(--nd-shadow-sm, 0 6px 18px rgba(23, 25, 29, 0.06));
}
.nd-article-hero {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nd-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--nd-muted, #6b6f7d);
}
.nd-article-meta span {
  padding: 5px 12px;
  background: var(--nd-bg-soft, #f7f8fd);
  border-radius: 999px;
}
.nd-article .nd-article-title { font-weight: 700; font-size: 16px; line-height: 1.35; color: var(--nd-ink, #17191d); }
.nd-article .nd-article-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--nd-muted, #6b6f7d);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ------------------------------ responsivo ------------------------------ */
@media (max-width: 860px) {
  .nd-page { padding: 26px 18px 60px; }
  .nd-editor { grid-template-columns: 1fr; }
  .nd-tool { grid-template-columns: 1fr; padding: 18px; }
  .nd-page-cta .nd-btn { flex: 1 1 auto; }
}
