/* =========================================
   VARIÁVEIS E RESET
   ========================================= */
:root {
    --bg-body: #f2f4f7;
    --bg-card: #ffffff;
    --primary: #c9302c;
    --primary-light: #fdeded;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --radius-card: 20px;
    --radius-nav: 50px;
    --shadow: 0 4px 20px -5px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover { color: var(--primary); }

/* =========================================
   NAVBAR ARREDONDADA (PÍLULA)
   ========================================= */
.navbar-wrapper {
    position: sticky; 
    top: 15px; 
    z-index: 1000;
    display: flex; 
    justify-content: center;
    padding: 0 15px;
}

.navbar {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-nav);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 0 20px; /* Reduzi um pouco o padding lateral */
    width: 100%;
    max-width: 1250px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO CORRIGIDO PARA PC */
.logo {
    font-weight: 800; 
    font-size: 1.1rem; /* Reduzi levemente */
    display: flex; 
    align-items: center; 
    gap: 8px; 
    color: var(--text-main);
    white-space: nowrap; /* OBRIGATÓRIO: Impede quebra de linha */
    flex-shrink: 0; /* Impede que o logo seja esmagado */
    margin-right: 10px;
}

.nav-menu { display: flex; gap: 2px; /* Reduzi o gap */ list-style: none; height: 100%; align-items: center; margin: 0; padding: 0; }

.nav-item { position: relative; height: 100%; display: flex; align-items: center; }

/* LINKS DO MENU AJUSTADOS PARA NÃO ESTOURAR */
.nav-link {
    padding: 8px 10px; /* Reduzi o padding lateral */
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem; /* Fonte ligeiramente menor */
    color: var(--text-main);
    cursor: pointer;
    white-space: nowrap;
}
.nav-link:hover { background: var(--primary-light); color: var(--primary); }
.nav-link i { margin-left: 4px; font-size: 0.7em; opacity: 0.6; }

.btn-nav-cta {
    background: var(--text-main); color: white !important;
    padding: 8px 20px; border-radius: 30px; transition: 0.3s; font-size: 0.9rem;
}
.btn-nav-cta:hover { background: var(--primary); }

/* Hambúrguer (Escondido no Desktop) */
.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-main); }

/* =========================================
   MEGA MENU DESKTOP
   ========================================= */
.mega-menu {
    display: none;
    position: absolute; top: 70px; left: 50%; transform: translateX(-50%);
    width: 800px; background: white; border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1); padding: 25px;
    grid-template-columns: 1fr 1fr; gap: 20px;
    border: 1px solid #eee; z-index: 999;
    opacity: 0; animation: fadeInMenu 0.3s forwards;
}

@keyframes fadeInMenu { to { opacity: 1; top: 65px; } }
.nav-item:hover .mega-menu { display: grid; }

