/* =========================================
   CKEDITOR HARD OVERRIDE - FINAL
   Escopo: #cms-content
   ========================================= */

/* Base / Reset */
#cms-content, #cms-content * {
  box-sizing: border-box;
}
#cms-content {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #222;
  word-wrap: break-word;
}

/* =========================
   ESPAÇAMENTO E PARÁGRAFOS
   ========================= */
#cms-content p,
#cms-content ul,
#cms-content ol,
#cms-content blockquote,
#cms-content pre,
#cms-content figure {
  margin: 0 0 1.25rem !important;
}
#cms-content h1, #cms-content h2, #cms-content h3,
#cms-content h4, #cms-content h5, #cms-content h6 {
  font-weight: 700;
  line-height: 1.3;
  margin: 1.75rem 0 1rem;
}

/* =========================
   TAMANHOS DE FONTE (CKEDITOR)
   ========================= */
#cms-content .text-tiny  { font-size: 0.7em  !important; line-height: 1.6 !important; }
#cms-content .text-small { font-size: 0.85em !important; line-height: 1.6 !important; }
#cms-content .text-big   { font-size: 1.4em  !important; line-height: 1.4 !important; }
#cms-content .text-huge  { font-size: 1.9em  !important; line-height: 1.3 !important; }

#cms-content .text-tiny  *, 
#cms-content .text-small *, 
#cms-content .text-big   *, 
#cms-content .text-huge  * { font-size: inherit !important; line-height: inherit !important; }

/* =========================
   IMAGENS
   ========================= */
#cms-content img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto 1rem !important;
  float: none !important;
}
#cms-content figure.image {
  display: block !important;
  margin: 1.25rem auto !important;
  text-align: center !important;
}
#cms-content figure.image.image-style-align-left {
  float: left !important;
  margin: .25rem 1rem 1rem 0 !important;
}
#cms-content figure.image.image-style-align-right,
#cms-content figure.image.image-style-side {
  float: right !important;
  margin: .25rem 0 1rem 1rem !important;
  max-width: 50% !important;
}
#cms-content figure.image figcaption {
  font-size: .9rem;
  color: #666;
  margin-top: .5rem !important;
  text-align: center !important;
}
#cms-content::after { content: ""; display: block; clear: both; }

/* ===== LISTAS dentro do #cms-content (corrigido) ===== */
#cms-content ul,
#cms-content ol {
  display: block !important;
  margin: 0 0 1.25rem 0 !important;
  padding-left: 1.5rem !important;
  list-style-position: outside !important;
}

#cms-content ul { list-style-type: disc !important; }
#cms-content ol { list-style-type: decimal !important; }

#cms-content li {
  display: list-item !important;
  margin: .35rem 0 !important;
  line-height: 1.6 !important;   /* <— aqui estava "line_height" */
  list-style: inherit !important;
}

/* Níveis aninhados */
#cms-content ul ul     { list-style-type: circle !important;  padding-left: 1.25rem !important; }
#cms-content ul ul ul  { list-style-type: square !important; }
#cms-content ol ol     { list-style-type: lower-alpha !important; padding-left: 1.25rem !important; }
#cms-content ol ol ol  { list-style-type: lower-roman !important; }

/* Remove bullets/nums “falsos” do tema */
#cms-content ul > li::before,
#cms-content ul > li::after,
#cms-content ol > li::before,
#cms-content ol > li::after { content: none !important; }

/* (Opcional) peso dos números do marcador */
#cms-content ol li::marker,
#cms-content ul li::marker { font-weight: 400; }

/* =========================
   VÍDEOS / MÍDIA EMBUTIDA
   ========================= */
#cms-content .media-embed,
#cms-content figure.media {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  margin: 0 0 1.5rem;
}
#cms-content .media-embed iframe,
#cms-content figure.media iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

/* =========================
   TEXTO INLINE E DECORAÇÕES
   ========================= */
#cms-content a {
  color: #0056b3;
  text-decoration: underline;
}
#cms-content a:hover {
  text-decoration: none;
}
#cms-content strong, #cms-content b { font-weight: 700; }
#cms-content em, #cms-content i { font-style: italic; }
#cms-content mark { background: #fff3cd; padding: .1em .25em; }

/* =========================
   CITAÇÕES E CÓDIGO
   ========================= */
#cms-content blockquote {
  border-left: 4px solid #ddd;
  background: #f9f9f9;
  padding: .75rem 1rem;
  margin: 1.25rem 0;
  color: #555;
}
#cms-content pre {
  background: #0f172a;
  color: #f1f5f9;
  padding: 1rem;
  border-radius: .4rem;
  overflow: auto;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* =========================
   TABELAS
   ========================= */
#cms-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}
#cms-content th, #cms-content td {
  border: 1px solid #e5e7eb;
  padding: .6rem .75rem;
  text-align: left;
}
#cms-content thead th {
  background: #f3f4f6;
  font-weight: 700;
}
#cms-content caption {
  caption-side: bottom;
  color: #666;
  padding-top: .5rem;
  font-size: .9rem;
}

/* =========================
   HR / SEPARADORES
   ========================= */
#cms-content hr {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 2rem 0;
}
