:root {
    --cor-base: #196354;
    --cor-fundo: #f4f7f6;
    --cor-texto: #333333;
    --cor-branco: #ffffff;
    --fonte-principal: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --fonte-titulos: 'Georgia', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--fonte-principal);
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    line-height: 1.6;
    padding-top: 110px;
    scroll-behavior: smooth;
}

/* --- Cabeçalho Superior --- */
header {
    background-color: var(--cor-base);
    color: var(--cor-branco);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scroll-ativo {
    padding: 0.5rem 2rem;
    background-color: rgba(25, 99, 84, 0.98);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-logo-img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    /* Removido o filtro que pintava a imagem de branco */
}

.logo-text {
    font-family: var(--fonte-titulos);
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--cor-branco);
    letter-spacing: 1px;
}

nav {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

nav a {
    color: var(--cor-branco);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

nav a:hover {
    text-decoration: underline;
}

/* --- Submenus (Dropdown) --- */
.menu-item-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none !important;
}

.dropdown-trigger span:first-child {
    display: inline;
}

.dropdown-trigger:hover span:first-child {
    text-decoration: underline;
}

.dropdown-trigger .seta {
    display: inline-block;
    font-size: 0.75rem;
    line-height: 1;
    text-decoration: none !important;
    opacity: 0.9;
    transform: translateY(1px);
    transition: transform 0.25s ease;
}

.menu-item-dropdown:hover .dropdown-trigger .seta {
    transform: translateY(1px) rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--cor-branco);
    min-width: 190px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    border-radius: 4px;
    padding: 0.4rem 0;
    margin-top: 0;
    z-index: 1050;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.dropdown-menu a {
    color: var(--cor-texto) !important;
    padding: 0.5rem 1rem;
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
    text-decoration: none;
    font-weight: normal;
}

.dropdown-menu a:hover {
    background-color: #f2f7f5;
    color: var(--cor-base) !important;
    text-decoration: none;
}

.menu-item-dropdown:hover .dropdown-menu {
    display: block;
}

/* Campo de pesquisa (280px) */
.search-bar {
    width: 280px;
}

.search-bar form {
    display: flex;
    width: 100%;
}

.search-bar input {
    width: calc(100% - 75px);
    padding: 0.45rem 0.8rem;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 0.88rem;
}

.search-bar button {
    width: 75px;
    padding: 0.45rem 0;
    background-color: #11453a;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
}

/* --- Estrutura Geral --- */
.main-wrapper {
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

main {
    flex: 1;
    min-width: 0;
}

/* --- Linha de Caminho (Breadcrumbs) --- */
.trilho-navegacao {
    font-size: 0.82rem;
    color: #777777;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.2rem;
}

.trilho-navegacao a {
    color: var(--cor-base);
    text-decoration: none;
}

.trilho-navegacao a:hover {
    text-decoration: underline;
}

.separador-trilho {
    color: #bbb;
    font-size: 0.78rem;
}

.pagina-atual {
    color: #555;
    font-weight: 600;
}

/* --- Título da secção de pesquisa --- */
.titulo-pagina-pesquisa {
    font-family: var(--fonte-titulos);
    color: var(--cor-base);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.termo-destaque {
    color: #555;
    font-style: italic;
}

/* --- Grelha com 4 Colunas na Capa --- */
.grid-artigos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem;
}

.cartao-artigo-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

.cartao-artigo {
    background: var(--cor-branco);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cartao-artigo-link:hover .cartao-artigo {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.imagem-artigo {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    background-color: #ddd;
}

.conteudo-artigo {
    padding: 0.85rem;
    flex-grow: 1;
}

.cabecalho-cartao {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.data-artigo {
    font-size: 0.78rem;
    color: #888;
    display: block;
}

.tipo-artigo {
    font-size: 0.7rem;
    background-color: #e4eee9;
    color: var(--cor-base);
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
}

.titulo-artigo {
    font-family: var(--fonte-titulos);
    font-size: 1.05rem;
    color: var(--cor-base);
    font-weight: bold;
    line-height: 1.3;
    text-decoration: none !important;
}

/* --- Artigo Individual e Imagens Proporcionais Completas --- */
.artigo-completo {
    background: var(--cor-branco);
    padding: 2rem;
    border-radius: 6px;
}

.artigo-completo h1 {
    font-family: var(--fonte-titulos);
    color: var(--cor-base);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.capa-artigo-figura {
    margin-bottom: 1.5rem;
}

.capa-artigo-imagem {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.conteudo-texto img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 1rem 0;
}

.capa-artigo-legenda {
    font-size: 0.82rem;
    color: #777;
    text-align: right;
    margin-top: 2px;
    font-style: italic;
    line-height: 1.3;
}

/* --- Barra Lateral (280px) --- */
.sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--cor-branco);
    padding: 1.2rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.sidebar h3 {
    font-family: var(--fonte-titulos);
    color: var(--cor-base);
    margin-bottom: 0.8rem;
    border-bottom: 2px solid var(--cor-base);
    padding-bottom: 0.3rem;
    font-size: 1.1rem;
}

.separador-mes {
    font-size: 0.85rem;
    font-weight: bold;
    color: #996633;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.7rem;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 1px dashed #dce5e2;
}

.separador-mes a {
    color: #996633;
    text-decoration: none;
}

.separador-mes:first-child {
    margin-top: 0;
}

.lista-artigos {
    list-style: none;
    margin-top: 0.1rem;
    margin-bottom: 0.4rem;
}

.lista-artigos li {
    padding: 0;
    margin-bottom: 0;
    line-height: 1.05;
    border-bottom: none;
    border-left: 2px solid #e0e0e0;
    padding-left: 0.4rem;
}

.lista-artigos li a {
    text-decoration: none;
    color: var(--cor-texto);
    font-size: 0.82rem;
    display: block;
    padding: 0.1rem 0;
}

.lista-artigos li a:hover {
    color: var(--cor-base);
    text-decoration: none;
}

.sobre-mim {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #eef2f1;
    font-size: 0.85rem;
    line-height: 1.5;
}

.sidebar .plugin-search,
.sidebar form[action*="search"] {
    display: none !important;
}

/* --- Rodapé --- */
footer {
    background-color: var(--cor-base);
    color: white;
    padding: 1.2rem 2rem;
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-symbol-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
}

.footer-symbol-link:hover {
    opacity: 1;
    transform: scale(1.15);
}

.footer-right {
    opacity: 0.9;
}

/* --- Setas Laterais Estilo 3D Discreto (Junto à barra de scroll) --- */
.scroll-arrow {
    position: fixed;
    right: 5px;
    background: linear-gradient(to bottom, #f9f9f9, #dcdcdc);
    color: #555;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.8);
    border: 1px solid #b5b5b5;
    z-index: 1000;
    transition: all 0.15s ease;
}

.scroll-arrow:hover {
    background: linear-gradient(to bottom, #edc492, #996633);
    color: #fff;
    border-color: #7a5026;
    box-shadow: 0 3px 6px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.4);
}

.scroll-arrow-up {
    bottom: 22px; 
}

.scroll-arrow-down {
    top: 90px;
    display: none;
}

.scroll-arrow-down.visivel {
    display: flex;
}

/* Responsividade */
@media (max-width: 1250px) {
    .grid-artigos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .grid-artigos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    body { padding-top: 140px; }
    header {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem 1rem;
    }
    .main-wrapper {
        flex-direction: column;
        padding: 1rem;
    }
    .search-bar {
        width: 100%;
    }
    .grid-artigos {
        grid-template-columns: 1fr;
    }
    .sidebar {
        width: 100%;
        min-width: 100%;
    }
    footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .scroll-arrow {
        display: none !important;
    }
}

/* --- Logótipo: Alto Relevo e Sombra Permanentes --- */
.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 2px;
    background: transparent !important;
    box-shadow: none !important;
}

.site-logo-img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    /* Estado Normal (Permanente): Alto relevo e a sombra/brilho sempre ativos */
    transform: translateY(-1px);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 3px rgba(0, 0, 0, 0.3));
    transition: transform 0.15s ease, filter 0.15s ease;
}

.brand:hover .site-logo-img {
    /* Mantém o mesmo aspeto ao passar o rato (ou pode ajustar se quiser variação) */
    transform: translateY(-1px);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 3px rgba(0, 0, 0, 0.3));
}

.brand:active .site-logo-img {
    /* Efeito de clique / pressão ligeira */
    transform: translateY(0px);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}