/* ==========================================================================
   CSM Portal Editorial - Single Article Stylesheet
   Layout de 2 colunas fiel ao mockup oficial com Sidebar rica e E-E-A-T
   ========================================================================== */

/* Barra de Progresso de Leitura Fixa no Topo */
.csm-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #1D4ED8 0%, #3B82F6 50%, #06B6D4 100%);
  z-index: 999999;
  pointer-events: none;
  transition: width 0.08s ease-out;
}

.csm-single-article {
  padding-top: 1.75rem;
  padding-bottom: 4.5rem;
  background-color: #FFFFFF;
}

/* Layout de 2 Colunas (Artigo à Esquerda + Sidebar Sticky à Direita) */
.csm-article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3.5rem;
  align-items: start;
}

.csm-article-main-col {
  min-width: 0;
}

/* ==========================================================================
   1. BREADCRUMBS SEMÂNTICOS
   ========================================================================== */
.csm-breadcrumbs {
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: #64748B;
}

.csm-breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.csm-breadcrumbs a {
  color: #64748B;
  text-decoration: none;
  transition: color 0.15s ease;
}

.csm-breadcrumbs a:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

.csm-breadcrumbs .csm-sep {
  color: #CBD5E1;
}

/* ==========================================================================
   2. CABEÇALHO DO ARTIGO
   ========================================================================== */
.csm-article-header {
  margin-bottom: 1.75rem;
}

.csm-article-cat-wrap {
  margin-bottom: 0.5rem;
}

.csm-article-cat-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: #1D4ED8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.csm-article-cat-badge:hover {
  text-decoration: underline;
}

.csm-article-title {
  font-family: var(--csm-font-editorial, Georgia, serif);
  font-size: clamp(1.85rem, 3.2vw, 2.45rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: #0A1931;
  margin: 0.4rem 0 0.85rem;
}

.csm-article-lead {
  font-size: 1.08rem;
  line-height: 1.55;
  color: #475569;
  margin-bottom: 1.25rem;
}

.csm-article-lead p {
  margin: 0;
}

/* Barra de Metadados Editoriais + Ações */
.csm-article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid #E2E8F0;
}

.csm-article-meta-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.csm-article-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.csm-author-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.csm-article-meta-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #64748B;
}

.csm-meta-author-name {
  font-weight: 700;
  color: #0C1B3C;
}

.csm-meta-sep {
  color: #CBD5E1;
}

.csm-article-actions-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.csm-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: #FFFFFF;
  border: 1px solid #1E293B;
  border-radius: 50%;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.csm-action-btn:hover {
  background-color: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.csm-action-btn:hover svg {
  stroke: #1D4ED8;
}

.csm-action-save.is-saved svg {
  fill: #1D4ED8;
  stroke: #1D4ED8;
}

/* Botão Seguir no Google (Pill / Cápsula idêntico ao print) */
.csm-action-btn-google {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 38px;
  padding: 0 0.95rem;
  border-radius: 9999px;
  border: 1px solid #1E293B;
  background: #FFFFFF;
  color: #1E293B;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.csm-action-btn-google:hover {
  background-color: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.csm-action-btn-google svg {
  display: block;
  flex-shrink: 0;
}

/* ==========================================================================
   3. IMAGEM DESTACADA
   ========================================================================== */
.csm-article-featured-media {
  margin: 1.75rem 0 1.25rem;
}

.csm-featured-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  box-shadow: 0 4px 14px rgba(12, 27, 60, 0.06);
}

.csm-media-caption {
  font-size: 0.82rem;
  color: #94A3B8;
  margin-top: 0.5rem;
  text-align: center;
  font-style: italic;
}

/* Slot de Resposta Rápida (logo após a imagem destacada) */
.csm-quick-answer-slot {
  margin: 1.25rem 0 1.75rem;
}

.csm-quick-answer-slot:empty {
  margin: 0;
}

/* ==========================================================================
   4. ÍNDICE NAVEGÁVEL DINÂMICO (TOC - "NESTE ARTIGO" COMPACTO CONFORME MOCKUP)
   ========================================================================== */
.csm-toc-container {
  margin: 0.25rem 0 1rem;
  display: block;
}

.csm-toc-container.is-collapsed {
  display: block;
}

.csm-toc-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 0.6rem 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  user-select: none;
}

