/* --- AGENTS PAGE LAYOUT --- */
.agents-page-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* --- HEADER SECTION --- */
.agents-header-section {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border, #e0e0e0);
    padding-bottom: 20px;
}

.agents-breadcrumbs {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
}
.agents-breadcrumbs a {
    color: var(--rlp-red, #e3003a);
    text-decoration: none;
}
.agents-breadcrumbs a:hover {
    text-decoration: underline;
}

.agents-header-section h1 {
    font-size: 2.5rem;
    color: var(--rlp-red, #e3003a);
    margin: 0 0 10px 0;
    font-weight: 400;
}

.agents-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* --- GRID LAYOUT --- */
.agents-grid {
    display: grid;
    /* Automatically creates responsive columns. Min width 280px, max 1fr */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* --- AGENT CARD --- */
.agent-card {
    background: #fff;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none; /* In case the whole card is a link */
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.agent-photo {
    width: 100%;
    aspect-ratio: 3/4; /* Classic portrait ratio */
    object-fit: cover;
    background-color: #f4f5f7;
    border-bottom: 3px solid var(--rlp-red, #e3003a); /* Brand accent */
}

.agent-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.agent-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark, #333);
    margin: 0 0 5px 0;
}

.agent-title {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 15px 0;
    font-weight: 500;
}

.agent-contact {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex: 1;
}

.agent-contact li {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.agent-contact li i {
    color: var(--rlp-red, #e3003a);
    width: 16px;
    text-align: center;
}

/* Ensure links inside the contact list don't inherit weird styles */
.agent-contact a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}
.agent-contact a:hover {
    color: var(--rlp-red, #e3003a);
}

.btn-view-profile {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    border: 1px solid var(--rlp-red, #e3003a);
    background: transparent;
    color: var(--rlp-red, #e3003a);
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-view-profile:hover {
    background: var(--rlp-red, #e3003a);
    color: #fff;
}
/* --- AGENT SEARCH BAR --- */
.agent-search-wrap {
    margin-top: 20px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border, #ccc);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    max-width: 400px;
}
.agent-search-wrap input {
    border: none;
    padding: 12px 15px;
    width: 100%;
    outline: none;
    font-size: 1rem;
}
.agent-search-wrap .search-icon {
    padding: 12px 15px;
    color: #666;
    background: #fff;
}

/* --- PAGINATION --- */
.pagination-container {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border, #e0e0e0);
    display: flex;
    justify-content: center;
}
.pagination { display: flex; gap: 8px; align-items: center; }
.page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    border: 1px solid var(--border, #ccc); border-radius: 4px;
    background: #fff; color: var(--text-dark, #333); font-weight: 500; font-size: 0.95rem;
    transition: all 0.2s; cursor: pointer; text-decoration: none;
}
.page-btn:hover { background: #f0f0f0; border-color: #999; }
.page-btn.active { background: var(--rlp-red, #e3003a); color: #fff; border-color: var(--rlp-red, #e3003a); pointer-events: none; }
.page-dots { color: #888; font-weight: 600; padding: 0 5px; }