.page-hero.blog-hero {
    
    background-size: cover;
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top:100px !important;
    padding-bottom: 20px !important;
    padding-left: 20px;
    padding-right: 20px;
}

/* Este seletor afeta APENAS o cabeçalho na página principal do blog e nas páginas de post */
body.blog .page-hero,
body.single-post .page-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
    padding-top: 140px;
    padding-bottom: 60px;
    padding-left: 20px;
    padding-right: 20px;
    background: linear-gradient(rgba(26,35,126,0.9), rgba(0,188,212,0.8)), url('https://images.unsplash.com/photo-1457369804613-52c61a468e7d?q=80&w=1470&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    color: #fff;
    text-align: center;
}

/* ============================================================ */
/* ==   AJUSTE DE COR PARA TÍTULOS NO CABEÇALHO (HERO)       == */
/* ============================================================ */

.page-hero .section-tagline,
.page-hero .section-title {
    color: #fff;
}

@media (max-width: 768px) {
    .page-hero.blog-hero {
        min-height: 300px;
        padding-top: 120px;
        padding-bottom: 40px;
    }
}

/* ============================================================ */
/* == 2. PÁGINA PRINCIPAL DO BLOG (INDEX/HOME)                 == */
/* ============================================================ */

/* --- Post em Destaque --- */
.featured-post-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}
.featured-post-image-link {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}
.featured-post-image-link img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease-out;
}
.featured-post-card:hover .featured-post-image-link img {
    transform: scale(1.05);
}
.featured-post-title {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.featured-post-title a {
    text-decoration: none;
    color: var(--cor-texto-principal);
}
.featured-post-excerpt {
    margin: 1.5rem 0;
    color: var(--cor-texto-secundario);
}
.featured-post-card .btn-primary {
    padding: 10px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.featured-post-card .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3);
}

/* --- Grade de Posts --- */
.post-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    border: 1px solid #f0f0f0;
    height: 100%;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}
.post-card-image-link img {
    border-radius: 12px 12px 0 0;
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.post-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.post-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 0.5rem;
    flex-grow: 1;
}
.post-card-title a {
    text-decoration: none;
    color: var(--cor-texto-principal);
    transition: color 0.2s ease;
}
.post-card-title a:hover {
    color: var(--cor-primaria);
}
.post-card-meta {
    font-size: 0.85rem;
    color: #777;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    margin-top: 1rem;
}

/* --- Paginação Numerada --- */
.pagination-container .pagination {
    justify-content: center;
}
.pagination-container .page-numbers {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: var(--cor-primaria);
    transition: all 0.3s ease;
}
.pagination-container .page-numbers:hover {
    background-color: var(--cor-primaria);
    color: #fff;
    border-color: var(--cor-primaria);
}
.pagination-container .page-numbers.current {
    background-color: var(--cor-primaria);
    color: #fff;
    border-color: var(--cor-primaria);
}


/* ============================================================ */
/* == 3. PÁGINA DE POST ÚNICO (SINGLE.PHP)                     == */
/* ============================================================ */

/* --- Posts Relacionados --- */
.related-posts-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}
.related-posts-title {
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}
.related-post-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #fff;
    margin-bottom: 1rem;
}
.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.related-post-card a {
    text-decoration: none;
}
.related-post-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.related-post-card-title {
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem;
    color: var(--cor-texto-principal);
}

