/* ==========================================================================
   PAGE: BLOG DO VINC
   ========================================================================== */

/* --- Layout Estrutural do Blog --- */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 40px;
  margin-bottom: 80px;
}

@media (min-width: 1024px) {
  .blog-layout {
    grid-template-columns: 2.3fr 1fr;
  }
}

/* --- Hero do Blog --- */
.blog-hero {
  padding: 80px 20px 40px 20px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.blog-hero .container {
  max-width: 800px;
}

.blog-hero h1 {
  color: var(--deep-blue);
  margin-bottom: 16px;
  font-weight: 800;
}

.blog-hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Barra de Filtros e Busca --- */
.blog-controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: -30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

/* Campo de Busca */
.search-box {
  position: relative;
  width: 100%;
}

@media (min-width: 768px) {
  .search-box {
    max-width: 320px;
  }
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  background-color: var(--background);
  transition: all 0.3s ease;
}

.search-box input:focus {
  background-color: var(--surface);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(42, 94, 168, 0.15);
  outline: none;
}

.search-box svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  transition: color 0.3s ease;
}

.search-box input:focus + svg {
  color: var(--blue);
}

/* Filtro de Categorias (Pills) */
.category-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none; /* Firefox */
}

.category-filter::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.category-btn {
  white-space: nowrap;
  background: var(--background);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn:hover {
  background: var(--ice-blue);
  color: var(--deep-blue);
  border-color: var(--blue);
}

.category-btn.active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

/* --- Artigo Destaque Principal --- */
.featured-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 40px;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.featured-img-link {
  display: block;
  width: 100%;
  height: 240px;
  position: relative;
  overflow: hidden;
}

.featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-card:hover .featured-img {
  transform: scale(1.03);
}

.featured-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

.blog-badge {
  background: var(--ice-blue);
  color: var(--deep-blue);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.featured-title {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--deep-blue);
  line-height: 1.3;
  margin-bottom: 12px;
}

.featured-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.featured-title a:hover {
  color: var(--blue);
}

.featured-excerpt {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 300;
}

.featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

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

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ice-blue);
}

.author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .featured-card {
    grid-template-columns: 1.2fr 1fr;
  }
  .featured-img-link {
    height: 100%;
    min-height: 340px;
  }
}

/* --- Grade de Artigos --- */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

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

/* Card do Artigo Comum */
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-img-link {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.article-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-img {
  transform: scale(1.03);
}

.article-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--deep-blue);
  line-height: 1.4;
  margin-top: 8px;
  margin-bottom: 12px;
}

.article-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.article-excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--background);
}

/* --- Sidebar --- */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--deep-blue);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ice-blue);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--blue);
}

/* Lista de posts populares */
.popular-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popular-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.popular-number {
  font-size: 24px;
  font-weight: 800;
  color: var(--blue);
  opacity: 0.3;
  line-height: 1;
}

.popular-item-content {
  display: flex;
  flex-direction: column;
}

.popular-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease;
}

.popular-item-title:hover {
  color: var(--blue);
}

.popular-item-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Lista de Categorias na Sidebar */
.sidebar-categories {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-cat-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary);
}

.sidebar-cat-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.sidebar-cat-link:hover {
  color: var(--blue);
}

.sidebar-cat-count {
  background: var(--background);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-badge {
  background: var(--background);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag-badge:hover {
  background: var(--ice-blue);
  color: var(--deep-blue);
  border-color: var(--blue);
}

/* Widget Newsletter Sidebar */
.newsletter-widget {
  text-align: center;
}

.newsletter-widget-icon {
  width: 48px;
  height: 48px;
  background: var(--ice-blue);
  color: var(--blue);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.newsletter-widget h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--deep-blue);
  margin-bottom: 8px;
}

.newsletter-widget p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-form input {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  width: 100%;
}

.newsletter-form input:focus {
  border-color: var(--blue);
  outline: none;
}

.newsletter-form .btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 14px;
}

/* --- Estado Vazio / Nenhum Artigo Encontrado --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.empty-state-icon {
  font-size: 48px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--deep-blue);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* ==========================================================================
   PAGE: DETALHES DO ARTIGO (INDIVIDUAL)
   ========================================================================== */

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--blue);
}

.breadcrumbs-separator {
  color: var(--border);
}

.breadcrumbs-current {
  color: var(--deep-blue);
  font-weight: 500;
}

/* --- Hero do Artigo --- */
.post-header {
  margin-bottom: 40px;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.post-title {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  font-weight: 800;
  color: var(--deep-blue);
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

/* --- Capa do Artigo --- */
.post-cover-wrap {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .post-cover-wrap {
    height: 480px;
  }
}

.post-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Corpo de Texto do Artigo --- */
.post-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-primary);
  font-weight: 400;
}

