/* =========================================
   VARIÁVEIS E RESET
========================================= */
:root {
    --cor-primaria: #2e7d32;
    --cor-secundaria: #558b2f;
    --cor-fundo: #e8f5e9;
    --cor-borda: #4caf50;
    --cor-destaque: #388e3c;
    --cor-sidebar-fundo: #3c3c3c; /* ✓ NOVA: Cinza claro para sidebar */
    --tamanho-logo: 50px; /* Mobile-first: logo menor */
    --gap-logo-texto: 8px;
    --spacing-right: 8px;
    --fonte-principal: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--fonte-principal);
    line-height: 1.6;
    color: var(--cor-primaria);
}
/* =========================================
   HEADER E LOGO - MOBILE FIRST
========================================= */
.site-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    padding-right: calc(4rem + var(--spacing-right));
    background: linear-gradient(to right, var(--cor-fundo), #f1f8e9);
    border-bottom: 2px solid var(--cor-borda);
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}
.logo-container {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-logo-texto);
    padding: 0.5rem;
    min-width: auto;
    max-width: 80%;
    flex-wrap: wrap;
}
.logo-svg {
    width: var(--tamanho-logo);
    height: var(--tamanho-logo);
    flex-shrink: 0;
    display: block;
}
.logo-texto {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    text-align: center;
}
.logo-texto h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 400; /* ✓ Peso leve */
    color: var(--cor-primaria);
    line-height: 1.1;
    letter-spacing: -0.3px;
    white-space: normal; /* Mobile: permite quebra de linha */
}
.logo-texto p {
    margin: 0;
    font-size: 1rem;
    font-weight: 400; /* ✓ REDUZIDO de 500 para 400 */
    color: var(--cor-secundaria);
    line-height: 1.1;
    letter-spacing: -0.2px;
}
/* =========================================
   NAVEGAÇÃO - MOBILE (ESCONDIDA)
========================================= */
.main-nav {
    display: none; /* Mobile: menu desktop escondido */
}
.nav-list {
    display: flex;
    list-style: none;
    gap: 1.8rem;
    justify-content: center;
}
.nav-link {
    text-decoration: none;
    color: var(--cor-primaria);
    font-weight: 400; /* ✓ REDUZIDO de 500 para 400 */
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 1rem;
}
.nav-link:hover {
    border-bottom-color: var(--cor-borda);
    color: var(--cor-destaque);
}
/* =========================================
   BLOCO BUSCA + IDIOMAS - MOBILE (ESCONDIDO)
========================================= */
.header-right-block {
    display: none; /* Mobile: escondido, será acessado pelo menu mobile */
}
.search-form {
    display: flex;
    gap: 0.3rem;
    width: 100%;
    max-width: 200px;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--cor-borda);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: var(--fonte-principal);
    background: white;
}
.search-form button {
    padding: 0.4rem 0.7rem;
    background: var(--cor-borda);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease;
}
.search-form button:hover {
    background: var(--cor-destaque);
}
.lang-list {
    display: flex;
    list-style: none;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
}
.lang-list a {
    display: block;
    text-decoration: none;
    color: var(--cor-primaria);
    font-size: 0.85rem;
    font-weight: 400; /* ✓ REDUZIDO de 500 para 400 */
    padding: 0.2rem 0.3rem;
    border-radius: 3px;
    transition: all 0.2s ease;
    min-width: 24px;
    text-align: center;
}
.lang-list a[aria-current="page"] {
    background: var(--cor-borda);
    color: white;
    font-weight: 600; /* ✓ Mantido para destaque */
    pointer-events: none;
}
.lang-list a:hover:not([aria-current="page"]) {
    background: rgba(76, 175, 80, 0.1);
    color: var(--cor-destaque);
}
/* =========================================
   HAMBURGUER - MOBILE (VISÍVEL)
========================================= */
.menu-toggle {
    display: block; /* Mobile: visível */
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}
.hamburger {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--cor-primaria);
    position: relative;
    transition: all 0.3s ease;
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 3px;
    background: var(--cor-primaria);
    transition: all 0.3s ease;
}
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }
.menu-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}
.menu-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}
.menu-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}
/* =========================================
   MENU MOBILE
========================================= */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--cor-fundo);
    z-index: 1000;
    padding: 5rem 1rem 2rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}