.mm-link { 
    display: block; 
    padding: 6px 12px; 
    border-radius: 8px; 
    font-weight: 500; 
    color: #555; 
    font-size: 0.85rem; 
    line-height: 1.4;
}
.mm-link:hover { background: #f9f9f9; color: var(--primary); }
.mm-link i { 
    margin-right: 8px; 
    width: 20px; 
    text-align: center; 
    color: var(--primary); 
    font-size: 0.9rem;
}

.mm-card {
    background: #f9fafb; border-radius: 16px; padding: 20px;
    display: flex; flex-direction: column; text-align: center; height: 100%; justify-content: center;
}
.mm-card h4 { font-size: 0.95rem; margin-bottom: 5px; font-weight: 700; color: #333; }
.mm-card p { font-size: 0.8rem; color: #666; line-height: 1.4; margin-bottom: 10px; font-style: italic; }
.mm-card .btn-sm { font-size: 0.75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; border: 1px solid #eee; padding: 5px 10px; border-radius: 20px; display:inline-block; }
.mm-card .btn-sm:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* =========================================
   LAYOUT GERAL E GRID
   ========================================= */
.container { max-width: 1250px; margin: 0 auto; padding: 40px 20px; }

.bento-grid {
    display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
.col-2 { grid-column: span 2; }

.card {
    background: var(--bg-card); border-radius: var(--radius-card); padding: 25px;
    box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.03);
    display: flex; flex-direction: column; overflow: hidden;
}

/* =========================================
   ESTILOS ESPECÍFICOS: PÁGINA DETALHE
   ========================================= */
.article-card { padding: 40px; }
.article-header { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.article-header h1 { font-size: 2.2rem; color: var(--text-main); line-height: 1.2; margin-bottom: 10px; }
.article-meta { color: var(--text-muted); font-size: 0.9rem; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }

.article-tools-box {
    background-color: rgba(0,0,0,0.03);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 30px;
    text-align: right;
}

.tools-row {
    display: flex; justify-content: flex-end; align-items: center;
    flex-wrap: wrap; margin-bottom: 10px; gap: 10px;
}
.tools-row:last-child { margin-bottom: 0; }
.tools-label { font-weight: 700; color: #555; margin-right: 5px; font-size: 0.9rem; }

.tools-btn {
    background: #fff; border: 1px solid #ddd; padding: 5px 12px;
    border-radius: 4px; font-size: 0.85rem; color: #333;
    text-decoration: none; transition: 0.2s; display: inline-flex; align-items: center; gap: 5px;
}
.tools-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.tools-disabled { background: #eee; color: #999; border-color: #ddd; cursor: default; }

.featured-image { width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: 12px; margin-bottom: 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.article-body { font-size: 1.2rem; line-height: 1.8; color: #333; text-align: justify; font-family: 'Georgia', serif; }
.dic-link { color: var(--primary); border-bottom: 1px dotted var(--primary); cursor: help; }

/* Widgets Grid (Rodapé do Artigo) */
.widgets-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.widget-box { background: #f9fafb; padding: 25px; border-radius: 16px; border: 1px solid #eee; }
.widget-title { font-size: 1.1rem; border-bottom: 2px solid var(--primary-light); padding-bottom: 10px; margin-bottom: 15px; font-weight: 800; color: #444; }

/* Votação */
.vote-actions { display: flex; justify-content: space-around; align-items: center; margin-top: 10px; }
.vote-item { text-align: center; cursor: pointer; transition: 0.3s; }
.vote-item img { width: 50px; transition: 0.2s; }
.vote-item:hover img { transform: scale(1.1); }
.vote-result { font-weight: 800; font-size: 0.9rem; margin-top: 5px; display: block; }

/* Tag Chips */
.tag-chip {
    display: inline-block; background: #f1f5f9; color: #475569;
    padding: 6px 12px; border-radius: 20px; font-size: 0.8rem;
    font-weight: 600; text-decoration: none !important;
    transition: 0.2s; border: 1px solid #e2e8f0; margin-bottom: 5px;
}
.tag-chip:hover { background: var(--primary); color: white; border-color: var(--primary); }
.tag-chip.author { background: #e0f2fe; color: #0284c7; border-color: #bae6fd; }

/* Leia Também Links */
.related-item {
    display: block; text-decoration: none !important; padding: 10px 0;
    border-bottom: 1px solid #f1f1f1; transition: 0.2s;
}
.related-item:last-child { border-bottom: none; }
.related-item:hover { transform: translateX(5px); }
.related-title { display: block; font-size: 0.95rem; font-weight: 600; color: #333; margin-bottom: 2px; }
.related-item:hover .related-title { color: var(--primary); }
.related-meta { font-size: 0.8rem; color: #888; }

/* Nuvem Tags Global */
.global-tag-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 10px 0; }
.cloud-pill { padding: 6px 14px; border-radius: 20px; text-decoration: none; font-weight: 600; transition: 0.2s; display: inline-block; line-height: 1.2; }
.cloud-pill:hover { transform: scale(1.1); opacity: 1 !important; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* Compartilhamento */
.share-section {
    margin-top: 30px; margin-bottom: 30px; text-align: center;
    background: linear-gradient(135deg, #007bff, #0056b3);
    padding: 2em; border-radius: 8px; color: white;
}
.share-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 30px; color: white; text-decoration: none;
    margin: 5px; font-weight: 600; font-size: 0.9rem; transition: 0.3s;
}
.share-btn:hover { transform: translateY(-3px); opacity: 0.9; }

/* =========================================
   OUTROS COMPONENTES
   ========================================= */
.reflexao-box { display: flex; gap: 30px; align-items: center; height: 100%; background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%); }
.reflexao-img { width: 250px; height: 280px; border-radius: 16px; object-fit: cover; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.reflexao-content blockquote { font-size: 1.2rem; color: #444; border-left: 4px solid var(--primary); padding-left: 20px; margin: 15px 0; font-style: italic; line-height: 1.6; }

.search-container h3 { margin-bottom: 15px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
.search-input, .search-select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 10px; margin-bottom: 10px; }
.btn-search { width: 100%; background: var(--primary); color: white; border: none; padding: 12px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.search-links { margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee; display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; }

.topics-scroller { display: flex; gap: 15px; overflow-x: auto; padding: 15px 5px; margin-top: 15px; scroll-behavior: smooth; }
.topics-scroller::-webkit-scrollbar { height: 4px; }
.topics-scroller::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
.topic-pill { min-width: 130px; background: white; border: 1px solid #eee; border-radius: 15px; padding: 15px; text-align: center; transition: 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.03); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.topic-pill:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 5px 15px rgba(0,0,0,0.08); color: var(--primary); }
.topic-emoji { font-size: 2rem; }
.topic-name { font-weight: 600; font-size: 0.9rem; }

.small-feature { background: white; border-radius: 16px; padding: 25px 15px; text-align: center; border: 1px solid #eee; transition: 0.3s; min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.small-feature:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: var(--primary); }
.sf-icon { width: 60px; height: 60px; background: var(--primary-light); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 15px; }
.sf-title { font-weight: 800; font-size: 1rem; margin-bottom: 8px; }
.sf-desc { font-size: 0.85rem; color: #666; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 15px; flex-grow: 1; }
.sf-link { font-size: 0.85rem; font-weight: 700; color: var(--primary); text-transform: uppercase; border: 1px solid #eee; padding: 5px 15px; border-radius: 20px; }

.insta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hidden-post { display: none; }
.btn-load-more { display: block; margin: 20px auto 0; padding: 10px 30px; background: #eee; color: #333; border: none; border-radius: 30px; font-weight: 700; cursor: pointer; transition: 0.3s; }
.btn-load-more:hover { background: #ddd; }

.msg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 24px; }
.msg-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; margin-bottom: 15px; }
.msg-card h4 { font-size: 1.1rem; margin-bottom: 5px; color: #111; }
.msg-card small { color: var(--primary); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; display: block; margin-bottom: 10px; }
.msg-actions { margin-top: auto; display: flex; gap: 10px; }
.btn-ler { flex: 1; text-align: center; background: #f3f4f6; padding: 10px; border-radius: 8px; font-weight: 600; color: #333; transition: 0.2s; }
.btn-ler:hover { background: #e5e7eb; color: var(--primary); }
.btn-bio { flex: 1; text-align: center; background: var(--primary); padding: 10px; border-radius: 8px; font-weight: 600; color: white !important; transition: 0.2s; }
.btn-bio:hover { background: #a3221f; opacity: 0.9; }

footer { background-color: var(--primary); color: #ffffff; padding: 60px 0 30px 0; margin-top: 60px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
.footer-col h3 { font-size: 1.2rem; margin-bottom: 20px; border-bottom: 2px solid rgba(255,255,255,0.3); padding-bottom: 10px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; font-size: 0.95rem; opacity: 0.95; padding-left: 15px; position: relative; }
.footer-col li::before { content: '›'; position: absolute; left: 0; }
.footer-bottom { margin-top: 40px; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 20px; text-align: center; font-size: 0.9rem; opacity: 0.9; }

.sidebar-widget { background: white; border-radius: 12px; padding: 15px; border: 1px solid #eee; margin-bottom: 15px; display: flex; align-items: center; gap: 15px; transition: 0.3s; text-decoration: none !important; }
.sidebar-widget:last-child { margin-bottom: 0; }
.sidebar-widget:hover { transform: translateX(5px); border-color: var(--primary); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.sw-icon { width: 45px; height: 45px; background: var(--primary-light); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.sw-content h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; color: #333; }
.sw-content p { font-size: 0.8rem; color: #666; margin-bottom: 0; line-height: 1.3; }

/* =========================================
   RESPONSIVIDADE (MOBILE MENU CORRIGIDO)
   ========================================= */
@media (max-width: 992px) {
    .navbar-wrapper { padding: 0 10px; top: 10px; }
    .navbar { padding: 0 15px; background: #ffffff !important; }
    
    /* Logo Ajustado para Mobile */
    .logo { 
        font-size: 1rem; 
        gap: 8px; 
    }
    
    .nav-menu { 
        display: none; position: fixed; top: 90px; left: 50%; transform: translateX(-50%);
        width: 90%; max-width: 380px; max-height: 70vh; overflow-y: auto; 
        background: #ffffff !important; flex-direction: column; padding: 12px; 
        border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); 
        border: 1px solid #eee; z-index: 9999; alignItems: stretch; gap: 0; opacity: 1 !important;
    }
    
    .nav-menu.active { display: flex !important; }
    
    .mega-menu { 
        position: static; width: 100%; display: none; transform: none; 
        box-shadow: none; border: none; padding: 8px 0; background: #f9f9f9;
        margin-top: 5px; border-radius: 10px; grid-template-columns: 1fr; gap: 5px;
    }
    
    .nav-item { width: 100%; height: auto; border-bottom: 1px solid #f0f0f0; display: block;}
    .nav-item:last-child { border-bottom: none; }
    .nav-link { width: 100%; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
    .menu-toggle { display: block; }
    
    .col-8, .col-4, .col-6, .col-2, .col-12 { grid-column: span 12; }
    .reflexao-box { flex-direction: column; }
    .reflexao-img { width: 100%; height: 200px; }
    .insta-grid { grid-template-columns: 1fr; }
    .widgets-row { grid-template-columns: 1fr; }
    
    .tools-row { justify-content: flex-start; }
    .article-tools-box { text-align: left; }
    
    /* CORREÇÃO DO TRADUTOR NO MOBILE */
    /* Garante que o item da lista apareça e tenha o layout correto */
    .lang-item { 
        display: flex !important; /* Força a exibição */
        border-left: none; 
        padding-left: 0; 
        margin: 5px 0; 
        justify-content: center; 
        border-top: 1px solid #f0f0f0; 
        padding-top: 10px; 
        height: auto; 
    }
    
    .lang-btn { 
        font-size: 11px; 
        padding: 4px 8px; 
        color: #555; /* Garante contraste */
    }
}