.csm-toc-toggle-btn:hover {
  background-color: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}

.csm-toc-icon {
  display: block;
  flex-shrink: 0;
}

.csm-toc-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0C1B3C;
  line-height: 1;
}

/* Quando aberto */
.csm-toc-container.is-open {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 16px rgba(12, 27, 60, 0.06);
  margin: 1rem 0 1.5rem;
}

.csm-toc-container.is-open .csm-toc-toggle-btn {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 0 1rem 0;
  border-radius: 0;
  border-bottom: 1px solid #E2E8F0;
  width: 100%;
}

.csm-toc-collapse-body {
  padding-top: 1rem;
}

.csm-toc-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: stretch;
  gap: 0;
}

.csm-toc-divider {
  background-color: #E2E8F0;
  width: 1px;
  height: auto;
  align-self: stretch;
  margin: 0.25rem 0;
}

.csm-toc-col {
  list-style-type: decimal;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.csm-toc-col-1 {
  padding: 0 2rem 0 1.25rem;
}

.csm-toc-col-2 {
  padding: 0 1.25rem 0 2.5rem;
}

.csm-toc-col li {
  line-height: 1.4;
  position: relative;
}

.csm-toc-col li a {
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.csm-toc-col li a:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

/* Botão Copiar Link do Capítulo (Tópico 4) */
.csm-toc-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 0.35rem;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #94A3B8;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
  position: relative;
}

.csm-toc-col li:hover .csm-toc-copy-btn,
.csm-toc-copy-btn:focus,
.csm-toc-copy-btn.is-copied {
  opacity: 1;
}

.csm-toc-copy-btn:hover {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #BFDBFE;
}

.csm-toc-copy-toast {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #0C1B3C;
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.csm-toc-copy-btn.is-copied .csm-toc-copy-toast {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-2px);
}

/* Espaçamento ajustado: subtítulo imediatamente após o TOC */
#csm-table-of-contents + h1,
#csm-table-of-contents + h2,
#csm-table-of-contents + h3,
.csm-toc-container + h1,
.csm-toc-container + h2,
.csm-toc-container + h3 {
  margin-top: 0.85rem !important;
}

/* ==========================================================================
   5. CORPO DO ARTIGO E TIPOGRAFIA DE LEITURA
   ========================================================================== */
.csm-article-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1E293B;
}

.csm-article-body p {
  margin-bottom: 1.25rem;
}

.csm-article-body h1 {
  font-family: var(--csm-font-editorial, Georgia, serif);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.28;
  margin: 2rem 0 0.85rem;
  color: #0C1B3C;
  scroll-margin-top: 85px;
}

.csm-article-body h2 {
  font-family: var(--csm-font-editorial, Georgia, serif);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.28;
  margin: 2rem 0 0.85rem;
  color: #0C1B3C;
  scroll-margin-top: 85px;
}

.csm-article-body h3 {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 1.75rem 0 0.75rem;
  color: #0C1B3C;
  scroll-margin-top: 85px;
}

.csm-article-body ul,
.csm-article-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1.4rem;
}

.csm-article-body li {
  margin-bottom: 0.45rem;
}

/* Links no corpo do artigo (com traço abaixo / sublinhado visível) */
.csm-article-body a {
  color: #1D4ED8;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: #1D4ED8;
  transition: color 0.15s ease, text-decoration-color 0.15s ease, text-decoration-thickness 0.15s ease;
}

.csm-article-body a:hover {
  color: #0C1B3C;
  text-decoration: underline;
  text-decoration-color: #0C1B3C;
  text-decoration-thickness: 2px;
}

