/**
 * CMBA Elementor Widgets — Base Styles
 *
 * Ultra-modern Members Directory + Profile/Group defaults.
 * Card styling can be overridden via Elementor Style tab controls.
 */

/* ================================================================
   Neutralize BuddyPress post-class layout constraints.
   BP adds .bp_members / .bp_group to the theme's <article>/<main>
   wrapper via post_class(), which inherits theme max-width rules.
   On pages we override with Elementor templates, remove those limits.
   ================================================================ */

.bp_members,
.bp_group,
.bp_activity,
.bp_blogs {
    max-width: none !important;
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Also clear any BP-inherited constraints on parent containers */
body.buddypress .site-content,
body.buddypress .entry-content,
body.buddypress .entry-header,
body.buddypress #primary,
body.buddypress .site-main {
    max-width: none !important;
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
}

body.buddypress .site-content {
    padding-top: 0 !important;
}

/* ================================================================
   Directory container
   ================================================================ */

.cmba-ew-directory {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto 2rem;
    padding: 2rem;
    background: #f5f6f8;
    border-radius: 14px;
    font-family: "Intervogue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2D2D2B;
}

/* ================================================================
   Filter Panel
   ================================================================ */

.cmba-ew-filters {
    background: #f0f2f5;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 0;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    overflow: hidden;
}

.cmba-ew-filter-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #1F4776;
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .02em;
    text-transform: uppercase;
    border-radius: 14px 14px 0 0;
}

.cmba-ew-filter-body {
    display: block;
    padding: 1rem 1.25rem 1.15rem;
}

.cmba-ew-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}

.cmba-ew-filter-group {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.cmba-ew-filter-group label {
    font-size: .78rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cmba-ew-filter-group input,
.cmba-ew-filter-group select {
    padding: .6rem .75rem;
    font-family: inherit;
    font-size: .88rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
    color: #2D2D2B;
    -webkit-appearance: none;
    appearance: none;
}

.cmba-ew-filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.22 4.47a.75.75 0 011.06 0L6 7.19l2.72-2.72a.75.75 0 011.06 1.06l-3.25 3.25a.75.75 0 01-1.06 0L2.22 5.53a.75.75 0 010-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 12px;
    padding-right: 2rem;
}

.cmba-ew-filter-group input:focus,
.cmba-ew-filter-group select:focus {
    border-color: #B88B4D;
    box-shadow: 0 0 0 3px rgba(184,139,77,.08);
}

.cmba-ew-filter-group input::placeholder {
    color: #9ca3af;
}

.cmba-ew-filter-actions {
    display: flex;
    gap: .75rem;
    margin-top: 1rem;
    align-items: center;
    justify-content: flex-end;
}

.cmba-ew-filter-submit {
    background-color: #B88B4D;
    font-family: "Intervogue", Sans-serif;
    font-size: .9rem;
    font-weight: 300;
    color: #000;
    border-style: solid;
    border-color: var(--e-global-color-secondary);
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.cmba-ew-filter-submit:hover:not(:disabled),
.cmba-ew-filter-submit:focus:not(:disabled) {
    background-color: var(--e-global-color-primary);
    color: var(--e-global-color-dbd3203);
    border-color: var(--e-global-color-primary);
}

.cmba-ew-filter-submit:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cmba-ew-filter-clear {
    font-size: .85rem;
    color: #6b7280;
    text-decoration: none;
    transition: color .2s;
}

.cmba-ew-filter-clear:hover {
    color: #1F4776;
}

/* ================================================================
   Active Filter Tags
   ================================================================ */

.cmba-ew-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
}

.cmba-ew-active-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 500;
    background: #e8eef5;
    color: #1F4776;
    padding: .3rem .7rem;
    border-radius: 20px;
    text-decoration: none;
    transition: background .2s;
}

.cmba-ew-active-tag:hover {
    background: #d0dae8;
}

.cmba-ew-active-tag svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    opacity: .6;
}

/* ================================================================
   Results Info
   ================================================================ */

.cmba-ew-results-info {
    font-size: .85rem;
    color: #4b5563;
    margin-bottom: 1rem;
    font-style: italic;
    font-weight: 700;
}

/* ================================================================
   Members List (card rows)
   ================================================================ */

