/* =========================================
   1. BASE E VARIÁVEIS
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --font-title: 'Marcellus', serif;
    --font-text: 'Sora', sans-serif;
    --color-white: #ffffff;
    --color-text-dark: #2A2A2A;
    --color-btn: #A0A08B;
    --color-bg-body: #F8F7F2;
}
body { font-family: var(--font-text); color: var(--color-text-dark); background-color: var(--color-bg-body); overflow-x: hidden; line-height: 1.6; }

/* =========================================
   2. HEADER (FUNDO ESCURO E MENU)
   ========================================= */
.site-header { 
    background-color: #1a1a1a !important; 
    padding: 20px 0 !important; 
    width: 100%; 
    z-index: 9999;
    position: relative;
}
.header-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.logo img { max-height: 80px; width: auto; display: block !important; opacity: 1 !important; visibility: visible !important; }

.main-nav ul { display: flex; gap: 25px; list-style: none; }
.main-nav > ul > li > a { color: #fff; text-decoration: none; font-weight: 500; font-family: var(--font-title); font-size: 1.1rem; }

/* Correção Dropdown Vida Cristã */
.sub-menu { 
    position: absolute; top: 100%; left: 0; width: 240px; background-color: var(--color-btn);
    padding: 10px 0; border-radius: 8px; opacity: 0; visibility: hidden; transition: 0.3s; z-index: 1100;
}
.main-nav li:hover > .sub-menu { opacity: 1; visibility: visible; }
.sub-menu a { color: #fff !important; padding: 10px 20px; display: block; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.1); }

/* Item saindo da tela */
.main-nav > ul > li:last-child .sub-menu,
.main-nav > ul > li:nth-last-child(2) .sub-menu { left: auto !important; right: 0 !important; }

/* =========================================
   3. SINGLE POST E CENTRALIZAÇÃO À PROVA DE FALHAS
   ========================================= */
/* Padrão 1: Força tudo a ficar centralizado e com 1 coluna caso não haja sidebar */
.layout-grid { 
    display: grid; 
    grid-template-columns: 1fr !important;
    max-width: 900px !important; 
    margin: -50px auto 0 auto !important; 
    padding: 0 20px;
    position: relative; 
    z-index: 10; 
    align-items: start;
    gap: 40px;
}

/* Padrão 2: APENAS SE a sidebar existir na tela, ele estica e divide em 2 colunas */
.layout-grid:has(.site-sidebar),
.layout-grid.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 340px !important;
    max-width: 1280px !important;
}

.content-container { 
    background: #fff; 
    padding: 50px 60px; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    width: 100%; 
}

.site-sidebar { width: 100%; }

/* =========================================
   4. FOTO DO AUTOR E BOX NEWSLETTER (CTA)
   ========================================= */
.author-box { display: flex; align-items: center; background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 30px; margin-top: 40px; gap: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); }
.author-avatar { width: 120px; height: 120px; flex-shrink: 0; overflow: hidden; border-radius: 50%; }
.author-avatar img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important; 
    display: block !important; 
    visibility: visible !important; 
    opacity: 1 !important; 
}
.author-info h3 { color: #111; font-size: 22px; margin-bottom: 12px; font-family: var(--font-title); }
.author-info p { font-size: 1rem; color: #555; line-height: 1.6; margin-bottom: 10px; }

.post-cta-box { background: linear-gradient(135deg, #f9f9f9, #f1f1f1); border-radius: 12px; padding: 40px; margin-top: 40px; text-align: center; border: 1px solid #e5e5e5; }
.post-cta-box h3 { color: #111; font-size: 24px; margin-bottom: 10px; font-family: var(--font-title); }
.post-cta-box p { color: #555; font-size: 16px; margin-bottom: 25px; }

.post-cta-box .forminator-ui { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 500px; margin: 0 auto !important; }
.post-cta-box .forminator-input { border-radius: 50px !important; background: #fff !important; border: 1px solid #ccc !important; height: 50px !important; padding: 0 20px !important; }
.post-cta-box .forminator-button-submit { background-color: #28a745 !important; color: #fff !important; border-radius: 50px !important; padding: 0 30px !important; height: 50px !important; font-weight: 700 !important; cursor: pointer; border: none !important; }

/* =========================================
   5. RESPONSIVIDADE E EXTRAS
   ========================================= */
@media (max-width: 1024px) {
    .layout-grid,
    .layout-grid:has(.site-sidebar),
    .layout-grid.has-sidebar { 
        display: block !important; 
        margin-top: 20px !important; 
    }
    .content-container { padding: 30px 20px; }
    .author-box { flex-direction: column; text-align: center; }
    .site-sidebar { margin-top: 40px; }
}

@media (max-width: 768px) {
    .post-cta-box .forminator-ui { flex-direction: column !important; }
    .post-cta-box .forminator-row, .post-cta-box .forminator-button-submit { width: 100% !important; }
}

/* Ocultar plugins sociais residuais da sidebar esquerda se houver */
.floating-icons, .heateor_sss_vertical_sharing { display: none !important; }
/* =========================================
   6. CORREÇÕES DE ACESSIBILIDADE E CONTRASTE (PAGESPEED)
   ========================================= */
/* Navegação do Post (Anterior / Próximo) */
.nav-label { 
    color: #111111 !important; /* Preto forte para contraste máximo */
    font-weight: 800 !important; 
}
.nav-title { 
    color: #003d80 !important; /* Azul escuro forte */
    font-weight: 700 !important; 
}
.nav-previous a, .nav-next a { 
    color: #333333 !important; 
    text-decoration: none; 
}
.nav-previous a:hover, .nav-next a:hover { 
    color: #000000 !important; 
}

/* Breadcrumbs (Navegação Início / Artigos) */
.breadcrumbs-dark, 
.breadcrumbs-dark a, 
.breadcrumbs-dark span,
.breadcrumbs-dark .current { 
    color: #333333 !important; /* Cinza bem escuro para passar no teste */
    font-weight: 700 !important; 
}
/* =========================================
   ESTILOS ESPECÍFICOS DA PÁGINA (PAGE.PHP)
   ========================================= */

/* Top Bar Semi-transparente */
.custom-top-bar-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 45px; background-color: rgba(0,0,0,0.3) !important; border-bottom: 1px solid rgba(255,255,255,0.1); z-index: 10005; display: flex; justify-content: center; }
.custom-top-bar-inner { width: 100%; max-width: 1280px; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; height: 100%; }
.top-contact-info { display: flex; gap: 25px; align-items: center; }
.contact-item { display: flex; align-items: center; gap: 8px; color: #ffffff; font-size: 13px; font-family: sans-serif; text-decoration: none; transition: color 0.3s; letter-spacing: 0.5px; }
.contact-item:hover { color: #d4af37; text-decoration: none; }
.contact-item svg { width: 14px; height: 14px; fill: currentColor; }
.top-social-icons { display: flex; gap: 15px; align-items: center; }
.custom-top-icon { color: #ffffff; font-size: 14px; text-decoration: none; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; cursor: pointer; padding: 5px; }
.custom-top-icon:hover { color: #d4af37; transform: translateY(-2px); }
.custom-top-icon svg { width: 16px; height: 16px; fill: currentColor; }

/* Modal de Busca da Página */
.search-modal { display: none; position: fixed; z-index: 999999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.95); align-items: center; justify-content: center; animation: fadeIn 0.3s; }
.search-modal.open { display: flex; }
.search-modal-content { position: relative; width: 80%; max-width: 700px; text-align: center; }
.search-modal input { width: 100%; padding: 20px; font-size: 24px; border: none; border-bottom: 2px solid #fff; background: transparent; color: #fff; outline: none; text-align: center; }
.search-modal-close { position: absolute; top: 30px; right: 30px; color: #fff; font-size: 40px; cursor: pointer; }
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }

/* Cabeçalho da Página */
.page-header { position: relative; height: 450px; background-color: #1a1a1a; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; margin-top: 0; padding-top: 80px; }
.page-header::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1; }
.page-header-content { position: relative; z-index: 2; color: #fff; width: 100%; max-width: 900px; padding: 0 20px; }
.page-title { font-size: 3.5rem; font-family: var(--font-title); margin-bottom: 20px; line-height: 1.1; }

.header-meta { display: flex; justify-content: center; align-items: center; gap: 15px; font-size: 0.95rem; color: #fff; margin-top: 10px; }
.meta-date { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.meta-date svg { width: 14px; height: 14px; fill: var(--color-btn); display: block; }
.header-sep { opacity: 0.4; font-size: 0.8rem; position: relative; top: -1px; }
.meta-author { font-size: 0.85rem; opacity: 0.8; font-weight: 400; letter-spacing: 0.5px; }
.meta-author strong { font-weight: 600; color: #fff; }

/* Box de Conteúdo da Página */
.page-template-default .main-content-area { padding: 80px 0; }
.page-template-default .content-container { max-width: 1050px; margin: 0 auto; background: #fff; padding: 80px; box-shadow: 0 10px 40px rgba(0,0,0,0.05); margin-top: -100px; position: relative; z-index: 10; }

.breadcrumbs-dark .separator { margin: 0 8px; opacity: 0.4; }
.breadcrumbs-dark .current { font-weight: bold; color: #333; }
.share-icons-right { display: flex; gap: 10px; }
.share-btn { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; transition: all 0.2s ease; text-decoration: none !important; }
.share-btn svg { width: 16px; height: 16px; fill: currentColor; }
.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }

/* Tipografia Extra */
.entry-content h3 { font-size: 1.6rem; margin-top: 30px; margin-bottom: 10px; font-family: var(--font-title); color: #333; }
.entry-content blockquote { border-left: 5px solid var(--color-btn); background-color: #F9F9F9; margin: 40px 0; padding: 25px 35px; font-family: var(--font-title); font-size: 1.25rem; font-style: normal; color: #555; position: relative; border-radius: 0 10px 10px 0; }
.entry-content blockquote::before { content: '“'; font-size: 3.5rem; color: var(--color-btn); opacity: 0.3; position: absolute; top: 5px; left: 10px; line-height: 1; }
.entry-content blockquote cite { display: block; font-size: 0.9rem; margin-top: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #888; }

/* Box CTA */
.page-template-default .post-cta-box { background-color: #F9F9F9; border-left: 5px solid #d4af37; padding: 45px 30px; margin: 60px 0 40px 0; border-radius: 8px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); }
.page-template-default .post-cta-box h3 { font-family: var(--font-title, serif); color: #222; margin: 0; font-size: 1.6rem; }
.cta-buttons-row { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.btn-cta { padding: 12px 30px; border-radius: 50px; text-decoration: none !important; font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; transition: all 0.3s ease; }
.btn-cta-newsletter { background-color: #1a1a1a; color: #fff; border: 2px solid #1a1a1a; }
.btn-cta-newsletter:hover { background-color: transparent; color: #1a1a1a; transform: translateY(-2px); }
.btn-cta-donate { background-color: transparent; color: #d4af37; border: 2px solid #d4af37; }
.btn-cta-donate:hover { background-color: #d4af37; color: #fff; transform: translateY(-2px); }

/* Responsividade Mobile da Página */
@media (max-width: 992px) {
    .custom-top-bar-wrapper { display: none !important; }
}
@media (max-width: 768px) { 
    .page-title { font-size: 2.5rem; } 
    .header-meta { flex-direction: column; gap: 8px; }
    .header-sep { display: none; }
    .page-template-default .content-container { padding: 30px 20px; margin-top: -50px; } 
    .meta-share-wrapper { flex-direction: column; align-items: flex-start; gap: 15px; }
    .cta-buttons-row { flex-direction: column; width: 100%; gap: 10px; }
    .btn-cta { width: 100%; text-align: center; }
}