/* Article Page */
.article-page {
  background: #f8f9fa;
  min-height: 100vh;
  padding-bottom: 10px;
}

/* Header */
.article-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-hover) 100%
  );
  color: white;
  padding: 30px 0;
  margin-bottom: 30px;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.article-breadcrumb a {
  color: white;
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.3;
}

.article-meta-header {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  opacity: 0.5;
}

.article-meta-header i {
  margin-right: 5px;
}

/* Layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  margin-bottom: 50px;
}

/* Content */
.article-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.article-featured-image {
  margin: -30px -30px 30px -30px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.article-legenda {
  font-size: 14px;
  font-style: italic;
  text-align: right;
  margin-right: 10px;
  color: #5e5e5e;
}

.article-summary {
  background: linear-gradient(135deg, #f5f0ff, #ede9fe);
  border-left: 8px solid #d84400;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 0 8px 8px 0;
  font-size: 1.2rem;
  font-style: italic;
  color: #333;
}

.article-summary p {
  margin-bottom: 0;
}

.article-body-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}

.article-body-content p {
  font-family: var(--font-serif);
  margin-bottom: 1.5rem;
  text-align: justify;
}

.article-body-content p strong,
.article-body-content p i,
.article-body-content ul li,
.article-body-content ul li strong,
.article-body-content ol li,
.article-body-content ol li strong {
  font-family: var(--font-serif);
}

.article-body-content h2,
.article-body-content h3,
.article-body-content h4 {
  margin: 2rem 0 1rem;
  color: #1a1a1a;
  font-family: var(--font-serif);
}

.article-body-content h2 {
  font-size: 1.6rem;
}

.article-body-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.article-body-content blockquote {
  border-left: 4px solid #d84400;
  padding-left: 20px;
  margin: 1.5rem 0;
  font-style: italic;
  color: #555;
}

/* Tabelas */
.article-body-content table {
  border-collapse: collapse;
  width: 100%;
  font-family: Arial, sans-serif;
}

.article-body-content th {
  background-color: #434343;
  color: white;
  text-align: left;
  padding: 5px;
}

.article-body-content th,
.article-body-content td {
  padding: 5px;
  border-bottom: 1px solid #ddd;
}

.article-body-content th,
.article-body-content td,
.article-body-content th strong,
.article-body-content td strong {
  font-family: var(--font-serif);
}

.article-body-content tbody tr:nth-child(even) {
  background-color: #f2f2f2;
}

.article-body-content tbody tr:nth-child(odd) {
  background-color: #fff;
}

.article-body-content tbody tr:hover {
  background-color: #ddd;
}

/* Tags */
.article-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.tag-label {
  font-weight: 600;
  color: #666;
}

.tag {
  background: #f5f0ff;
  color: #d84400;
  padding: 5px 15px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.tag:hover {
  background: #d84400;
  color: white;
}

/* Share */
.article-share {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 20px 0;
  border-top: 1px solid #eee;
}

.share-label {
  font-weight: 600;
  color: #666;
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition:
    transform 0.3s,
    opacity 0.3s;
}

.share-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
  color: white;
}

.share-btn.facebook {
  background: #3b5998;
}
.share-btn.twitter {
  background: #1da1f2;
}
.share-btn.whatsapp {
  background: #25d366;
}
.share-btn.telegram {
  background: #0088cc;
}

/* Comments Section */
.comments-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #eee;
}

.comments-section h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #333;
}

.comments-section h3 i {
  color: #d84400;
  margin-right: 10px;
}

/* Comment Form */
.comment-form-wrapper {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.comment-form .form-group {
  margin-bottom: 15px;
}

.comment-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.comment-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
}

.comment-form textarea:focus {
  outline: none;
  border-color: #d84400;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.reply-info {
  background: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 3px solid #d84400;
}