.post-body p {
  margin-bottom: 24px;
  font-weight: 300;
}

.post-body h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--deep-blue);
  margin-top: 40px;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.post-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--deep-blue);
  margin-top: 32px;
  margin-bottom: 12px;
}

.post-body ul, .post-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 8px;
  font-weight: 300;
}

/* Regra de Ouro do Vinc Destacada no Texto */
.post-regra-ouro {
  background-color: #FFF5F2;
  border-left: 4px solid var(--alert);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 24px;
  margin: 40px 0;
  box-shadow: var(--shadow-sm);
}

.post-regra-ouro-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--alert);
  margin-bottom: 6px;
}

.post-regra-ouro-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--deep-blue);
  line-height: 1.4;
  margin-bottom: 0 !important;
}

.post-regra-ouro-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 0 !important;
}

/* --- Caixa de Autor Detalhada --- */
.post-author-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-top: 60px;
  margin-bottom: 60px;
  box-shadow: var(--shadow-sm);
}

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

.post-author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--ice-blue);
  flex-shrink: 0;
}

.post-author-info h4 {
  font-size: 18px;
  font-weight: 800;
  color: var(--deep-blue);
  margin-bottom: 4px;
}

.post-author-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.post-author-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 300;
}

/* --- Artigos Relacionados --- */
.related-posts {
  padding-top: 60px;
  border-top: 1px solid var(--border);
  margin-bottom: 80px;
}

.related-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--deep-blue);
  margin-bottom: 30px;
}

/* --- Botão Voltar para o Blog --- */
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 30px;
  transition: transform 0.2s ease;
}

.back-to-blog:hover {
  transform: translateX(-4px);
  color: var(--deep-blue);
}

/* --- Feedback do formulário de Newsletter --- */
.newsletter-feedback {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  display: none;
}

.newsletter-feedback.success {
  color: var(--verified-green);
  display: block;
}

.newsletter-feedback.error {
  color: var(--alert);
  display: block;
}

/* --- Responsividade da Sidebar --- */
@media (max-width: 1023px) {
  .blog-sidebar {
    margin-top: 40px;
  }
}

/* --- Índice de Conteúdo (Table of Contents) --- */
.post-toc {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--deep-blue);
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toc-list {
  list-style: none !important;
  padding-left: 0 !important;
  margin-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list li {
  margin-bottom: 0 !important;
}

.toc-link {
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toc-link:hover {
  color: var(--blue) !important;
  transform: translateX(4px);
}

.toc-bullet {
  font-size: 10px;
  color: var(--blue);
  opacity: 0.7;
}

/* ==========================================================================
   FEEDBACK E INTERAÇÃO (FASE 1)
   ========================================================================== */
.post-interaction-box {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  margin: 40px 0;
  box-shadow: var(--shadow-sm);
}

.interaction-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--deep-blue);
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.interaction-subheading {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 12px;
}

/* Opções de Avaliação (Etapa 1) */
.rating-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .rating-options {
    grid-template-columns: repeat(4, 1fr);
  }
}

.rating-btn {
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  width: 100%;
}

.rating-btn .emoji {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.rating-btn:hover {
  background-color: var(--ice-blue);
  border-color: var(--blue);
  color: var(--deep-blue);
}

.rating-btn:hover .emoji {
  transform: scale(1.2);
}

.rating-btn.active {
  background-color: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.rating-btn.active .emoji {
  transform: scale(1.2);
}

/* Opções de Interesse em Novos Temas (Etapa 2) */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

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

.topic-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.topic-label input[type="checkbox"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.topic-label:hover {
  background-color: var(--ice-blue);
  border-color: var(--blue);
}

.topic-label.checked {
  background-color: rgba(42, 94, 168, 0.08);
  border-color: var(--blue);
  color: var(--deep-blue);
}

/* Sugestões e Envio (Etapa 3) */
.suggestions-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggestions-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--background);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.3s ease;
}

.suggestions-textarea:focus {
  background-color: var(--surface);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(42, 94, 168, 0.15);
  outline: none;
}

/* Botões e Mensagens de Feedback */
.btn-submit-suggestion {
  align-self: flex-start;
  padding: 10px 24px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.feedback-message {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: feedbackFadeIn 0.3s ease-out;
}

.feedback-message.success {
  background-color: rgba(46, 139, 87, 0.1);
  color: var(--verified-green);
  border-left: 3px solid var(--verified-green);
}

.feedback-message.info {
  background-color: var(--ice-blue);
  color: var(--blue);
  border-left: 3px solid var(--blue);
}

@keyframes feedbackFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
