/* =========================================================================
   lex-pages.css — estilo das páginas de CONTEÚDO (post_content em HTML puro)
   Escopado em .lex-page: não afeta as páginas montadas no Elementor.
   Reaproveita os tokens da home (Elementor global colors).
   ========================================================================= */

.lex-page {
  --lex-primary:   #2563EB;
  --lex-secondary: #1E40AF;
  --lex-accent:    #06B6D4;
  --lex-text:      #0F172A;
  --lex-muted:     #475569;
  --lex-dark:      #0B1220;
  --lex-bg:        #F8FAFC;
  --lex-surface:   #FFFFFF;
  --lex-border:    #E2E8F0;
  --lex-danger:    #DC2626;
  --lex-success:   #16A34A;

  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 24px 56px;
  color: var(--lex-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Títulos ---------- */
.lex-page h1 {
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.25rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--lex-dark);
}
.lex-page h2 {
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.55rem);
  line-height: 1.25;
  font-weight: 700;
  margin: 1.8em 0 0.5em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--lex-border);
  color: var(--lex-dark);
}
.lex-page h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.4em 0 0.35em;
  color: var(--lex-dark);
}
.lex-page h2:first-child,
.lex-page h1 + h2 { margin-top: 0.6em; }

/* ---------- Texto ---------- */
.lex-page p { margin: 0 0 1em; max-width: 72ch; }
.lex-page strong { font-weight: 600; color: var(--lex-dark); }
.lex-page a { color: var(--lex-primary); text-decoration: none; }
.lex-page a:hover,
.lex-page a:focus { text-decoration: underline; }

/* ---------- Listas ---------- */
.lex-page ul,
.lex-page ol { margin: 0 0 1.1em; padding-left: 1.4em; max-width: 72ch; }
.lex-page li { margin: 0.3em 0; }
.lex-page ol { counter-reset: none; }

/* ---------- Divisor (os <hr> viram separador sutil) ---------- */
.lex-page hr {
  border: 0;
  border-top: 1px solid var(--lex-border);
  margin: 2em 0;
}

/* ---------- Tabelas (ex.: "O que está incluído") ---------- */
.lex-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
  font-size: 0.95rem;
  border: 1px solid var(--lex-border);
  border-radius: 12px;
  overflow: hidden;
}
.lex-page thead th {
  background: var(--lex-dark);
  color: #fff;
  text-align: left;
  font-weight: 600;
  padding: 12px 14px;
}
.lex-page tbody td {
  padding: 11px 14px;
  border-top: 1px solid var(--lex-border);
  vertical-align: top;
}
.lex-page tbody tr:nth-child(even) td { background: var(--lex-bg); }
/* fallback responsivo: tabela pode rolar na horizontal no mobile */
.lex-page .lex-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
  .lex-page table { display: block; overflow-x: auto; white-space: normal; }
  .lex-page thead, .lex-page tbody { display: table; width: 100%; min-width: 460px; }
}

/* ---------- Bloco de CTAs (linha de botões) ---------- */
.lex-page p.lex-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.2em 0;
  max-width: none;
}

/* ---------- Botões (.lex-cta hoje não tem estilo nenhum) ---------- */
.lex-page a.lex-cta {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  background: var(--lex-primary);
  color: #fff;
  border: 2px solid var(--lex-primary);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.lex-page a.lex-cta:hover,
.lex-page a.lex-cta:focus { background: var(--lex-secondary); border-color: var(--lex-secondary); color: #fff; text-decoration: none; }
.lex-page a.lex-cta strong { color: inherit; font-weight: 600; }

/* CTA secundário (WhatsApp) — detectado por href */
.lex-page a.lex-cta[href*="wa.me"],
.lex-page a.lex-cta[href*="whatsapp"] {
  background: transparent;
  color: var(--lex-primary);
}
.lex-page a.lex-cta[href*="wa.me"]:hover,
.lex-page a.lex-cta[href*="whatsapp"]:hover,
.lex-page a.lex-cta[href*="wa.me"]:focus,
.lex-page a.lex-cta[href*="whatsapp"]:focus {
  background: #EFF6FF;
  color: var(--lex-secondary);
}

/* Foco visível (acessibilidade) */
.lex-page a:focus-visible,
.lex-page a.lex-cta:focus-visible {
  outline: 2px solid var(--lex-primary);
  outline-offset: 2px;
}

/* ---------- Imagens / figuras ---------- */
.lex-page figure { margin: 1.4em 0; }
.lex-page img { max-width: 100%; height: auto; border-radius: 12px; }
.lex-page figcaption { font-size: .85rem; color: var(--lex-muted); margin-top: .5em; }

/* ---------- Bloco de contato no fim (telefone/e-mail/horário) ---------- */
.lex-page p:last-of-type { margin-bottom: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 768px) {
  .lex-page { padding: 4px 16px 40px; }
  .lex-page h2 { margin-top: 1.5em; }
  .lex-page p.lex-cta-row { gap: 10px; }
  .lex-page a.lex-cta { width: 100%; text-align: center; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  .lex-page a.lex-cta { transition: none; }
}
