/* ============================================================
   MEMBER DIRECTORY - PROFESSIONAL GRID (FULL WIDTH)
   ============================================================ */

.swpm_mda_post-grid {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

.swpm_mda_grid-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    margin-bottom: 30px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.swpm_mda_grid-item {
    background: #ffffff !important;
    border: 1px solid #e5e9f0 !important;
    border-radius: 8px !important;
    padding: 24px 20px 0 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    height: 100% !important;
    min-height: 340px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
}

.swpm_mda_grid-item:hover {
    border-color: #b0c8dd !important;
    box-shadow: 0 4px 12px rgba(11, 78, 150, 0.08) !important;
}

.swpm_mda_profile-image {
    margin: 0 auto 12px auto !important;
    flex-shrink: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !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;
}

.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;
    width: 100% !important;
    flex-shrink: 0 !important;
}

.swpm_mda_info-lines {
    width: 100% !important;
    max-width: 100% !important;
    text-align: left !important;
    font-size: 13px !important;
    color: #4a5a6a !important;
    margin: 0 0 12px 0 !important;
    padding: 10px 14px !important;
    background: #f7f9fc !important;
    border-radius: 6px !important;
    border: 1px solid #eef2f7 !important;
    flex: 1 1 auto !important;
    min-height: 70px !important;
    box-sizing: border-box !important;
}

.swpm_mda_info-row {
    padding: 3px 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid #eef2f7 !important;
    width: 100% !important;
}

.swpm_mda_info-row:last-child {
    border-bottom: none !important;
}

.swpm_mda_info-label {
    font-weight: 500 !important;
    color: #2d3a4a !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    flex-shrink: 0 !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;
}

/* ============================================================
   VIEW PROFILE BUTTON - PURE WHITE, NO GRAY BACKGROUND
   ============================================================ */

.swpm_mda_profile-button {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding: 14px 20px !important;
    background: #ffffff !important;
    border-top: 1px solid #eef2f7 !important;
    border-radius: 0 0 8px 8px !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    min-height: 60px !important;
    position: relative !important;
    z-index: 1 !important;
}

.swpm_mda_profile-button a {
    display: inline-block !important;
    text-decoration: none !important;
    width: auto !important;
}

.swpm_mda_profile-button button {
    background: #000061 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 32px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    min-width: 150px !important;
    transition: background 0.2s ease, transform 0.1s ease !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.swpm_mda_profile-button button:hover {
    background: #00004a !important;
    transform: translateY(-1px) !important;
}

.swpm_mda_profile-button button:active {
    transform: translateY(0) !important;
}

/* ============================================================
   SEARCH BAR - BUTTON COLOR #000061
   ============================================================ */

#swpm_mda-search-form {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 35px !important;
    box-sizing: border-box !important;
}

.swpm_mda_listing-search-field {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center !important;
}

