/* Member Directory - Clean Professional Grid */

/* MAIN CONTAINER - control overall width */
.swpm_mda_post-grid {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* GRID - 3 columns, properly spaced */
.swpm_mda_grid-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    margin-bottom: 30px !important;
}

/* CARD */
.swpm_mda_grid-item {
    background: #ffffff !important;
    border: 1px solid #e5e9f0 !important;
    border-radius: 8px !important;
    padding: 24px 20px 18px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    transition: border-color 0.2s ease !important;
}

.swpm_mda_grid-item:hover {
    border-color: #b0c8dd !important;
}

/* AVATAR */
.swpm_mda_profile-image {
    margin-bottom: 12px !important;
    flex-shrink: 0 !important;
}

.swpm_mda_profile-image img {
    width: 85px !important;
    height: 85px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #e5e9f0 !important;
    display: block !important;
}

/* USERNAME */
.swpm_mda_member-username {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a2a3a !important;
    margin: 0 0 12px 0 !important;
    text-align: center !important;
    line-height: 1.3 !important;
}

/* INFO BOX */
.swpm_mda_info-lines {
    width: 100% !important;
    text-align: left !important;
    font-size: 13px !important;
    color: #4a5a6a !important;
    margin: 0 0 14px 0 !important;
    padding: 10px 14px !important;
    background: #f7f9fc !important;
    border-radius: 6px !important;
    border: 1px solid #eef2f7 !important;
    flex: 1 !important;
    min-height: 80px !important;
}

/* INFO ROWS */
.swpm_mda_info-row {
    padding: 4px 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid #eef2f7 !important;
}

.swpm_mda_info-row:last-child {
    border-bottom: none !important;
}

.swpm_mda_info-label {
    font-weight: 500 !important;
    color: #5a6a7a !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.swpm_mda_info-value {
    color: #1a2a3a !important;
    text-align: right !important;
    font-weight: 400 !important;
    font-size: 13px !important;
    max-width: 60% !important;
    word-wrap: break-word !important;
}

/* BUTTON - properly aligned */
.swpm_mda_profile-button {
    width: 100% !important;
    margin-top: auto !important;
    padding-top: 14px !important;
    border-top: 1px solid #eef2f7 !important;
    text-align: center !important;
}

.swpm_mda_profile-button a {
    display: block !important;
    text-decoration: none !important;
    width: 100% !important;
}

.swpm_mda_profile-button button {
    background: #0b4e96 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 9px 16px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    width: 100% !important;
    max-width: 160px !important;
    transition: background 0.2s ease !important;
    white-space: nowrap !important;
}

.swpm_mda_profile-button button:hover {
    background: #073a72 !important;
}

/* SEARCH - clean and proportional */
.swpm_mda_listing-search-field {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 35px !important;
}

.swpm_mda_search-input {
    padding: 10px 18px !important;
    border: 1px solid #dce4ec !important;
    border-radius: 4px 0 0 4px !important;
    width: 280px !important;
    font-size: 14px !important;
    outline: none !important;
    background: #ffffff !important;
    height: 42px !important;
}

.swpm_mda_search-input:focus {
    border-color: #0b4e96 !important;
}

.swpm_mda_search-button {
    background: #0b4e96 !important;
    color: #fff !important;
    border: none !important;
    padding: 0 22px !important;
    border-radius: 0 4px 4px 0 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.swpm_mda_search-button:hover {
    background: #073a72 !important;
}

/* PAGINATION */
.swpm_mda_pagination {
    text-align: center !important;
    margin-top: 35px !important;
}

.swpm_mda_pagination ul {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: center !important;
}

.swpm_mda_pagination ul li {
    display: inline-block !important;
    margin: 0 !important;
}

.swpm_mda_pagination ul li a,
.swpm_mda_pagination ul li span {
    display: inline-block !important;
    padding: 6px 12px !important;
    border: 1px solid #dce4ec !important;
    border-radius: 4px !important;
    color: #1a2a3a !important;
    text-decoration: none !important;
    font-size: 13px !important;
    min-width: 34px !important;
    text-align: center !important;
}

.swpm_mda_pagination ul li a:hover {
    background: #f5f8fc !important;
    border-color: #b8c8d8 !important;
}

.swpm_mda_pagination ul li span {
    background: #0b4e96 !important;
    color: #ffffff !important;
    border-color: #0b4e96 !important;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .swpm_mda_grid-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 640px) {
    .swpm_mda_post-grid {
        padding: 0 12px !important;
    }
    
    .swpm_mda_grid-row {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .swpm_mda_search-input {
        width: 180px !important;
    }
    
    .swpm_mda_grid-item {
        padding: 18px 14px !important;
    }
    
    .swpm_mda_profile-image img {
        width: 70px !important;
        height: 70px !important;
    }
    
    .swpm_mda_profile-button button {
        max-width: 100% !important;
        white-space: normal !important;
    }
}