/* =========================================
   CONSTRUMONT - Módulo de Artigos
   ========================================= */

/* --- FILTROS --- */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px 24px;
    background-color: var(--white);
    border: 1px solid #e5e5e5;
    border-bottom: 3px solid var(--blue-primary);
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
    border: 2px solid #ddd;
    padding: 10px 14px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(0, 74, 172, 0.1);
}

.search-box i {
    color: var(--steel-gray);
}

.search-box input {
    border: none;
    outline: none;
    font-family: 'Archivo', sans-serif;
    font-size: 0.95rem;
    color: var(--concrete-dark);
    width: 100%;
    background: transparent;
}

.search-box input::placeholder {
    color: #aaa;
}

.filter-group select {
    padding: 12px 40px 12px 14px;
    border: 2px solid #ddd;
    font-family: 'Archivo', sans-serif;
    font-size: 0.9rem;
    color: var(--concrete-dark);
    cursor: pointer;
    appearance: none;
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: var(--transition);
    outline: none;
}

.filter-group select:focus {
    border-color: var(--blue-primary);
}

.filter-counter {
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--steel-gray);
    white-space: nowrap;
}

.filter-counter span {
    color: var(--blue-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* --- GRID DE ARTIGOS --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* --- CARD DE ARTIGO --- */
.article-card {
    background-color: var(--white);
    border: 1px solid #e5e5e5;
    overflow: hidden;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeIn 0.5s ease forwards;
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card:hover {
    transform: translateY(-8px);
    border-bottom-color: var(--blue-primary);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.article-card.hidden {
    display: none;
}

.article-card-image {
    height: 180px;
    overflow: hidden;
    position: relative;
    background-color: #eee;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.08);
}

.article-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--blue-primary);
    color: white;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.article-card-content {
    padding: 24px 20px;
}

.article-card-content h3 {
    font-size: 1.15rem;
    color: var(--concrete-dark);
    margin-bottom: 10px;
    line-height: 1.3;
    text-transform: capitalize;
}

.article-region {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--steel-gray);
    margin-bottom: 14px;
    padding: 4px 8px;
    background-color: var(--concrete-light);
}

.article-card-content .card-link {
    margin-top: 12px;
    display: inline-flex;
}

/* --- ESTADO VAZIO --- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--steel-gray);
}

.empty-state i {
    color: #ccc;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--concrete-dark);
    margin-bottom: 8px;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-group select {
        width: 100%;
    }

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

@media (max-width: 480px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
}