/* ========== FEATURED IMAGE (topo do artigo) ========== */
.article-featured-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0 0 36px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.article-featured-img img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

@media (max-width: 880px) {
  .article-featured-img img { height: 220px; }
}

/* ============================================================
   Blog TRG: Article Page Stylesheet
   ============================================================ */

/* ========== ARTICLE HERO ========== */
.article-hero {
  padding: 60px 40px 90px;
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

/* esconde o ::before decorativo quando há background de imagem */
.article-hero::before { display: none; }

.article-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 40px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 24px; font-size: 16px; position: relative;
}

.breadcrumb a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: rgba(255,255,255,0.85); }
.breadcrumb span { color: rgba(255,255,255,0.30); }
.breadcrumb strong { color: rgba(255,255,255,0.75); font-weight: 500; }

.article-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; position: relative; }

.article-hero-tag {
  font-size: 14px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; padding: 4px 12px; border-radius: 20px;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.20);
  color: rgba(255,255,255,0.80);
}

.article-hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(34px, 3.5vw, 54px);
  font-weight: 700; color: #fff; line-height: 1.25;
  max-width: 740px; margin-bottom: 28px; position: relative;
}

.article-hero-meta { display: flex; align-items: center; gap: 20px; position: relative; flex-wrap: wrap; }

.article-author { display: flex; align-items: center; gap: 10px; }

.article-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff;
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.article-author-name { font-size: 17px; font-weight: 600; color: #fff; }
.article-author-date { font-size: 15px; color: rgba(255,255,255,0.55); margin-top: 1px; }

.article-read-time {
  font-size: 16px; color: rgba(255,255,255,0.50);
  display: flex; align-items: center; gap: 5px; margin-left: auto;
}

/* ========== ARTICLE LAYOUT ========== */
.article-layout {
  max-width: 1160px; margin: 0 auto;
  padding: 44px 32px 80px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

/* ========== ARTICLE BODY ========== */
.article-body {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 48px 52px; border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}

.article-body .article-lead {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 25px; font-style: italic;
  color: var(--navy); line-height: 1.75;
  margin-bottom: 36px; padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.article-body h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px; font-weight: 700;
  color: var(--navy-dark); margin: 40px 0 16px; line-height: 1.3;
}

.article-body p { font-size: 20px; line-height: 1.85; color: #1f2937; margin-bottom: 20px; }
.article-body strong { color: var(--navy); font-weight: 600; }

/* Links no texto do artigo */
.article-body p a {
  color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px; text-decoration-color: rgba(13,59,110,0.35);
  transition: text-decoration-color .2s, color .2s;
}
.article-body p a:hover { color: var(--blue); text-decoration-color: currentColor; }

/* ========== REFERÊNCIAS (## Referências no rascunho) ========== */
.article-body h2.article-references-title {
  font-size: 12px !important; font-family: inherit; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-light);
  margin: 44px 0 12px; padding-top: 24px; border-top: 1px solid var(--border);
}
.article-body .article-references-title ~ p {
  font-size: 13px !important; line-height: 1.6 !important; color: var(--text-muted);
  margin-bottom: 8px; padding-left: 1.4em; text-indent: -1.4em; overflow-wrap: anywhere;
}
.article-body .article-references-title ~ p:has(> strong:only-child) {
  padding-left: 0; text-indent: 0; margin: 16px 0 6px;
  font-size: 11px !important; letter-spacing: 1px; text-transform: uppercase;
}
.article-body .article-references-title ~ p strong { color: var(--text-muted); font-weight: 700; }
.article-body .article-references-title ~ p a { color: var(--text-muted); }
.article-body .article-references-title ~ p a:hover { color: var(--navy); }

/* ========== ARTICLE IMAGES ========== */
.article-img {
  border-radius: var(--radius-md); overflow: hidden;
  margin: 32px 0; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}

.article-img img { width: 100%; height: auto; display: block; }

.article-img figcaption {
  padding: 10px 14px; font-size: 16px; color: var(--text-light);
  background: var(--surface-2); font-style: italic; text-align: center;
}

/* ========== QUOTE ========== */
.article-quote {
  border-left: 3px solid var(--green);
  background: linear-gradient(to right, rgba(80,190,140,0.05), transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px; margin: 28px 0; box-shadow: var(--shadow-sm);
}

.article-quote p { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 20px; color: var(--navy); margin: 0 0 8px; line-height: 1.7; }
.article-quote .q-source { font-size: 15px; font-weight: 700; color: var(--green-dark); letter-spacing: 0.8px; text-transform: uppercase; font-style: normal; }

/* ========== HIGHLIGHT BOX ========== */
.article-highlight {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  border-radius: var(--radius-md); padding: 24px 28px; margin: 28px 0;
  box-shadow: 0 4px 20px rgba(13,59,110,0.25), var(--shadow-sm);
}

.article-highlight p { color: rgba(255,255,255,0.88); margin: 0; font-size: 19px; line-height: 1.75; }
.article-highlight strong { color: var(--green); }

/* Player de narração (logo após o lead) */
.article-lead:has(+ .article-audio:not([hidden])) {
  border-bottom: 0; padding-bottom: 0; margin-bottom: 24px;
}
.article-audio {
  margin-bottom: 36px; padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.article-audio[hidden] { display: none; }
.article-body .article-audio-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 600; line-height: 1.3;
  color: var(--navy-dark); margin: 0 0 6px;
}
.article-audio-title svg { flex: none; }
.article-body .article-audio-text {
  font-size: 16px; line-height: 1.5; color: var(--text-muted); margin: 0 0 16px;
}
.audio-player {
  padding: 16px 20px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.audio-controls { display: flex; align-items: center; gap: 14px; }
.audio-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 0; background: var(--blue); color: #fff;
  transition: background .2s, transform .15s;
}
.audio-btn:hover { background: var(--navy-mid); }
.audio-btn:active { transform: scale(.95); }
.audio-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.audio-btn .icon-play { margin-left: 2px; }
.audio-btn .icon-pause,
.audio-player.playing .audio-btn .icon-play { display: none; }
.audio-player.playing .audio-btn .icon-pause { display: block; }
.audio-progress {
  --p: 0%;
  flex: 1; min-width: 0; height: 4px; margin: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; border-radius: 2px;
  background: linear-gradient(to right, var(--navy) var(--p), var(--border-med) var(--p));
}
.audio-progress::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--navy); border: 0;
}
.audio-progress::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; background: var(--navy); border: 0;
}
.audio-progress:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.audio-time {
  flex: none; font-size: 12px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Sobre este conteúdo (autoria e aviso) */
.article-note {
  margin: 24px 0 0; padding: 20px 24px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.article-note p { font-size: 13px; line-height: 1.65; color: var(--text-muted); margin: 0 0 8px; }
.article-note p:last-child { margin-bottom: 0; }
.article-note strong { color: var(--navy); }

/* ========== BOX "QUEM CRIOU A TRG" (gerado pelo seo.py) ========== */
.article-bio {
  display: grid; grid-template-columns: 34% 1fr;
  margin: 32px 0 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.article-bio-photo { background: #3e4a3f; min-height: 100%; }
.article-bio-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.article-bio-body { padding: 36px 40px 34px; }
.article-bio-eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}
.article-bio-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 26px; line-height: 1.3; color: var(--navy-dark); margin-bottom: 16px;
}
.article-bio-body > p:not(.article-bio-eyebrow):not(.article-bio-title) {
  font-size: 16px; line-height: 1.75; color: #374151; margin-bottom: 14px;
}
.article-bio-body strong { color: var(--navy-dark); font-weight: 700; }
.article-bio-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding-bottom: 4px;
  font-size: 15.5px; font-weight: 700; color: var(--navy); text-decoration: none;
  border-bottom: 1.5px solid rgba(13,59,110,0.3); transition: border-color .2s, gap .2s;
}
.article-bio-link:hover { border-color: var(--navy); gap: 12px; }

@media (max-width: 880px) {
  .article-bio { grid-template-columns: 1fr; }
  .article-bio-photo { aspect-ratio: 4 / 3; min-height: 0; }
  .article-bio-body { padding: 26px 22px 26px; }
  .article-bio-title { font-size: 22px; }
  .article-bio-body > p:not(.article-bio-eyebrow):not(.article-bio-title) { font-size: 15.5px; }
}

/* ========== ARTICLE SIDEBAR ========== */
.article-sidebar {
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 76px;
}

/* ========== SUGGESTIONS ========== */
.article-suggestions { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--border); }