.cmba-ew-members-list {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

/* ================================================================
   Member Card (row layout)
   ================================================================ */

.cmba-ew-card--member {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 1.15rem 1.5rem;
    transition: all .25s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.cmba-ew-card--member::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #1F4776;
    opacity: 0;
    transition: opacity .25s;
    border-radius: 14px 0 0 14px;
}

.cmba-ew-card--member:hover {
    border-color: #c8d4e3;
    box-shadow: 0 4px 20px rgba(31,71,118,.08), 0 1px 4px rgba(0,0,0,.04);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.cmba-ew-card--member:hover::before {
    opacity: 1;
}

.cmba-ew-card__avatar {
    flex-shrink: 0;
}

.cmba-ew-card__avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f2f5;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: border-color .25s;
}

.cmba-ew-card--member:hover .cmba-ew-card__avatar img {
    border-color: #1F4776;
}

.cmba-ew-card__body {
    flex: 1;
    min-width: 0;
}

.cmba-ew-card__name {
    font-size: 1.08rem;
    font-weight: 700;
    color: #1F4776;
    margin: 0 0 .2rem;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.cmba-ew-card__name a {
    color: #1F4776;
    text-decoration: none;
    transition: color .2s;
}

.cmba-ew-card__name a:hover {
    color: #2a5fa0;
}

.cmba-ew-card__title {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 .15rem;
    line-height: 1.35;
}

.cmba-ew-card__detail-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .15rem .5rem;
    margin: 0;
}

.cmba-ew-card__company,
.cmba-ew-card__location {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.cmba-ew-detail-icon {
    width: 13px;
    height: 13px;
    fill: #9ca3af;
    flex-shrink: 0;
}

.cmba-ew-detail-sep {
    color: #d1d5db;
    font-size: .75rem;
    user-select: none;
}

/* ================================================================
   Area Tags
   ================================================================ */

.cmba-ew-card__areas {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: flex-start;
    margin-top: .4rem;
}

.cmba-ew-area-tag {
    font-size: .72rem;
    font-weight: 600;
    background: linear-gradient(135deg, #e8eef5 0%, #dfe6f0 100%);
    color: #1F4776;
    padding: .25rem .65rem;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: .01em;
}

.cmba-ew-area-tag--more {
    background: #dfe6f0;
    font-weight: 700;
}

/* ================================================================
   Empty State
   ================================================================ */

.cmba-ew-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border: 1px solid #eaedf1;
    border-radius: 14px;
    color: #6b7280;
    font-size: .95rem;
}

.cmba-ew-empty-state a {
    color: #1F4776;
    text-decoration: none;
    font-weight: 600;
}

.cmba-ew-empty-state a:hover {
    text-decoration: underline;
}

/* ================================================================
   Pagination (modern)
   ================================================================ */

.cmba-ew-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.cmba-ew-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 .6rem;
    font-family: inherit;
    font-size: .9rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all .2s;
    background: #fff;
    border: 1px solid #d1d5db;
    color: #2D2D2B;
    cursor: pointer;
}

.cmba-ew-pagination__link:hover {
    background: #1F4776;
    border-color: #1F4776;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(31,71,118,.2);
    text-decoration: none;
}

.cmba-ew-pagination__link--active {
    background: linear-gradient(135deg, #1F4776 0%, #163457 100%);
    border: 1px solid #1F4776;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(31,71,118,.2);
    pointer-events: none;
}

.cmba-ew-pagination__ellipsis {
    font-size: .9rem;
    color: #9ca3af;
    padding: 0 .25rem;
}

/* ================================================================
   Member Profile — ultra-modern two-column card
   ================================================================ */

.cmba-profile {
    width: 100%;
    font-family: "Intervogue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2D2D2B;
}

.cmba-profile__card {
    position: relative;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

/* Left accent bar */
.cmba-profile__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: #1F4776;
    border-radius: 14px 0 0 14px;
}

.cmba-profile__body {
    display: grid;
    grid-template-columns: 1fr 280px;
    min-height: 0;
}

.cmba-profile__body--full {
    grid-template-columns: 1fr;
}

/* Main column */
.cmba-profile__main {
    padding: 2.25rem 2.5rem 2.25rem 2.75rem;
}

.cmba-profile__name {
    font-size: 1.65rem;
    font-weight: 800;
    color: #1F4776;
    margin: 0 0 .25rem;
    letter-spacing: -.02em;
    line-height: 1.25;
}

.cmba-profile__role {
    margin: 0 0 .15rem;
    font-size: .95rem;
    color: #555;
    font-weight: 500;
}

.cmba-profile__company {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 1.35rem;
    font-size: .95rem;
    color: #444;
    font-weight: 600;
}

.cmba-profile__company svg {
    width: 16px;
    height: 16px;
    fill: #888;
    flex-shrink: 0;
}

/* Field rows */
.cmba-profile__field {
    margin-bottom: .85rem;
}

.cmba-profile__label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
    margin-bottom: .15rem;
}

.cmba-profile__value {
    font-size: .92rem;
    color: #333;
    line-height: 1.5;
}

.cmba-profile__value a {
    color: #1F4776;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}

.cmba-profile__value a:hover {
    color: #2a5fa0;
    text-decoration: underline;
}

/* Divider */
.cmba-profile__divider {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 1.15rem 0;
}

/* Practice area tags */
.cmba-profile__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .25rem;
}

.cmba-profile__tag {
    display: inline-block;
    padding: .2rem .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    color: #1F4776;
    background: #e8eef6;
    letter-spacing: .01em;
    line-height: 1.5;
}

/* Sidebar */
.cmba-profile__sidebar {
    background: #f7f8fa;
    padding: 2.25rem 1.75rem;
    border-left: 1px solid #e8e8e8;
}

.cmba-profile__sidebar-title {
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #1F4776;
    margin: 0 0 .6rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid #1F4776;
}

.cmba-profile__sidebar-title + .cmba-profile__sidebar-title,
.cmba-profile__group-list + .cmba-profile__sidebar-title {
    margin-top: 1.6rem;
}

.cmba-profile__group-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cmba-profile__group-list li {
    padding: .35rem 0;
    border-bottom: 1px solid #eaeaea;
    font-size: .88rem;
}

.cmba-profile__group-list li:last-child {
    border-bottom: none;
}

.cmba-profile__group-list li a {
    color: #1F4776;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}

.cmba-profile__group-list li a:hover {
    color: #2a5fa0;
    text-decoration: underline;
}

/* "View all" toggle link */
.cmba-profile__show-toggle {
    display: inline;
    margin-top: .5rem;
    margin-bottom: .75rem;
    padding: 0;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 500;
    color: #1F4776;
    background: none;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: color .15s;
}

.cmba-profile__show-toggle:hover {
    color: #2a5fa0;
    text-decoration: underline;
}

/* Native <dialog> modal */
.cmba-profile__dialog {
    position: fixed;
    border: none;
    border-radius: 14px;
    padding: 0;
    width: 90vw;
    max-width: 480px;
    max-height: 70vh;
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
    overflow: hidden;
    animation: cmba-dialog-in .2s ease;
}

.cmba-profile__dialog::backdrop {
    background: rgba(0,0,0,.45);
    animation: cmba-backdrop-in .2s ease;
}

@keyframes cmba-dialog-in {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cmba-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cmba-profile__dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #1F4776;
    color: #fff;
}

.cmba-profile__dialog-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.cmba-profile__dialog-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background .15s;
}

.cmba-profile__dialog-close:hover {
    background: rgba(255,255,255,.3);
}

.cmba-profile__dialog-list {
    list-style: none;
    margin: 0;
    padding: .5rem 1.25rem 1.25rem;
    max-height: calc(70vh - 60px);
    overflow-y: auto;
}

.cmba-profile__dialog-list li {
    padding: .45rem 0;
    border-bottom: 1px solid #eaeaea;
    font-size: .88rem;
}

.cmba-profile__dialog-list li:last-child {
    border-bottom: none;
}

.cmba-profile__dialog-list li a {
    color: #1F4776;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}

.cmba-profile__dialog-list li a:hover {
    color: #B88B4D;
    text-decoration: underline;
}

/* ================================================================
   Profile — responsive
   ================================================================ */

@media (max-width: 768px) {
    .cmba-profile__body {
        grid-template-columns: 1fr;
    }

    .cmba-profile__sidebar {
        border-left: none;
        border-top: 1px solid #e8e8e8;
    }

    .cmba-profile__main {
        padding: 1.5rem 1.5rem 1.5rem 2rem;
    }

    .cmba-profile__sidebar {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cmba-profile__main {
        padding: 1.25rem 1.25rem 1.25rem 1.75rem;
    }

    .cmba-profile__name {
        font-size: 1.35rem;
    }
}

/* ================================================================
   Groups Directory Cards
   ================================================================ */

.cmba-ew-groups-list {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.cmba-ew-card--group {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    transition: box-shadow .25s ease, border-color .25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.cmba-ew-card--group:hover {
    border-color: #c0cad8;
    box-shadow: 0 4px 16px rgba(31,71,118,.08), 0 1px 4px rgba(0,0,0,.04);
}

/* Avatar inside group card */
.cmba-ew-card--group .cmba-ew-card__avatar {
    flex-shrink: 0;
}

.cmba-ew-card--group .cmba-ew-card__avatar img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #eaedf1;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

/* Body in group card */
.cmba-ew-card--group .cmba-ew-card__body {
    flex: 1;
    min-width: 0;
}

.cmba-ew-card--group .cmba-ew-card__name {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 .35rem;
    line-height: 1.3;
}

.cmba-ew-card--group .cmba-ew-card__name a {
    color: #1F4776;
    text-decoration: none;
    transition: color .2s;
}

.cmba-ew-card--group .cmba-ew-card__name a:hover {
    color: #2a5fa0;
}

/* Meta row: status / members / type badges */
.cmba-ew-card__meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .45rem;
    font-size: .85rem;
    color: #6b7280;
}

.cmba-ew-card__status {
    font-weight: 500;
    color: #6b7280;
    text-transform: capitalize;
}

.cmba-ew-card__divider {
    color: #d1d5db;
    user-select: none;
}

.cmba-ew-card__member-count {
    color: #6b7280;
}

.cmba-ew-card__type-badge {
    display: inline-block;
    padding: .15rem .65rem;
    background: #e8f0f8;
    color: #1F4776;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .01em;
}

/* Description */
.cmba-ew-card--group .cmba-ew-card__desc {
    font-size: .88rem;
    color: #555;
    line-height: 1.55;
    margin: .15rem 0 .4rem;
}

/* Categories */
.cmba-ew-card--group .cmba-ew-card__categories {
    margin-bottom: .35rem;
}

/* Last active */
.cmba-ew-card__last-active {
    font-size: .8rem;
    color: #9ca3af;
    font-style: italic;
    margin-top: .25rem;
}

/* Action column */
.cmba-ew-card__action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    align-self: center;
}

.cmba-ew-btn {
    display: inline-block;
    background-color: #B88B4D;
    font-family: "Intervogue", Sans-serif;
    font-size: .88rem;
    font-weight: 300;
    color: #000;
    border-style: solid;
    border-color: var(--e-global-color-secondary);
    border-radius: 4px;
    padding: 10px 20px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s, color .2s, border-color .2s;
}

.cmba-ew-btn:hover,
.cmba-ew-btn:focus {
    background-color: var(--e-global-color-primary);
    color: var(--e-global-color-dbd3203);
    border-color: var(--e-global-color-primary);
    text-decoration: none;
}

.cmba-ew-btn--join {
    /* inherits base .cmba-ew-btn style */
}

.cmba-ew-btn--join:hover {
    /* inherits base .cmba-ew-btn:hover style */
}

.cmba-ew-btn--visit {
    /* inherits base .cmba-ew-btn style */
}

.cmba-ew-btn--visit:hover,
.cmba-ew-btn--visit:focus {
    /* inherits base .cmba-ew-btn:hover style */
}

/* Search button */
.cmba-ew-search__btn {
    background-color: #B88B4D;
    font-family: "Intervogue", Sans-serif;
    font-size: .9rem;
    font-weight: 300;
    color: #000;
    border-style: solid;
    border-color: var(--e-global-color-secondary);
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.cmba-ew-search__btn:hover,
.cmba-ew-search__btn:focus {
    background-color: var(--e-global-color-primary);
    color: var(--e-global-color-dbd3203);
    border-color: var(--e-global-color-primary);
}

.cmba-ew-btn--pending {
    background: #95a5a6;
    color: #fff;
    cursor: not-allowed;
    opacity: .7;
}

/* Groups directory responsive */
@media (max-width: 767px) {
    .cmba-ew-card--group {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.25rem;
    }

    .cmba-ew-card--group .cmba-ew-card__avatar img {
        width: 70px;
        height: 70px;
    }

    .cmba-ew-card__meta-row {
        justify-content: center;
    }

    .cmba-ew-card--group .cmba-ew-card__action {
        width: auto;
        margin-top: .75rem;
    }

    .cmba-ew-card--group .cmba-ew-card__action .cmba-ew-btn {
        display: inline-block;
        width: auto;
        min-width: 120px;
    }
}

/* ================================================================
   Legacy profile helpers (group profile, avatars)
   ================================================================ */

img.cmba-ew-avatar--small {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    object-fit: cover;
}

/* ================================================================
   Group Profile Card
   ================================================================ */

.cmba-group-card {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto 2.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
    overflow: hidden;
    font-family: "Intervogue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2D2D2B;
}

/* Header */
.cmba-group-card__header {
    background: linear-gradient(135deg, #1F4776 0%, #2a5a8f 100%);
    padding: 2.25rem 3rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cmba-group-card__avatar img {
    width: 110px;
    height: 110px;
    border-radius: 14px;
    object-fit: contain;
    border: 3px solid rgba(255,255,255,.85);
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    background: rgba(255,255,255,.15);
}

.cmba-group-card__header-info {
    flex: 1;
    min-width: 0;
}

.cmba-group-card__name {
    font-family: "Intervogue", sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 .35rem;
    letter-spacing: .01em;
}

.cmba-group-card__meta-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .25rem;
}

.cmba-group-card__badge {
    display: inline-block;
    font-family: "Intervogue", sans-serif;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .3rem .7rem;
    border-radius: 20px;
    background: rgba(255,255,255,.18);
    color: rgba(255,255,255,.9);
}

.cmba-group-card__member-count {
    font-family: "Intervogue", sans-serif;
    font-size: .85rem;
    color: rgba(255,255,255,.7);
}

/* Body */
.cmba-group-card__body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.cmba-group-card__body--two-col {
    grid-template-columns: 1fr 340px;
}

.cmba-group-card__left {
    padding: 2rem 3rem 2.5rem;
}

.cmba-group-card__right {
    padding: 2rem 3rem 2.5rem;
    background: #f8f9fb;
    border-left: 1px solid #eaedf1;
}

/* Description */
.cmba-group-card__description {
    font-family: "Intervogue", sans-serif;
    font-size: .95rem;
    line-height: 1.65;
    color: #444;
    margin: 0 0 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eaedf1;
}

.cmba-group-card__description strong {
    color: #2D2D2B;
}

.cmba-group-card__description a {
    color: #1F4776;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}

.cmba-group-card__description a:hover {
    border-bottom-color: #B88B4D;
}

/* Field rows */
.cmba-group-card__field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.cmba-group-card__field:last-child {
    margin-bottom: 0;
}

.cmba-group-card__field-label {
    font-family: "Intervogue", sans-serif;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #1F4776;
    margin: 0 0 .3rem;
}

.cmba-group-card__field-value {
    font-family: "Intervogue", sans-serif;
    font-size: .95rem;
    font-weight: 400;
    line-height: 1.55;
    color: #2D2D2B;
    margin: 0;
}

.cmba-group-card__field-value a {
    color: #1F4776;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}

.cmba-group-card__field-value a:hover {
    border-bottom-color: #B88B4D;
}

/* Right-column headings */
.cmba-group-card__section-heading {
    font-family: "Intervogue", sans-serif;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #1F4776;
    margin: 0 0 .6rem;
}

/* Practice-area tags */
.cmba-group-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
}

.cmba-group-card__tag {
    font-family: "Intervogue", sans-serif;
    font-size: .8rem;
    font-weight: 500;
    background: #e8eef5;
    color: #1F4776;
    padding: .3rem .75rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* Managing partner card (sidebar) */
.cmba-group-card__partner {
    font-family: "Intervogue", sans-serif;
    font-size: .9rem;
    line-height: 1.55;
    color: #2D2D2B;
    background: #fff;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid #eaedf1;
}

.cmba-group-card__partner a {
    color: #1F4776;
    text-decoration: none;
}

.cmba-group-card__partner a:hover {
    border-bottom: 1px solid #B88B4D;
}

/* Categories inside sidebar */
.cmba-group-card__categories {
    margin-bottom: 1.75rem;
}

.cmba-group-card__categories .cmba-ew-tags {
    gap: .5rem;
}

.cmba-group-card__categories .cmba-ew-tag--category {
    font-size: .8rem;
    padding: .3rem .75rem;
    border-radius: 20px;
}

/* Responsive */
@media (max-width: 800px) {
    .cmba-group-card__header {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .cmba-group-card__meta-row {
        justify-content: center;
    }

    .cmba-group-card__body,
    .cmba-group-card__body--two-col {
        grid-template-columns: 1fr;
    }

    .cmba-group-card__left,
    .cmba-group-card__right {
        padding: 1.5rem;
    }

    .cmba-group-card__right {
        border-left: none;
        border-top: 1px solid #eaedf1;
    }
}

/* ================================================================
   Field rows (shared between directory cards and profiles)
   ================================================================ */

.cmba-ew-field {
    display: flex;
    gap: 6px;
    font-size: 13px;
    padding: 3px 0;
}

.cmba-ew-field__label {
    font-weight: 600;
    color: #555;
}

.cmba-ew-field__label::after {
    content: ':';
}

.cmba-ew-field__value {
    color: #222;
}

/* ================================================================
   Tags / Badges
   ================================================================ */

.cmba-ew-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cmba-ew-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.5;
    background: #f0f0f0;
    color: #333;
}

.cmba-ew-tag--membership {
    background: #e8f4fd;
    color: #0073aa;
}

.cmba-ew-tag--category {
    background: #fef3e2;
    color: #8a6500;
}

.cmba-ew-tag--type {
    background: #e8fde8;
    color: #2e7d32;
}

/* Status badges */
.cmba-ew-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cmba-ew-badge--active {
    background: #e8fde8;
    color: #2e7d32;
}

.cmba-ew-badge--inactive,
.cmba-ew-badge--expired {
    background: #fdeaea;
    color: #c62828;
}

.cmba-ew-badge--none {
    background: #f0f0f0;
    color: #888;
}

/* Check marks */
.cmba-ew-check {
    font-weight: 700;
}

.cmba-ew-check--yes {
    color: #2e7d32;
}

.cmba-ew-check--no {
    color: #c62828;
}

/* ================================================================
   Pagination (legacy — kept for groups directory)
   ================================================================ */

.cmba-ew-pagination--legacy {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.cmba-ew-pagination--legacy .cmba-ew-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.2s, border-color 0.2s;
}

.cmba-ew-pagination--legacy .cmba-ew-pagination__link:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.cmba-ew-pagination--legacy .cmba-ew-pagination__link--active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    pointer-events: none;
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 1024px) {
    .cmba-ew-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .cmba-ew-list .cmba-ew-card {
        flex-direction: column;
    }

    .cmba-ew-list .cmba-ew-card__avatar {
        margin-right: 0;
        margin-bottom: 12px;
    }
}

@media (max-width: 640px) {
    .cmba-ew-filter-grid {
        grid-template-columns: 1fr;
    }

    .cmba-ew-card--member {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
        gap: 1rem;
    }

    .cmba-ew-card--member::before {
        display: none;
    }

    .cmba-ew-detail-sep {
        display: none;
    }

    .cmba-ew-card__detail-row {
        flex-direction: column;
        align-items: center;
    }

    .cmba-ew-card__areas {
        width: 100%;
        justify-content: center;
    }

    .cmba-ew-card--member .cmba-ew-card__action {
        width: auto;
    }

    .cmba-ew-card--member .cmba-ew-card__action .cmba-ew-btn {
        display: inline-block;
        width: auto;
        min-width: 120px;
    }

    .cmba-ew-card__avatar img {
        width: 72px;
        height: 72px;
    }

    .cmba-ew-card__name {
        font-size: 1rem;
    }
}