.csm-article-body a:focus-visible {
  outline: 2px solid #1D4ED8;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Exceções: botões, imagens e componentes específicos que não devem ter traço permanente */
.csm-article-body a:has(img),
.csm-article-body .wp-block-image a,
.csm-article-body .wp-block-button__link,
.csm-article-body .wp-element-button,
.csm-article-body .csm-button,
.csm-article-body .csm-button-cta,
.csm-article-body .csm-mid-cta-btn,
.csm-article-body .csm-calc-wrapper a,
.csm-article-body .csm-action-btn,
.csm-article-body .csm-action-btn-google {
  text-decoration: none !important;
}

/* Índice de Leitura (TOC) - preserva navegação limpa sem traço forçado */
.csm-article-body .csm-toc-container a,
.csm-article-body .csm-toc-toggle-btn {
  text-decoration: none;
}

.csm-article-body .csm-toc-col li a {
  color: #334155;
  text-decoration: none;
}

.csm-article-body .csm-toc-col li a:hover {
  color: #1D4ED8;
  text-decoration: underline;
  text-decoration-color: #1D4ED8;
}

/* Box "Leia Também" Contextual */
.csm-article-body .csm-inline-related-link {
  color: #0C1B3C;
  text-decoration: none;
}

.csm-article-body .csm-inline-related-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
  text-decoration-color: #1D4ED8;
}

/* Citações e Blockquotes Editoriais */
.csm-article-body blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #1D4ED8;
  background-color: #F8FAFC;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #334155;
}

.csm-article-body blockquote p:last-child {
  margin-bottom: 0;
}


/* ==========================================================================
   6. CAIXAS EDITORIAIS E DESTAQUES (PADRÕES VISUAIS DO MOCKUP)
   ========================================================================== */

/* 6.1 Resposta Rápida (Fundo Azul Suave com Raio) */
.csm-box-quick-answer {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  position: relative;
}

.csm-box-quick-answer-title,
.csm-box-quick-answer h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #1D4ED8;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.csm-box-quick-answer-title::before,
.csm-box-quick-answer h3::before {
  content: '⚡';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #DBEAFE;
  font-size: 0.85rem;
  color: #1D4ED8;
}

.csm-box-quick-answer p {
  color: #1E3A8A;
  font-size: 0.94rem;
  line-height: 1.6;
  margin: 0;
}

/* 6.2 Principais Vantagens (Checklist Verde em 2 Colunas) */
.csm-box-advantages,
.csm-box-pros {
  background: #F0FDF4;
  border: 1px solid #DCFCE7;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

.csm-box-advantages-title,
.csm-pros-title,
.csm-box-advantages h3,
.csm-box-advantages h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #15803D;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.csm-box-advantages-title::before,
.csm-pros-title::before,
.csm-box-advantages h3::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #15803D;
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 900;
}

.csm-box-advantages ul,
.csm-box-pros ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.5rem;
}

.csm-box-advantages li,
.csm-box-pros li {
  font-size: 0.88rem;
  color: #166534;
  position: relative;
  padding-left: 1.25rem;
  margin: 0;
  line-height: 1.45;
}

.csm-box-advantages li::before,
.csm-box-pros li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #16A34A;
  font-weight: 900;
}

.csm-box-advantages a,
.csm-box-pros a {
  color: #15803D;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: #15803D;
}

.csm-box-advantages a:hover,
.csm-box-pros a:hover {
  color: #166534;
  text-decoration-color: #166534;
}

/* 6.3 Caixa Atenção / Alerta (Vermelha) */
.csm-box-alert {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

.csm-box-alert-title,
.csm-box-alert h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #DC2626;
  margin: 0 0 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.csm-box-alert-title::before,
.csm-box-alert h3::before {
  content: '⚠';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FEE2E2;
  color: #DC2626;
  font-size: 0.85rem;
  font-weight: 900;
}

.csm-box-alert p {
  font-size: 0.88rem;
  color: #7F1D1D;
  line-height: 1.55;
  margin: 0;
}

.csm-box-alert a {
  color: #DC2626;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: #DC2626;
}

.csm-box-alert a:hover {
  color: #7F1D1D;
  text-decoration-color: #7F1D1D;
}


/* 6.4 Tabelas Dentro do Artigo com Scroll Horizontal Responsivo */
.csm-table-scroll-wrap {
  position: relative;
  margin: 1.75rem 0 1rem;
}

.csm-table-scroll-hint {
  display: none;
  text-align: right;
  margin-bottom: 0.35rem;
}

.csm-table-scroll-hint span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748B;
  background: #F1F5F9;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
}

