/* ==========================================================================
   ESTILOS COMPLEMENTARES DO BLOG
   ========================================================================== */

/* Ajuste no Header Hero para o Blog */
.blog-hero-header {
    padding: 160px 0 80px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Barra de Pesquisa (Hero) --- */
.search-form-blog {
    max-width: 600px;
    margin: 0 auto;
}

.search-box-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: var(--radius-sm, 12px);
    padding: 6px;
    box-shadow: var(--shadow-md, 0 14px 40px rgba(10, 43, 78, 0.1));
    position: relative;
    border: 2px solid transparent;
    transition: 0.3s;
}

.search-box-wrapper:focus-within {
    border-color: var(--turq, #16d2c6);
    box-shadow: 0 0 0 4px rgba(22, 210, 198, 0.15);
}

.search-icon {
    font-size: 16px;
    color: var(--slate, #566480);
    margin-left: 16px;
}

.search-input {
    border: none;
    outline: none;
    padding: 14px 16px;
    width: 100%;
    font-size: 1rem;
    font-family: var(--font-body, 'Inter', sans-serif);
    color: var(--ink, #15233b);
    background: transparent;
}

.search-input::placeholder {
    color: #94a3b8;
}

.btn-clear {
    color: var(--slate, #566480);
    padding: 10px;
    margin-right: 6px;
    transition: color 0.2s;
}

.btn-clear:hover {
    color: #ef4444;
}

.btn-search-submit {
    padding: 12px 26px !important;
    border-radius: 8px !important;
    flex-shrink: 0;
}

/* --- Filtros de Categoria --- */
.blog-filters-section {
    background: #ffffff;
    border-bottom: 1px solid var(--line, #e4ebf3);
    padding: 20px 0;
    position: sticky;
    top: 75px;
    z-index: 800;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.filter-tabs-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; 
}

.filter-tabs-wrapper::-webkit-scrollbar {
    display: none; 
}

.btn-ghost.active-tab {
    background: linear-gradient(135deg, #22e3d4 0%, #13bbae 60%, #0fa99d 100%) !important;
    border-color: transparent !important;
    color: #062340 !important;
    box-shadow: 0 6px 15px rgba(22, 210, 198, 0.25) !important;
}

/* --- Barra de Status da Pesquisa --- */
.filter-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-soft, #f4f8fc);
    border: 1px dashed var(--turq, #16d2c6);
    padding: 14px 20px;
    border-radius: var(--radius-sm, 12px);
    margin-bottom: 30px;
    font-size: 0.95rem;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-reset-filters {
    color: var(--turq-600, #0fb8ad);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-reset-filters:hover {
    color: var(--navy-800, #0a2b4e);
}

/* --- Layout da Tabela de Artigos --- */
.blog-main-content {
    background: var(--bg, #ffffff);
    min-height: 50vh;
    padding: 50px 0 90px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.blog-card {
    padding: 20px !important; 
    justify-content: flex-start !important;
    cursor: pointer;
}

.blog-img {
    width: 100%;
    height: 220px;
    border-radius: var(--radius-sm, 12px);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-img img {
    transform: scale(1.04);
}

.blog-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.blog-meta .tag {
    color: var(--turq, #16d2c6);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-meta .date {
    color: var(--slate, #566480);
    font-size: 0.85rem;
}

.blog-content h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.blog-content h3 a {
    color: var(--ink, #15233b);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card:hover h3 a {
    color: var(--turq-600, #0fb8ad);
}

.blog-content p {
    color: var(--slate, #566480);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.blog-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink, #15233b);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-top: auto;
}

.blog-card:hover .blog-link {
    color: var(--turq, #16d2c6);
}

.blog-card:hover .blog-link svg {
    transform: translateX(4px);
}

/* Estado Vazio */
.empty-blog-state {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border: 1px dashed var(--line, #e4ebf3);
    border-radius: var(--radius, 18px);
    max-width: 600px;
    margin: 20px auto;
}

.empty-blog-icon {
    width: 70px;
    height: 70px;
    background: var(--bg-soft, #f4f8fc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.empty-blog-icon i {
    font-size: 28px;
    color: var(--slate, #566480);
}

.empty-blog-state h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.empty-blog-state p {
    font-size: 0.95rem;
    color: var(--slate, #566480);
    margin-bottom: 24px;
}

/* Paginação */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.pagination-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--line, #e4ebf3);
    box-shadow: var(--shadow-sm, 0 4px 14px rgba(10, 43, 78, 0.06));
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-family: var(--font-display, 'Sora', sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink, #15233b);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.page-link:hover {
    background: var(--bg-soft, #f4f8fc);
    color: var(--turq-600, #0fb8ad);
}

.page-link.active-page {
    background: var(--navy-800, #0a2b4e);
    color: #ffffff;
    pointer-events: none;
    box-shadow: var(--shadow-sm, 0 4px 14px rgba(10, 43, 78, 0.06));
}

/* --- RESPONSIVIDADE BLINDADA --- */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    html, body, .blog-hero-header, .blog-main-content {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .blog-hero-header {
        padding: 100px 0 50px;
    }

    .blog-hero-header h1 {
        font-size: 2rem !important;
    }

    .search-box-wrapper {
        flex-direction: column;
        padding: 12px;
        gap: 12px;
    }

    .search-input {
        text-align: center;
        padding: 8px 0;
    }
    
    .search-icon {
        display: none;
    }

    .btn-search-submit {
        width: 100%;
        padding: 14px !important;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-img {
        height: 200px;
    }

    .filter-tabs-wrapper {
        padding-bottom: 10px; 
    }
}