/*
Theme Name: Semântico SEO
Theme URI: https://semantico.com.br/
Author: Alexander Rodrigues Silva
Author URI: https://semantico.com.br/
Description: Tema editorial de alto rigor conceitual para WordPress, inspirado na Ciência da Informação, Ontologias, Grafos de Conhecimento e SEO Semântico. Inclui arquitetura de Busca Semântica Federada com Gemini Embeddings, Schema.org JSON-LD nativo e Agent Readiness.
Version: 1.4.4
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: semantico-theme
Tags: blog, news, editorial, two-columns, custom-header, custom-menu, featured-images, full-width-template, theme-options, translation-ready
*/

@layer base {
  html, body {
    margin: 0;
    padding: 0;
  }
  body {
    overscroll-behavior-y: none;
  }
}

/* Skip Link Acessível (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background-color: #091420;
  color: #FFD100;
  border-radius: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  transition: top 0.2s ease-in-out;
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid #FFD100;
  outline-offset: 2px;
}

/* Scrollbar Customizado */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Suporte à Barra de Administração do WordPress para Cabeçalho Fixo */
body.admin-bar header.fixed {
  top: 32px !important;
}
@media screen and (max-width: 782px) {
  body.admin-bar header.fixed {
    top: 46px !important;
  }
}

/* Ocultar bandeiras automáticas do WPML dentro da pílula do menu de navegação */
header nav .wpml-ls-item,
header nav .menu-item-language,
header nav .wpml-ls-flag,
header nav img[class*="wpml-ls"] {
  display: none !important;
}

/* Blueprint Graph Pattern Background */
.bg-graph-pattern {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
}

/* Suporte aos Blocos Gutenberg do WordPress no Corpo do Artigo */
.entry-content {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #334155;
  line-height: 1.8;
  font-size: 1.125rem;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #091420;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  line-height: 1.25;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.entry-content h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #091420;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.entry-content h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #091420;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.entry-content ul, 
.entry-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.entry-content ul {
  list-style-type: disc;
}

.entry-content ol {
  list-style-type: decimal;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content blockquote {
  border-left: 4px solid #FFD100;
  background: #f8fafc;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 0.75rem 0.75rem 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-style: italic;
  color: #091420;
}

.entry-content pre,
.entry-content code {
  font-family: 'JetBrains Mono', monospace;
}

.entry-content pre {
  background: #091420;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  border: 1px solid #334155;
}

.entry-content code:not(pre code) {
  background: #f1f5f9;
  color: #091420;
  padding: 0.2rem 0.4rem;
  border-radius: 0.375rem;
  font-size: 0.875em;
  border: 1px solid #e2e8f0;
}

.entry-content img {
  border-radius: 1rem;
  margin: 2rem auto;
  max-width: 100%;
  height: auto;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.entry-content figure {
  margin: 2rem 0;
}

.entry-content figcaption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.5rem;
}

.entry-content a {
  color: #091420;
  text-decoration: underline;
  text-decoration-color: #FFD100;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.entry-content a:hover {
  color: #b45309;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.875rem;
}

.entry-content th, 
.entry-content td {
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  text-align: left;
}

.entry-content th {
  background: #f8fafc;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: #091420;
}

/* Estilos de Comentários Aninhados (Replies) */
.comment-list .children {
  margin-left: 1.5rem;
  margin-top: 1rem;
  border-left: 2px solid rgba(9, 20, 32, 0.25);
  padding-left: 1rem;
}
@media (max-width: 640px) {
  .comment-list .children {
    margin-left: 0.75rem;
    padding-left: 0.5rem;
  }
}

/* ========================================================================= */
/* ESTILIZAÇÃO DOS WIDGETS DA BARRA LATERAL (Novos Artigos & Comentários)    */
/* ========================================================================= */
.widget_recent_entries ul,
.widget_recent_comments ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
}

.widget_recent_entries ul li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.2s ease;
  position: relative;
}

.widget_recent_entries ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget_recent_entries ul li:first-child {
  padding-top: 0.25rem;
}

.widget_recent_entries ul li a {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.45;
  text-decoration: none !important;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}

.widget_recent_entries ul li a:hover {
  color: #b45309;
  transform: translateX(3px);
}

.widget_recent_entries ul li .post-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: #64748b;
  letter-spacing: 0.02em;
}

/* Widget: Novos Comentários */
.widget_recent_comments ul li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.5;
}

.widget_recent_comments ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget_recent_comments ul li .comment-author-link {
  font-weight: 700;
  color: #091420;
}

.widget_recent_comments ul li a {
  color: #091420;
  text-decoration: none !important;
  font-weight: 500;
  transition: color 0.15s ease;
}

.widget_recent_comments ul li a:hover {
  color: #b45309;
  text-decoration: underline !important;
}

/* Estado Vazio de Comentários ou Widgets */
.widget_recent_comments:empty,
.widget_recent_comments > div,
.widget_recent_comments p,
.widget_recent_entries p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #64748b;
  font-style: italic;
  padding: 0.5rem 0;
}

/* ==========================================================================
   Header Logo & Branding Proportions
   ========================================================================== */
.theme-logo-wrapper {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  max-height: 56px !important;
  flex-shrink: 0 !important;
}

.theme-logo-wrapper a,
.theme-logo-wrapper .custom-logo-link,
a.custom-logo-link {
  display: inline-flex !important;
  align-items: center !important;
  max-height: 48px !important;
  height: 48px !important;
  line-height: 1 !important;
}

.theme-logo-wrapper img,
.theme-logo-wrapper .custom-logo,
.theme-logo-img,
img.custom-logo,
.custom-logo-link img {
  height: 44px !important;
  max-height: 48px !important;
  width: auto !important;
  max-width: 220px !important;
  aspect-ratio: 1024 / 409 !important;
  object-fit: contain !important;
  display: block !important;
}

@media (max-width: 640px) {
  .theme-logo-wrapper a,
  .theme-logo-wrapper .custom-logo-link {
    height: 38px !important;
    max-height: 38px !important;
  }
  .theme-logo-wrapper img,
  .theme-logo-wrapper .custom-logo,
  .theme-logo-img,
  img.custom-logo,
  .custom-logo-link img {
    height: 36px !important;
    max-height: 38px !important;
    max-width: 170px !important;
  }
}

/* Utilitário nativo de truncamento de texto */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Evita duplicatas dos widgets padrão do WordPress no container dinâmico */
.dynamic-sidebar-area .widget_recent_entries,
.dynamic-sidebar-area .widget_recent_comments {
  display: none !important;
}

/* Estilização consistente de qualquer outro widget do WordPress */
.dynamic-sidebar-area .widget {
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.dynamic-sidebar-area .widget .widget-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: #091420;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

/* ========================================================================= */
/* ESTILOS DA BUSCA SEMÂNTICA FEDERADA (MODAL ⌘K & CITAÇÕES IA)              */
/* ========================================================================= */
#semanticoSearchModal {
  border: none;
  background: transparent;
  outline: none;
  animation: semanticoModalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#semanticoSearchModal::backdrop {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: semanticoBackdropFadeIn 0.2s ease-out forwards;
}

@keyframes semanticoModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes semanticoBackdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.semantico-citation-badge {
  text-decoration: none;
  cursor: pointer;
}

.semantico-citation-badge:hover {
  text-decoration: underline;
}
