/* ============================================================
   KronGazeta — Portal de Notícias | news.css
   Última atualização: 2026-06-03
   ============================================================ */

/* === VARIÁVEIS === */
:root {
  --brand:        #cc0000;
  --brand-dark:   #991b1b;
  --bg:           #fafaf7;
  --card:         #ffffff;
  --text:         #1a1a1a;
  --muted:        #6b7280;
  --border:       #e5e7eb;
  --cat-brasil:      #1d4ed8;
  --cat-economia:    #15803d;
  --cat-tecnologia:  #7c3aed;
  --cat-mundo:       #c2410c;
  --cat-politica:    #b91c1c;
}

/* === RESET MÍNIMO === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
a { color: inherit; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; color: transparent; } /* color:transparent esconde alt text quando imagem quebrada */
ul, ol { list-style: none; }

/* === LAYOUT === */
.container        { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.container--narrow { max-width: 760px;  margin: 0 auto; padding: 0 2rem; }

/* === HEADER === */
.site-header {
  background: rgba(250,250,247,0.97);
  border-bottom: 2px solid var(--brand);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(4px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.site-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  line-height: 1;
}
.site-logo:hover { text-decoration: none; opacity: .85; }
.site-logo { display: inline-flex; align-items: center; }
.site-logo__img {
  height: 42px;
  width: auto;
  display: block;
}
@media (max-width: 768px) {
  .site-logo__img { height: 34px; }
}
.site-logo__sub {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1px;
}
.site-nav { display: flex; align-items: center; gap: 0; }
.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: var(--border); text-decoration: none; }
.site-nav a.active { color: var(--brand); font-weight: 600; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text);
}

