/* --- CONFIGURAÇÕES GERAIS --- */
* {
    box-sizing: border-box; /* Fundamental para o padding não quebrar a largura */
}

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden; /* Evita rolagem lateral no celular */
}

.container { 
    width: 100%;
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

/* --- CARDS E ARTIGOS --- */
.card-artigo {
    width: 100%;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    position: relative;
}

.conteudo-artigo {
    width: 100%;
    font-size: 1.1rem;
    line-height: 1.7;
    word-wrap: break-word;
}

.img-forma {
    width: 100%;          /* Ocupa toda a largura do card */
    height: 400px;        /* Altura fixa que você deseja para o padrão */
    object-fit: cover;    /* CORTA as bordas da imagem para preencher o espaço sem esticar */
    object-position: center; /* Garante que o centro da foto seja o foco do corte */
    border-radius: 8px;
    margin: 15px 0;
    display: block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.9);

}

/* Ajuste opcional para celular (fotos um pouco menores) */
@media (max-width: 768px) {
    .img-forma {
        height: 200px;    /* Altura menor no celular para não ocupar a tela toda */
    }
}

/* --- BOTÕES --- */
.btn-destaque { 
    background: var(--primary); 
    color: white !important; 
    padding: 8px 16px; 
    border-radius: 6px; 
    text-decoration: none;
}

.btn-share {
    background: #e2e8f0;
    color: var(--text);
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

/* Classe para o botão principal de publicação e salvamento */
.btn-publicar {
    background-color: #2563eb; /* Azul vibrante */
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-publicar:hover {
    background-color: #1d4ed8; /* Azul um pouco mais escuro ao passar o rato */
    transform: translateY(-2px); /* Efeito de levante */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-publicar:active {
    transform: translateY(0);
}

/* Estilo secundário para o botão cancelar (usado no editar_perfil) */
.btn-cancelar {
    background-color: #f1f5f9;
    color: #475569;
    padding: 12px 24px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-cancelar:hover {
    background-color: #e2e8f0;
}

/* Botão de Cadastrar (Destaque) */
.btn-destaque {
    background-color: #3b82f6; /* Azul brilhante */
    color: #ffffff !important;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-destaque:hover {
    background-color: #2563eb;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    transform: scale(1.05);
}

/* Botão de Entrar / Sair (Discreto) */
.btn-sair {
    background-color: transparent;
    color: #cbd5e1 !important; /* Cinza claro para não brigar com o destaque */
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid #475569;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-sair:hover {
    color: #ffffff !important;
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Ajuste para os itens da lista no menu fixo */
.nav-links li {
    margin-left: 10px;
    display: flex;
    align-items: center;
}


/* --- RESPONSIVIDADE (CELULAR) --- */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .card-artigo {
        padding: 15px;
        border-radius: 0; /* Ocupa a tela toda sem bordas arredondadas */
    }

    .conteudo-artigo {
        font-size: 1.2rem !important;
    }

    .logo-box h1 {
        font-size: 0.9rem !important;
    }
    
    .nav-links li span, .nav-links li strong {
        display: none; /* Esconde "Olá, nome" no celular para caber os ícones */
    }
}
/* Esconde o elemento em ecrãs pequenos e mostra em ecrãs maiores que 768px */
.show-desktop {
    display: none;
}

@media (min-width: 768px) {
    .show-desktop {
        display: block;
    }
}

/* --- ESTILIZAÇÃO DO MENU (NAVBAR) --- */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    box-sizing: border-box;
    padding: 10px 20px;
    min-height: 70px; /* Em vez de height fixo, usamos min-height */
    display: flex;
    align-items: center;
}

.logo-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 15px;
}

.logo-link {
    flex-shrink: 0;
}

.logo-img {
    height: 4.5rem; /* Reduzido o tamanho padrão para não estourar */
    display: block;
    transition: height 0.3s ease;
}

.title-box {
    flex-grow: 1;
    text-align: center;
    padding: 0 10px;
}

.title-box h1 {
    margin: 0;
    font-family: 'Trebuchet MS', sans-serif;
    color: #f8fafc;
    font-size: 1.6rem;
    text-transform: uppercase;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.nav-links a {
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
}

/* Espaçador da busca para não sumir atrás do menu fixo */
.search-wrapper {
    margin-top: 90px; /* Ajustado para dar espaço ao menu fixo */
    padding: 20px 15px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* --- AJUSTES DO MENU NA MEDIA QUERY EXISTENTE (CELULAR) --- */
@media (max-width: 768px) {
    .nav-container {
        padding: 8px 10px;
    }

    .logo-box {
        flex-wrap: wrap; /* Permite que os elementos se organizem em telas muito pequenas */
        justify-content: space-between;
        gap: 5px;
    }

    .logo-img {
        height: 3rem; /* Logo menor no celular */
    }

    .title-box {
        order: 1; /* Move o título para a linha de cima ou centro se necessário */
        width: 100%; /* Faz o título ocupar a largura total se quebrar */
        padding: 5px 0;
    }

    .title-box h1 {
        font-size: 1.1rem !important;
        text-align: center;
    }

    .nav-links {
        width: 100%;
        justify-content: center; /* Centraliza os botões de ação no mobile */
        gap: 8px;
        margin-top: 5px;
    }
    
    .nav-links a {
        padding: 6px 12px !important; /* Botões ligeiramente menores no celular */
        font-size: 0.8rem !important;
    }

    .search-wrapper {
        margin-top: 140px; /* Aumenta o espaço no mobile já que o menu fica mais alto */
    }
}