@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;300;400;500;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ─────────────────────────────────────────
   VARIÁVEIS
───────────────────────────────────────── */
:root {
    --cor-fundo:            #080d18;
    --cor-fundo-secundario: #020617;
    --cor-fundo-card:       #0d1424;
    --cor-texto-primario:   #e5e7eb;
    --cor-texto-secundario: #6b7280;
    --cor-borda:            rgba(148, 163, 184, 0.12);
    --cor-borda-hover:      rgba(34, 211, 238, 0.3);
    --cor-destaque:         #22d3ee;
    --cor-destaque-dim:     rgba(34, 211, 238, 0.08);
    --cor-titulo:           #f9fafb;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--cor-fundo);
    color: var(--cor-texto-primario);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.texto-justificado { text-align: justify; }

/* ─────────────────────────────────────────
   NAV — HOME
───────────────────────────────────────── */
nav {
    padding: 0;
}

nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--cor-borda);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 3rem;
    margin: 0;
    padding: 0;
}

nav li { text-align: center; }

nav a {
    color: var(--cor-texto-secundario);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.25s;
}

nav a:hover { color: var(--cor-destaque); }

nav a.ativo {
    color: var(--cor-destaque);
    position: relative;
}

nav a.ativo::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--cor-destaque);
}

/* ─────────────────────────────────────────
   NAV — INTERNA
───────────────────────────────────────── */
.nav-interna {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background-color: rgba(8, 13, 24, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--cor-borda);
    padding: 0;
    margin-bottom: 0;
}

.nav-interna .container {
    justify-content: space-between;
    padding: 1.2rem 0;
    border-bottom: none;
}

.mini-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cor-destaque);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nav-interna ul { gap: 2.5rem; }

/* offset para nav fixa nas páginas internas */
body:has(.nav-interna) main {
    padding-top: 80px;
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
    min-height: 90vh;
    width: 100%;
    background-image:
        linear-gradient(rgba(8, 13, 24, 0.88), rgba(8, 13, 24, 0.5)),
        url('assets/bg-desktop.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0;
    padding: 0 20px;
    color: #ffffff;
    border-bottom: 1px solid var(--cor-borda);
}

.hero h1,
.hero h2,
.hero h3,
.hero .hero-tag,
.hero .texto-destaque,
.hero .hero-desc {
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
}

.hero .hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cor-destaque);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(34, 211, 238, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 100;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero .texto-destaque {
    font-weight: 200;
}

.hero .hero-desc {
    font-size: 1.1rem;
    max-width: 520px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255,255,255,0.65);
}

/* ─────────────────────────────────────────
   SEÇÕES — ÍNDICE NUMERADO
───────────────────────────────────────── */
.secao-artigos,
.secao-guias,
.secao-alertas {
    margin-bottom: 6rem;
}

.section-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    color: var(--cor-destaque);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    display: block;
}

main h2 {
    font-family: 'Outfit', sans-serif;
    color: var(--cor-titulo);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--cor-borda);
}

/* ─────────────────────────────────────────
   BUSCA
───────────────────────────────────────── */
.search-container {
    margin: 2.5rem 0 1rem;
}

#search-input {
    width: 100%;
    padding: 1rem 1.4rem;
    font-size: 0.95rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--cor-texto-primario);
    background-color: var(--cor-fundo-card);
    border: 1px solid var(--cor-borda);
    border-radius: 0;
    outline: none;
    transition: all 0.25s ease;
}

#search-input:focus {
    border-color: var(--cor-destaque);
    background-color: var(--cor-fundo-secundario);
}

#search-input::placeholder {
    color: var(--cor-texto-secundario);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}

/* ─────────────────────────────────────────
   CARDS DE POST
───────────────────────────────────────── */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px;
    margin-top: 0;
    padding: 0;
    background: var(--cor-borda);
    border: 1px solid var(--cor-borda);
    margin-top: 2rem;
}

.post-preview:last-child:nth-child(3n - 2) {
    grid-column: 1 / -1;
}

