/* --- Dark Mode Suave & Melhorias Visuais --- */

body {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
}

.navbar-custom {
    background-color: #b71c1c !important;
    border-bottom: none;
}

.navbar-custom .navbar-brand, 
.navbar-custom .nav li a {
    color: #ffffff !important;
}

.post-preview > a, 
.page-meta {
    color: #bdbdbd !important;
}

a {
    color: #ff5252 !important;
}

a:hover {
    color: #ff867f !important;
    text-decoration: underline;
}

/* Caixa de destaque vermelha (Projetos) */
.bg-danger {
    background-color: #d32f2f !important;
    color: #ffffff !important;
    padding: 20px;
    border-radius: 0 !important;
    margin-top: 20px;
}

/* Indicador de página ativa no menu */
.navbar-custom .nav li.active > a, 
.navbar-custom .nav li.active > a:focus, 
.navbar-custom .nav li.active > a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-bottom: 3px solid #ffffff;
}

/* Botão Scroll to Top */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: #b71c1c;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 0 !important;
}

#scrollTopBtn:hover {
    background-color: #d32f2f;
}

/* --- Correção de Layout dos Posts --- */

.post-preview {
    width: 100% !important;
    float: none !important;
    display: block !important;
    clear: both !important;
    margin-bottom: 40px;
}

.post-entry-content {
    overflow: hidden;
    margin-right: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
}

.post-thumbnail, 
.post-preview img {
    display: none !important;
}

.post-read-more {
    text-align: left !important;
    clear: both !important;
    display: block !important;
    margin-top: 15px !important;
}

.post-read-more a {
    display: inline-block;
    background-color: #b71c1c;
    color: white !important;
    padding: 8px 16px;
    border-radius: 0 !important;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid #b71c1c;
    line-height: 1;
}

.post-read-more a:hover {
    background-color: transparent;
    color: #ff5252 !important;
    border-color: #ff5252;
}

hr + hr {
    display: none !important;
}

.post-preview + hr {
    border: 0 !important;
    border-top: 1px solid #444 !important;
    margin: 40px 0 !important;
    opacity: 0.5;
}

/* --- CORREÇÃO DEFINITIVA DO BOTÃO LEIA MAIS --- */

