/* ==========================================================================
   ESTILOS ESPECÍFICOS PARA ARTIGOS E ENSAIOS | KELLY LIRA
   ========================================================================== */

/* Layout da Página de Listagem */
.articles-hero {
  padding: 1.5rem 1rem;
  background-color: var(--card-bg, #fcf8f3);
  border-bottom: 1px solid rgba(139, 58, 58, 0.08);
  text-align: center;
}

.articles-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.articles-hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

.articles-section {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}

/* Forçar menu Artigos sempre sublinhado na página de artigos */
.desktop-nav .nav-link[href*="artigos"],
.mobile-nav-panel .mobile-nav-link[href*="artigos"] {
  color: var(--primary) !important;
}

.desktop-nav .nav-link[href*="artigos"]::after,
.mobile-nav-panel .mobile-nav-link[href*="artigos"]::after {
  width: 100% !important;
}

/* Barra de Filtros e Busca */
.articles-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0.5rem 0 1.75rem 0;
}

@media (min-width: 768px) {
  .articles-controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-full);
  background-color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 58, 58, 0.15);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.tags-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(139, 58, 58, 0.15);
  background-color: #fff;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.tag-btn:hover,
.tag-btn.active {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Grid de Artigos */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 5rem;
}

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card do Artigo */
.article-card {
  background-color: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

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

.article-card-thumb {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background-color: var(--card-bg);
}

.article-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.article-card-meta .tag-badge {
  background-color: rgba(139, 58, 58, 0.1);
  color: var(--primary);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: none;
}

.article-card-meta .tag-badge.badge-ensaio {
  background-color: rgba(44, 82, 104, 0.1);
  color: #2c5268;
}

.article-card-meta .tag-badge.badge-artigo {
  background-color: rgba(139, 58, 58, 0.1);
  color: var(--primary);
}

.article-card-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.75rem;
  transition: color var(--transition-fast);
}

.article-card:hover .article-card-title {
  color: var(--primary);
}

.article-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.article-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  margin-bottom: 1rem;
}

.article-mini-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background-color: rgba(0, 0, 0, 0.04);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  line-height: 1.3;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

/* ==========================================================================
   PÁGINA INDIVIDUAL DO ARTIGO (LEITURA)
   ========================================================================== */

.post-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem 1.5rem;
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: color var(--transition-fast);
}

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

.post-header {
  margin-bottom: 2.5rem;
}

.post-category-tag {
  display: inline-block;
  background-color: rgba(139, 58, 58, 0.1);
  color: var(--primary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.post-category-tag.badge-ensaio {
  background-color: rgba(44, 82, 104, 0.1);
  color: #2c5268;
}

.post-category-tag.badge-artigo {
  background-color: rgba(139, 58, 58, 0.1);
  color: var(--primary);
}

.post-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.post-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.post-author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.post-author-name {
  font-weight: 600;
  color: var(--text);
}

.post-share-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--card-bg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.share-btn:hover {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.post-featured-image {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 2rem 0 3rem 0;
  box-shadow: var(--shadow-md);
}

/* Tipografia Editorial do Conteúdo do Artigo */
.post-content {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  line-height: 1.85;
  color: #2c2c2c;
}

.post-content p {
  margin-bottom: 1.75rem;
}

/* Títulos: tamanhos hierárquicos com o vermelho oficial da marca */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  font-family: var(--font-serif);
  color: var(--primary);
  letter-spacing: -0.01em;
}

.post-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 3rem 0 1.25rem 0;
}

.post-content h2 {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 2.75rem 0 1rem 0;
}

.post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 2.25rem 0 0.85rem 0;
}

.post-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 2rem 0 0.75rem 0;
}

.post-content h5 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 1.75rem 0 0.5rem 0;
}

.post-content h6 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 1.5rem 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Citações / Blockquotes */
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1.1rem 1.5rem;
  margin: 2.25rem 0;
  background-color: rgba(139, 58, 58, 0.04);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
}

.post-content blockquote p {
  margin-bottom: 0.6rem;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Listas com Marcadores e Listas Numeradas */
.post-content ul {
  list-style: disc !important;
  list-style-type: disc !important;
  margin: 1.75rem 0 2rem 0;
  padding-left: 2.25rem;
  line-height: 1.85;
}

.post-content ol {
  list-style: decimal !important;
  list-style-type: decimal !important;
  margin: 1.75rem 0 2rem 0;
  padding-left: 2.25rem;
  line-height: 1.85;
}

.post-content ul ul {
  list-style-type: circle !important;
  margin: 0.5rem 0 0.5rem 0;
}

.post-content ol ol {
  list-style-type: lower-alpha !important;
  margin: 0.5rem 0 0.5rem 0;
}

.post-content li {
  margin-bottom: 0.65rem;
  padding-left: 0.35rem;
}

/* Marcadores e Números em Vermelho (Identidade Visual do Site) */
.post-content ul > li::marker,
.post-content ol > li::marker,
.post-content li::marker {
  color: var(--primary) !important;
  font-weight: 700;
}

/* Links no texto: vermelho oficial, sublinhado e nunca azul/roxo ao ser clicado */
.post-content a,
.post-content a:visited {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  font-weight: 500;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.post-content a:hover,
.post-content a:focus {
  color: var(--primary-hover);
  text-decoration-color: var(--primary-hover);
}

.post-content a:active {
  color: var(--primary-hover);
}

/* Imagens e Figuras no Conteúdo */
.post-content img,
.post-content .post-content-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 2rem auto;
  display: block;
  box-shadow: var(--shadow-md);
}

.post-content figure,
.post-content .post-figure {
  margin: 2.5rem 0;
  text-align: center;
}

.post-content figcaption {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  margin-top: 0.75rem;
  font-style: italic;
}

/* Formatação de Texto: Negrito, Itálico, Tachado e Código */
.post-content strong {
  font-weight: 600;
  color: var(--text);
}

.post-content em,
.post-content i {
  font-style: italic;
}

.post-content del,
.post-content s,
.post-content strike {
  text-decoration: line-through;
  color: var(--muted-foreground);
  opacity: 0.85;
}

.post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background-color: var(--secondary);
  color: var(--primary);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(139, 58, 58, 0.15);
}

.post-content pre {
  background-color: #242426;
  color: #f8f8f2;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 2rem 0;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: 0.92em;
}

/* Caixa do Autor no Fim do Post */
.post-author-box {
  margin-top: 4rem;
  padding: 2rem;
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 58, 58, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 640px) {
  .post-author-box {
    flex-direction: row;
    text-align: left;
  }
}

.author-box-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  flex-shrink: 0;
}

.author-box-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.author-box-bio {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}