.post-preview:last-child:nth-child(3n - 1) {
    grid-column: span 2;
}

.post-preview {
    background-color: var(--cor-fundo-card);
    padding: 2rem;
    transition: background 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.post-preview::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: var(--cor-destaque-dim);
    transition: width 0.4s ease;
}

.post-preview:hover::before { width: 100%; }

.post-preview:hover {
    background-color: var(--cor-fundo-secundario);
}

.post-preview h3 {
    position: relative; z-index: 1;
}

.post-preview h3 a {
    text-decoration: none;
    color: var(--cor-titulo);
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.3;
    transition: color 0.25s;
}

.post-preview h3 span {
    color: var(--cor-titulo);
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.3;
}

.post-preview h3 a:hover { color: var(--cor-destaque); }

.post-date {
    font-size: 0.72rem;
    color: var(--cor-texto-secundario);
    margin-top: 0.6rem;
    margin-bottom: 1rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 400;
    position: relative; z-index: 1;
}

.post-preview p {
    color: var(--cor-texto-secundario);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-weight: 300;
    position: relative; z-index: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--cor-destaque);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(34, 211, 238, 0.3);
    padding-bottom: 3px;
    align-self: flex-start;
    transition: all 0.25s;
    position: relative; z-index: 1;
}

.read-more:hover {
    border-color: var(--cor-destaque);
    gap: 0.7rem;
}

.post-em-breve {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cor-texto-secundario);
    border: 1px solid var(--cor-borda);
    padding: 0.3rem 0.7rem;
    display: inline-block;
    margin-top: auto;
    position: relative; z-index: 1;
}

/* ─────────────────────────────────────────
   MENU HAMBÚRGUER
───────────────────────────────────────── */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--cor-texto-primario);
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
}

.menu-toggle .linha {
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--cor-texto-primario);
    transition: all 0.3s ease;
}

.menu-toggle:hover .linha { background-color: var(--cor-destaque); }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
#app-footer {
    background-color: var(--cor-fundo-secundario);
    color: var(--cor-texto-secundario);
    width: 100%;
    padding: 3rem 0;
    margin-top: 6rem;
    margin-bottom: 0;
    text-align: center;
    border-top: 1px solid var(--cor-borda);
}

#app-footer a {
    color: var(--cor-destaque);
    opacity: 0.8;
    text-decoration: none;
    font-weight: 400;
    transition: opacity 0.25s;
}

#app-footer a:hover { opacity: 1; }

#app-footer p {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

/* ─────────────────────────────────────────
   PÁGINA SOBRE
───────────────────────────────────────── */
.sobre-conteudo {
    background-color: var(--cor-fundo-card);
    padding: 2.5rem;
    border: 1px solid var(--cor-borda);
    border-left: 3px solid var(--cor-destaque);
}

.sobre-conteudo h3 {
    color: var(--cor-destaque);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 400;
}

.sobre-conteudo h3:first-child { margin-top: 0; }

.sobre-conteudo p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--cor-texto-secundario);
}

.sobre-conteudo a {
    color: var(--cor-destaque);
    font-weight: 500;
}

.sobre-voltar {
    margin-top: 2rem;
    border-top: 1px solid var(--cor-borda);
    padding-top: 1.5rem;
}

/* ─────────────────────────────────────────
   ARTIGOS COMPLETOS
───────────────────────────────────────── */
.post-full {
    max-width: 720px;
    margin: 3rem auto;
    background-color: var(--cor-fundo-card);
    padding: 3rem;
    border: 1px solid var(--cor-borda);
}

.post-full h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 300;
    margin-bottom: 0.8rem;
    color: var(--cor-titulo);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--cor-borda);
    padding-bottom: 1.5rem;
}

.post-meta {
    font-size: 0.78rem;
    color: var(--cor-texto-secundario);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.post-content { margin-top: 1.5rem; }

.post-content p {
    margin-bottom: 1rem;
    color: var(--cor-texto-secundario);
    line-height: 1.85;
    font-size: 0.97rem;
}

.post-content h2 {
    color: var(--cor-titulo);
    font-size: 1.3rem;
    font-weight: 400;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--cor-destaque);
}

