/* Estilos Base */
.blog-filter-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.blog-filter-container {
    margin: 40px 0;
}

/* Seção de Pesquisa */
.blog-search-container {
    margin-bottom: 30px;
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 48px;
}

.search-icon {
    position: absolute;
    left: 15px;
    width: 20px;
    height: 20px;
    color: #79b11f;
    margin: 0;
}

.search-input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid #79b11f;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fff;
    color: #333333;
    height: 100%;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #003781;
    box-shadow: 0 0 0 3px rgba(121, 177, 31, 0.3);
}

.search-results-count {
    position: absolute;
    right: 15px;
    /* Remova o transform: translateY(-50%) */
    font-size: 14px;
    color: #79b11f;
    background: rgba(121, 177, 31, 0.1);
    padding: 4px 10px; /* Aumente o padding vertical para melhor aparência */
    border-radius: 20px;
    height: fit-content; /* Ajusta à altura do conteúdo */
    top: 50%; /* Posiciona no meio vertical */
    transform: translateY(-50%); /* Ajuste fino para centralização perfeita */
    margin: 0; /* Remove margens padrão */
}

/* Controles de Filtro */
.blog-filter-controls {
    margin-bottom: 40px;
}

.filter-section-title {
    color: #003781;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.filter-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 auto;
    max-width: 800px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: #f5f5f5;
    color: #333333;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.filter-btn:hover {
    background: #e0e0e0;
    color: #003781;
}

.filter-btn.active {
    background: #003781;
    color: #fff;
}

.post-count-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.filter-btn:not(.active) .post-count-badge {
    background: rgba(0, 55, 129, 0.1);
    color: #003781;
}

/* Grid de Posts */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.blog-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 55, 129, 0.1);
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 55, 129, 0.15);
}

.post-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-thumbnail.placeholder {
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.post-thumbnail.placeholder svg {
    width: 50px;
    height: 50px;
}

.blog-post-card:hover .post-thumbnail {
    transform: scale(1.05);
}

.post-date-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 55, 129, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.post-content-wrapper {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #003781;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: #79b11f;
}

.post-excerpt {
    margin: 0 0 15px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    flex-grow: 1;
}

.post-meta-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 55, 129, 0.1);
}

.post-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post-tag {
    font-size: 12px;
    color: #79b11f;
    text-decoration: none;
    transition: all 0.2s;
    background: rgba(121, 177, 31, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.post-tag:hover {
    color: #fff;
    background: #79b11f;
}

.read-more-link {
    font-size: 14px;
    color: #003781;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    margin-left: 10px;
}

.read-more-link:hover {
    color: #79b11f;
}

/* Mensagem sem resultados */
.no-results-message {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
    grid-column: 1 / -1;
    display: none;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 20px;
}

/* Responsividade */
@media (max-width: 768px) {
    .blog-filter-wrapper {
        padding: 0 15px;
    }
    
    .blog-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .filter-buttons-container {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .post-content-wrapper {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .blog-filter-container {
        margin: 30px 0;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .search-wrapper {
        max-width: 100%;
    }
    
    .search-results-count {
        position: static;
        transform: none;
        display: block;
        text-align: center;
        margin-top: 8px;
    }
}