.suggestions-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 26px; font-weight: 700; color: var(--navy-dark); margin-bottom: 24px;
}

.suggestions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.suggestion-card {
  background: var(--bg); border-radius: var(--radius-md);
  overflow: hidden; border: 1px solid var(--border);
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; display: block;
}

.suggestion-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.suggestion-thumb { height: 120px; overflow: hidden; }
.suggestion-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.suggestion-card:hover .suggestion-thumb img { transform: scale(1.04); }

.suggestion-body { padding: 14px 16px; }
.suggestion-cat { font-size: 14px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--blue); margin-bottom: 5px; }
.suggestion-title { font-family: Georgia, 'Times New Roman', serif; font-size: 18px; font-weight: 700; color: var(--navy-dark); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ========== RESPONSIVE ========== */
@media (max-width: 880px) {
  .article-layout        { grid-template-columns: 1fr; padding: 28px 20px 60px; }
  .article-sidebar       { display: flex; position: static; max-height: none; overflow-y: visible; }
  .article-body          { padding: 28px 24px; }
  .article-hero          { padding: 48px 20px 60px; }
  .suggestions-grid      { grid-template-columns: 1fr; }

  /* Typography — mobile */
  .article-hero h1       { font-size: clamp(26px, 7vw, 38px); }
  .breadcrumb            { font-size: 13px; }
  .article-author-name   { font-size: 14px; }
  .article-author-date   { font-size: 13px; }
  .article-read-time     { font-size: 14px; }
  .article-body .article-lead { font-size: 18px; }
  .article-body .article-audio-title { font-size: 17px; }
  .article-body .article-audio-text  { font-size: 14px; }
  .article-body h2       { font-size: 22px; }
  .article-body p        { font-size: 16px; }
  .article-quote p       { font-size: 17px; }
  .article-highlight p   { font-size: 16px; }
  .suggestions-title     { font-size: 22px; }
  .suggestion-title      { font-size: 16px; }
}

/* Typography — large desktop */
@media (min-width: 1280px) {
  .article-body .article-lead { font-size: 27px; }
  .article-body h2       { font-size: 30px; }
  .article-body p        { font-size: 21px; }
  .article-quote p       { font-size: 21px; }
  .article-highlight p   { font-size: 20px; }
  .suggestions-title     { font-size: 28px; }
  .suggestion-title      { font-size: 19px; }
}