/* 1. Esconder TODAS as imagens e thumbnails nos previews */
.post-preview .post-thumbnail,
.post-preview img,
.post-preview figure,
.post-preview .featured-image,
.post-preview .entry-content img {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. Garantir que o container do post ocupa 100% da largura */
.post-preview {
    width: 100% !important;
    float: none !important;
    clear: both !important;
    display: block !important;
}

/* 3. Garantir que o conteúdo do post ocupa toda a largura disponível */
.post-entry-content {
    width: 100% !important;
    overflow: hidden; 
    margin-right: 0 !important;
    padding-right: 0 !important;
}

/* 4. Estilizar o Botão Leia Mais para ficar limpo */
.post-read-more {
    clear: both !important; 
    text-align: left !important;
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    display: block !important;
}

.post-read-more a {
    display: inline-block !important;
    background-color: #b71c1c !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 0 !important; 
    text-decoration: none !important;
    font-weight: bold !important;
    border: 1px solid #b71c1c !important;
    transition: all 0.3s ease !important;
}

.post-read-more a:hover {
    background-color: transparent !important;
    color: #ff5252 !important;
    border-color: #ff5252 !important;
}

/* --- Layout Vertical Limpo para Posts --- */

.post-preview {
    width: 100% !important;
    float: none !important;
    display: block !important;
    clear: both !important;
    margin-bottom: 40px;
}

.post-title {
    margin-top: 0;
    margin-bottom: 5px;
}

.post-title a {
    color: #ffffff !important;
    text-decoration: none;
}

.post-title a:hover {
    color: #ff5252 !important;
    text-decoration: underline;
}

.post-subtitle {
    font-size: 1.2em;
    color: #bdbdbd !important;
    margin-bottom: 15px;
}

.post-entry-content {
    font-size: 1.1em;
    line-height: 1.6;
    color: #e0e0e0 !important;
}

/* Botão Leia Mais */
.post-read-more {
    margin-top: 20px;
    text-align: left !important;
}

.post-read-more a {
    display: inline-block;
    background-color: #b71c1c; 
    color: white !important;
    padding: 10px 20px;
    border-radius: 0 !important; 
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid #b71c1c;
}

.post-read-more a:hover {
    background-color: transparent;
    color: #ff5252 !important;
    border-color: #ff5252;
}

/* Linha Separadora */
hr {
    border: 0 !important;
    border-top: 1px solid #444 !important;
    margin: 40px 0 !important;
    opacity: 0.5;
}

/* --- CORREÇÃO FINAL DOS POST PREVIEWS --- */

/* 1. Esconder totalmente qualquer thumbnail/imagem no preview */
.post-preview .post-thumbnail,
.post-preview img,
.post-preview figure {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. Forçar o container do post a ocupar 100% da largura */
.post-preview {
    width: 100% !important;
    float: none !important;
    clear: both !important;
    display: block !important;
}

/* 3. Garantir que o conteúdo do post ocupa toda a largura */
.post-entry-content {
    width: 100% !important;
    overflow: hidden; 
    margin-right: 0 !important;
    padding-right: 0 !important;
}

/* 4. Estilizar o Botão Leia Mais */
.post-read-more {
    clear: both !important; 
    text-align: left !important;
    margin-top: 20px !important;
    display: block !important;
}

.post-read-more a {
    display: inline-block !important;
    background-color: #b71c1c !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 0 !important; 
    text-decoration: none !important;
    font-weight: bold !important;
    border: 1px solid #b71c1c !important;
    transition: all 0.3s ease !important;
}

.post-read-more a:hover {
    background-color: transparent !important;
    color: #ff5252 !important;
    border-color: #ff5252 !important;
}

/* --- CORREÇÃO DEFINITIVA DO LAYOUT DE POSTS (Beautiful Hugo Grid Fix) --- */

/* 1. Forçar o artigo a ocupar 100% da largura e remover floats */
.post-preview {
    width: 100% !important;
    float: none !important;
    display: block !important;
    clear: both !important;
}

/* 2. CRÍTICO: Remover a margem direita do conteúdo que cria o espaço vazio */
.post-preview .post-entry-content {
    margin-right: 0 !important; 
    width: 100% !important; 
    overflow: hidden; 
}

/* 3. Esconder qualquer thumbnail/imagem quebrada ou vazia */
.post-preview .post-thumbnail,
.post-preview img,
.post-preview figure {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 4. Estilizar o Botão Leia Mais para ficar limpo e alinhado */
.post-read-more {
    clear: both !important; 
    text-align: left !important;
    margin-top: 20px !important;
    display: block !important;
}

.post-read-more a {
    display: inline-block !important;
    background-color: #b71c1c !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 0 !important; 
    text-decoration: none !important;
    font-weight: bold !important;
    border: 1px solid #b71c1c !important;
    transition: all 0.3s ease !important;
}

.post-read-more a:hover {
    background-color: transparent !important;
    color: #ff5252 !important;
    border-color: #ff5252 !important;
}

/* --- CORREÇÃO DEFINITIVA DO LAYOUT DE POSTS --- */

/* 1. Forçar o artigo a ocupar 100% da largura */
.post-preview {
    width: 100% !important;
    float: none !important;
    display: block !important;
    clear: both !important;
    margin-bottom: 40px;
}

/* 2. CRÍTICO: Remover a margem direita do conteúdo que cria o espaço vazio */
.post-preview .post-entry-content {
    margin-right: 0 !important; 
    width: 100% !important; 
    overflow: hidden; 
}

/* 3. Esconder qualquer thumbnail/imagem quebrada ou vazia */
.post-preview .post-thumbnail,
.post-preview img,
.post-preview figure {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 4. Estilizar o Botão Leia Mais */
.post-read-more {
    clear: both !important; 
    text-align: left !important;
    margin-top: 20px !important;
    display: block !important;
}

.post-read-more a {
    display: inline-block !important;
    background-color: #b71c1c !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 0 !important; 
    text-decoration: none !important;
    font-weight: bold !important;
    border: 1px solid #b71c1c !important;
    transition: all 0.3s ease !important;
}

.post-read-more a:hover {
    background-color: transparent !important;
    color: #ff5252 !important;
    border-color: #ff5252 !important;
}

/* --- CORREÇÃO FINAL DO BOTÃO LEIA MAIS --- */

/* 1. Remover qualquer fundo, borda ou espaçamento do container footer */
.post-read-more {
    background-color: transparent !important; 
    border: none !important;
    padding: 0 !important;
    margin: 20px 0 0 0 !important; 
    text-align: left !important;
    display: block !important;
    clear: both !important;
}

/* 2. Estilizar o Link (Botão) para ficar compacto e perfeito */
.post-read-more a {
    display: inline-block !important;
    background-color: #b71c1c !important; 
    color: white !important;
    padding: 8px 16px !important; 
    border-radius: 0 !important; 
    text-decoration: none !important;
    font-weight: bold !important;
    border: 1px solid #b71c1c !important;
    transition: all 0.3s ease !important;
    line-height: 1.2 !important; 
    box-sizing: border-box !important;
}

.post-read-more a:hover {
    background-color: transparent !important;
    color: #ff5252 !important;
    border-color: #ff5252 !important;
}

hr {
    border: 0 !important;
    border-top: 1px solid #444 !important; 
    margin: 40px 0 !important; 
    opacity: 0.5;
}


hr + hr {
    display: none !important;
}

