/* Member directory - aligns with community-activity and the secure sign-in page. */
#wrapper {
    overflow: visible;
    background: #fff;
}

.md-page {
    max-width: 1180px;
    margin: 0 auto 56px;
    padding: 0 20px 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.md-page p,
.md-page li {
    color: inherit;
    text-align: left;
    padding: 0;
}

.md-page a:visited {
    color: #00498f;
}

.md-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #003870 0%, #00498f 55%, #1e5598 100%);
    border-radius: 20px;
    padding: 40px 40px 28px;
    margin: 20px 0 28px;
    color: #fff;
    box-shadow: 0 18px 40px rgba(0, 73, 143, 0.22);
}

.md-hero::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -60px;
    top: -80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.md-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 12px;
}

.md-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7dd3fc;
    box-shadow: 0 0 0 5px rgba(125, 211, 252, 0.16);
}

.md-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.md-hero h1 {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -0.03em;
    padding: 0;
}

.md-hero .md-lead {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 28px;
    line-height: 1.55;
    max-width: 560px;
    text-align: left;
}

.md-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.md-stat {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 16px 16px 14px;
}

.md-stat-num {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.md-stat-label {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.md-stat-note {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.3;
}

.md-cta {
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: #00498f;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.md-cta:hover,
.md-cta:visited {
    background: #fff;
    color: #00498f;
}

.md-cta:hover,
.md-cta:visited:hover {
    background: #e8f1fb;
    color: #003870;
}

.md-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.md-main,
.md-side {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.md-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f7;
}

.md-toolbar h2 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    padding: 0;
}

.md-count {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.md-search {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 220px;
    max-width: 420px;
}

.md-search input {
    flex: 1;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #172b42;
    font-size: 14px;
    outline: none;
}

.md-search input:focus {
    border-color: #1769aa;
    box-shadow: 0 0 0 4px rgba(23, 105, 170, 0.11);
}

.md-search button {
    height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: #00498f;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.md-search button:hover {
    background: #003870;
}

.md-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 18px 6px;
}

.md-chip {
    display: inline-block;
    min-width: 36px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.md-chip:visited {
    color: #475569;
}

.md-chip:hover,
.md-chip:visited:hover {
    border-color: #00498f;
    color: #00498f;
    background: #fff;
}

.md-chip.is-active,
.md-chip.is-active:visited {
    background: #00498f;
    border-color: #00498f;
    color: #fff;
}

.md-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    padding: 12px 18px 22px;
}

.md-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 14px 18px;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.md-card:hover {
    border-color: #d6e4f5;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.md-avatar-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
    overflow: hidden;
}

.md-photo,
.md-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.md-avatar[hidden],
.md-photo + .md-avatar {
    display: none !important;
}

.md-photo {
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(15, 39, 66, 0.13);
    background: #e8f1fb;
}

.md-avatar {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    line-height: 72px;
    text-align: center;
}

.md-avatar.navy { background: #00498f; }
.md-avatar.teal { background: #0f766e; }
.md-avatar.sky { background: #0369a1; }
.md-avatar.slate { background: #475569; }
.md-avatar.ink { background: #1e3a5f; }
.md-avatar.sea { background: #0e7490; }

.md-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.md-card-sub {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.md-card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.md-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #e8f1fb;
    color: #00498f;
}

.md-badge.agency {
    background: #ecfdf5;
    color: #047857;
}

.md-empty {
    text-align: center;
    padding: 48px 16px 56px;
    color: #64748b;
}

.md-empty p {
    margin: 0 0 14px;
    font-size: 15px;
    text-align: center;
}

.md-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0 18px 22px;
}

.md-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.md-page-link:visited {
    color: #334155;
}

.md-page-link:hover,
.md-page-link:visited:hover {
    border-color: #00498f;
    color: #00498f;
}

.md-page-link.is-active,
.md-page-link.is-active:visited {
    background: #00498f;
    border-color: #00498f;
    color: #fff;
}

span.md-page-link {
    cursor: default;
}

.md-page-ellipsis {
    color: #94a3b8;
    padding: 0 4px;
    font-weight: 700;
}

.md-side {
    padding: 22px 20px 20px;
    position: sticky;
    top: 16px;
}

.md-side h2 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
    padding: 0;
}

.md-side-sub {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px;
    line-height: 1.55;
}

.md-benefits {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
}

.md-benefit {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
}

.md-benefit-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eaf3fb;
    color: #00498f;
    font-size: 14px;
    font-weight: 700;
    line-height: 28px;
    text-align: center;
}

.md-benefit strong {
    display: block;
    color: #172b42;
    font-size: 13px;
    margin-bottom: 2px;
}

.md-benefit span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.md-side-cta {
    display: block;
    text-align: center;
    background: #00498f;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    padding: 11px 14px;
    border-radius: 12px;
}

.md-side-cta:hover,
.md-side-cta:visited {
    background: #00498f;
    color: #fff;
}

.md-side-cta:hover {
    background: #003870;
    color: #fff;
}

.md-side-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #00498f;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.md-side-link:visited {
    color: #00498f;
}

.md-side-link:hover {
    text-decoration: underline;
}

.md-people {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eef2f7;
}

.md-person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin: 0 -6px 4px;
    border-radius: 12px;
    text-decoration: none;
}

.md-person:hover {
    background: #f8fafc;
}

.md-person .md-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    line-height: 36px;
    font-size: 13px;
}

.md-person-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.md-person-country {
    display: block;
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
}

.md-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 960px) {
    .md-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    .md-stat {
        padding: 12px 10px 10px;
    }
    .md-stat-num {
        font-size: 20px;
    }

    .md-layout {
        grid-template-columns: 1fr;
    }

    .md-side {
        position: static;
    }

    .md-hero {
        padding: 28px 20px 22px;
    }

    .md-hero h1 {
        font-size: 28px;
    }

    .md-hero-top {
        align-items: flex-start;
    }

    .md-search {
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .md-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        padding: 10px 12px 18px;
    }

    .md-toolbar {
        padding: 14px 14px;
    }

    .md-letters {
        padding: 12px 12px 4px;
    }
}