@media (max-width: 768px) {
  .csm-table-scroll-hint {
    display: block;
  }
}

.csm-table-inner {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}

.csm-article-body table,
.wp-block-table table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
}

.csm-article-body th,
.wp-block-table th {
  background-color: #EFF6FF;
  color: #1E40AF;
  font-weight: 700;
  padding: 0.65rem 1rem;
  border: 1px solid #DBEAFE;
  text-align: left;
}

.csm-article-body td,
.wp-block-table td {
  padding: 0.65rem 1rem;
  border: 1px solid #E2E8F0;
  color: #1E293B;
}

.csm-article-body tr:nth-child(even) td,
.wp-block-table.is-style-stripes tr:nth-child(even) td {
  background-color: #F8FAFC;
}

.wp-element-caption,
figcaption {
  font-size: 0.74rem;
  color: #94A3B8;
  margin-top: 0.35rem;
}

/* 6.5 Calculadora de Transferência Bonificada Inline no Artigo */
.csm-calc-wrapper {
  background-color: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.csm-calc-header {
  margin-bottom: 1rem;
}

.csm-calc-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0C1B3C;
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.csm-calc-subtitle {
  font-size: 0.82rem;
  color: #64748B;
  margin: 0;
}

.csm-calc-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.csm-calc-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr auto;
  gap: 0.75rem;
  align-items: flex-end;
}

.csm-calc-field label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  display: block;
  margin-bottom: 0.3rem;
}

.csm-calc-field input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  background: #FFFFFF;
  font-size: 0.88rem;
  color: #0F172A;
  box-sizing: border-box;
}

.csm-calc-btn-primary {
  background: #FF6B00;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  height: 40px;
  transition: background-color 0.15s ease;
  white-space: nowrap;
}

.csm-calc-btn-primary:hover {
  background-color: #E05A00;
}

.csm-calc-results {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #DBEAFE;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.csm-calc-total-wrap {
  display: flex;
  flex-direction: column;
}

.csm-calc-total-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748B;
}

.csm-calc-total-val {
  font-size: 1.4rem;
  font-weight: 900;
  color: #0C1B3C;
}

.csm-calc-disclaimer {
  font-size: 0.74rem;
  color: #64748B;
  max-width: 320px;
  line-height: 1.4;
  margin: 0;
}

/* 6.6 CTA de Meio de Artigo (Bankmilhas - Tópico 2) */
.csm-mid-article-cta {
  background: linear-gradient(135deg, #0C1B3C 0%, #1E3A8A 100%);
  border-radius: 14px;
  padding: 1.85rem 2rem;
  margin: 2.5rem 0;
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(12, 27, 60, 0.12);
  position: relative;
  overflow: hidden;
}

.csm-mid-article-cta::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.csm-mid-cta-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #FACC15;
  background: rgba(250, 204, 21, 0.16);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.csm-mid-cta-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
}

.csm-mid-cta-desc {
  font-size: 0.95rem;
  color: #CBD5E1;
  line-height: 1.55;
  margin: 0 0 1.25rem 0;
}

.csm-mid-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #FACC15;
  color: #0C1B3C;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.75rem 1.65rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
}

.csm-mid-cta-btn:hover {
  background: #FDE047;
  color: #0C1B3C;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(250, 204, 21, 0.4);
}

