/* ============================================= */
/* CSS para Páginas de Listagem (Agentes, etc.)  */
/* ============================================= */

main.list-page {
    padding: 3rem 0;
}

/* ---- Estilo do Cabeçalho da Página ---- */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #343A40;
}

.page-header p {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0.5rem auto 0;
}


/* ---- Barra de Filtros ---- */
.filter-bar {
    background-color: #FFFFFF;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #DEE2E6;
    margin-bottom: 3rem;
}

.filter-bar form {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.filter-group.search {
    flex-grow: 2;
}

.filter-group label {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #DEE2E6;
    border-radius: 4px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    background-color: #FFFFFF;
}

.filter-button {
    background-color: #009A44;
    color: #FFFFFF;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-button:hover {
    background-color: #007A33;
}


/* ---- Grade de Resultados ---- */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ---- Card Individual ---- */
.item-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-image {
    /* AJUSTE: Removida altura fixa e adicionada proporção 4:3 */
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-category {
    background-color: #eee;
    color: #343A40;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    align-self: flex-start;
}

.card-status {
    color: #FFFFFF;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.card-status.open { background-color: #009A44; }
.card-status.closed { background-color: #6c757d; }
.card-status.progress { background-color: #005A9C; }

.card-title {
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: #6c757d;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.card-button {
    text-decoration: none;
    color: #009A44;
    font-weight: 700;
}


/* ---- Paginação ---- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.pagination a {
    text-decoration: none;
    color: #6c757d;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #eee;
    color: #343A40;
}

.pagination a.active {
    background-color: #009A44;
    color: #FFFFFF;
}