/* =========================================
   RESETS BÁSICOS E VARIÁVEIS
   ========================================= */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth; /* Animação suave ao clicar no menu lateral */
}

:root {
    --bg-main: #0b0e14;
    --bg-card: #131821;
    --bg-card-hover: #1a212d;
    --border-color: #262f3d;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent-yellow: #facc15;
    --accent-orange: #fb923c;
    --accent-blue: #38bdf8; /* Nova cor para respiro e defesas */
    --font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   BARRA DE NAVEGAÇÃO (NAVBAR) - GLOBAL
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
  display: flex;
  justify-content: center;   /* centraliza horizontalmente */
}

.logo img {
  height: 80px;   /* reduza aqui: antes estava 120px */
  width: auto;
}


.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.search-nav {
    display: flex;
    align-items: center;
    background-color: #1a2230;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    gap: 0.5rem;
}

.search-nav i {
    color: var(--text-muted);
}

.search-nav input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.875rem;
    width: 120px;
}

.search-nav .shortcut {
    color: var(--text-muted);
    font-size: 0.75rem;
    background-color: #262f3d;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* =========================================
   PÁGINA INICIAL (INDEX)
   ========================================= */
.hero {
    position: relative;
    padding: 6rem 1rem 4rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.hero-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #1a2530;
    border: 1px solid #2d3c4d;
    padding: 0.3rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.status-pill strong {
    color: var(--text-main);
    font-weight: 500;
}

.status-pill .dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.main-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.highlight-yellow {
    color: var(--accent-yellow);
}

.highlight-white {
    color: var(--text-main);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 700px;
}

.subtitle strong {
    color: var(--text-main);
}

.main-search {
    display: flex;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    gap: 1rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s;
}

.main-search:focus-within {
    border-color: #475569;
}

.main-search i {
    color: var(--text-muted);
    font-size: 1.25rem;
}

.main-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 1rem;
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tag:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-main);
}

/* Stats Section */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem 1rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-orange);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.divider {
    height: 1px;
    background-color: var(--border-color);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Domains Section */
.domains {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1rem;
}

.section-header-center {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    color: var(--accent-orange);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    border-color: #3b4859;
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* Activity Section */
.activity {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1rem;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.activity-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.view-all:hover {
    color: var(--text-main);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.activity-item:hover {
    background-color: var(--bg-card);
}

.activity-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.activity-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    min-width: 100px;
    text-align: center;
}

.badge-tipologia { background-color: rgba(250, 204, 21, 0.1); color: #facc15; }
.badge-tatica { background-color: rgba(56, 189, 248, 0.1); color: #38bdf8; }
.badge-engenharia { background-color: rgba(163, 230, 53, 0.1); color: #a3e635; }
.badge-ferramenta { background-color: rgba(45, 212, 191, 0.1); color: #2dd4bf; }
.badge-glossario { background-color: rgba(251, 191, 36, 0.1); color: #fbbf24; }

.activity-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.activity-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.activity-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    font-family: monospace;
    color: var(--text-muted);
}

.activity-right .author {
    color: #cbd5e1;
}

/* =========================================
   PÁGINAS DE CONTEÚDO COM SIDEBAR
   ========================================= */

/* Novo Layout Grid para suportar a barra lateral */
.page-layout {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem 6rem 1.5rem;
    gap: 4rem; /* Espaçamento grande entre sidebar e conteúdo */
    align-items: flex-start;
}

/* Sidebar Estilos */
.sidebar-nav {
    width: 250px;
    position: sticky;
    top: 100px; /* Mantém ela na tela quando o usuário rola pra baixo */
    flex-shrink: 0;
}

.sidebar-block {
    margin-bottom: 2.5rem;
}

.sidebar-block h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    font-weight: 700;
}

.sidebar-block ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-block a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #cbd5e1;
    transition: color 0.2s;
}

.sidebar-block a:hover {
    color: var(--accent-yellow);
}

/* Container de Leitura */
.article-container {
    flex: 1; /* Ocupa o espaço restante */
    max-width: 750px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.breadcrumb a {
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--text-main);
}

.breadcrumb i {
    font-size: 0.75rem;
}

.breadcrumb span {
    color: var(--accent-yellow);
    font-weight: 500;
}

.article-header {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.article-header .activity-badge {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.article-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-item .highlight {
    color: #cbd5e1;
}

/* Corpo do Texto e Respiro Visual */
.article-content {
    font-size: 1.05rem;
    line-height: 1.85; /* Maior espaçamento entre linhas */
    color: #e2e8f0; 
}

/* Subtítulos mais destacados e com ícones */
.article-content h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 4rem; /* Maior respiro antes de novas seções */
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.article-content h2 i {
    color: var(--text-muted);
    font-size: 1.4rem;
}

.article-content p {
    margin-bottom: 1.75rem; /* Maior espaço entre parágrafos */
}

.article-content strong {
    color: var(--text-main);
    font-weight: 600;
}

.article-content ul {
    margin-bottom: 2.5rem;
    padding-left: 1.5rem;
    list-style-type: square;
}

.article-content li {
    margin-bottom: 0.75rem;
}

.article-content li::marker {
    color: var(--text-muted);
}

/* Caixas de Alerta e Defesa (Cores) */
.tactic-box {
    padding: 1.75rem;
    border-radius: 8px; /* Cantos arredondados, menos agressivo */
    margin: 3rem 0; /* Maior distância do texto normal */
}

/* Caixa Vermelha (Red Flags) */
.tactic-box.alert-box {
    background-color: rgba(239, 68, 68, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid #ef4444; 
}

.tactic-box.alert-box .box-header i {
    color: #ef4444;
}

/* NOVA Caixa Azul/Ciano (Contramedidas/Autodefesa) */
.tactic-box.defense-box {
    background-color: rgba(56, 189, 248, 0.04);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-left: 4px solid var(--accent-blue);
}

.tactic-box.defense-box .box-header i {
    color: var(--accent-blue);
}

/* Estilos internos das caixas */
.box-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.box-header i {
    font-size: 1.5rem;
}

.tactic-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.tactic-box p:last-child,
.tactic-box ul:last-child {
    margin-bottom: 0;
}

/* =========================================
   RESPONSIVIDADE GERAL (CELULARES/TABLETS)
   ========================================= */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    /* No celular/tablet pequeno, o menu lateral some ou vai pro final */
    .page-layout {
        flex-direction: column;
        gap: 2rem;
    }
    .sidebar-nav {
        width: 100%;
        position: static;
        order: 2; /* Joga a sidebar para o final da página */
        border-top: 1px solid var(--border-color);
        padding-top: 2rem;
    }
    .article-container {
        order: 1; /* Mantém o texto no topo */
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Ajustes Index */
    .main-title { font-size: 2.5rem; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .nav-links { display: none; }
    .activity-item { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .activity-right { width: 100%; justify-content: flex-end; }
    
    /* Ajustes Artigo */
    .article-title { font-size: 2rem; }
    .page-layout { padding-top: 2rem; }
}

@media (max-width: 640px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}