/* ==========================================================================
   DINHEIRO & FINANÇA - ESTILO OFICIAL INFOMONEY / IMPRENSA FINANCEIRA
   Design sóbrio, tradicional, 100% responsivo, alta legibilidade e performance.
   ========================================================================== */

:root {
  --bg-body: #F8F9FA;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --primary-black: #000000;
  --primary-navy: #0A2540;
  --brand-red: #DC2626;
  --brand-green: #16A34A;
  --brand-green-bg: #DCFCE7;
  --brand-amber: #D97706;
  --brand-amber-bg: #FEF3C7;
  
  --border-color: #E2E8F0;
  --border-dark: #334155;
  
  --font-serif: "Merriweather", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--brand-red);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   1. FITA DE COTAÇÕES (MARKET TICKER DO TOPO)
   ========================================================================== */
.top-ticker-bar {
  background-color: #0A0F1D;
  color: #F8FAFC;
  font-size: 12px;
  border-bottom: 1px solid #1E293B;
  overflow-x: auto;
  white-space: nowrap;
}
.ticker-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
}
.ticker-items {
  display: flex;
  align-items: center;
  gap: 20px;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.ticker-symbol {
  color: #94A3B8;
  font-weight: 700;
}
.badge-up {
  color: #4ADE80;
  font-weight: 700;
}
.badge-down {
  color: #F87171;
  font-weight: 700;
}
.ticker-date {
  color: #64748B;
  font-size: 11px;
}

/* ==========================================================================
   2. CABEÇALHO E LOGO OFICIAL PRETO
   ========================================================================== */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-svg-img {
  height: 48px;
  width: auto;
  display: block;
}
.header-market-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.market-status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--brand-green);
  border-radius: 50%;
  display: inline-block;
}

/* Barra de Destaques "Em Alta Hoje" (InfoMoney Style) */
.trending-bar {
  background-color: #F8FAFC;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 12px;
  overflow-x: auto;
  white-space: nowrap;
}
.trending-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trending-badge {
  background-color: var(--brand-red);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.5px;
}
.trending-items {
  display: flex;
  gap: 16px;
  color: var(--text-muted);
}
.trending-items a {
  color: var(--text-main);
  font-weight: 600;
}
.trending-items a:hover {
  color: var(--brand-red);
  text-decoration: underline;
}

/* ==========================================================================
   3. BARRA DE NAVEGAÇÃO DE CATEGORIAS
   ========================================================================== */
.nav-categories {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 2px solid var(--primary-black);
}
.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 26px;
  overflow-x: auto;
  white-space: nowrap;
}
.nav-item a {
  display: block;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-main);
  position: relative;
}
.nav-item a.active, .nav-item a:hover {
  color: var(--brand-red);
}
.nav-item a.highlight-calc {
  color: var(--brand-green);
}

/* Breadcrumbs (Trilhas de Navegação para SEO) */
.breadcrumb-trail {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
}
.breadcrumb-trail a {
  color: #0A2540;
  font-weight: 600;
}
.breadcrumb-trail a:hover {
  color: var(--brand-red);
}
.breadcrumb-trail span {
  color: var(--text-main);
  font-weight: 700;
}

/* ==========================================================================
   4. DESTAQUES DA HOME & CALCULADORA INTEGRADA
   ========================================================================== */
.hero-portal {
  padding: 24px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Card da Calculadora Estilo Simulador Oficial */
.calculator-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.calc-header {
  border-bottom: 2px solid var(--primary-black);
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.calc-badge {
  display: inline-block;
  background-color: var(--brand-green-bg);
  color: var(--brand-green);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}
.calc-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary-black);
  line-height: 1.3;
}
.calc-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.calc-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.calc-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 5px;
}
.calc-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}
.calc-input:focus {
  border-color: var(--primary-black);
}

.btn-calc {
  width: 100%;
  background-color: #0A2540;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn-calc:hover {
  background-color: #000000;
}

/* Resultados da Calculadora */
.calc-result-box {
  background-color: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 18px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border-color);
}
.result-row:last-child {
  border-bottom: none;
}
.result-label {
  color: var(--text-muted);
}
.result-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
}
.result-row.total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 2px solid var(--primary-black);
}
.result-row.total .result-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-black);
}
.result-row.total .result-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-green);
}

/* Barra Visual de Proporção Investimento vs Juros */
.calc-visual-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin: 14px 0 8px;
  background-color: #E2E8F0;
}
.calc-bar-invested {
  background-color: #0A2540;
  transition: width 0.3s ease;
}
.calc-bar-interest {
  background-color: var(--brand-green);
  transition: width 0.3s ease;
}
.calc-bar-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.legend-dot-invested {
  color: #0A2540;
  font-weight: 700;
}
.legend-dot-interest {
  color: var(--brand-green);
  font-weight: 700;
}

.passive-income-alert {
  background-color: var(--brand-green-bg);
  border: 1px solid #86EFAC;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 12px;
  color: #14532D;
  margin-top: 12px;
  text-align: center;
}

/* Notícia Principal / Hero Editorial */
.lead-story {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}
.lead-tag {
  color: var(--brand-red);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}
.lead-headline {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--primary-black);
  margin-bottom: 12px;
}
.lead-headline a:hover {
  color: var(--brand-red);
}
.lead-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.lead-meta {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
}

/* ==========================================================================
   5. GRADE DE NOTÍCIAS & ARTIGOS (ESTILO INFOMONEY)
   ========================================================================== */
.section-news {
  padding: 30px 0 50px;
}
.section-news-header {
  border-bottom: 2px solid var(--primary-black);
  padding-bottom: 8px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.section-news-title {
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-black);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.news-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.news-cat-tag {
  color: var(--brand-red);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.news-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--primary-black);
  margin-bottom: 8px;
  flex-grow: 1;
}
.news-title a:hover {
  color: var(--brand-red);
}
.news-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.news-read-more {
  font-size: 12px;
  font-weight: 700;
  color: #0A2540;
}
.news-read-more:hover {
  color: var(--brand-red);
}