.btn-cancel-reply {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Login to Comment */
.login-to-comment {
  text-align: center;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 30px;
}

.login-to-comment i {
  font-size: 1rem;
  color: #ccc;
  margin-bottom: 6px;
  margin-right: 5px;
}

.login-to-comment p {
  margin-bottom: 20px;
  color: #666;
}

.login-to-comment span {
  display: inline-block;
  margin: 0 15px;
  color: #999;
}

/* Comments List */
.comment {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.comment:last-child {
  border-bottom: none;
}

.comment-avatar img,
.avatar-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.avatar-placeholder.small {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 8px;
}

.comment-author {
  color: #333;
}

.comment-date {
  font-size: 0.8rem;
  color: #888;
}

.comment-text {
  color: #555;
  line-height: 1.6;
}

.btn-reply {
  background: none;
  border: none;
  color: #d84400;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 10px;
  padding: 0;
}

.btn-reply:hover {
  text-decoration: underline;
}

/* Replies */
.comment-replies {
  margin-left: 65px;
  margin-top: 15px;
  padding-left: 20px;
  border-left: 2px solid #e0e0e0;
}

.comment.reply {
  margin-bottom: 15px;
  padding-bottom: 15px;
}

.no-comments {
  text-align: center;
  padding: 40px;
  color: #888;
}

.no-comments i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #ddd;
}

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: 20px;
}

.sidebar-widget {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.sidebar-widget h4 {
  font-size: 1rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #d84400;
  color: #333;
}

.sidebar-widget h4 i {
  margin-right: 8px;
  color: #d84400;
}

.related-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  transition: background 0.3s;
}

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

.related-item:hover {
  background: #f8f9fa;
  margin: 0 -10px;
  padding: 10px;
  border-radius: 8px;
}

.related-image {
  width: 70px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder-small {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f0ff;
  color: #d84400;
}

.related-info h5 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: #333;
  margin-bottom: 4px;
  line-height: 1.3;
}

.related-date {
  font-size: 0.75rem;
  color: #888;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.btn-outline-primary {
  border: 2px solid #d84400;
  color: #d84400;
  background: transparent;
  padding: 6px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-outline-primary:hover {
  background: #d84400;
  color: white;
}

/* Alerts */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Responsive */
@media (max-width: 992px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .article-header h1 {
    font-size: 1.6rem;
  }

  .article-meta-header {
    gap: 10px;
    font-size: 0.8rem;
  }

  .article-content {
    padding: 20px;
  }

  .article-featured-image {
    margin: -20px -20px 20px -20px;
  }

  .comment-replies {
    margin-left: 20px;
  }

  .article-share {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* CSS Tabelas Responsivas */
@media (max-width: 768px) {
  .article-body-content table {
    margin: 40px 0;
  }

  .article-body-content table,
  .article-body-content thead,
  .article-body-content tbody,
  .article-body-content th,
  .article-body-content td,
  .article-body-content tr {
    display: block;
  }

  .article-body-content thead {
    display: none;
  }

  .article-body-content tr {
    margin-bottom: 16px;
    border: 1px solid #ddd;
    padding: 8px;
  }

  .article-body-content td {
    display: flex;
    /*justify-content: space-between;*/
    padding: 6px 0;
    text-align: left;
  }

  .article-body-content td::before {
    content: attr(data-label);
    font-weight: bold;
    margin-right: 8px;
    min-width: 50%;
    max-width: 50%;
  }
}

/* Índice de Conteúdo */
.indice-conteudo {
  border-left: 4px solid #ccc;
  padding: 12px 16px;
  margin: 24px 0;
  background: #f9f9f9;
}

.indice-conteudo ul {
  list-style: none;
  padding-left: 0;
  margin-top: 8px;
}

.indice-conteudo li {
  margin: 6px 0;
}

.indice-conteudo li a {
  text-decoration: none;
}

.indice-conteudo li.nivel-h3 {
  padding-left: 12px;
}
.indice-conteudo li.nivel-h4 {
  padding-left: 24px;
}
