/* =================================================================
   Estilos para a Seção de Categorias Populares
   ================================================================= */

.popular-categories-section {
    text-align: center;
    padding: 60px 20px;
    font-family: sans-serif;
    background: linear-gradient(135deg, #0E1A2D, #1A2B4C);
    border-radius: 10px;
}

.popular-categories-section .section-header {
    margin-bottom: 50px;
}

.popular-categories-section .section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
}

.popular-categories-section .section-title span {
    color: #d4af37;

} 

.popular-categories-section .section-subtitle {
    font-size: 1.125rem;
    margin: 0;
    line-height: 1.5;
    color:#fff;
}

/* A grelha que contém todos os cards */
.popular-categories-section .category-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* O card individual (que é um link) */
.popular-categories-section .category-card {
    display: block;
    text-decoration: none;
    background-color: #fff;
    border-radius: 16px;
    padding: 30px 20px;
    border: 1px solid #f0f2f5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.popular-categories-section .category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.popular-categories-section .card-icon-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f0f2f5;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.popular-categories-section .category-card:hover .card-icon-wrapper {
    background-color: #e4e8ec;
}

.popular-categories-section .card-icon-wrapper i {
    font-size: 36px;
    color: #384158;
}

.popular-categories-section .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1A2B4C;
    margin: 0 0 5px 0;
}

.popular-categories-section .card-count {
    font-size: 1rem;
    color: #6c757d;
    margin: 0;
}

/* Estilos para os filtros de sub-categoria */
.filter-group,
.child-category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px !important;
}

.filter-pills-container {
    margin-bottom: 40px;
}

.filter-pill {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background-color: #f9f9f9 !important;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    color: #333 !important;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.filter-pill:hover {
    background-color: #e9e9e9 !important;
    border-color: #ccc !important;
}

/* Estilo do botão de filtro ativo */
.filter-pill.active {
    background-color: #1A2B4C !important;
    color: #ffffff !important;
    border-color: #1A2B4C !important;
}


/* =================================================================
   Espaçamento entre as Secções na Página de Categoria
   ================================================================= */

/* Espaço abaixo do cabeçalho principal (Título da Categoria) */
.topic-archive-page .page-header {
    margin-bottom: 50px; 
}

/* Espaço abaixo da grelha de lojas (entre as lojas e o título do blog) */
.topic-archive-page .page-content {
    margin-bottom: 30px; /* Um pouco mais de espaço aqui para separar bem os conteúdos */
}

/* Espaço abaixo da secção do blog (entre o botão "Ver Todos" e o FAQ) */
.topic-archive-page .latest-blog-section {
    margin-bottom: 30px;
}

/* Remove qualquer margem extra da secção de FAQ se não for necessária */
.topic-archive-page .faq-section {
    margin-bottom: 30px; /* Um espaço menor no final da página */
}

/* Título para a secção de filtros */
.topic-archive-page .page-content .section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.25rem;
    font-weight: 700;
    color: #1A2B4C;
}

.topic-archive-page.site-main {
    padding-top: 50px;
}

.page-header .entry-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1A2B4C;
    margin-bottom: 20px;
}

/* Estilos para a seção de posts do blog na página de categoria */
.latest-blog-posts {
    padding: 40px 20px;
    text-align: center;
}
.latest-blog-posts .section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1A2B4C;
    margin-bottom: 40px;
}
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}
.blog-post-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.blog-post-card a {
    text-decoration: none;
    color: inherit;
}
.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover; 
}
.post-content {
    padding: 20px;
}
.post-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #1A2B4C;
}
.post-content .read-more {
    display: block;
    text-align: right;
    color: #0d6efd;
    font-weight: 600;
}

/* Estilo para o container do botão 'Ver Todos os Posts' */
.view-all-posts-container {
    text-align: center;
    margin-top: 40px;
}

/* Estilo do botão 'Ver Todos os Posts' */
.view-all-posts-link {
    display: inline-block;
    padding: 6px 20px;
    background-color: #1A2B4C;
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.view-all-posts-link:hover {
    background-color: #1A2B4C;
    color: #ffffff;
    transform: translateY(-2px);
}
/*  Correção para conflito entre Tailwind CSS e Font Awesome.  */
.fa-solid,
.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-regular,
.far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

.fa-brands,
.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}