/*
 Theme Name:   PEF Theme
 Theme URI:    https://pelaestradafora.com
 Description:  Child theme do News Magazine X para o Pela Estrada Fora
 Author:       Nuno Barros
 Author URI:   https://pelaestradafora.com
 Template:     news-magazine-x
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  pef-theme
*/

/* =============================================
   PEF THEME — CUSTOM STYLES
   Cor de destaque: #8b0000 (vermelho escuro)
   Secundária: #3a3a3a (cinzento escuro)
   Fundo claro: #f4f4f4
   Fundo escuro: #111111
   ============================================= */

/* Cor de fundo do ticker de destaques */
.newsx-news-ticker,
.newsx-top-section-wrap,
.newsx-middle-section-wrap ~ .newsx-top-section-wrap,
#site-header .newsx-top-section-wrap {
    background-color: #c8a84b !important;
}

.newsx-news-ticker .news-ticker-heading {
    display: none !important;
}

.newsx-news-ticker .news-ticker-heading-text,
.newsx-news-ticker .newsx-news-ticker-title p,
.newsx-news-ticker .newsx-news-ticker-title {
    color: #1a1a1a !important;
}

/* Modo escuro */
.dark-mode .newsx-news-ticker,
.dark-mode .newsx-top-section-wrap {
    background-color: #8b6914 !important;
}

.dark-mode .newsx-news-ticker .news-ticker-heading {
    background-color: #7a5c10 !important;
}

.dark-mode .newsx-news-ticker .newsx-news-ticker-title p,
.dark-mode .newsx-news-ticker .newsx-news-ticker-title {
    color: #f0f0f0 !important;
}

/* Centrar imagens nos artigos */
.entry-content img,
.post-content img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Ocultar reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* Ocultar Google Privacy and cookie settings */
.cmp-show-settings-icon,
[data-cmp-ab="2"],
#cmp-icon-btn,
.sp_choice_type_11,
[id^="sp_message"],
.message-overlay,
.ft-button.ft-reg-button {
    display: none !important;
}

/* Ajustar tagline ligeiramente para a direita */
.site-description {
    padding-left: 12px;
}

/* Logo no header */
.site-branding .site-title a,
.site-title a,
#site-title a,
.header-title a {
    display: block;
    text-indent: -9999px;
    background-image: url('/wp-content/themes/pef-theme/images/logo-claro.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left center;
    width: 220px;
    height: 116px;
}

/* Ocultar imagem duplicada no início do artigo */
.newsx-single-post-media {
    display: none !important;
}

/* Área AdSense entre sources e navegação do artigo */
.pef-post-ad {
    margin: 16px 0;
    text-align: center;
}

/* Área AdSense na página principal (entre 5º e 6º artigo) */
.pef-home-ad {
    margin: 16px 0;
    text-align: center;
}

/* Reduzir espaço entre navegação e artigos relacionados */
.newsx-post-navigation {
    margin-bottom: 8px !important;
}
.newsx-related-posts-wrap {
    margin-top: 8px !important;
}

/* Ocultar caixa do autor no final do artigo */
.newsx-post-author-box {
    display: none !important;
}

/* Ocultar texto 'Marcado:' nas tags do artigo */
.post-source.source-tag > span:first-child {
    display: none;
}

/* Substituir 'Related Posts' por 'Artigos relacionados' */
.newsx-related-posts-wrap > h4 {
    font-size: 0;
}
.newsx-related-posts-wrap > h4::after {
    content: 'Artigos relacionados';
    font-size: 1rem;
}

/* Substituir texto 'Read More' por 'Ler mais...' */
.newsx-grid-read-more-link {
    font-size: 0 !important;
}
.newsx-grid-read-more-link::after {
    content: 'Ler mais...';
    font-size: 14px;
}
.newsx-middle-section-wrap .newsx-builder-grid-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
}

.pef-header-ad {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 468px;
    height: 60px;
    text-align: center;
    z-index: 1;
}

.pef-header-ad ins {
    width: 468px;
    height: 60px;
    display: block;
}

/* Redes sociais alinhadas à direita */
.newsx-middle-section-wrap .newsx-grid-column-right {
    margin-left: auto;
}

@media (max-width: 768px) {
    .pef-header-ad {
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        margin: 8px auto;
        overflow: hidden;
    }
    .pef-header-ad ins {
        max-width: 100% !important;
        width: 100% !important;
    }
}

