@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Source+Sans+3:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
    --ink: #14211F;
    --paper: #F1EEE4;
    --river: #1F4C4A;
    --amber: #C97A3B;
    --leaf: #4E7A51;
    --muted: #6E7C77;
    --line: #D9D3C2;
    --card: #FFFFFF;

    --f-display: 'Fraunces', serif;
    --f-body: 'Source Sans 3', sans-serif;
    --f-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--f-body);
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- River divider (signature element) ---------- */
.rio-divisor {
    width: 100%;
    height: 14px;
    display: block;
    color: var(--river);
}

/* ---------- Masthead ---------- */
.masthead {
    background: var(--ink);
    color: var(--paper);
    padding: 18px 0 0;
}
.masthead .topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9FB0AB;
    padding-bottom: 14px;
    border-bottom: 1px solid #2A3E3B;
}
.masthead .brand {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 22px 0 20px;
}
.masthead .brand h1 {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 44px;
    margin: 0;
    letter-spacing: -0.01em;
}
.masthead .brand .slogan {
    font-family: var(--f-mono);
    font-size: 12px;
    color: #9FB0AB;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.masthead .brand a { color: var(--paper); }

nav.categorias {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding-bottom: 0;
}
nav.categorias a {
    font-family: var(--f-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    color: #C9D4D0;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}
nav.categorias a:hover,
nav.categorias a.ativo {
    color: var(--paper);
    border-bottom-color: var(--amber);
}

/* ---------- Destaques (featured) ---------- */
.secao-titulo {
    font-family: var(--f-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 40px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.secao-titulo::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.destaques {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    margin-top: 18px;
}
.destaque-principal {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    background: var(--ink);
    min-height: 420px;
    display: flex;
    align-items: flex-end;
}
.destaque-principal img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.72;
}
.destaque-principal .conteudo {
    position: relative;
    padding: 28px;
    color: #fff;
}
.destaque-secundarios {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.destaque-secundario {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
}
.destaque-secundario img {
    width: 96px; height: 96px;
    object-fit: cover;
    border-radius: 2px;
}

.pill {
    display: inline-block;
    font-family: var(--f-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 9px;
    border-radius: 20px;
    color: #fff;
    margin-bottom: 8px;
}

.titulo-noticia {
    font-family: var(--f-display);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 8px;
}
.destaque-principal .titulo-noticia { font-size: 30px; color: #fff; }
.destaque-secundario .titulo-noticia { font-size: 16px; }
.destaque-principal .resumo { color: #E4E0D5; font-size: 14px; max-width: 60ch; }

.meta {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.destaque-principal .meta { color: #C9D4D0; }

/* ---------- Grid de notícias ---------- */
.grid-noticias {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    margin-top: 18px;
}
.card-noticia {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.card-noticia img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.card-noticia .conteudo { padding: 16px; }
.card-noticia .titulo-noticia { font-size: 18px; }
.card-noticia .resumo {
    font-size: 14px;
    color: #445350;
    margin: 8px 0 12px;
}

/* ---------- Página de notícia ---------- */
.artigo {
    max-width: 720px;
    margin: 40px auto 0;
    padding: 0 24px;
}
.artigo .titulo-noticia { font-size: 38px; margin-top: 12px; }
.artigo .resumo-artigo {
    font-family: var(--f-display);
    font-style: italic;
    font-size: 19px;
    color: #3B4A47;
    margin: 14px 0 18px;
}
.artigo .imagem-capa {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 22px;
}
.artigo .corpo p { font-size: 18px; margin: 0 0 18px; color: #232F2D; }
.voltar {
    font-family: var(--f-mono);
    font-size: 12px;
    text-transform: uppercase;
    color: var(--river);
}

/* ---------- Footer ---------- */
footer {
    margin-top: 70px;
    background: var(--ink);
    color: #9FB0AB;
    padding: 34px 0;
    font-family: var(--f-mono);
    font-size: 12px;
    text-align: center;
}
footer a { color: var(--paper); }

/* ---------- Admin ---------- */
.admin-body { background: var(--paper); min-height: 100vh; }
.admin-bar {
    background: var(--ink);
    color: var(--paper);
    padding: 16px 0;
    font-family: var(--f-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.admin-bar .wrap { display: flex; justify-content: space-between; align-items: center; }
.admin-bar a { color: #C9D4D0; }
.admin-bar a:hover { color: var(--amber); }

.admin-caixa {
    max-width: 420px;
    margin: 90px auto;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 36px;
    border-radius: 2px;
}
.admin-caixa h2 { font-family: var(--f-display); margin-top: 0; }

.form-campo { margin-bottom: 18px; }
.form-campo label {
    display: block;
    font-family: var(--f-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 6px;
}
.form-campo input,
.form-campo select,
.form-campo textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-family: var(--f-body);
    font-size: 15px;
    background: #fff;
    color: var(--ink);
}
.form-campo textarea { resize: vertical; }

.btn {
    display: inline-block;
    font-family: var(--f-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--river);
    color: #fff;
    padding: 11px 20px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
}
.btn:hover { background: var(--ink); }
.btn.perigo { background: #B23B3B; }
.btn.secundario { background: transparent; color: var(--river); border: 1px solid var(--river); }

.alerta {
    font-family: var(--f-mono);
    font-size: 12px;
    padding: 10px 14px;
    border-radius: 2px;
    margin-bottom: 18px;
}
.alerta.erro { background: #F6DEDE; color: #8A2B2B; }
.alerta.sucesso { background: #DEEDDA; color: #2E5C31; }

table.tabela-admin {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    font-size: 14px;
}
table.tabela-admin th, table.tabela-admin td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}
table.tabela-admin th {
    font-family: var(--f-mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
}
table.tabela-admin .acoes { display: flex; gap: 10px; }
table.tabela-admin .acoes a { font-family: var(--f-mono); font-size: 12px; color: var(--river); }
table.tabela-admin .acoes a.excluir { color: #B23B3B; }

.painel-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 20px;
}
.painel-topo h2 { font-family: var(--f-display); margin: 0; }

@media (max-width: 860px) {
    .destaques { grid-template-columns: 1fr; }
    .grid-noticias { grid-template-columns: 1fr 1fr; }
    .masthead .brand h1 { font-size: 32px; }
}
@media (max-width: 560px) {
    .grid-noticias { grid-template-columns: 1fr; }
    .destaque-secundario { grid-template-columns: 76px 1fr; }
}