body.menu-open .mobile-menu {
    transform: translateX(0);
}
.mobile-nav-list {
    list-style: none;
}
.mobile-nav-list li {
    margin-bottom: 0.8rem;
}
.mobile-nav-list a {
    display: block;
    padding: 0.8rem;
    text-decoration: none;
    color: var(--cor-primaria);
    font-weight: 400; /* ✓ REDUZIDO de 500 para 400 */
    border-radius: 4px;
    transition: background 0.2s ease;
}
.mobile-nav-list a:hover {
    background: rgba(76, 175, 80, 0.1);
}
.mobile-extra {
    border-top: 1px solid var(--cor-borda);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
/* =========================================
   LAYOUT COM SIDEBAR - MOBILE FIRST
   (ESTILOS QUE FALTAVAM)
========================================= */
.layout-container {
    display: flex;
    flex-direction: column; /* Mobile: sidebar abaixo do conteúdo */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.post-content {
    flex: 1; /* Ocupa todo o espaço disponível */
    min-width: 0; /* Previne problemas de overflow */
}
.sidebar {
    width: 100%; /* Mobile: largura total */
}
/* =========================================
   BLOCO DE BOAS-VINDAS TEMPORÁRIO
========================================= */
.welcome-box {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2.5rem 1.5rem;
    background-color: #fff8e1; /* creme claro suave */
    color: var(--cor-primaria); /* verde principal */
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    font-family: var(--fonte-principal);
    line-height: 1.6;
}
.welcome-box h1 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1.2rem;
    line-height: 1.3;
}
.welcome-box h3 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--cor-secundaria);
}
.welcome-box h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.5rem;
    letter-spacing: 0.08em;
    color: var(--cor-destaque);
}
/* =========================================
   FOOTER MAIN - MOBILE (1 COLUNA)
========================================= */
.footer-main {
    background: #2b2b2b;
    color: #ffffff;
    padding: 2.5rem 2rem 2rem;
}
.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 coluna */
    gap: 2rem;
    text-align: center;
}
.footer-title {
    font-size: 1rem;
    font-weight: 500; /* ✓ REDUZIDO de 600 para 500 */
    color: var(--cor-borda);
    margin-bottom: 0.75rem;
}
.footer-logo-col .footer-site-name {
    font-size: 1.1rem;
    font-weight: 500; /* ✓ REDUZIDO de 600 para 500 */
    margin: 0.5rem 0 0.25rem;
    color: #ffffff;
}
.footer-logo-col .footer-tagline {
    font-size: 0.875rem;
    color: #cccccc;
}
.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-list a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.6;
    transition: color 0.2s;
}
.footer-list a:hover {
    color: var(--cor-borda);
}
.footer-tools-col .search-form {
    max-width: 100%;
    margin: 0 auto 1rem;
}
.footer-tools-col .lang-list {
    justify-content: center; /* Mobile: centralizado */
    gap: 0.3rem;
}
.footer-tools-col .lang-list a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}
.footer-tools-col .lang-list a[aria-current="page"] {
    background: var(--cor-borda);
    color: #ffffff;
}
.footer-tools-col .lang-list a:hover {
    background: var(--cor-borda);
}
/* =========================================
   BOTTOM BAR - MOBILE (COLUNA)
========================================= */
.bottom-bar {
    background-color: #000000;
    color: #cccccc;
    padding: 25px 0;
    font-size: 0.85rem;
    border-top: 1px solid #333333;
}
.bottom-bar .container {
    display: flex;
    flex-direction: column; /* Mobile: coluna */
    align-items: center;
    text-align: center;
    gap: 15px;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}