.post-content ul,
.post-content ol {
    margin: 0.8rem 0 1.2rem 1.5rem;
    line-height: 1.8;
    color: var(--cor-texto-secundario);
}

.post-content li { margin-bottom: 0.6rem; }

.post-content li ul,
.post-content li ol {
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}

.post-content strong { color: var(--cor-texto-primario); }

.post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: var(--cor-fundo);
    border-left: 3px solid var(--cor-destaque);
    color: var(--cor-texto-secundario);
    font-style: italic;
    font-size: 1rem;
}

.subtitulo {
    font-size: 1rem;
    font-weight: 400;
    color: var(--cor-texto-secundario);
    margin: 1rem 0 1.5rem;
    font-style: italic;
    line-height: 1.6;
}

/* ─────────────────────────────────────────
   SUMÁRIO (TOC)
───────────────────────────────────────── */
.toc {
    margin: 1.5rem 0;
    padding: 1.2rem 1.5rem;
    background-color: var(--cor-fundo);
    border: 1px solid var(--cor-borda);
    border-left: 2px solid var(--cor-destaque);
}

.toc strong {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cor-destaque);
}

.toc ul {
    list-style: none;
    margin-top: 0.8rem;
    padding-left: 0;
}

.toc li { margin-bottom: 0.4rem; }

.toc a {
    color: var(--cor-texto-secundario);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.toc a:hover {
    color: var(--cor-destaque);
}

/* ─────────────────────────────────────────
   IMAGENS
───────────────────────────────────────── */
.post-full figure {
    margin: 1.5rem 0;
    text-align: center;
}

.post-full img {
    max-width: 100%;
    border: 1px solid var(--cor-borda);
}

.post-full figcaption {
    font-size: 0.8rem;
    color: var(--cor-texto-secundario);
    margin-top: 0.6rem;
}

.image-credit {
    font-size: 0.78rem;
    color: var(--cor-texto-secundario);
    opacity: 0.7;
}

.image-credit a { color: var(--cor-texto-secundario); }

/* ─────────────────────────────────────────
   FERRAMENTAS
───────────────────────────────────────── */
.post-footer-nav {
    margin-top: 2.5rem;
    border-top: 1px solid var(--cor-borda);
    padding-top: 1.5rem;
}

/* ─────────────────────────────────────────
   RESPONSIVO
───────────────────────────────────────── */
@media (max-width: 768px) {
    .hero {
        background-image:
            linear-gradient(rgba(8, 13, 24, 0.9), rgba(8, 13, 24, 0.6)),
            url('assets/bg-mobile.jpg');
        background-attachment: scroll;
        min-height: 80vh;
        padding: 120px 1.5rem 4rem;
    }

    .hero h1 {
        font-size: 2.4rem;
        letter-spacing: -0.02em;
    }

    .hero .hero-desc {
        font-size: 0.9rem;
    }

    nav .container {
        justify-content: center;
        height: 48px;
    }

    .nav-interna { padding: 0; }

    .nav-interna .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 56px;
    }

    .menu-toggle {
        display: flex;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 20;
    }

    .nav-interna .menu-toggle {
        position: relative;
        transform: none;
        right: auto;
        top: auto;
    }

    nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--cor-fundo-secundario);
        border-top: 1px solid var(--cor-borda);
        border-bottom: 1px solid var(--cor-borda);
        z-index: 10;
    }

    nav ul.menu-ativo { display: flex; }

    nav a {
        display: block;
        text-align: center;
        padding: 1.2rem;
        border-bottom: 1px solid var(--cor-borda);
    }

    nav li:last-child a { border-bottom: none; }

    nav a.ativo::after { display: none; }

    .post-list {
        grid-template-columns: 1fr;
        gap: 1px;
    }

    .texto-justificado { text-align: left; }

    .post-full {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }

    .sobre-conteudo { padding: 1.5rem; }

    .container { width: 92%; }

    .search-container { margin-top: 1.5rem; }
}
