/* ===========================
   ARTIGO - Estilos da Página de Leitura
   =========================== */

.article-main {
  min-height: calc(100vh - 200px);
  background: var(--white);
  padding: 2rem 0 4rem;
}

.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--brown);
}

.breadcrumb span {
  color: var(--text-muted);
}

/* Header do Artigo */
.article-header {
  margin-bottom: 2rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.article-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.article-excerpt {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Imagem de Capa */
.article-cover-wrapper {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-cover {
  width: 100%;
  height: auto;
  display: block;
}

/* Corpo do Artigo - Markdown Styles */
.article-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
}

.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}

.article-body h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2rem 0 0.75rem;
}

.article-body h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
  margin: 1.5rem 0 0.5rem;
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(0, 77, 64, 0.3);
  transition: all 0.2s ease;
}

.article-body a:hover {
  color: var(--brown);
  text-decoration-color: var(--brown);
}

.article-body ul,
.article-body ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: #f8f9fa;
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-muted);
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

.article-body code {
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--brown);
}

.article-body pre {
  background: var(--navy);
  color: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-body pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.article-body hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2.5rem 0;
}

.article-body strong {
  font-weight: 700;
  color: var(--navy);
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.article-tags .tag {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: rgba(0, 77, 64, 0.08);
  color: var(--teal);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.article-tags .tag:hover {
  background: var(--teal);
  color: var(--white);
}

/* Autor */
.article-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  margin: 2rem 0;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--white);
  padding: 4px;
  border: 2px solid var(--gold);
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
}

.author-role {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* CTA WhatsApp */
.article-cta {
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, rgba(11, 30, 53, 0.95) 100%);
  border-radius: 16px;
  margin: 3rem 0;
  color: var(--white);
}

.article-cta h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-cta p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: #25d366;
  color: var(--white);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}

/* Posts Relacionados */
.related-posts {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.related-posts h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.related-post-card {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.related-post-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.related-post-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.related-post-card .card-body {
  padding: 1rem;
}

.related-post-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
  margin: 0;
}

/* Loading e Error States */
.article-loading,
.article-error {
  text-align: center;
  padding: 4rem 2rem;
}

.article-error svg {
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: 1.5rem;
}

.article-error h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.article-error p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.btn-back {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: var(--tealdark);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .article-main {
    padding: 1.5rem 0 3rem;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .article-body {
    font-size: 1rem;
  }

  .article-body h2 {
    font-size: 1.5rem;
  }

  .article-cta {
    padding: 2rem 1.5rem;
  }

  .article-cta h3 {
    font-size: 1.25rem;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .breadcrumb {
    font-size: 0.8rem;
  }

  .article-author {
    flex-direction: column;
    text-align: center;
  }

  .btn-whatsapp {
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
  }
}
