/* ============================= */
/* RESET                         */
/* ============================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================= */
/* BODY                          */
/* ============================= */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(160deg, oklch(100% 0.00011 271.152) 0%, oklch(86.74% 0.05521 285.176) 100%);
    min-height: 100vh;
    color: #e2e8f0;
    overflow-x: hidden;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ============================= */
/* OVERLAY                       */
/* ============================= */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================= */
/* HEADER                        */
/* ============================= */
.topbar {
    background: oklch(14% 0.06 273);
    color: white;
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid oklch(50% 0.12 273 / 0.25);
}

.topbar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    font-size: 26px;
    color: #a5b4fc;
    font-weight: bold;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: stretch;
    height: 100%;
}

.navbar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    padding: 6px 16px;
    height: auto;
    color: #babec9;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    white-space: nowrap;
    border-radius: 6px;
    transition: color 0.25s, background 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

/* ── HOVER: fundo tech iluminado ─────────────────────────
   Ao passar o mouse, o link ganha um fundo semitransparente
   com tom roxo/índigo — combina com a paleta do TecnoEra.
   O box-shadow interno (inset) cria uma borda sutil brilhante
   em cima e embaixo, dando um efeito de "painel selecionado". */
.navbar .nav-link:hover {
    color: #e2e8f0;
    background: linear-gradient(
        135deg,
        rgba(101, 101, 104, 0.418) 0%,
        rgba(236, 238, 255, 0.041) 50%,
        rgba(225, 225, 255, 0.15) 100%
    );
    box-shadow:
        inset 0 1px 0 rgba(165, 180, 252, 0.2),
        inset 0 -1px 0 rgba(165, 180, 252, 0.1);
}

.navbar .nav-link + .nav-link {
    margin-left: 4px;
}

/* ── LINK ATIVO: fundo permanente mais intenso ───────────
   O link da página atual fica sempre com o fundo visível,
   um pouco mais forte que o hover, e com borda lateral
   esquerda colorida como indicador de "selecionado".       */
.navbar .nav-link.nav-ativo {
    color: #c7d2fe;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.20) 0%,
        rgba(129, 140, 248, 0.14) 50%,
        rgba(99, 102, 241, 0.20) 100%
    );
    box-shadow:
        inset 0 1px 0 rgba(165, 180, 252, 0.18),
        inset 0 -1px 0 rgba(165, 180, 252, 0.08);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    height: 2px;
    background: #a5b4fc;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================= */
/* HERO SECTION                  */
/* ============================= */
.hero-section {
    width: 100%;
    background: linear-gradient(135deg,
        oklch(44% 0.11 273) 0%,
        oklch(37.334% 0.09452 273.246) 40%,
        oklch(28% 0.09 278) 100%
    );
    padding: 36px 0;
    border-bottom: 1px solid oklch(50% 0.12 273 / 0.2);
}

.hero-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    align-items: stretch;
}

.hero {
    position: relative;
    overflow: hidden;
    clip-path: polygon(5px 0%, calc(100% - 5px) 0%, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0% calc(100% - 5px), 0% 5px);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 20px oklch(10% 0.05 273 / 0.5);
    transition: transform 0.3s ease;
}

.hero-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
    border-top: 4px solid oklch(57.029% 0.23974 277.987);
}

.hero:hover .hero-bg { transform: scale(1.08); }
.hero:hover          { transform: translateY(-3px); }

.hero-content {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, oklch(14% 0.06 273 / 0.95), oklch(14% 0.06 273 / 0.4), transparent);
    color: rgb(255, 255, 255);
}

.hero-content h2 { border-radius: 5px; font-size: 18px; background-color: rgba(7, 7, 7, 0.313); line-height: 1.3; }
.hero-content p  { font-size: 13px; color: #c7d2fe; margin-top: 4px; padding: 2px;}

.hero-principal {
    height: 384px;
    box-shadow: 0 8px 30px oklch(40% 0.15 273 / 0.4);
}

.hero-principal:hover { transform: translateY(-3px); }
.hero-secundario      { height: 384px; }

/* ============================= */
/* TAG                           */
/* ============================= */
.tag {
    display: inline-block;
    background: oklch(26.555% 0.00148 16.124);
    color: #ffffff;
    border: 1px solid rgb(59, 58, 58);
    box-shadow: 0 0 8px rgb(247, 247, 248);
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* ============================= */
/* CONTAINER                     */
/* ============================= */
.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 15px;
}

/* ============================= */
/* MAIN GRID                     */
/* ============================= */
.main-grid {
    display: grid;
    grid-template-columns: 463px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* ============================= */
/* SIDEBAR (home pública)        */
/* ============================= */
@keyframes pulse-bar {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 1; }
}

.sidebar {
    background: linear-gradient(135deg,
        oklch(44% 0.11 273) 0%,
        oklch(37.334% 0.09452 273.246) 40%,
        oklch(28% 0.09 278) 100%
    );
    padding: 20px;
    border-radius: 10px;
    border: 1px solid oklch(50% 0.1 273 / 0.4);
    position: relative;
    overflow: hidden;
}

.sidebar-title {
    position: relative;
    color: #a5b4fc;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 18px;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #a5b4fc, transparent);
    animation: pulse-bar 2.5s ease-in-out infinite;
}

.sidebar-links { list-style: none; }

.sidebar-links li {
    border-bottom: 1px solid oklch(100% 0 0 / 0.08);
}

.sidebar-links li:last-child { border-bottom: none; }

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    color: #c7d2fe;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.4;
    transition: color 0.25s ease, gap 0.25s ease;
}

