/* =============================================================
   BLOG PRUDENFLEX — Complemento ao style.css do site
   Cards e grid já estão em style.css. Este arquivo cobre:
   - Filtros de busca/categoria
   - Botão "Ver Mais"
   - Página de artigo (conteúdo rico, sidebar sticky)
   ============================================================= */

/* ── GRID: corrige card único ocupando largura total ────────── */
/* auto-fill preserva colunas vazias; auto-fit as colapsa */
.blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* ── FILTROS ────────────────────────────────────────────────── */
.blog-filtros {
    display: flex;
    justify-content: center;
}
.blog-filtros-inner {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    padding: .5rem .75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.blog-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.blog-search-wrap i {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: .8rem;
    pointer-events: none;
}
.blog-search-input {
    width: 100%;
    padding: .5rem .9rem .5rem 2.2rem;
    border: none;
    background: transparent;
    font-size: .875rem;
    outline: none;
    font-family: var(--font-primary);
}
.blog-cat-select {
    padding: .5rem 2rem .5rem .9rem;
    border: none;
    border-left: 1px solid #e5e7eb;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right .75rem center;
    -webkit-appearance: none;
    appearance: none;
    font-size: .875rem;
    font-family: var(--font-primary);
    outline: none;
    cursor: pointer;
    color: #374151;
}

/* Estado vazio */
.blog-empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
}
.blog-empty-msg i { font-size: 2rem; display: block; margin-bottom: .75rem; }

/* ── BOTÃO VER MAIS ─────────────────────────────────────────── */
.btn-ver-mais-blog {
    display: inline-flex;
    align-items: center;
    padding: .75rem 2.5rem;
    background: transparent;
    color: var(--vermelho);
    border: 2px solid var(--vermelho);
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 700;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: background .25s, color .25s, transform .25s;
    letter-spacing: .3px;
}
.btn-ver-mais-blog:hover {
    background: var(--vermelho);
    color: #fff;
    transform: translateY(-2px);
}
.btn-ver-mais-blog:disabled { opacity: .6; cursor: not-allowed; }

/* ── PÁGINA DO ARTIGO ───────────────────────────────────────── */
.blog-article-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--preto);
}
.blog-article-cover {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 16/7;
    object-fit: cover;
    display: block;
}
.blog-article-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #374151;
}
.blog-article-content p    { margin-bottom: 1.4rem; }
.blog-article-content h2   {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 .85rem;
    color: var(--preto);
    padding-bottom: .5rem;
    border-bottom: 2px solid #e5e7eb;
}
.blog-article-content h3   {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 1.75rem 0 .6rem;
    color: var(--vermelho);
}
.blog-article-content ul,
.blog-article-content ol   { padding-left: 1.5rem; margin-bottom: 1.4rem; }
.blog-article-content li   { margin-bottom: .5rem; }
.blog-article-content strong { color: var(--preto); font-weight: 700; }
.blog-article-content blockquote {
    border-left: 4px solid var(--vermelho);
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: #fef2f2;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
    font-size: 1.05rem;
    line-height: 1.75;
}
.blog-article-content blockquote p { margin-bottom: 0; }

/* Tabela gerada pela IA */
.blog-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.75rem 0;
    font-size: .9rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.blog-article-content table thead tr {
    background: var(--vermelho);
    color: #fff;
    font-weight: 700;
    text-align: left;
}
.blog-article-content table th,
.blog-article-content table td {
    padding: .75rem 1rem;
    border: 1px solid #e5e7eb;
    vertical-align: top;
}
.blog-article-content table tbody tr:nth-child(even) { background: #fdf5f5; }
.blog-article-content table tbody tr:hover { background: #fef2f2; }

/* Sidebar sticky */
.blog-sidebar-sticky {
    position: sticky;
    top: 110px;
}

@media (max-width: 991px) {
    .blog-filtros-inner { border-radius: 12px; }
    .blog-sidebar-sticky { position: static; }
}
