/* ============================================
   Area de Conteudos — CSS especifico
   Usado por: conteudos/index.html e conteudos/posts/*.html
   ============================================ */

/* ── Hero (artigo em destaque) ── */
.articles-hero {
  background: #13161b; border: 1px solid #1e2128; border-radius: 10px;
  overflow: hidden; margin-bottom: 2rem;
  display: grid; grid-template-columns: 1.3fr 1fr;
  transition: transform 0.15s, border-color 0.15s;
  text-decoration: none; color: inherit;
}
.articles-hero:hover { transform: translateY(-2px); border-color: #2a3142; }
.articles-hero-thumb {
  min-height: 280px;
  position: relative; overflow: hidden;
}
.articles-hero-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.articles-hero-thumb.is-fallback {
  background: linear-gradient(135deg, #1a1f29 0%, #0d0f12 60%, rgba(200,240,74,0.15) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 4rem;
  color: rgba(200,240,74,0.35); letter-spacing: -2px;
}
.articles-hero-body { padding: 2rem 2.25rem; display: flex; flex-direction: column; justify-content: center; }
.articles-hero-tag {
  font-family: 'DM Mono', monospace; font-size: 0.68rem;
  color: #c8f04a; letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.articles-hero-title {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 2rem;
  line-height: 1.15; color: #eceef1; margin-bottom: 0.85rem;
}
.articles-hero-lead {
  font-size: 1rem; line-height: 1.55; color: #9ca3af; margin-bottom: 1.25rem;
}
.articles-hero-meta {
  font-family: 'DM Mono', monospace; font-size: 0.72rem;
  color: #6b7280; letter-spacing: 0.04em;
}

/* ── Grid de cards ── */
.articles-section-title {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.1rem;
  color: #eceef1; margin: 2.5rem 0 1rem;
  padding-bottom: 0.6rem; border-bottom: 1px solid #1e2128;
}
.articles-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.article-card {
  background: #13161b; border: 1px solid #1e2128; border-radius: 8px;
  overflow: hidden; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform 0.15s, border-color 0.15s;
}
.article-card:hover { transform: translateY(-2px); border-color: #2a3142; }
.article-card-thumb {
  height: 160px;
  position: relative; overflow: hidden;
}
.article-card-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.article-card-thumb.is-fallback {
  background: linear-gradient(135deg, #1a1f29 0%, #0d0f12 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 2.4rem;
  color: rgba(200,240,74,0.3); letter-spacing: -1px;
}
.article-card-body { padding: 1.1rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.article-card-tag {
  font-family: 'DM Mono', monospace; font-size: 0.6rem;
  color: #c8f04a; letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.article-card-title {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.05rem;
  line-height: 1.25; color: #eceef1; margin-bottom: 0.5rem;
}
.article-card-lead {
  font-size: 0.82rem; line-height: 1.5; color: #9ca3af;
  margin-bottom: 0.85rem; flex: 1;
}
.article-card-meta {
  font-family: 'DM Mono', monospace; font-size: 0.65rem;
  color: #6b7280; letter-spacing: 0.04em;
  padding-top: 0.65rem; border-top: 1px solid #1e2128;
}

/* ── Empty state ── */
.articles-empty {
  text-align: center; padding: 4rem 2rem; color: #6b7280;
  font-family: 'DM Mono', monospace; font-size: 0.85rem;
}

/* ============================================
   Pagina de artigo individual (texto longo)
   ============================================ */
.article-body {
  max-width: 860px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem;
}
.article-body .article-cover {
  margin: 0 0 2rem; padding: 0;
  border-radius: 10px; overflow: hidden;
  background: #13161b; border: 1px solid #1e2128;
  aspect-ratio: 16 / 9;
  position: relative; left: 50%; transform: translateX(-50%);
  width: min(1200px, calc(100vw - 3rem));
  max-width: none;
}
.article-body .article-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.article-body .article-meta-top {
  font-family: 'DM Mono', monospace; font-size: 0.7rem;
  color: #6b7280; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.article-body .article-meta-top .tag {
  color: #c8f04a; margin-right: 0.75rem;
}
.article-body h1 {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: clamp(1.65rem, 2.2vw + 1rem, 2.35rem);
  line-height: 1.12; color: #eceef1; margin-bottom: 1.25rem;
  letter-spacing: -0.8px;
  text-wrap: balance;
}
.article-body .lead {
  font-size: clamp(1rem, 0.4vw + 0.95rem, 1.22rem);
  line-height: 1.55; color: #d1d5db;
  margin-bottom: 2rem; font-weight: 400;
  text-wrap: pretty;
}
.article-body .byline {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 0; border-top: 1px solid #1e2128; border-bottom: 1px solid #1e2128;
  font-family: 'DM Mono', monospace; font-size: 0.72rem; color: #6b7280;
  margin-bottom: 2rem;
}
.article-body .byline strong { color: #eceef1; font-weight: 600; }
.article-body .byline .sep { color: #3a4050; }
.article-body h2 {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: clamp(1.2rem, 0.8vw + 1rem, 1.5rem);
  color: #eceef1; margin: 2.5rem 0 0.85rem;
  text-wrap: balance;
}
.article-body h3 {
  font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: clamp(1.05rem, 0.4vw + 0.95rem, 1.15rem);
  color: #eceef1; margin: 1.75rem 0 0.65rem;
}
.article-body p {
  font-size: clamp(0.95rem, 0.2vw + 0.9rem, 1.02rem);
  line-height: 1.72; color: #d1d5db;
  margin-bottom: 1.25rem;
}
.article-body p a { color: #c8f04a; text-decoration: none; border-bottom: 1px solid rgba(200,240,74,0.3); }
.article-body p a:hover { border-bottom-color: #c8f04a; }
.article-body strong { color: #eceef1; font-weight: 600; }
.article-body ul, .article-body ol { margin: 0 0 1.25rem 1.5rem; color: #d1d5db; }
.article-body li { margin-bottom: 0.4rem; line-height: 1.65; }

/* Pull quote (destaque) */
.article-body .pull-quote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid #c8f04a;
  font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: clamp(1.05rem, 0.8vw + 0.9rem, 1.35rem);
  line-height: 1.35; color: #eceef1;
  text-wrap: balance;
}

/* Chart wrapper — breakout editorial (mais largo que o texto) */
.article-body .chart-wrap {
  background: #13161b; border: 1px solid #1e2128; border-radius: 8px;
  padding: 1.5rem; margin: 2rem 0;
  position: relative; left: 50%; transform: translateX(-50%);
  width: min(1200px, calc(100vw - 3rem));
  max-width: none;
  box-sizing: border-box;
}
/* Inner box com altura fixa: evita loop infinito do Chart.js (responsive + maintainAspectRatio:false) */
.article-body .chart-wrap .chart-canvas {
  position: relative;
  height: 380px;
  width: 100%;
}
.article-body .chart-caption {
  font-family: 'DM Mono', monospace; font-size: 0.72rem;
  color: #6b7280; margin-top: 0.85rem; line-height: 1.5;
}
.article-body .chart-caption strong { color: #9ca3af; }

/* Data table inside article */
.article-body .data-table-wrap {
  background: #13161b; border: 1px solid #1e2128; border-radius: 8px;
  overflow-x: auto; margin: 1.5rem 0;
}
.article-body .data-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.article-body .data-table thead th {
  padding: 12px 14px; font-family: 'DM Mono', monospace;
  font-size: 0.68rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.06em; color: #6b7280; text-align: left;
  border-bottom: 1px solid #1e2128; background: #13161b;
}
.article-body .data-table tbody td {
  padding: 10px 14px; border-bottom: 1px solid #1a1d22;
  color: #d1d5db; font-variant-numeric: tabular-nums;
}
.article-body .data-table tbody tr:last-child td { border-bottom: none; }
.article-body .data-table tbody tr:hover td { background: #181c24; }
.article-body .data-table td.num { font-family: 'DM Mono', monospace; text-align: right; }
.article-body .data-table td.highlight { color: #c8f04a; font-weight: 600; }

/* Footer CTA (navegacao apos artigo) */
.article-footer-cta {
  max-width: 860px; margin: 2rem auto 0; padding: 2rem 1.5rem;
  border-top: 1px solid #1e2128;
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'DM Mono', monospace; font-size: 0.78rem;
}
.article-footer-cta a {
  color: #9ca3af; text-decoration: none; padding: 0.5rem 0;
  border-bottom: 1px solid transparent; transition: color 0.15s, border-color 0.15s;
}
.article-footer-cta a:hover { color: #c8f04a; border-bottom-color: #c8f04a; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .articles-hero { grid-template-columns: 1fr; }
  .articles-hero-thumb { min-height: 160px; font-size: 2.5rem; }
  .articles-hero-body { padding: 1.25rem 1.25rem 1.5rem; }
  .articles-hero-title { font-size: 1.4rem; }
  .articles-hero-lead { font-size: 0.88rem; }
  .articles-grid { grid-template-columns: 1fr; gap: 0.85rem; }
  .article-card-thumb { height: 120px; font-size: 1.8rem; }
  .article-card-body { padding: 0.85rem 1rem; }
  .article-card-title { font-size: 0.95rem; }
  .article-card-lead { font-size: 0.78rem; }
  .articles-section-title { font-size: 0.95rem; margin: 1.5rem 0 0.85rem; }

  /* Artigo */
  .article-body { padding: 1.5rem 1rem 2rem; }
  .article-body h2 { margin: 1.75rem 0 0.6rem; }
  .article-body .pull-quote { font-size: clamp(1.05rem, 0.5vw + 0.9rem, 1.35rem); padding: 0.75rem 1rem; }
  .article-body .chart-wrap { padding: 1rem; margin: 1.5rem 0; }
  .article-body .chart-wrap .chart-canvas { height: 280px; }
  .article-body .data-table { font-size: 0.75rem; }
  .article-body .data-table thead th { padding: 8px 10px; font-size: 0.6rem; }
  .article-body .data-table tbody td { padding: 7px 10px; }
  .article-footer-cta { padding: 1.5rem 1rem; flex-direction: column; gap: 0.75rem; align-items: flex-start; }
}
