/* ==========================================================================
   Syny Articles Custom Stylesheet (artigos.css)
   Fiel à identidade visual da Syny (Tags Verde Limão, H1/H2 brancos e bold,
   parágrafos acinzentados com entrelinha elegante e cards modernos).
   ========================================================================== */

/* --- Container e Estrutura dos Artigos --- */

hr {
  border: none !important;
  margin: 10px 0;
}

.artigos-page-body {
  background-color: var(--bg);
  color: var(--fg);
}

.article-container {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) var(--pad-x);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
}

/* --- Cabeçalho do Artigo --- */
.article-header {
  margin-bottom: 40px;
  text-align: left;
}

/* Tag Verde Limão (idêntica ao anexo: MONITORAMENTO DE RESERVATÓRIOS) */
.article-tag {
  display: inline-block;
  color: var(--accent);
  /* #93bf00 */
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

/* Título H1 do Artigo (idêntico ao anexo: "Nível sob controle, alertas antes do vazamento.") */
.article-title {
  font-size: clamp(32px, 5.2vw, 56px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin: 0 0 20px 0;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.article-hero-image {
  margin-top: 8px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--glow-soft);
}

.article-hero-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}


/* --- Corpo do Texto do Artigo --- */
.article-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.7;
  color: #a0a0a0;
  /* Tom acinzentado suave fiel ao print fornecido */
  font-weight: 400;
}

.article-body p {
  margin-top: 0;
  margin-bottom: 1.8rem;
  color: #a0a0a0;
}

.article-body h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--fg);
  /* Branco puro */
  margin-top: 2.8rem;
  margin-bottom: 1.2rem;
}

.article-body h3 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg);
  margin-top: 2.2rem;
  margin-bottom: 1rem;
}

.article-body strong {
  color: var(--fg);
  font-weight: 600;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.article-body a:hover {
  color: var(--accent-hover);
}

.article-body ul,
.article-body ol {
  margin-top: 0;
  margin-bottom: 1.8rem;
  padding-left: 1.6rem;
}

.article-body li {
  margin-bottom: 0.8rem;
  color: #c0c0c0;
  line-height: 1.65;
}

.article-body li strong {
  color: var(--fg);
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  padding: 20px 24px;
  margin: 2.4rem 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.article-body blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--fg);
  font-size: 1.1rem;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-md);
  margin: 2rem 0;
  border: 1px solid var(--border);
}

/* --- Tabelas nos Artigos --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 2.2rem 0;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-1);
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.table-responsive th,
.table-responsive td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.table-responsive th {
  background: var(--surface-2);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border-bottom: 2px solid var(--border-strong);
}

.table-responsive tr:last-child td {
  border-bottom: none;
}

.table-responsive td {
  color: #c0c0c0;
  line-height: 1.5;
}

.table-responsive td:first-child {
  color: var(--fg);
  font-weight: 600;
}

.table-responsive tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* --- Box de CTA no final do artigo --- */
.article-cta {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 44px);
  margin-top: 56px;
  text-align: center;
  box-shadow: var(--glow-soft);
}

.article-cta h3 {
  color: var(--fg);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 12px;
}

.article-cta p {
  color: var(--fg-muted);
  font-size: 1rem;
  margin-bottom: 24px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Estilos do Grid / Listagem em /artigos --- */
.articles-hero {
  padding: clamp(48px, 8vw, 80px) var(--pad-x) clamp(32px, 5vw, 48px);
  text-align: center;
  background: radial-gradient(circle at top center, rgba(147, 191, 0, 0.12), transparent 70%);
  border-bottom: 1px solid var(--border);
}

.articles-hero .badge {
  display: inline-block;
  color: var(--accent);
  border: 1px solid rgba(147, 191, 0, 0.3);
  background: rgba(147, 191, 0, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.articles-hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0;
}

.articles-grid-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) var(--pad-x);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.article-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--glow-soft);
}

.article-card-image {
  margin: -24px -24px 20px -24px;
  border-radius: var(--r-md) var(--r-md) 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.article-card-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .article-card-image img {
  transform: scale(1.03);
}

.article-card-tag {
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 12px;
}

.article-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fg);
  margin-top: 0;
  margin-bottom: 12px;
  line-height: 1.35;
}

.article-card-desc {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.article-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--fg-faint);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: auto;
}

/* --- Layout em Linhas para a Página /artigos --- */
.articles-list-container {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) var(--pad-x);
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.article-row-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: grid;
  grid-template-columns: 340px 1fr;
  align-items: stretch;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.article-row-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--glow-soft);
}

.article-row-media {
  display: block;
  height: 100%;
  overflow: hidden;
  background: var(--surface-2);
}

.article-row-media img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-row-card:hover .article-row-media img {
  transform: scale(1.04);
}

.article-row-content {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.article-row-title {
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 8px;
  margin-bottom: 12px;
}

.article-row-title a {
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-row-title a:hover {
  color: var(--accent);
}

.article-row-desc {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.article-row-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--fg-faint);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: auto;
}

@media (max-width: 768px) {
  .article-row-card {
    grid-template-columns: 1fr;
  }

  .article-row-media img {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .article-row-content {
    padding: 24px;
  }
}

/* --- Paginação da Central de Artigos --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
  padding-top: 24px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.pagination-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #060606;
  cursor: default;
}

.pagination-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}