/**
 * CORREÇÃO: Legibilidade dos Posts Recentes - Página Início
 * Blue Concursos
 * 
 * LOCAL: Adicionar no style.css do tema child (astra-child/style.css)
 * OU criar arquivo separado: assets/css/pages/inicio-posts-recentes.css
 */

/* ========================================
   POSTS RECENTES - CORREÇÃO DE LEGIBILIDADE
======================================== */

/* Seletor específico para posts recentes na página inicial */
.home .posts-tecnoblog .entry-title,
.home .posts-tecnoblog .entry-title a,
.page-template-default .posts-tecnoblog .entry-title,
.page-template-default .posts-tecnoblog .entry-title a {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

/* Conteúdo/resumo dos posts */
.home .posts-tecnoblog .entry-summary,
.home .posts-tecnoblog .entry-summary p,
.home .posts-tecnoblog .entry-content,
.home .posts-tecnoblog .entry-content p,
.page-template-default .posts-tecnoblog .entry-summary,
.page-template-default .posts-tecnoblog .entry-summary p,
.page-template-default .posts-tecnoblog .entry-content,
.page-template-default .posts-tecnoblog .entry-content p {
    color: #f1f5f9 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Metadados (data, autor, etc) */
.home .posts-tecnoblog .entry-meta,
.home .posts-tecnoblog .entry-meta a,
.home .posts-tecnoblog .entry-meta span,
.page-template-default .posts-tecnoblog .entry-meta,
.page-template-default .posts-tecnoblog .entry-meta a,
.page-template-default .posts-tecnoblog .entry-meta span {
    color: #e2e8f0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Overlay de contraste nas imagens de fundo */
.home .posts-tecnoblog .post-thumbnail,
.home .posts-tecnoblog .ast-blog-featured-section,
.page-template-default .posts-tecnoblog .post-thumbnail,
.page-template-default .posts-tecnoblog .ast-blog-featured-section {
    position: relative;
}

.home .posts-tecnoblog .post-thumbnail::after,
.home .posts-tecnoblog .ast-blog-featured-section::after,
.page-template-default .posts-tecnoblog .post-thumbnail::after,
.page-template-default .posts-tecnoblog .ast-blog-featured-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Garantir que o conteúdo fique acima do overlay */
.home .posts-tecnoblog .entry-content-wrap,
.home .posts-tecnoblog .ast-post-data,
.page-template-default .posts-tecnoblog .entry-content-wrap,
.page-template-default .posts-tecnoblog .ast-post-data {
    position: relative;
    z-index: 2;
}

/* Botões "Leia Mais" ou similares */
.home .posts-tecnoblog .ast-button,
.home .posts-tecnoblog .read-more,
.home .posts-tecnoblog a.button,
.page-template-default .posts-tecnoblog .ast-button,
.page-template-default .posts-tecnoblog .read-more,
.page-template-default .posts-tecnoblog a.button {
    color: #ffffff !important;
    background: rgba(0, 115, 170, 0.9) !important;
    border-color: #0073aa !important;
    text-shadow: none;
}

.home .posts-tecnoblog .ast-button:hover,
.home .posts-tecnoblog .read-more:hover,
.home .posts-tecnoblog a.button:hover,
.page-template-default .posts-tecnoblog .ast-button:hover,
.page-template-default .posts-tecnoblog .read-more:hover,
.page-template-default .posts-tecnoblog a.button:hover {
    background: rgba(0, 115, 170, 1) !important;
}

/* ========================================
   FALLBACK: Se não tiver classe .recent-posts-section
======================================== */

/* Caso os posts estejam em um grid ou blog-layout */
.home .ast-blog-layout-1 .entry-title,
.home .ast-blog-layout-1 .entry-title a,
.home .ast-separate-posts .entry-title,
.home .ast-separate-posts .entry-title a {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.home .ast-blog-layout-1 .entry-summary,
.home .ast-blog-layout-1 .entry-content,
.home .ast-separate-posts .entry-summary,
.home .ast-separate-posts .entry-content {
    color: #f1f5f9 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ========================================
   RESPONSIVIDADE
======================================== */

@media (max-width: 768px) {
    /* Aumentar contraste em telas menores */
    .home .posts-tecnoblog .post-thumbnail::after,
    .page-template-default .posts-tecnoblog .post-thumbnail::after {
        background: linear-gradient(
            to top, 
            rgba(0, 0, 0, 0.9) 0%, 
            rgba(0, 0, 0, 0.5) 60%,
            transparent 100%
        );
    }
    
    /* Títulos maiores em mobile */
    .home .posts-tecnoblog .entry-title,
    .page-template-default .posts-tecnoblog .entry-title {
        font-size: 1.1em;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    }
}

/* ========================================
   SELETORES ADICIONAIS (caso necessário)
======================================== */

/* Se os posts estiverem dentro de um widget ou sidebar */
.home aside .entry-title a,
.home .sidebar .entry-title a {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Se houver cards com background-image */
.home article[style*="background-image"] .entry-title,
.home article[style*="background-image"] .entry-content,
.home .post[style*="background-image"] .entry-title,
.home .post[style*="background-image"] .entry-content {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ========================================
   MODO ESCURO (se aplicável)
======================================== */

/* Se o site tiver modo escuro, ajustar */
.dark-mode .home .posts-tecnoblog .entry-title,
.dark-mode .home .posts-tecnoblog .entry-content {
    color: #ffffff !important;
}