/* 6.7 Recomendação Contextual Inline ("Leia Também" - Tópico 3) */
.csm-inline-related {
  background: #F8FAFC;
  border-left: 4px solid #1D4ED8;
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.35rem;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.csm-inline-related-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: #1D4ED8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.csm-inline-related-link {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0C1B3C;
  text-decoration: none;
  transition: color 0.15s ease;
  line-height: 1.35;
}

.csm-inline-related-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

/* 6.8 Box de Captura Alertas de Milhas (Tópico 3) */
.csm-article-newsletter-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 2rem;
  margin: 2.75rem 0 2rem;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.csm-art-newsletter-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.csm-art-newsletter-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  color: #2563EB;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #EFF6FF;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.csm-art-newsletter-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0C1B3C;
  margin: 0.45rem 0 0.4rem;
  line-height: 1.3;
}

.csm-art-newsletter-desc {
  font-size: 0.92rem;
  color: #64748B;
  margin: 0;
  line-height: 1.55;
}

.csm-art-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.csm-art-newsletter-input-group {
  display: flex;
  gap: 0.5rem;
}

.csm-art-newsletter-input {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: #0C1B3C;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.csm-art-newsletter-input:focus {
  border-color: #1D4ED8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.csm-art-newsletter-btn {
  background: #1D4ED8;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.csm-art-newsletter-btn:hover {
  background: #1E40AF;
}

.csm-art-newsletter-note {
  font-size: 0.75rem;
  color: #94A3B8;
}

/* ==========================================================================
   7. SIDEBAR LATERAL (WIDGETS REPLICANDO O MOCKUP)
   ========================================================================== */
.csm-article-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.csm-sidebar-widget {
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 1.35rem;
  box-shadow: 0 1px 4px rgba(12, 27, 60, 0.04);
}

/* Widget 1: Valor das Milhas Hoje */
.csm-widget-quotes-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.csm-widget-icon-bars {
  flex-shrink: 0;
  margin-top: 2px;
}

.csm-widget-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0C1B3C;
  margin: 0 0 0.2rem;
  letter-spacing: -0.01em;
}

.csm-widget-desc {
  font-size: 0.74rem;
  color: #64748B;
  margin: 0;
  line-height: 1.35;
}

.csm-sidebar-quotes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.csm-sidebar-quotes-table th {
  background-color: #F8FAFC;
  color: #64748B;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #E2E8F0;
  text-align: left;
}

.csm-sidebar-quotes-table td {
  padding: 0.6rem 0.65rem;
  border-bottom: 1px solid #F1F5F9;
  color: #0C1B3C;
  font-weight: 600;
}

.csm-sidebar-quotes-table tr:last-child td {
  border-bottom: none;
}

.csm-side-prog-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.csm-side-prog-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.csm-btn-orange {
  display: inline-block;
  background-color: #FF6B00;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.csm-btn-orange:hover {
  background-color: #E05A00;
  transform: translateY(-1px);
}

.csm-btn-full {
  width: 100%;
  box-sizing: border-box;
}

/* Widget 2: Mais Lidas */
.csm-widget-popular-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.csm-widget-popular-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.csm-widget-more-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1D4ED8;
  text-decoration: none;
}

.csm-widget-more-link:hover {
  text-decoration: underline;
}

.csm-sidebar-ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.csm-sidebar-ranking-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #F1F5F9;
}

.csm-sidebar-ranking-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.csm-sidebar-rank-thumb-link {
  position: relative;
  width: 76px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  display: block;
  background-color: #E2E8F0;
}

.csm-sidebar-rank-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.csm-sidebar-ranking-item:hover .csm-sidebar-rank-thumb {
  transform: scale(1.08);
}

.csm-sidebar-rank-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.csm-sidebar-rank-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  background-color: #1D4ED8;
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  line-height: 1;
}

.csm-sidebar-rank-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.csm-sidebar-rank-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1E293B;
  text-decoration: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.csm-sidebar-rank-title:hover {
  color: #1D4ED8;
}

.csm-sidebar-rank-date {
  font-size: 0.72rem;
  color: #94A3B8;
  font-weight: 500;
}

