/* assets/css/posts.css - Estilo Premium de Artigos & Sidebar (vFinal + Reaction Update) */

/* --- 1. LAYOUT DO ARTIGO --- */
.article-container { 
    padding: 60px 40px !important; 
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03); 
    border: 1px solid #f3f4f6;
}

/* Cabeçalho */
.article-header { text-align: center; max-width: 800px; margin: 0 auto 50px; }

.article-badges { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 25px; }
.category-pill { 
    background: linear-gradient(135deg, #6200ea, #7c3aed); 
    color: #fff; font-weight: 700; font-size: 0.75rem; 
    text-transform: uppercase; letter-spacing: 1px; 
    padding: 6px 14px; border-radius: 50px; 
    box-shadow: 0 4px 10px rgba(98, 0, 234, 0.2);
}
.date-pill { font-size: 0.85rem; color: #64748b; font-weight: 500; }

.article-title { 
    font-size: 2.5rem; line-height: 1.2; color: #111; margin-bottom: 25px; 
    letter-spacing: -0.5px; font-weight: 800;
}

.article-meta { 
    display: flex; justify-content: center; align-items: center; 
    gap: 30px; border-top: 1px solid #f3f4f6; border-bottom: 1px solid #f3f4f6; 
    padding: 20px 0; margin-top: 30px;
}

.author-box { display: flex; align-items: center; gap: 12px; text-align: left; }
.author-avatar { 
    width: 48px; height: 48px; background: #f3f4f6; color: #333; 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    font-weight: 700; font-size: 1.2rem; border: 2px solid #fff; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.author-info { display: flex; flex-direction: column; }
.author-info strong { font-size: 0.9rem; color: #111; font-weight: 700; }
.author-info span { font-size: 0.8rem; color: #666; }

.share-mini { display: flex; gap: 10px; }
.btn-icon-circle { 
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid #e5e7eb; 
    background: #fff; color: #555; display: flex; align-items: center; justify-content: center; 
    cursor: pointer; transition: 0.2s; font-size: 0.9rem; 
}
.btn-icon-circle:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.whatsapp:hover { color: #fff; background: #25D366; border-color: #25D366; }

/* Imagem */
.featured-image-wrapper { margin: 0 -40px 50px; box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
.featured-image-wrapper img { width: 100%; height: auto; display: block; }

/* --- 2. TEXTO PREMIUM (O Diamante) --- */
.article-body {
    font-family: 'Inter', sans-serif; 
    font-size: 1.15rem; line-height: 1.85; 
    color: #334155; max-width: 740px; margin: 0 auto;
    /* Justificação Híbrida */
    text-align: justify; text-justify: inter-word; 
    hyphens: auto; -webkit-hyphens: auto;
}

.article-body p { margin-bottom: 1.8em; }
.article-body h2 { 
    font-size: 1.8rem; color: #111; margin-top: 2.5em; margin-bottom: 0.8em; 
    letter-spacing: -0.5px; font-weight: 800; position: relative;
}
.article-body h2::before {
    content: ''; position: absolute; left: -20px; top: 8px; bottom: 8px;
    width: 4px; background: var(--primary); border-radius: 2px; opacity: 0; 
}
.article-body h3 { font-size: 1.4rem; color: #1e293b; margin-top: 2em; margin-bottom: 0.6em; font-weight: 700; }
.article-body ul, .article-body ol { 
    margin-bottom: 2em; padding-left: 1.2em; background: #f8fafc; 
    padding: 30px 30px 30px 50px; border-radius: 12px; border-left: 4px solid var(--primary);
}
.article-body li { margin-bottom: 0.8em; padding-left: 5px; }
.article-body img { max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); margin: 30px 0; }
.article-body a { 
    color: var(--primary); text-decoration: none; font-weight: 600;
    border-bottom: 2px solid rgba(98, 0, 234, 0.2); transition: 0.2s;
}
.article-body a:hover { background: rgba(98, 0, 234, 0.1); border-bottom-color: var(--primary); }
.article-body blockquote {
    font-style: italic; font-size: 1.3rem; color: #111;
    border-left: 4px solid var(--primary); margin: 40px 0; padding: 10px 20px 10px 30px;
    background: #fff;
}

/* --- 3. WIDGETS LATERAIS (Sidebar Cards) --- */
.side-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 4px; border-radius: 8px; color: var(--text-muted); font-weight: 500; transition: all 0.2s; text-decoration: none; }
.side-link:hover { background: #fff; color: var(--primary); transform: translateX(5px); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.icon-box { width: 24px; display: flex; justify-content: center; transition: transform 0.2s; }
.side-link:hover .icon-box { transform: scale(1.1); }
.section-header { font-size: 0.75rem; font-weight: 800; color: #9ca3af; margin: 25px 0 10px 15px; text-transform: uppercase; letter-spacing: 0.5px; }

.community-card { 
    background: linear-gradient(135deg, #6200ea 0%, #b055ff 100%); 
    color: white; text-align: center; border: none; 
    padding: 25px; border-radius: 12px; margin-top: 20px; 
}
.community-card h4 { color: white; margin-bottom: 5px; font-size: 1.1rem; } 
.community-card p { color: rgba(255,255,255,0.9); font-size: 0.9rem; margin-bottom: 15px; }
.community-icon { font-size: 1.5rem; margin-bottom: 10px; background: rgba(255,255,255,0.2); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.news-input { width: 100%; border: none; padding: 10px; border-radius: 4px; margin-bottom: 8px; font-size: 0.9rem; outline: none; color: #333; }
.btn-header { background: white; color: var(--primary); border: none; width: 100%; font-weight: 700; font-size: 0.85rem; padding: 10px; border-radius: 50px; cursor:pointer; transition:0.2s; }
.btn-header:hover { background: #f0f0f0; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

.ranking-list { padding-left: 0; margin: 0; list-style: none; counter-reset: rank-counter; }
.ranking-item { position: relative; padding-left: 35px; margin-bottom: 15px; }
.ranking-item::before { counter-increment: rank-counter; content: counter(rank-counter); position: absolute; left: 0; top: 2px; font-size: 1.5rem; font-weight: 800; color: #e0e0e0; line-height: 1; }
.ranking-item:nth-child(1)::before { color: #FFD700; } .ranking-item:nth-child(2)::before { color: #C0C0C0; } .ranking-item:nth-child(3)::before { color: #CD7F32; } 
.ranking-link { font-weight: 600; font-size: 0.95rem; color: var(--text-main); line-height: 1.4; display: block; text-decoration: none; }
.ranking-link:hover { color: var(--primary); } .ranking-meta { font-size: 0.75rem; color: #999; margin-top: 4px; }

/* --- 4. VOTAÇÃO (NOVO ESTILO REACTION) --- */
.article-divider { text-align: center; font-size: 1.5rem; color: #e5e7eb; margin: 60px 0 20px; letter-spacing: 15px; }

.vote-section { 
    background: transparent; /* Remove fundo cinza */
    padding: 30px 0; 
    text-align: center; 
    max-width: 600px; 
    margin: 0 auto; 
    border: none; /* Remove borda */
}

.vote-section h4 { 
    margin: 0 0 25px 0; 
    font-size: 1.1rem; 
    color: #94a3b8; /* Cor mais suave */
    font-weight: 600; 
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vote-buttons { 
    display: flex; 
    justify-content: center; 
    gap: 50px; /* Mais espaço entre os ícones */
}

/* Botões de Reação (Carinhas) */
.reaction-btn {
    background: transparent;
    border: none;
    font-size: 3.5rem; /* Ícone Grande */
    color: #cbd5e1; /* Cinza claro inativo */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efeito Bouncy */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.reaction-btn:hover {
    transform: scale(1.2) translateY(-5px); /* Cresce e sobe */
}

.reaction-btn:disabled {
    cursor: default;
    opacity: 0.3;
    transform: none !important;
}

/* Cores ao passar o mouse ou ativar */
.reaction-btn.happy:hover, 
.reaction-btn.happy.active { 
    color: #fbbf24; /* Amarelo Feliz */
    filter: drop-shadow(0 10px 15px rgba(251, 191, 36, 0.3));
}

.reaction-btn.sad:hover, 
.reaction-btn.sad.active { 
    color: #94a3b8; /* Cinza Escuro Triste */
    filter: drop-shadow(0 10px 15px rgba(148, 163, 184, 0.3));
}

/* Classe de animação de clique */
.pop-anim {
    animation: popEffect 0.4s ease forwards;
}

@keyframes popEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Mensagem de Feedback */
#voteMsg {
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 700;
    color: #10b981;
    animation: fadeIn 0.5s ease;
}

/* --- 5. TABELAS --- */
.article-body table {
    width: 100%; border-collapse: collapse; margin: 25px 0; font-size: 0.95rem;
    background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.article-body thead { background-color: var(--primary); color: #fff; }
.article-body th, .article-body td { padding: 12px 15px; border: 1px solid #e5e7eb; text-align: left; }
.article-body th { font-weight: 700; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px; }
.article-body tr:nth-child(even) { background-color: #f9fafb; }
.article-body tr:hover { background-color: #f3f4f6; }

/* --- DARK MODE --- */
body.dark-mode .article-container { background: #1e293b; border-color: #334155; }
body.dark-mode .article-title { color: #f8fafc; }
body.dark-mode .article-meta { border-color: #334155; }
body.dark-mode .author-avatar { background: #0f172a; border-color: #334155; color: #fff; }
body.dark-mode .author-info strong { color: #fff; }
body.dark-mode .author-info span { color: #94a3b8; }
body.dark-mode .btn-icon-circle { background: #0f172a; border-color: #334155; color: #cbd5e1; }
body.dark-mode .article-body { color: #cbd5e1; }
body.dark-mode .article-body h2, body.dark-mode .article-body h3, body.dark-mode .article-body strong { color: #fff; }
body.dark-mode .article-body ul, body.dark-mode .article-body ol { background: #0f172a; color: #cbd5e1; }
body.dark-mode .article-body blockquote { color: #e2e8f0; background: transparent; }

/* Dark Mode Voting */
body.dark-mode .vote-section h4 { color: #64748b; }
body.dark-mode .reaction-btn { color: #475569; } /* Cinza mais escuro no dark */
body.dark-mode .reaction-btn.happy:hover, body.dark-mode .reaction-btn.happy.active { color: #fbbf24; }
body.dark-mode .reaction-btn.sad:hover, body.dark-mode .reaction-btn.sad.active { color: #cbd5e1; }

/* Tabelas Dark */
body.dark-mode .article-body table { background: #1e293b; border-color: #334155; }
body.dark-mode .article-body th, body.dark-mode .article-body td { border-color: #334155; }
body.dark-mode .article-body tr:nth-child(even) { background-color: #0f172a; }
body.dark-mode .article-body tr:hover { background-color: rgba(255,255,255,0.05); }

/* Mobile */
@media (max-width: 768px) {
    .article-container { padding: 30px 20px !important; }
    .article-title { font-size: 2rem; }
    .featured-image-wrapper { margin: 0 -20px 30px; border-radius: 0; }
    .featured-image-wrapper img { border-radius: 0; }
    .article-meta { flex-direction: column; gap: 20px; align-items: flex-start; }
    .share-mini { width: 100%; display: flex; justify-content: flex-start; gap: 10px; }
    .article-body { font-size: 1.05rem; }
    .article-body table { display: block; width: 100%; overflow-x: auto; white-space: nowrap; }
    .vote-buttons { gap: 30px; }
    .reaction-btn { font-size: 3rem; }
}