/* ============================================================
   artigos.css
   CSS dos artigos editoriais da Pedias
   Versão: 1.0 · março 2026
   Fonte: Ubuntu (Google Fonts) — importada aqui, não nos HTMLs
   ============================================================ */

/* ── Reading progress bar ── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Article Hero ── */
.article-hero {
  padding-bottom: 0;
}

.article-hero-sub {
  margin-bottom: 28px;
}

.article-hero-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  padding-bottom: 28px;
  align-items: center;
}

.article-hero-meta-dot {
  opacity: 0.4;
}

/* ── Índice de seções no hero ── */
.article-hero-index {
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.article-hero-index-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
}

/* ── Sticky index bar ── */
.sticky-index {
  position: fixed;
  top: 64px; /* altura do site-header */
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--blue-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  transform: translateY(-110%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.sticky-index.visible {
  /*transform: translateY(0);*/
}

.sticky-index-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-index-inner::-webkit-scrollbar {
  display: none;
}

.index-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.38);
  margin-right: 6px;
  flex-shrink: 0;
}

.index-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 11px;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.index-chip:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.index-chip.h2-chip {
  font-weight: 600;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.2);
}

.index-chip.h3-chip {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(224, 123, 26, 0.18);
  border-color: rgba(224, 123, 26, 0.3);
}

.index-chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.h2-chip .index-chip-dot {
  background: rgba(255, 255, 255, 0.6);
}

.h3-chip .index-chip-dot {
  background: var(--amber);
}

.index-chip.active {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #fff !important;
}

.h3-chip.active {
  background: rgba(224, 123, 26, 0.35) !important;
  border-color: rgba(224, 123, 26, 0.5) !important;
}

/* ── Pedias Article Styles ── */
.rh-article {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  max-width: 100%;
  background: #fff;
}

/* ── Share row ── */
.rh-share-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.rh-share-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--text-light);
  font-weight: 500;
  margin-right: 4px;
}

.share-buttons-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: auto;
  flex: 1;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 5px;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: #fff;
  transition: all 0.15s;
  white-space: nowrap;
  flex: 0 1 auto;
}

.btn-share:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.rh-ai-disclaimer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: -18px 0 26px;
  font-size: 13px;
  color: var(--text-light);
}

.rh-ai-disclaimer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.rh-ai-disclaimer a:hover {
  text-decoration: underline;
}

.rh-ai-divider {
  color: var(--border-dark);
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
  .rh-share-row {
    flex-wrap: wrap;
  }

  .rh-share-row {
    align-items: center;
  }

  .rh-share-label {
    width: 100%;
    margin-right: 0;
    margin-bottom: 8px;
  }

  .share-buttons-wrapper {
    gap: 6px;
    width: 100%;
    flex: 0 0 100%;
  }

  .btn-share {
    padding: 6px 10px;
    font-size: 0.75rem;
    flex: 0 1 calc(50% - 4px);
  }

  .btn-share-icon {
    width: 14px;
    height: 14px;
    font-size: 14px;
  }

  .rh-ai-disclaimer {
    margin-top: -10px;
    font-size: 13px;
  }
}

/* ── Porte box ── */
.rh-porte-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 0 0 36px;
}

.rh-porte-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rh-porte-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.rh-porte-detalhe {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 28px;
}

.rh-porte-item {
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 3px solid transparent;
}

.rh-porte-pequena {
  background: #F0F7FF;
  border-left-color: #378ADD;
}

.rh-porte-media {
  background: var(--teal-light);
  border-left-color: var(--teal);
}

.rh-porte-grande {
  background: var(--amber-light);
  border-left-color: var(--amber);
}

.rh-porte-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.rh-porte-pequena .rh-porte-label {
  color: var(--blue-dark);
}

.rh-porte-media .rh-porte-label {
  color: var(--teal-dark);
}

.rh-porte-grande .rh-porte-label {
  color: #633806;
}

.rh-porte-item p {
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0;
  color: var(--text);
}

/* ── Definição citável ── */
.rh-definition {
  border-left: 4px solid var(--blue);
  background: var(--blue-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 0 0 32px;
}

.rh-definition p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--blue-dark);
}

/* ── Corpo e tipografia ── */
.rh-article h2 {
  font-family: var(--font);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 14px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.rh-article h3 {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin: 24px 0 10px;
}

.rh-article p {
  margin: 0 0 18px;
}

.rh-article ul,
.rh-article ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.rh-article li {
  margin-bottom: 6px;
}

.rh-article a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rh-article a:hover {
  color: var(--blue-dark);
}

/* ── Notas de referência inline ── */
.rh-ref-link {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  vertical-align: super;
  line-height: 0;
}

.rh-ref-link:hover {
  text-decoration: underline;
}

/* ── Tabelas ── */
.rh-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 0.9rem;
}

.rh-article th {
  background: var(--blue);
  color: #fff;
  font-weight: 500;
  padding: 10px 14px;
  text-align: left;
}

.rh-article td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.rh-article tr:last-child td {
  border-bottom: none;
}

.rh-article tr:nth-child(even) td {
  background: var(--bg);
}

/* ── Benchmarks ── */
.rh-benchmarks {
  margin: 40px 0;
}

/* ── Ferramenta/checklist ── */
.rh-tool {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 40px 0;
}

.rh-tool h2 {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.rh-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rh-checklist li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.rh-checklist li:last-child {
  border-bottom: none;
}

.rh-checklist li::before {
  content: '☐';
  flex-shrink: 0;
  color: var(--blue);
  font-size: 1rem;
}

/* ── FAQ ── */
.rh-faq {
  margin: 40px 0;
}

.rh-faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.rh-faq-item:last-child {
  border-bottom: none;
}

.rh-faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.rh-faq-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Blocos de fornecedor ── */
.rh-supplier-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin: 24px 0;
  background: var(--bg-card);
}

.rh-supplier-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 8px;
  display: block;
}

.rh-supplier-quote {
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
  border-left: 3px solid var(--teal);
  padding-left: 16px;
  margin: 12px 0;
}

.rh-supplier-author {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Parceiros ── */
.rh-partners {
  margin: 40px 0;
}

.rh-partner-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.rh-partner-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.875rem;
}

.rh-partner-item a {
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

.rh-partner-item span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ── Referências ── */
.rh-references {
  margin: 48px 0 32px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
}

.rh-references h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: none;
  margin-top: 0;
  padding-top: 0;
  color: var(--text-muted);
}

.rh-ref-list {
  padding-left: 20px;
  margin: 0;
}

.rh-ref-list li {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 8px;
}

.rh-ref-list a {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.rh-ref-list a:hover {
  color: var(--blue);
}

/* ── Navegação interna ── */
.rh-related {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 40px 0 0;
}

.rh-related h2 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-top: none;
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 14px;
}

.rh-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rh-related-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.rh-related-list li:last-child {
  border-bottom: none;
}

.rh-next-step {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--blue-light);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.rh-next-step a {
  font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .rh-title {
    font-size: 1.5rem;
  }

  .rh-subtitle {
    font-size: 1rem;
  }

  .rh-article {
    padding: 0;
  }

  .rh-porte-box {
    padding: 16px;
  }

  .rh-tool {
    padding: 16px;
  }

  .rh-porte-grid,
  .rh-porte-detalhe {
    grid-template-columns: 1fr;
  }

  .article-hero-index-inner {
    padding: 12px 16px;
    overflow-x: auto;
  }
}