/* === BREADCRUMB === */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.75rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumb__sep { color: #d1d5db; }

/* === CATEGORY BADGE === */
.cat-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-decoration: none;
  line-height: 1.4;
}
.cat-badge:hover { text-decoration: none; opacity: .8; }
.cat-badge--brasil      { background: #dbeafe; color: var(--cat-brasil); }
.cat-badge--economia    { background: #dcfce7; color: var(--cat-economia); }
.cat-badge--tecnologia  { background: #ede9fe; color: var(--cat-tecnologia); }
.cat-badge--mundo       { background: #ffedd5; color: var(--cat-mundo); }
.cat-badge--politica    { background: #fee2e2; color: var(--cat-politica); }

/* === CATEGORY STRIP (homepage) === */
.cat-strip { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1.5rem 0 0; padding-bottom: 0; }
.cat-strip-item {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: opacity .15s;
}
.cat-strip-item:hover { text-decoration: none; opacity: .75; }
.cat-strip-item--brasil      { background: #dbeafe; color: var(--cat-brasil);     border-color: #bfdbfe; }
.cat-strip-item--economia    { background: #dcfce7; color: var(--cat-economia);   border-color: #bbf7d0; }
.cat-strip-item--tecnologia  { background: #ede9fe; color: var(--cat-tecnologia); border-color: #ddd6fe; }
.cat-strip-item--mundo       { background: #ffedd5; color: var(--cat-mundo);      border-color: #fed7aa; }
.cat-strip-item--politica    { background: #fee2e2; color: var(--cat-politica);   border-color: #fecaca; }

/* === ARTICLE META (data, autor, tempo de leitura) === */
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.article-meta__dot { color: #d1d5db; }
.article-meta time { }

/* === HOMEPAGE HERO === */
.hero { padding: 2.25rem 0 0; }
.hero-article {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.hero-article__img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 380px;
  object-fit: cover;
  background: #e5e7eb;
  font-size: 0; /* fallback extra para alt text */
}
.hero-article__body { padding: 2.25rem 2.25rem 2.25rem 2rem; display: flex; flex-direction: column; justify-content: center; gap: 0; }
.hero-article__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.22;
  color: var(--text);
  text-decoration: none;
  display: block;
  margin: 0.6rem 0 0.75rem;
}
.hero-article__title:hover { color: var(--brand); text-decoration: none; }
.hero-article__excerpt {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.65;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn-read-more {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  margin-top: 0.5rem;
}
.btn-read-more:hover { text-decoration: underline; }

/* === SECTION HEADING === */
.section-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brand);
  display: inline-block;
}

/* === ARTICLE GRID === */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: box-shadow .2s, transform .15s;
}
.article-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  text-decoration: none;
}
.article-card__img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
  background: #e5e7eb;
  min-height: 150px;
  font-size: 0;
}
.article-card__body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.article-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0.45rem 0 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card:hover .article-card__title { color: var(--brand); }
.article-card__excerpt {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
  flex: 1;
}
.article-card__meta { font-size: 0.72rem; color: var(--muted); margin-top: auto; }

/* === ARTICLE PAGE === */
.article-page { padding: 0 0 3rem; }
.article-headline {
  font-family: 'Playfair Display', serif;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 0.75rem 0 1rem;
}
.article-lead {
  font-size: 1.12rem;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--brand);
  padding-left: 1rem;
  font-style: italic;
}
.article-featured-img {
  width: 100%;
  border-radius: 12px;
  margin: 0 0 0.4rem;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #e5e7eb;
}
.article-img-caption {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 2rem;
}

/* === ARTICLE BODY TYPOGRAPHY === */
.article-body {
  font-size: 1.05rem;
  line-height: 1.82;
  color: #374151;
}
.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.25rem 0 0.75rem;
  line-height: 1.25;
}
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.75rem 0 0.5rem;
}
.article-body p { margin-bottom: 1.3rem; }
.article-body a { color: var(--brand); text-decoration: underline; }
.article-body a:hover { color: var(--brand-dark); }
.article-body ul { list-style: disc; margin: 0 0 1.25rem 1.5rem; }
.article-body ol { list-style: decimal; margin: 0 0 1.25rem 1.5rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body blockquote {
  border-left: 3px solid var(--brand);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: #fff5f5;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--muted);
}
.article-body strong { color: var(--text); font-weight: 600; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* === SHARE BUTTONS === */
.share-section {
  margin: 2.25rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.share-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.share-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity .15s;
}
.share-btn:hover { opacity: .85; text-decoration: none; }
.share-btn--whatsapp { background: #25d366; color: #fff; }
.share-btn--twitter  { background: #000;    color: #fff; }
.share-btn--linkedin { background: #0077b5; color: #fff; }

/* === RELATED ARTICLES === */
.related-section { margin: 2rem 0 0; }
.related-section > h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brand);
  display: inline-block;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* === CATEGORY PAGE === */
.cat-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.cat-header__name {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0 0.4rem;
}
.cat-header__desc { color: var(--muted); font-size: 0.95rem; }

/* === FOOTER === */
.site-footer {
  background: #1a1a1a;
  color: #d1d5db;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f9fafb;
  text-decoration: none;
  display: block;
  margin-bottom: 0.75rem;
}
.footer-logo:hover { text-decoration: none; opacity: .85; }
.footer-about { font-size: 0.83rem; line-height: 1.65; color: #9ca3af; }
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
  margin-bottom: 0.75rem;
}
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { font-size: 0.83rem; color: #d1d5db; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1.25rem;
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* === ALERTAS / DESTAQUES === */
.alert-box {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.alert-box--info    { background: #eff6ff; border-left: 3px solid var(--cat-brasil);    color: #1e3a5f; }
.alert-box--success { background: #f0fdf4; border-left: 3px solid var(--cat-economia);  color: #14532d; }
.alert-box--warning { background: #fffbeb; border-left: 3px solid #d97706; color: #78350f; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 62px;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    gap: 0.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
  }
  .nav-toggle { display: block; }
  .hero-article { grid-template-columns: 1fr; }
  .hero-article__img { max-height: 220px; min-height: 180px; }
  .hero-article__body { padding: 1.5rem; }
  .hero-article__title { font-size: 1.35rem; }
  .article-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-headline { font-size: 1.65rem; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}


/* Bloco "Leia também" — linkagem interna garantida */
.article-body .leia-tambem {
  margin: 2rem 0 0.5rem;
  padding: 1rem 1.25rem;
  background: #f7f7f4;
  border-left: 3px solid #cc0000;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.6;
}
.article-body .leia-tambem strong { color: #1a1a1a; }
.article-body .leia-tambem a { color: #cc0000; text-decoration: none; }
.article-body .leia-tambem a:hover { text-decoration: underline; }


/* ===== Tabelas dentro dos artigos ===== */
.article-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  line-height: 1.45;
  background: #fff;
  border: 1px solid #e2e2dc;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(26,54,93,0.08);
  table-layout: auto;
}
.article-body table thead th {
  background: #1a365d;
  color: #fff;
  font-weight: 700;
  text-align: left;
  vertical-align: middle;
  padding: 0.9rem 1.1rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
}
.article-body table tbody td {
  padding: 0.8rem 1.1rem;
  border-top: 1px solid #ededea;
  color: #1a1a1a;
  vertical-align: top;
}
/* primeira coluna em destaque (rótulo da linha) */
.article-body table tbody td:first-child {
  font-weight: 600;
  color: #1a365d;
  width: 42%;
}
.article-body table tbody tr:nth-child(even) td {
  background: #f8f8f5;
}
.article-body table tbody tr:hover td {
  background: #fdf2f2;
}
/* linha em destaque quando há <strong> na 1ª célula (ex.: Brasil) */
.article-body table tbody tr:has(td:first-child strong) td {
  background: #fff4e6;
}
/* rolagem horizontal em telas pequenas, sem quebrar o layout */
@media (max-width: 600px) {
  .article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .article-body table tbody td:first-child { width: auto; }
}