/* --- Navegação de Post Anterior/Próximo --- */
.post-navigation {
    margin-top: 3rem;
    border-top: 1px solid #eee;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}
.post-navigation a {
    text-decoration: none;
    color: var(--cor-primaria);
    transition: all 0.2s ease;
}
.post-navigation a:hover {
    color: var(--cor-primaria-hover);
}

/* --- Compartilhamento Social --- */
.social-share-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.social-share-bottom .share-title {
    font-weight: 600;
    margin-right: 1.5rem;
    color: var(--cor-texto-principal);
}
.social-share-bottom .share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    margin: 0 5px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}
.social-share-bottom .share-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.share-link.whatsapp { background-color: #25D366; }
.share-link.linkedin { background-color: #0077B5; }
.share-link.facebook { background-color: #1877F2; }
.share-link.twitter { background-color: #1DA1F2; }

@media (max-width: 576px) {
    .social-share-bottom {
        flex-direction: column;
    }
    .social-share-bottom .share-title {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}


/* ============================================================ */
/* == 4. SIDEBAR DO BLOG (COMPONENTE COMPARTILHADO)            == */
/* ============================================================ */

.blog-sidebar {
    position: sticky;
    top: 120px;
}
.sidebar-widget {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    border: 1px solid #f0f0f0;
    margin-bottom: 2.5rem;
}
.sidebar-widget .widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--cor-texto-principal);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

/* --- Widget de Pesquisa --- */
.sidebar-widget .search-form {
    display: flex;
}
.sidebar-widget .search-form .search-field {
    width: 100%;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 50px 0 0 50px;
    transition: all 0.3s ease;
}
.sidebar-widget .search-form .search-field:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    outline: none;
}
.sidebar-widget .search-form .search-submit {
    background-color: var(--cor-primaria);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
}

/* --- Widget de Artigos Recentes --- */
.recent-post-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f5f5f5;
}
.recent-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.recent-post-thumbnail img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}
.recent-post-item:hover .recent-post-thumbnail img {
    transform: scale(1.08);
}
.recent-post-info .post-title {
    font-weight: 600;
    color: var(--cor-texto-principal);
    display: block;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}
.recent-post-item:hover .post-title {
    color: var(--cor-primaria);
}
.recent-post-info .post-date {
    font-size: 0.8rem;
    color: #888;
}

/* --- Widget de Categorias (Novo Design Tipográfico) --- */
.category-groups-wrapper {
    margin-top: 1.5rem;
}

.category-group {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee; /* A linha de separação */
}
.category-group:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Título da Categoria Principal (ex: "Link Pro") */
/* --- Opção 3: O Moderno com Ícone --- */
/* --- Opção 2: O Toque de Destaque --- */
.parent-category-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 4px solid var(--cor-primaria); /* A barra de destaque */
    padding-left: 0.75rem; /* Espaço após a barra */
}
.parent-category-title a {
    text-decoration: none;
    color: var(--cor-texto-principal);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}
.parent-category-title a:hover {
    color: var(--cor-primaria);
}

/* Badge (Círculo Sólido) */
.parent-category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    background-color: var(--cor-primaria);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
    margin-left: 0.75rem;
}

/* Lista de Subcategorias */
.subcategory-list {
    list-style: none;
    padding-left: 5px; /* Pequena indentação para alinhamento */
}

.subcategory-list li {
    padding: 0.2rem 0; /* Espaçamento vertical entre os itens */
    border-bottom: none; /* Remove qualquer borda herdada */
}

.subcategory-list a {
    font-size: 1rem;
    font-weight: 400;
    color: var(--cor-texto-secundario);
    text-decoration: none;
    transition: color 0.2s ease;
}

.subcategory-list a:hover {
    color: var(--cor-primaria);
}

/* Badge com a contagem de posts da Categoria Principal */
.parent-category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 10px; /* Padding horizontal para criar a forma de pílula */
    background-color: rgba(13, 110, 253, 0.1); /* Fundo muito claro e semi-transparente */
    color: var(--cor-primaria); /* Texto com a cor forte */
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50px; /* Raio grande para o formato de pílula */
    margin-left: 0.75rem;
}

/* Pequeno ajuste para garantir o alinhamento perfeito do título e do badge */
.parent-category-title a {
    display: inline-flex;
    align-items: center;
}

/* ============================================================ */
/* == 5. COMPONENTES REUTILIZÁVEIS                             == */
/* ============================================================ */

/* --- Badge de Categoria --- */
a.category-badge {
    display: inline-block;
    background-color: var(--cor-primaria);
    color: #fff !important;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}
a.category-badge:hover {
    background-color: var(--cor-primaria-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- Tempo de Leitura --- */
.reading-time {
    display: inline-block;
}


/* ============================================================ */
/* == 6. UTILIDADES E CORREÇÕES                                == */
/* ============================================================ */

/* --- Barra de Progresso de Leitura --- */
/* --- Barra de Progresso de Leitura (Versão Premium) --- */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 7px; /* Um pouco mais espessa */
    background: linear-gradient(to right, #00d4ff, #0084ff); /* Gradiente mais vibrante */
    z-index: 9999;
    transition: width 0.1s linear;
    display: none;
    /* ✅ A MÁGICA DO EFEITO NEON */
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.7); 
}

/* Só mostra a barra nas páginas de post */
body.single-post .reading-progress-bar {
    display: block;
}