/* Widgets 3 e 4: Banners Oficiais na Sidebar (Bankmilhas e Viaza) */
.csm-widget-banner-debora,
.csm-widget-banner-viaza {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 10px;
  overflow: hidden;
}

.csm-banner-debora-link,
.csm-banner-sidebar-link {
  display: block;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(11, 18, 38, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  line-height: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.csm-banner-debora-link:hover,
.csm-banner-sidebar-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11, 18, 38, 0.22);
}

.csm-banner-debora-img,
.csm-banner-sidebar-img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  transition: filter 0.25s ease;
}

.csm-banner-debora-link:hover .csm-banner-debora-img,
.csm-banner-sidebar-link:hover .csm-banner-sidebar-img {
  filter: brightness(1.02);
}

/* ==========================================================================
   8. E-E-A-T: BOX DO AUTOR E ARTIGOS RELACIONADOS
   ========================================================================== */
.csm-author-bio-box {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 2.5rem 0;
}

.csm-author-bio-avatar {
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

.csm-bio-img {
  border-radius: 50%;
  display: block;
}

.csm-author-bio-content h4 {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0C1B3C;
  margin: 0 0 0.2rem;
}

.csm-author-bio-role {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: #1D4ED8;
  margin-bottom: 0.5rem;
}

.csm-author-bio-desc {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 0.75rem;
}

.csm-author-bio-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1D4ED8;
  text-decoration: none;
}

.csm-author-bio-link:hover {
  text-decoration: underline;
}

/* Artigos Relacionados */
.csm-related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #E2E8F0;
}

.csm-related-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0C1B3C;
  margin: 0 0 1.25rem;
}

.csm-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.csm-related-card {
  display: flex;
  flex-direction: column;
}

.csm-related-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  margin-bottom: 0.65rem;
  background-color: #E2E8F0;
}

.csm-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.csm-related-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1E3A8A 0%, #EA580C 100%);
}

.csm-related-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0C1B3C;
  margin: 0 0 0.35rem;
}

.csm-related-card-title a {
  color: inherit;
  text-decoration: none;
}

.csm-related-card-title a:hover {
  color: #1D4ED8;
}

.csm-related-time {
  font-size: 0.72rem;
  color: #94A3B8;
}

/* ==========================================================================
   9. RESPONSIVIDADE (TABLETS E SMARTPHONES)
   ========================================================================== */
@media (max-width: 1024px) {
  .csm-article-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .csm-article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .csm-widget-cta-quote {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .csm-article-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .csm-article-sidebar {
    grid-template-columns: 1fr;
  }

  .csm-widget-cta-quote,
  .csm-widget-banner-debora,
  .csm-widget-banner-viaza {
    grid-column: span 1;
  }

  .csm-toc-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .csm-toc-divider {
    display: none;
  }

  .csm-toc-col-1,
  .csm-toc-col-2 {
    padding: 0 0 0 1.25rem;
  }

  .csm-box-advantages ul,
  .csm-box-pros ul {
    grid-template-columns: 1fr;
  }

  .csm-calc-row {
    grid-template-columns: 1fr;
  }

  .csm-related-grid {
    grid-template-columns: 1fr;
  }

  /* Tópico 4: Botão de cópia sempre visível em touch */
  .csm-toc-copy-btn {
    opacity: 0.7;
  }

  /* Tópico 2: CTA de Meio de Artigo responsivo */
  .csm-mid-article-cta {
    padding: 1.35rem;
    margin: 1.75rem 0;
  }

  .csm-mid-cta-title {
    font-size: 1.15rem;
  }

  .csm-mid-cta-btn {
    width: 100%;
    text-align: center;
  }

  /* Tópico 3: Box Alertas responsivo no artigo */
  .csm-article-newsletter-box {
    padding: 1.35rem;
    margin: 2rem 0;
  }

  .csm-art-newsletter-input-group {
    flex-direction: column;
  }

  .csm-art-newsletter-btn {
    width: 100%;
  }
}