.sidebar-links a::before {
    content: '›';
    color: #a5b4fc;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.sidebar-links a:hover           { color: #ffffff; gap: 12px; background: oklch(100% 0 0 / 0.1); border-radius: 6px; padding-left: 8px; }
.sidebar-links a:hover::before   { transform: translateX(4px); color: #ffffff; }

.sidebar-tag {
    display: inline-block;
    background: oklch(57.029% 0.23974 277.987 / 0.25);
    color: #a5b4fc;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ============================= */
/* SIDEBAR LINKS COM MINIATURA   */
/* ============================= */
/* Usado em sidebar-home.php para exibir uma thumb antes do título
   do artigo. A thumb substitui visualmente a seta › do ::before.

   Layout: a thumb fica flutuada à esquerda (float: left). Se o
   título for curto, ocupa só a linha ao lado da thumb. Se for
   longo, "envolve" a thumb — as primeiras linhas ficam ao lado e
   as seguintes descem pra baixo dela. É o comportamento clássico
   de texto envolvendo imagem, que só o float oferece (flexbox e
   grid não fazem isso). */

.sidebar-link-com-thumb {
    /* Sobrescreve o flex herdado de .sidebar-links a.
       flow-root cria um contexto de bloco que CONTÉM o float,
       evitando que ele "vaze" para o próximo item da lista. */
    display: flow-root;
}

.sidebar-link-com-thumb::before {
    display: none; /* esconde a seta › que aparece nos outros links */
}

.sidebar-link-thumb {
    width: 120px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid oklch(100% 0 0 / 0.12);
    background: oklch(20% 0.04 273); /* fundo enquanto a imagem carrega */
    transition: border-color 0.25s ease;
    float: left;
    margin: 2px 10px 4px 0;
}

.sidebar-link-text {
    /* O texto flui naturalmente ao redor da imagem flutuada.
       Não precisa de flex aqui — o navegador cuida sozinho. */
}

.sidebar-links a:hover .sidebar-link-thumb {
    border-color: oklch(100% 0 0 / 0.25);
}

.sidebar-close { display: none; }

/* ─── GAVETA MOBILE COMPARTILHADA (vinda do footer.php) ─────
   Aplicada apenas ao <aside> da gaveta que mora no footer
   (páginas que não são a home). A home tem seu próprio <aside>
   sem este modificador.

   Por que existe: a .sidebar "pura" no desktop é uma COLUNA
   VISÍVEL (background gradiente, padding, etc.). Mas a gaveta
   do footer só faz sentido no mobile — no desktop ela precisa
   sumir, senão aparece como uma caixa roxa solta no fim da
   página. Esta regra força display:none por padrão.

   No mobile (@media max-width:900px), as regras de .sidebar /
   .sidebar.open já existentes cuidam de transformar este mesmo
   elemento em gaveta deslizante. A regra .sidebar.open tem
   especificidade 0,2,0 (duas classes), maior que esta (0,1,0),
   então quando abre, vence e mostra a gaveta. */
.sidebar--drawer {
    display: none;
}

/* ============================= */
/* POSTS                         */
/* ============================= */
/* O seletor cobre h1 E h2 porque a home passou a usar <h1> aqui
   (SEO, 21/07/2026) enquanto outras páginas seguem com <h2>.
   Mesma aparência para os dois — a mudança é semântica, não visual.
   A classe .titulo-secao existe para tornar a intenção explícita
   caso o HTML mude de tag de novo no futuro. */
.posts h1,
.posts h2,
.titulo-secao {
    margin-bottom: 20px;
    color: #404346;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
}

.post {
    display: flex;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(
        160deg,
        oklch(22% 0.045 275 / 0.90) 0%,
        oklch(18% 0.055 272 / 0.88) 55%,
        oklch(20% 0.05  268 / 0.92) 100%
    );
    border: 1px solid oklch(100% 0 0 / 0.10);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 oklch(100% 0 0 / 0.09);
    position: relative;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(to bottom, oklch(100% 0 0 / 0.05), transparent);
    pointer-events: none;
    z-index: 0;
}

.post:hover {
    transform: translateY(-4px);
    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 oklch(100% 0 0 / 0.13);
}

.post-img-wrapper {
    width: 260px;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

.post:hover .post-img { transform: scale(1.06); }

.post-content {
    padding: 22px 26px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 3px solid oklch(57.029% 0.23974 277.987);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.post-date {
    display: block;
    font-size: 11px;
    color: #cfcfcf;
    margin-top: 8px;
    opacity: 0.75;
    letter-spacing: 0.3px;
}

.post-content .tag {
    margin-bottom: 8px;
    width: fit-content;
}

.post-content h3 {
    color: #e8edf5;
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: break-word;
}

.post-content p {
    font-size: 14px;
    color: #cfd6e0;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 18px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.post-content a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #e1e6ff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: gap 0.2s ease, color 0.2s ease;
    width: fit-content;
    position: static;
}

.post-content a::after {
    content: '→';
    display: inline-block;
    transition: transform 0.2s ease;
}

.post-content a:hover {
    color: #c7d2fe;
    gap: 9px;
}

.post-content a:hover::after { transform: translateX(3px); }

.post-content a.card-link::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 12px;
}

.post-content a:hover::after { transform: translateX(3px); }

/* ============================= */
/* FOOTER                        */
/* ============================= */
.footer {
    background: oklch(14% 0.06 273);
    color: #c7d2fe;
    margin-top: 40px;
    font-size: 13px;
    letter-spacing: 0.3px;
    border-top: 1px solid oklch(50% 0.12 273 / 0.25);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-left h2.logo {
    font-size: 20px;
    color: #a5b4fc;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.footer-left p {
    color: #8892b0;
    font-size: 13px;
    line-height: 1.5;
}

/* Navegação institucional do rodapé (link Fale Conosco) */
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-nav a {
    color: #8892b0;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-nav a:hover {
    color: #a5b4fc;
}

.footer-bottom {
    border-top: 1px solid oklch(50% 0.12 273 / 0.15);
    text-align: center;
    padding: 14px 16px;
    color: #8892b0;
    font-size: 12px;
}

/* ============================= */
/* RESPONSIVO                    */
/* ============================= */
@media (max-width: 900px) {
    .hamburger { display: flex; }
    .navbar    { display: none; }

    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hero, .hero-principal, .hero-secundario {
        height: 228px;
        width: 100%;
        grid-column: unset;
        grid-row: unset;
        min-height: unset;
    }

    .main-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "posts";
        gap: 0;
    }

    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: min(85vw, 364px);
        height: 100dvh;
        z-index: 150;
        border-radius: 0;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding-top: 24px;
    }

    .sidebar.open {
        display: block;
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 20px;
    }

    .sidebar-close button {
        background: none;
        border: none;
        color: #a5b4fc;
        font-size: 28px;
        cursor: pointer;
        line-height: 1;
    }

    .posts {
        grid-area: posts;
        width: 100%;
        min-width: 0;
    }

    .post {
        flex-direction: column;
        width: 100%;
        border-radius: 12px;
    }

    .post-img-wrapper {
        width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
        z-index: 1;
    }

    .post-content {
        border-left: none;
        border-top: 3px solid oklch(57.029% 0.23974 277.987);
        width: 100%;
        justify-content: flex-start;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .logo { font-size: 18px; }
    .hero, .hero-principal, .hero-secundario { height: 204px; }
    .hero-content h2 { font-size: 15px; }
    .post-img-wrapper { height: auto; }
    .container { margin: 16px auto; }
    .posts h2  { font-size: 17px; }
}

/* ============================= */
/* POST PAGE                     */
/* ============================= */
.post-page {
    min-height: 80vh;
}

.breadcrumb-bar {
    background: oklch(14% 0.06 273 / 0.6);
    border-bottom: 1px solid oklch(50% 0.12 273 / 0.2);
    padding: 10px 0;
}

.breadcrumb-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #8892b0;
    flex-wrap: wrap;
}

.breadcrumb-inner a {
    color: #a5b4fc;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-inner a:hover { color: #fff; }

.breadcrumb-current {
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.post-page-container {
    max-width: 1320px;
    margin: 30px auto;
    padding: 0 15px;
}

.post-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px;
    align-items: start;
}

.article {
    background: linear-gradient(135deg,
        oklch(92.551% 0.00278 285.785) 0%,
        oklch(97.766% 0.01079 280.389) 40%,
        oklch(96.115% 0.00011 271.152) 100%
    );
    border: 1px solid oklch(37.124% 0.2275 264.187);
    border-radius: 10px;
    padding: 32px;
    box-shadow: 0 4px 20px oklch(10% 0.05 273 / 0.4);
    min-width: 0;
    overflow: hidden;
}

.article .tag { margin-bottom: 12px; }

.article-title {
    font-size: 26px;
    line-height: 1.35;
    color: #1e2a38;
    margin: 12px 0 10px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.article-resumo {
    font-size: 16px;
    color: #555e70;
    line-height: 1.6;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid oklch(50% 0.12 273 / 0.15);
    overflow-wrap: break-word;
    word-break: break-word;
}

.article-hero-img {
    width: 70%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto 28px auto;
    background: #1a1a1a;
}

.article-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: #3a4250;
    overflow-wrap: break-word;
    word-break: break-word;
}

.article-body p  { margin-bottom: 16px; }
.article-body h2 { font-size: 20px; color: #1e2a38; margin: 28px 0 12px; }
.article-body h3 { font-size: 17px; color: #2d3748; margin: 22px 0 10px; }
.article-body ul, .article-body ol { padding-left: 22px; margin-bottom: 16px; }
.article-body li { margin-bottom: 6px; }
.article-body a  { color: #6366f1; text-decoration: underline; }
.article-body blockquote {
    border-left: 4px solid oklch(57.029% 0.23974 277.987);
    padding: 10px 18px;
    margin: 20px 0;
    background: oklch(90% 0.03 273 / 0.4);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #555;
}

/* ── VÍDEO EMBED (YouTube/Vimeo) ──────────────────────────────
   O editor insere o vídeo como um <iframe> com largura/altura FIXAS
   (ex: 560x315). A regra base lá no topo (img, video, iframe) só
   limita a largura — a altura continuaria 315px, deixando o vídeo
   achatado/com barras no mobile. Aqui forçamos proporção 16:9 fluida:
   o iframe ocupa 100% da largura disponível e a altura é calculada
   pela própria proporção (aspect-ratio), escalando certo em qualquer
   tela. Vale para vídeos dentro do conteúdo de posts e artigos.        */
.article-body iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;   /* proporção padrão de vídeo */
    height: auto;           /* altura derivada da proporção, não fixa */
    margin: 22px 0;
    border: 0;
    border-radius: 8px;
    background: #000;       /* fundo enquanto o player carrega */
}

/* ============================= */
/* ANEXOS PDF DO ARTIGO          */
/* ============================= */
/* Bloco que aparece após o conteúdo do artigo, listando os
   materiais complementares (PDFs) com link de download forçado.
   Visual sóbrio alinhado com a paleta do TecnoEra. */

.article-anexos {
    margin: 32px 0;
    padding: 18px 20px;
    background: oklch(90% 0.03 273 / 0.4);
    border: 1px solid oklch(50% 0.12 273 / 0.15);
    border-radius: 10px;
}

.article-anexos h3 {
    font-size: 15px;
    color: #1e2a38;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.anexos-lista {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    /* Grid responsivo: cards menores (mínimo 200px), então cabem
       mais por linha automaticamente. */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 6px;
}

.anexos-lista li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.anexo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none !important;
    color: #1e2a38 !important;
    transition: all 0.2s ease;
    height: 100%;
    box-sizing: border-box;
}

.anexo-link:hover {
    border-color: oklch(57.029% 0.23974 277.987);
    background: oklch(98% 0.01 277);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.anexo-icon {
    width: 28px;
    height: 28px;
    background: #475569;
    color: white;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.anexo-link:hover .anexo-icon {
    background: oklch(57.029% 0.23974 277.987);
}

.anexo-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.anexo-titulo {
    font-weight: 600;
    font-size: 13px;
    color: #1e2a38;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.anexo-meta {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}

.anexo-acao {
    font-size: 14px;
    flex-shrink: 0;
    opacity: 0.4;
    transition: all 0.2s ease;
}

.anexo-link:hover .anexo-acao {
    opacity: 1;
    transform: translateY(1px);
}

@media (max-width: 480px) {
    .article-anexos { padding: 14px 16px; }
    .article-anexos h3 { font-size: 14px; }
    .anexo-link { padding: 7px 10px; }
    .anexo-icon { width: 26px; height: 26px; font-size: 12px; }
}

/* ============================= */
/* COMPARTILHAR (SHARE)          */
/* ============================= */
/* Bloco aparece logo após o conteúdo do artigo, antes da data.
   Cores oficiais das marcas WhatsApp (#25D366) e Telegram (#229ED9). */
.share-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 20px;
    padding: 16px 20px;
    background: oklch(90% 0.03 273 / 0.4);
    border: 1px solid oklch(50% 0.12 273 / 0.15);
    border-radius: 10px;
}

.share-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-right: 6px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.share-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.share-whatsapp { background: #25D366; }
.share-whatsapp:hover { background: #1ebe5b; }

.share-telegram { background: #229ED9; }
.share-telegram:hover { background: #1a87b8; }

/* No mobile: label vira linha própria, botões esticam pra largura cheia. */
@media (max-width: 480px) {
    .share-buttons {
        padding: 14px 16px;
    }
    .share-label {
        width: 100%;
        margin-bottom: 4px;
    }
    .share-btn {
        flex: 1;
        justify-content: center;
    }
}

/* BOTÃO VOLTAR */
.article-back {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid oklch(50% 0.12 273 / 0.15);
}

.btn-back {
    display: inline-block;
    padding: 9px 18px;
    background: oklch(44% 0.11 273);
    color: #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-back:hover { background: oklch(37% 0.09 273); color: #fff; }

/* SIDEBAR DO POST */
.post-sidebar-box {
    background: linear-gradient(135deg,
        oklch(44% 0.11 273) 0%,
        oklch(37.334% 0.09452 273.246) 40%,
        oklch(28% 0.09 278) 100%
    );
    padding: 20px;
    border-radius: 10px;
    border: 1px solid oklch(50% 0.1 273 / 0.4);
    position: sticky;
    top: 80px;
}

/* RELACIONADOS */
.relacionados {
    margin-top: 40px;
}

.relacionados-titulo {
    font-size: 20px;
    color: #2f2f32;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid oklch(57.029% 0.23974 277.987);
    display: inline-block;
}


.relacionados-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.rel-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg,
        oklch(92.551% 0.00278 285.785) 0%,
        oklch(97.766% 0.01079 280.389) 100%
    );
    border: 1px solid oklch(37.124% 0.2275 264.187);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 12px oklch(10% 0.05 273 / 0.3);
}

.rel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px oklch(40% 0.15 273 / 0.4);
}

.rel-img-wrapper {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.rel-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.rel-card:hover .rel-img-wrapper img { transform: scale(1.07); }

.rel-content {
    padding: 14px;
    border-top: 3px solid oklch(57.029% 0.23974 277.987);
}

.rel-content h3 {
    font-size: 14px;
    color: #1e2a38;
    margin: 8px 0 6px;
    line-height: 1.4;
}

.rel-content p {
    font-size: 12px;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 900px) {
    .post-page-grid { grid-template-columns: 1fr; }
    .post-sidebar { display: none; }
    .article { padding: 20px; }
    .article-title { font-size: 21px; }
    .relacionados-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .article { padding: 16px; }
    .article-title { font-size: 18px; }
    .article-body  { font-size: 15px; }
    .relacionados-grid { grid-template-columns: 1fr; }
}

/* ============================= */
/* NAVBAR — LINK ATIVO           */
/* ============================= */
.navbar a.nav-ativo {
    color: #ffffff;
    border-bottom: 2px solid #a5b4fc;
    padding-bottom: 2px;
}

.sidebar-links a.nav-ativo {
    color: #ffffff;
    background: oklch(100% 0 0 / 0.1);
    border-radius: 6px;
    padding-left: 8px;
}

/* ============================= */
/* PÁGINA DE CATEGORIA           */
/* ============================= */
.categoria-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid oklch(57.029% 0.23974 277.987);
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.categoria-titulo { font-size: 24px; color: #898989; font-weight: bold; }
.categoria-contagem { font-size: 14px; color: #8892b0; }

.categoria-vazio {
    padding: 60px 20px;
    text-align: center;
    color: #8892b0;
    font-size: 15px;
    background: linear-gradient(135deg,
        oklch(92.551% 0.00278 285.785) 0%,
        oklch(97.766% 0.01079 280.389) 100%
    );
    border-radius: 10px;
    border: 1px solid oklch(37.124% 0.2275 264.187);
}

.categoria-vazio strong { color: #4b5563; }

/* ============================= */
/* PAGINAÇÃO                     */
/* ============================= */
.paginacao {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 28px 0 16px;
}

.paginacao-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    background: linear-gradient(
        135deg,
        oklch(22% 0.045 275 / 0.90) 0%,
        oklch(18% 0.055 272 / 0.88) 100%
    );
    border: 1px solid oklch(100% 0 0 / 0.10);
    color: #c7d2fe;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.paginacao-btn:hover {
    background: oklch(44% 0.11 273);
    color: #fff;
    transform: translateY(-2px);
}

.paginacao-btn.paginacao-ativo {
    background: oklch(57.029% 0.23974 277.987);
    border-color: transparent;
    color: #fff;
    font-weight: bold;
    pointer-events: none;
}

@media (max-width: 480px) {
    .paginacao-btn {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
        padding: 0 9px;
    }
}

/* DATA DO ARTIGO */
.article-date {
    font-size: 13px;
    color: #232323;
    margin-top: 20px;
    margin-bottom: 18px;
    opacity: 0.8;
    letter-spacing: 0.3px;
    border-top: 1px solid #e8e4ff;
    padding-top: 16px;
}

/* ============================= */
/* CARD INTEIRO CLICÁVEL         */
/* ============================= */
.post-content a { position: static; }

.post-content a::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.post-img-wrapper { z-index: 0; }

.post-content a::after {
    position: relative;
    z-index: 2;
}

/* ============================= */
/* POST PAGE — SEM SIDEBAR       */
/* ============================= */
/*
   Variante do .post-page-grid usada em post.php, artigo.php e
   categoria.php quando a sidebar foi removida.

   Em vez de criar uma classe wrapper totalmente nova, aplicamos
   esta classe MODIFICADORA junto com a .post-page-grid existente.
   Assim a única coisa que muda é o número de colunas — o resto
   do layout (gap, align-items) continua sendo controlado pela
   classe base.

   A largura é controlada pelo .post-page-container pai (1100px),
   exatamente igual ao .container da home — assim post e home têm
   a mesma "área útil" e o site fica coeso.

   Para voltar a ter sidebar em alguma dessas páginas, basta:
   1. Re-adicionar o <aside class="post-sidebar"> no HTML
   2. Remover a classe --no-sidebar do .post-page-grid
*/
.post-page-grid--no-sidebar {
    grid-template-columns: minmax(0, 1fr);
    margin: 0 auto;
}

/* ============================= */
/* TOPBAR ACTIONS (busca + menu) */
/* ============================= */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ============================= */
/* BOTÃO DE BUSCA (lupa)         */
/* ============================= */
.search-toggle {
    background: none;
    border: none;
    color: #8892b0;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.25s, background 0.25s;
    flex-shrink: 0;
}

.search-toggle:hover {
    color: #e2e8f0;
    background: rgba(165, 180, 252, 0.1);
}

/* ============================= */
/* BARRA DE BUSCA (overlay)      */
/* ============================= */

/* Fundo escuro que aparece atrás da barra */
.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 240;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    display: block;
    opacity: 1;
}

/* Barra em si — desliza de cima para baixo */
.search-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 250;
    background: linear-gradient(135deg, oklch(14% 0.06 273) 0%, oklch(18% 0.07 275) 100%);
    padding: 20px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid oklch(57.029% 0.23974 277.987);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar.open {
    transform: translateY(0);
}

.search-bar-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Form dentro da barra */
.search-form {
    flex: 1;
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid oklch(50% 0.12 273 / 0.4);
    background: oklch(20% 0.04 273);
    color: #e2e8f0;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form input::placeholder {
    color: #64748b;
}

.search-form input:focus {
    border-color: oklch(57.029% 0.23974 277.987);
    box-shadow: 0 0 0 3px oklch(57.029% 0.23974 277.987 / 0.2);
}

.search-submit {
    padding: 12px 24px;
    background: oklch(57.029% 0.23974 277.987);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
}

.search-submit:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* Botão × de fechar */
.search-bar-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.search-bar-close:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
}

/* ============================= */
/* PÁGINA DE BUSCA (busca.php)   */
/* ============================= */

/* Form de busca inline na página de resultados */
.busca-form-inline {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
}

.busca-input-inline {
    flex: 1;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid oklch(50% 0.12 273 / 0.3);
    background: linear-gradient(135deg,
        oklch(22% 0.045 275 / 0.90) 0%,
        oklch(18% 0.055 272 / 0.88) 100%
    );
    color: #e2e8f0;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.busca-input-inline::placeholder {
    color: #64748b;
}

.busca-input-inline:focus {
    border-color: oklch(57.029% 0.23974 277.987);
    box-shadow: 0 0 0 3px oklch(57.029% 0.23974 277.987 / 0.2);
}

.busca-btn-inline {
    padding: 12px 22px;
    background: oklch(57.029% 0.23974 277.987);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.busca-btn-inline:hover {
    opacity: 0.88;
}

/* Título de seção nos resultados (Posts / Análises) */
.busca-secao {
    font-size: 18px;
    color: #38393f;
    margin: 28px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid oklch(50% 0.12 273 / 0.2);
}

/* ============================= */
/* BUSCA — RESPONSIVO            */
/* ============================= */
@media (max-width: 600px) {
    .search-bar-inner {
        flex-wrap: wrap;
    }

    .search-form {
        width: 100%;
    }

    .search-submit {
        padding: 12px 16px;
        font-size: 14px;
    }

    .busca-form-inline {
        flex-direction: column;
    }

    .busca-btn-inline {
        width: 100%;
    }
}

/* ============================= */
/* GALERIA DE IMAGENS (post.php) */
/* ============================= */

.post-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 28px;
}

.gallery-thumb {
    position: relative;
    flex: 0 0 calc(25% - 6px);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 6px;
    border: 2px solid oklch(50% 0.12 273 / 0.2);
    cursor: pointer;
    padding: 0;
    background: oklch(20% 0.04 273);
    transition: border-color 0.2s, transform 0.2s;
}

.gallery-thumb:hover,
.gallery-thumb:focus-visible {
    border-color: oklch(57.029% 0.23974 277.987);
    transform: translateY(-2px);
    outline: none;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.08);
}

.gallery-thumb::after {
    content: '🔍';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: oklch(14% 0.06 273 / 0.5);
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-thumb:hover::after {
    opacity: 1;
}

@media (max-width: 480px) {
    .post-gallery {
        gap: 6px;
    }
    .gallery-thumb {
        flex: 0 0 calc(50% - 3px);
    }
}

/* ============================= */
/* LIGHTBOX                      */
/* ============================= */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img-wrap {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 36px;
    line-height: 1;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 1;
    user-select: none;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-50%) scale(1.1); }
.lightbox-next:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-50%) scale(1.1); }

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 12px;
    border-radius: 99px;
}

@media (max-width: 600px) {
    .lightbox-prev { left: 8px; width: 40px; height: 40px; font-size: 28px; }
    .lightbox-next { right: 8px; width: 40px; height: 40px; font-size: 28px; }
    .lightbox-close { top: 10px; right: 10px; width: 38px; height: 38px; font-size: 26px; }
}

/* ============================= */
/* SIDEBAR HOME — DESKTOP/MOBILE */
/* ============================= */

.sidebar-mobile-only {
    display: none;
}

@media (max-width: 900px) {
    .sidebar-desktop-only {
        display: none;
    }
    .sidebar-mobile-only {
        display: block;
    }
}

/* ============================= */
/* HOME PAGE — ÁREA ÚTIL +20%    */
/* ============================= */
/* Sobrescreve o max-width SOMENTE dentro da home (index.php).
   As demais páginas continuam usando os 1100px originais
   definidos em .hero-container e .container.               */
.home-page .hero-container {
    max-width: 1320px;
}

.home-page .container {
    max-width: 1320px;
}

/* ═══════════════════════════════════════════════════════════════════
   BLOCOS DE CÓDIGO RESPONSIVOS (<pre>) NO CONTEÚDO DE ARTIGOS

   Por que existe esta regra:
   Quando se cola código com syntax highlighting de outros sites, vêm
   junto múltiplos <span style="background-color:..."> aninhados dentro
   do <pre>. Esses spans inline NÃO respeitam o overflow do <pre> pai,
   e o texto estoura horizontalmente em mobile (visível com barras
   pretas saindo da tela).

   Solução: forçar o <pre> a ter scroll horizontal próprio, e neutralizar
   os backgrounds inline dos spans aninhados (preserva COR DO TEXTO
   colorido = syntax highlight; descarta o fundo colorido = barras
   pretas problemáticas).
   ═══════════════════════════════════════════════════════════════════ */
.article-body pre {
    background: #1e293b;             /* fundo escuro consistente */
    color: #e2e8f0;                  /* texto cinza claro */
    padding: 14px 16px;
    border-radius: 6px;
    margin: 18px 0;
    overflow-x: auto;                /* CHAVE: scroll horizontal próprio */
    max-width: 100%;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre;                /* preserva indentação do código */
    -webkit-overflow-scrolling: touch;  /* scroll suave em iOS */
}

/* Neutraliza backgrounds inline em spans aninhados dentro de <pre>.
   O TinyMCE preserva esses spans ao colar/editar; isso evita que as
   "barras pretas" deles quebrem a responsividade do bloco. */
.article-body pre span[style*="background"] {
    background: transparent !important;
    background-color: transparent !important;
}

/* Garante que <code> dentro de <pre> seja transparente também
   (alguns editores embrulham linhas em <code> com background extra). */
.article-body pre code {
    background: transparent !important;
    color: inherit;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
}

/* <code> INLINE (no meio do texto, fora de <pre>): visual diferente.
   Fundo cinza-claro, fonte mono, padding mínimo. */
.article-body p code,
.article-body li code,
.article-body td code {
    background: #f1f5f9;
    color: #c026d3;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.9em;
    white-space: nowrap;
}

/* Mobile: ajuste de fonte e padding mais enxuto */
@media (max-width: 768px) {
    .article-body pre {
        font-size: 13px;
        padding: 12px 14px;
        margin: 14px -8px;           /* margem negativa pra usar largura cheia */
        border-radius: 4px;
    }
}


.article-acoes {
    margin: 12px 0 24px;
    display: flex;
    justify-content: flex-end;
}

.btn-imprimir {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    color: #1e3a8a;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.btn-imprimir:hover {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

.btn-imprimir svg {
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   IMPRESSÃO / SALVAR COMO PDF
   Aplicado automaticamente quando o usuário usa Ctrl+P ou clica em
   "Salvar como PDF". Todo elemento marcado com .no-print é escondido,
   e o conteúdo do artigo ganha tipografia limpa estilo "papel branco".
   ═══════════════════════════════════════════════════════════════════ */
@media print {

    /* — Configuração da página A4 com margens ajustadas.
         A margem MAIOR no topo/base ajuda a "empurrar" o cabeçalho
         e rodapé que o Chrome injeta para fora do conteúdo visível
         (não desaparecem totalmente, mas ficam menos invasivos).
         Para Firefox, Safari e Edge modernos, as diretivas
         @top-left, @top-center etc. ZERAM esses cantos. — */
    @page {
        size: A4;
        margin: 2.2cm 1.5cm 1.8cm 1.5cm;

        /* Fallback para navegadores que respeitam CSS Paged Media
           (Firefox, Safari, Edge novos). Chrome ignora estes blocos. */
        @top-left { content: ""; }
        @top-center { content: ""; }
        @top-right { content: ""; }
        @bottom-left { content: ""; }
        @bottom-center { content: ""; }
        @bottom-right { content: ""; }
    }

    /* — PRESERVAR CORES DE FUNDO em elementos de destaque (blockquote,
         blocos de código, tabelas). Navegadores por padrão removem
         background na impressão pra economizar tinta. O seletor é
         restrito a elementos do conteúdo para NÃO afetar body/html
         (que têm gradiente do site). — */
    .article-body blockquote,
    .article-body pre,
    .article-body code,
    .article-body table,
    .article-body th,
    .article-body td {
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    /* — FORÇAR FUNDO BRANCO no body, html e containers principais.
         Sem isto, o gradiente do site aparece no PDF causando
         "bordas escuras" no topo/fim da página. — */
    html,
    body,
    .container,
    .post-page-container,
    .post-page-grid,
    .article {
        background: #fff !important;
        background-image: none !important;
    }

    /* — Reset geral pra impressão.
         Font-size 10.5pt (em vez de 11pt) economiza ~5% de espaço
         vertical, ajudando a evitar página final quase vazia. — */
    body {
        color: #000 !important;
        font-size: 10.5pt;
        line-height: 1.5;
    }

    /* — ESCONDER tudo que não é conteúdo do artigo — */
    .topbar,
    .navbar,
    .sidebar,
    .sidebar-overlay,
    .footer,
    .breadcrumb-bar,
    .breadcrumb,
    .article-acoes,
    .article-anexos,
    .relacionados,
    .btn-back,
    .no-print {
        display: none !important;
    }

    /* — LOGO DISCRETO NO TOPO (a "capa" do PDF) —
         Usamos pseudoelemento ::before pra inserir um cabeçalho
         só no PDF, sem precisar adicionar HTML extra na página. */
    .article::before {
        content: "TecnoEra";
        display: block;
        font-size: 13pt;
        font-weight: 700;
        color: #1e3a8a;
        letter-spacing: 2px;
        text-align: center;
        padding-bottom: 8pt;
        margin-bottom: 16pt;
        border-bottom: 2px solid #1e3a8a;
    }

    /* — RODAPÉ DISCRETO NO FIM —
         Removido em 09/06/2026: o logo "TecnoEra" no topo já identifica
         a origem do conteúdo. O rodapé era redundante e causava uma
         página extra no PDF quando não cabia junto da última seção.
         Se um dia quiser reativar, basta descomentar o bloco abaixo. */

    /*
    .article::after {
        content: "tecnoera.com.br · Conteúdo do artigo impresso pelo navegador";
        display: block;
        font-size: 8pt;
        color: #666;
        text-align: center;
        padding-top: 12pt;
        margin-top: 18pt;
        border-top: 1px solid #ccc;
        page-break-before: avoid;
    }
    */

    /* — Container do artigo: ocupa página inteira na impressão — */
    .post-page-container,
    .post-page-grid,
    .article {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    /* — Tag "ARTIGO" no topo: forma mais discreta no PDF — */
    .article .tag {
        background: none !important;
        color: #1e3a8a !important;
        padding: 0 !important;
        font-size: 9pt !important;
        letter-spacing: 2px;
        border: 0;
    }

    /* — Título do artigo: mais sóbrio no papel — */
    .article-title {
        font-size: 20pt !important;
        line-height: 1.25 !important;
        margin: 8pt 0 6pt 0 !important;
        color: #000 !important;
        page-break-after: avoid;
    }

    /* — Resumo: levemente destacado, em itálico — */
    .article-resumo {
        font-size: 11pt !important;
        font-style: italic;
        color: #444 !important;
        margin-bottom: 16pt !important;
    }

    /* — Imagem de capa: limitar altura pra não dominar a página — */
    .article-hero-img {
        margin: 0 0 12pt 0 !important;
        page-break-inside: avoid;
    }

    .article-hero-img img {
        max-height: 280pt;
        width: 100%;
        object-fit: cover;
        display: block;
    }

    /* — Corpo do artigo: tipografia confortável pra leitura impressa — */
    .article-body {
        font-size: 11pt;
        line-height: 1.55;
        color: #000 !important;
    }

    .article-body p {
        margin: 0 0 10pt 0;
        text-align: justify;
        orphans: 3;
        widows: 3;
    }

    .article-body h2 {
        font-size: 14pt !important;
        margin: 14pt 0 6pt 0 !important;
        page-break-after: avoid;
    }

    .article-body h3 {
        font-size: 12pt !important;
        margin: 10pt 0 4pt 0 !important;
        page-break-after: avoid;
    }

    /* — Links: como o PDF não é clicável (geralmente), mostrar a URL
         entre parênteses depois do texto do link.
         É a convenção universal pra "links impressos". — */
    .article-body a {
        color: #1e3a8a !important;
        text-decoration: underline;
    }

    .article-body a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
        font-weight: normal;
    }

    /* — Imagens dentro do corpo: não estourar a página — */
    .article-body img {
        max-width: 100%;
        height: auto;
        page-break-inside: avoid;
    }

    /* — Blocos de código: cinza claro, sem cortar entre páginas — */
    .article-body pre,
    .article-body code {
        background: #f5f5f5 !important;
        border: 1px solid #ddd;
        page-break-inside: avoid;
        font-size: 9pt;
    }

    /* — Listas: manter alinhamento — */
    .article-body ul,
    .article-body ol {
        margin: 0 0 10pt 16pt;
    }

    .article-body li {
        margin-bottom: 4pt;
    }

    /* — Blockquotes: borda discreta no papel — */
    .article-body blockquote {
        border-left: 3px solid #ccc;
        padding-left: 12pt;
        margin: 8pt 0;
        font-style: italic;
        color: #444;
    }

    /* — Evita quebra de página em alguns elementos críticos — */
    h1, h2, h3, h4, h5, h6,
    figure, img, table {
        page-break-inside: avoid;
    }
}

/* ============================= */
/* DATA NO TOPO (posts/artigos)  */
/* (adicionado em 19/07/2026)    */
/* ============================= */

/* Variante do .article-date para uso no TOPO da matéria, logo
   abaixo do resumo (padrão de portal de notícias: o leitor vê a
   atualidade ANTES de investir na leitura).

   Padrão "modificador" (BEM): o elemento usa AS DUAS classes
   juntas — class="article-date article-date--topo". A base
   (.article-date) fornece fonte, cor e espaçamento de letra; o
   modificador só ANULA o que é específico do rodapé (a linha
   divisória de cima e o respiro grande), mantendo uma única
   fonte de verdade para o visual da data. Se um dia mudar a cor
   da data, muda na base e os dois lugares acompanham. */
.article-date--topo {
    border-top: none;      /* a linha divisória é coisa do rodapé */
    padding-top: 0;
    margin-top: 0;         /* o resumo acima já dá o respiro */
    margin-bottom: 20px;   /* separa da imagem de destaque */
}