/* ==========================================================================
   6. PÁGINA DE ARTIGO / LEITURA (SEO-OPTIMIZED)
   ========================================================================== */
.article-container {
  max-width: 840px;
  margin: 20px auto 50px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px 32px;
}
.article-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 28px;
}
.article-tag {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 8px;
}
.article-headline {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--primary-black);
  margin-bottom: 14px;
}
.article-byline {
  font-size: 12px;
  color: var(--text-muted);
}

.article-content {
  font-size: 16px;
  line-height: 1.8;
  color: #1E293B;
}
.article-content p {
  margin-bottom: 20px;
}
.article-content h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 900;
  color: var(--primary-black);
  margin: 32px 0 14px;
}
.article-content h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-black);
  margin: 24px 0 10px;
}
.article-content ul, .article-content ol {
  margin: 16px 0 24px 24px;
}
.article-content li {
  margin-bottom: 8px;
}

/* Card de Autor do Artigo (E-E-A-T Google) */
.article-author-card {
  margin-top: 36px;
  padding: 20px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
}
.author-avatar {
  width: 54px;
  height: 54px;
  background: var(--primary-black);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
  flex-shrink: 0;
}
.author-info h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-black);
}
.author-info p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 4px;
  margin-bottom: 0;
}

/* Seção de Artigos Relacionados */
.related-articles-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--primary-black);
}
.related-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary-black);
  margin-bottom: 16px;
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Tabela de Evolução da Calculadora */
.table-responsive {
  overflow-x: auto;
  margin: 24px 0;
}
.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: right;
}
.calc-table th {
  background-color: #0A0F1D;
  color: #FFFFFF;
  padding: 10px 12px;
  font-weight: 700;
}
.calc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}
.calc-table tr:nth-child(even) {
  background-color: #F8FAFC;
}
.calc-table th:first-child, .calc-table td:first-child {
  text-align: left;
}

/* Newsletter / Boletim Informativo */
.newsletter-card {
  background: #0A0F1D;
  color: #FFFFFF;
  padding: 30px;
  border-radius: var(--radius-md);
  margin: 40px 0 20px;
  text-align: center;
}
.newsletter-card h3 {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 6px;
}
.newsletter-card p {
  font-size: 13px;
  color: #94A3B8;
  max-width: 600px;
  margin: 0 auto 18px;
}
.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 8px;
}
.newsletter-input {
  flex-grow: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
  background: #1E293B;
  color: #FFFFFF;
  font-size: 13px;
  outline: none;
}
.newsletter-btn {
  background-color: var(--brand-green);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.newsletter-btn:hover {
  background-color: #15803D;
}

/* ==========================================================================
   7. RODAPÉ E BOTÃO DE VENDA DO DOMÍNIO
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: #0A0F1D;
  color: #94A3B8;
  border-top: 3px solid var(--primary-black);
  padding: 40px 0 30px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1E293B;
  padding-bottom: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo-text {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #FFFFFF;
}
.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  flex-wrap: wrap;
}
.footer-links a {
  color: #CBD5E1;
}
.footer-links a:hover {
  color: #FFFFFF;
}

.footer-domain-sale {
  text-align: center;
  padding: 20px 0 10px;
}
.btn-domain-sale {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #1E293B;
  color: #FBBF24;
  border: 1px solid #475569;
  font-size: 13px;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-domain-sale:hover {
  background-color: #334155;
  border-color: #FBBF24;
  color: #FFFFFF;
  transform: translateY(-1px);
}
.footer-copyright {
  text-align: center;
  font-size: 11px;
  color: #64748B;
  margin-top: 16px;
}

/* ==========================================================================
   8. MODAL DE PROPOSTA DE COMPRA (100% BLINDADO)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.modal-overlay.active {
  display: flex;
}
.modal-window {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  max-width: 520px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-close-btn:hover {
  color: var(--primary-black);
}
.modal-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary-black);
  margin-bottom: 6px;
}
.modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: var(--font-sans);
}
.form-control:focus {
  border-color: var(--primary-black);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.btn-submit-proposal {
  width: 100%;
  background-color: var(--brand-green);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 8px;
  transition: background-color 0.15s ease;
}
.btn-submit-proposal:hover {
  background-color: #15803D;
}
.alert-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.alert-box.success {
  background-color: var(--brand-green-bg);
  border: 1px solid #86EFAC;
  color: #14532D;
  display: block;
}
.alert-box.error {
  background-color: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  display: block;
}

/* ==========================================================================
   RESPONSIVIDADE (MOBILE-FIRST)
   ========================================================================== */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .calc-fields-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .newsletter-form {
    flex-direction: column;
  }
}

/* ==========================================================================
   9. BOTÃO FLUTUANTE DE PROPOSTA DE DOMÍNIO (DISCRETO & CONVERSOR)
   ========================================================================== */
.floating-domain-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  background-color: #0A0F1D;
  color: #FBBF24;
  border: 1px solid #334155;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.floating-domain-btn:hover {
  transform: translateY(-2px);
  background-color: #1E293B;
  border-color: #FBBF24;
  color: #FFFFFF;
}

/* ==========================================================================
   10. ESTILOS DE IMPRESSÃO / SALVAR EM PDF (@media print)
   ========================================================================== */
@media print {
  .top-ticker-bar, .trending-bar, .nav-categories, .site-footer, 
  .floating-domain-btn, .modal-overlay, .btn-calc, button {
    display: none !important;
  }
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .calculator-card {
    border: 1px solid #000000 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}