.bottom-bar a {
    color: #ffffff;
    font-weight: 500; /* ✓ REDUZIDO de 600 para 500 */
    text-decoration: none;
    transition: color 0.3s ease;
}
.bottom-bar a:hover {
    color: var(--brand-green);
    text-decoration: underline;
}
/* =========================================
   SIDEBAR - MOBILE (LARGURA TOTAL)
========================================= */
.sidebar-box {
    width: 100%;
    padding: 20px;
    background: var(--cor-sidebar-fundo); /* ✓ ALTERADO: Cinza claro */
    border-radius: 8px;
    border: 1px solid var(--cor-borda);
    font-family: var(--fonte-principal);
    color: var(--cor-primaria);
}
.sb-section {
    margin-bottom: 24px;
}
.sb-section h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--cor-destaque);
    font-weight: 500; /* ✓ REDUZIDO de 600 para 500 */
}
.sb-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--cor-primaria);
}
.sb-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sb-list li {
    margin: 8px 0;
}
.sb-list a {
    text-decoration: none;
    color: var(--cor-primaria);
    font-weight: 400; /* ✓ REDUZIDO de 500 para 400 */
    transition: all 0.2s ease;
}
.sb-list a:hover {
    color: var(--cor-destaque);
    padding-left: 4px;
}
.sb-button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 16px;
    background: var(--cor-borda);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500; /* ✓ REDUZIDO de 600 para 500 */
    transition: background 0.2s ease;
}
.sb-button:hover {
    background: var(--cor-destaque);
    color: white;
}
/* =========================================
   RESPONSIVIDADE - TABLET E DESKTOP
========================================= */
/* --- Tablet (min-width: 768px) --- */
@media (min-width: 768px) {
    /* Logo aumenta */
    :root {
        --tamanho-logo: 60px;
    }
    .logo-texto h1 {
        font-size: 1.6rem;
        white-space: nowrap;
    }
    .logo-texto p {
        font-size: 1.1rem;
    }
    /* LAYOUT SIDEBAR: muda para linha */
    .layout-container {
        flex-direction: row; /* Desktop: elementos lado a lado */
        padding: 2rem;
    }
    .sidebar {
        width: 320px; /* Largura fixa para sidebar */
        flex-shrink: 0; /* Não deixa a sidebar encolher */
    }
    /* Footer: 2 colunas */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }
    .footer-tools-col .lang-list {
        justify-content: flex-start;
    }
    .footer-tools-col .search-form {
        margin: 0 0 1rem 0;
    }
    /* Bottom Bar: linha com espaçamento */
    .bottom-bar .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
}
/* --- Desktop (min-width: 992px) --- */
@media (min-width: 992px) {
    /* Header: layout completo desktop */
    :root {
        --tamanho-logo: 70px;
        --gap-logo-texto: 10px;
        --spacing-right: 10px;
    }
    .site-header {
        padding: 1rem 2rem;
        padding-right: calc(4rem + var(--spacing-right));
    }
    .logo-container {
        flex-wrap: nowrap;
        max-width: none;
        margin: 0;
    }
    .logo-texto {
        text-align: left;
    }
    .logo-texto h1 {
        font-size: 1.75rem;
    }
    .logo-texto p {
        font-size: 1.15rem;
    }
    /* Nav desktop visível */
    .main-nav {
        display: block;
        flex-grow: 1;
        min-width: 250px;
    }
    /* Bloco direito visível */
    .header-right-block {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        align-items: flex-end;
        min-width: 220px;
        padding-right: var(--spacing-right);
    }
    /* Hamburguer escondido */
    .menu-toggle {
        display: none;
    }
    /* Sidebar um pouco maior */
    .sidebar {
        width: 350px;
    }
    /* Footer: 4 colunas */
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .footer-tools-col .lang-list {
        justify-content: flex-start;
    }
}
/* --- Large Desktop (min-width: 1200px) opcional --- */
@media (min-width: 1200px) {
    .footer-grid {
        gap: 2.5rem;
    }
}