.swpm_mda_search-input {
    padding: 10px 18px !important;
    border: 1px solid #dce4ec !important;
    border-radius: 4px 0 0 4px !important;
    border-right: none !important;
    width: 100% !important;
    max-width: 100% !important;
    font-size: 14px !important;
    outline: none !important;
    background: #ffffff !important;
    height: 44px !important;
    box-sizing: border-box !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.swpm_mda_search-input:focus {
    border-color: #000061 !important;
    border-right: none !important;
}

.swpm_mda_search-button {
    background: #000061 !important;
    color: #ffffff !important;
    border: 1px solid #000061 !important;
    border-left: none !important;
    padding: 0 22px !important;
    border-radius: 0 4px 4px 0 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
    min-width: 50px !important;
    width: auto !important;
}

.swpm_mda_search-button:hover {
    background: #00004a !important;
    border-color: #00004a !important;
}

.swpm_mda_search-button .dashicons {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
}

.swpm_mda_search-res-text {
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 15px !important;
    font-size: 14px !important;
    color: #5a6a7a !important;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.swpm_mda_pagination {
    text-align: center !important;
    margin-top: 35px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !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;
    width: 100% !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: #000061 !important;
    color: #ffffff !important;
    border-color: #000061 !important;
}

/* ============================================================
   RESPONSIVE - DIRECTORY
   ============================================================ */

@media (max-width: 992px) {
    .swpm_mda_grid-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    .swpm_mda_search-input {
        width: 100% !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_grid-item {
        padding: 18px 14px 0 14px !important;
        min-height: 300px !important;
    }
    
    .swpm_mda_listing-search-field {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .swpm_mda_search-input {
        padding: 10px 14px !important;
        height: 42px !important;
        flex: 1 1 auto !important;
    }
    
    .swpm_mda_search-button {
        padding: 0 16px !important;
        height: 42px !important;
        min-width: 44px !important;
    }
    
    .swpm_mda_profile-image img {
        width: 70px !important;
        height: 70px !important;
    }
    
    .swpm_mda_profile-button {
        padding: 12px 16px !important;
        min-height: 54px !important;
        background: #ffffff !important;
    }
    
    .swpm_mda_profile-button button {
        min-width: 100% !important;
        white-space: normal !important;
        padding: 10px 16px !important;
        width: 100% !important;
    }
    
    .swpm_mda_info-lines {
        min-height: 60px !important;
        padding: 8px 12px !important;
        margin-bottom: 10px !important;
    }
}

/* ============================================================
   MEMBER PROFILE PAGE - AVATAR LEFT, ALL CONTENT BELOW
   ============================================================ */

.swpm_mda_member-details {
    max-width: 900px !important;
    margin: 20px auto !important;
    padding: 30px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    border: 1px solid #e5e9f0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

/* --- TOP ROW: Avatar left, Name + Company beside --- */
.swpm_mda_member-details-top {
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    padding-bottom: 20px !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid #eef2f7 !important;
}

.swpm_mda_member-details-profile-image {
    flex-shrink: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.swpm_mda_member-details-profile-image img {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #e5e9f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    display: block !important;
}

.swpm_mda_member-details-name-company {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.swpm_mda_member-details-name {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #1a2a3a !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.swpm_mda_member-details-company {
    font-size: 15px !important;
    color: #4a5a6a !important;
    margin: 0 !important;
    font-weight: 400 !important;
}

/* --- BOTTOM SECTION: All fields below - SAME GRAY BACKGROUND --- */
.swpm_mda_member-details-core-fields {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.swpm_mda_member-details-lines {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin-bottom: 16px !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
    border: 1px solid #eef2f7 !important;
    overflow: hidden !important;
}

/* --- ROWS - NO BORDER LINES, NO HOVER --- */
.swpm_mda_member-details-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 18px !important;
    border-bottom: none !important;
    background: #ffffff !important;
}

.swpm_mda_member-details-row:last-child {
    border-bottom: none !important;
}

/* --- LABELS - BOLD AND DARK, NO BORDER --- */
.swpm_mda_member-details-label {
    font-weight: 700 !important;
    color: #000000 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    flex-shrink: 0 !important;
    min-width: 150px !important;
    border-bottom: none !important;
}

.swpm_mda_member-details-value {
    color: #1a2a3a !important;
    text-align: right !important;
    font-weight: 400 !important;
    font-size: 15px !important;
    word-wrap: break-word !important;
    max-width: 60% !important;
    line-height: 1.4 !important;
}

/* --- CUSTOM FIELDS - SAME GRAY BACKGROUND --- */
.swpm_mda_member-details-custom-fields {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    border-radius: 8px !important;
    border: 1px solid #eef2f7 !important;
    overflow: hidden !important;
    background: #f8fafc !important;
}

.swpm_mda_member-details-custom-fields .swpm_mda_member-details-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 18px !important;
    border-bottom: none !important;
    background: #ffffff !important;
}

.swpm_mda_member-details-custom-fields .swpm_mda_member-details-row:last-child {
    border-bottom: none !important;
}

.swpm_mda_member-details-value a {
    color: #000061 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.swpm_mda_member-details-value a:hover {
    color: #00004a !important;
    text-decoration: underline !important;
}

.swpm_mda_member-details-value:empty,
.swpm_mda_member-details-value:has(a[href=""]) {
    color: #a0aec0 !important;
    font-style: italic !important;
}

.swpm_mda_member-details-value a[href=""] {
    color: #a0aec0 !important;
    pointer-events: none !important;
    cursor: default !important;
}

/* ============================================================
   RESPONSIVE - PROFILE
   ============================================================ */

@media (max-width: 768px) {
    .swpm_mda_member-details {
        padding: 24px 20px !important;
        margin: 10px 12px !important;
    }
    
    .swpm_mda_member-details-top {
        flex-direction: column !important;
        text-align: center !important;
        gap: 16px !important;
    }
    
    .swpm_mda_member-details-profile-image img {
        width: 90px !important;
        height: 90px !important;
    }
    
    .swpm_mda_member-details-name-company {
        align-items: center !important;
        text-align: center !important;
    }
    
    .swpm_mda_member-details-name {
        font-size: 20px !important;
    }
    
    .swpm_mda_member-details-company {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .swpm_mda_member-details {
        padding: 16px 14px !important;
        margin: 8px 8px !important;
        border-radius: 10px !important;
    }
    
    .swpm_mda_member-details-top {
        gap: 12px !important;
        padding-bottom: 14px !important;
        margin-bottom: 14px !important;
    }
    
    .swpm_mda_member-details-profile-image img {
        width: 75px !important;
        height: 75px !important;
    }
    
    .swpm_mda_member-details-name {
        font-size: 18px !important;
    }
    
    .swpm_mda_member-details-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        padding: 10px 14px !important;
    }
    
    .swpm_mda_member-details-custom-fields .swpm_mda_member-details-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        padding: 10px 14px !important;
    }
    
    .swpm_mda_member-details-label {
        min-width: auto !important;
        font-size: 12px !important;
        border-bottom: none !important;
    }
    
    .swpm_mda_member-details-value {
        max-width: 100% !important;
        text-align: left !important;
        font-size: 14px !important;
        width: 100% !important;
    }
}