/**
 * Global Member Directory — Directory styles.
 *
 * Covers: container, directory, filter bar, member grid/list, member cards,
 * member profile, pagination, organizations grid, organization directory
 * (committees & forums), organization single, archive hero, country archive,
 * registration form enhancements.
 *
 * Loaded on all GMD frontend pages.
 *
 * @package GlobalMemberDirectory
 */


/* =========================================================================
 * 0. CONTAINER (used by all templates)
 * ====================================================================== */

.gmd-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .gmd-container {
        padding: 0 16px;
    }
}


/* =========================================================================
 * 1. DIRECTORY
 * ====================================================================== */

.gmd-directory {
    position: relative;
}

.gmd-directory__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.gmd-directory__title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--gmd-text);
}

.gmd-directory__meta {
    margin: 0;
    color: var(--gmd-text-muted);
    font-size: 14px;
}

.gmd-directory__tools {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* Layout toggle */

.gmd-layout-toggle {
    display: inline-flex;
    border: 1px solid var(--gmd-border);
    border-radius: var(--gmd-radius);
    overflow: hidden;
    background: var(--gmd-bg);
}

.gmd-layout-toggle__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--gmd-text-muted);
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}

.gmd-layout-toggle__btn:hover {
    background: var(--gmd-bg-alt);
    color: var(--gmd-primary);
}

.gmd-layout-toggle__btn.is-active {
    background: var(--gmd-primary);
    color: #fff;
}

.gmd-layout-toggle__btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}


/* =========================================================================
 * 2. FILTER BAR
 * ====================================================================== */

.gmd-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    background: var(--gmd-bg);
    border: 1px solid var(--gmd-border);
    border-radius: var(--gmd-radius-lg);
    box-shadow: var(--gmd-shadow);
    margin-bottom: 18px;
    align-items: center;
}

.gmd-filter-bar__field {
    flex: 1 1 180px;
    min-width: 150px;
    position: relative;
}

.gmd-filter-bar__field--search {
    flex: 2 1 260px;
}

.gmd-filter-bar__field--actions {
    flex: 0 0 auto;
    min-width: 0;
}

.gmd-filter-bar__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gmd-text-muted);
    font-size: 18px;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.gmd-input--search {
    padding-left: 38px;
    padding-right: 38px;
}

.gmd-filter-bar__clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--gmd-text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gmd-filter-bar__clear:hover {
    color: var(--gmd-danger);
    background: rgba(214, 54, 56, .08);
}

.gmd-filter-bar__clear .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}


/* Active filter chips */

.gmd-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.gmd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 12px;
    background: rgba(var(--gmd-primary-rgb), .08);
    color: var(--gmd-primary);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
}

.gmd-chip__label {
    opacity: .7;
}

.gmd-chip__remove {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 2px;
    border-radius: 50%;
}

.gmd-chip__remove:hover {
    background: rgba(var(--gmd-primary-rgb), .2);
}

.gmd-chip__remove .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}


/* =========================================================================
 * 3. MEMBER GRID / LIST
 *
 * Spec §2.4 — four columns on large desktops, three on medium,
 * two on tablets, one on mobile.
 * ====================================================================== */

.gmd-directory__results {
    position: relative;
    min-height: 120px;
    transition: opacity .2s ease;
}

.gmd-directory__results[aria-busy="true"] {
    opacity: .6;
    pointer-events: none;
}

.gmd-members {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}


/* Default grid = 4 columns (matches spec §2.4). */

.gmd-members--grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gmd-members--list {
    grid-template-columns: 1fr;
}

.gmd-members--compact {
    gap: 14px;
}


/* Responsive: 4 → 3 → 2 → 1 */

@media (max-width: 1100px) {
    .gmd-members--grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .gmd-members--grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .gmd-members--grid {
        grid-template-columns: 1fr;
    }
}


/* Optional: shortcode-driven column count overrides. */

.gmd-members--cols-1 {
    grid-template-columns: 1fr;
}

.gmd-members--cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gmd-members--cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gmd-members--cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .gmd-members--cols-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .gmd-members--cols-3,
    .gmd-members--cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .gmd-members--cols-2,
    .gmd-members--cols-3,
    .gmd-members--cols-4 {
        grid-template-columns: 1fr;
    }
}


/* =========================================================================
 * 4. MEMBER CARD
 * ====================================================================== */

.gmd-member-card {
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.gmd-member-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--gmd-shadow-lg);
    border-color: rgba(var(--gmd-primary-rgb), .35);
}

.gmd-member-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    outline: none;
}

.gmd-member-card__link:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(var(--gmd-primary-rgb), .3);
    border-radius: var(--gmd-radius-lg);
}


/* Grid layout */

.gmd-member-card--grid .gmd-member-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--gmd-bg-alt);
    overflow: hidden;
}

.gmd-member-card--grid .gmd-member-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gmd-member-card--grid .gmd-member-card__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 42px;
    font-weight: 700;
    color: var(--gmd-primary);
    background: rgba(var(--gmd-primary-rgb), .08);
    letter-spacing: .04em;
}


/* List layout */

.gmd-member-card--list .gmd-member-card__link {
    flex-direction: row;
    align-items: center;
}

.gmd-member-card--list .gmd-member-card__media {
    position: relative;
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    background: var(--gmd-bg-alt);
    overflow: hidden;
}

.gmd-member-card--list .gmd-member-card__photo,
.gmd-member-card--list .gmd-member-card__initials {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--gmd-primary);
    background: rgba(var(--gmd-primary-rgb), .08);
}

.gmd-member-card--list .gmd-member-card__body {
    flex: 1;
    min-width: 0;
}


/* Flag overlay */

.gmd-member-card__flag {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    padding: 3px;
    background: rgba(255, 255, 255, .92);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
    line-height: 0;
}

.gmd-member-card__flag img {
    height: 14px;
    width: auto;
    display: block;
    border-radius: 2px;
}


/* New badge */

.gmd-member-card__new {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--gmd-info) !important;
    color: #fff !important;
    border-color: var(--gmd-info) !important;
    font-size: 10.5px !important;
    text-transform: uppercase;
    letter-spacing: .04em;
}


/* Body */

.gmd-member-card__body {
    padding: 16px 18px 18px;
    flex: 1;
    min-width: 0;
}

.gmd-member-card__name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 4px;
    color: var(--gmd-text);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gmd-member-card__designation {
    font-size: 13.5px;
    color: var(--gmd-primary);
    font-weight: 500;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gmd-member-card__organization,
.gmd-member-card__country {
    font-size: 12.5px;
    color: var(--gmd-text-muted);
    margin: 2px 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gmd-member-card__organization .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.gmd-member-card__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.gmd-member-card__cats .gmd-badge {
    font-size: 11px;
    padding: 2px 8px;
}


/* Compact variant */

.gmd-member-card--compact .gmd-member-card__body {
    padding: 12px 14px 14px;
}

.gmd-member-card--compact .gmd-member-card__name {
    font-size: 14.5px;
}

.gmd-member-card--compact .gmd-member-card__designation {
    font-size: 12.5px;
}


/* =========================================================================
 * 5. PAGINATION
 * ====================================================================== */

.gmd-directory__pagination {
    margin-top: 8px;
}

.gmd-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.gmd-pagination a,
.gmd-pagination button,
.gmd-page-current,
.gmd-page-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--gmd-radius);
    border: 1px solid var(--gmd-border);
    background: var(--gmd-bg);
    color: var(--gmd-text);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all .12s ease;
}

.gmd-pagination a:hover,
.gmd-pagination button:hover {
    background: var(--gmd-bg-alt);
    border-color: var(--gmd-primary);
    color: var(--gmd-primary);
}

.gmd-page-current {
    background: var(--gmd-primary);
    color: #fff;
    border-color: var(--gmd-primary);
    font-weight: 700;
}

.gmd-page-disabled {
    opacity: .4;
    cursor: not-allowed;
}

.gmd-page-ellipsis {
    padding: 0 4px;
    color: var(--gmd-text-muted);
    display: inline-flex;
    align-items: center;
    min-width: 24px;
    justify-content: center;
}

.gmd-pagination-summary {
    text-align: center;
    margin-top: 12px;
    color: var(--gmd-text-muted);
    font-size: 13px;
}


/* Loading overlay */

.gmd-directory__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .6);
    backdrop-filter: blur(2px);
    z-index: 10;
    border-radius: var(--gmd-radius-lg);
}

.gmd-directory__overlay .gmd-spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
    color: var(--gmd-primary);
}


/* =========================================================================
 * 6. PROFILE PAGE
 * ====================================================================== */

.gmd-profile {
    max-width: 900px;
    margin: 0 auto;
}

.gmd-profile__preview-notice {
    padding: 12px 16px;
    background: rgba(219, 166, 23, .12);
    border-left: 4px solid var(--gmd-warning);
    border-radius: var(--gmd-radius);
    font-size: 13.5px;
    color: #7a5a0f;
    margin-bottom: 20px;
}

.gmd-profile__hero {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 32px;
    align-items: flex-start;
    padding: 32px;
    background: var(--gmd-bg);
    border: 1px solid var(--gmd-border);
    border-radius: var(--gmd-radius-lg);
    box-shadow: var(--gmd-shadow);
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .gmd-profile__hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
        text-align: center;
    }
}

.gmd-profile__photo {
    aspect-ratio: 1 / 1;
    border-radius: var(--gmd-radius-lg);
    overflow: hidden;
    background: var(--gmd-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gmd-profile__photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gmd-profile__photo-initials {
    font-size: 52px;
    font-weight: 700;
    color: var(--gmd-primary);
    background: rgba(var(--gmd-primary-rgb), .08);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: .04em;
}

.gmd-profile__name {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--gmd-text);
    line-height: 1.2;
}

.gmd-profile__designation {
    font-size: 16px;
    color: var(--gmd-primary);
    font-weight: 600;
    margin: 0 0 6px;
}

.gmd-profile__organization,
.gmd-profile__country {
    font-size: 14px;
    color: var(--gmd-text-muted);
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 640px) {
    .gmd-profile__organization,
    .gmd-profile__country {
        justify-content: center;
    }
}

.gmd-profile__organization .dashicons,
.gmd-profile__country .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.gmd-profile__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

@media (max-width: 640px) {
    .gmd-profile__categories {
        justify-content: center;
    }
}

.gmd-profile__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

@media (max-width: 640px) {
    .gmd-profile__socials {
        justify-content: center;
    }
}

.gmd-profile__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gmd-bg-alt);
    border: 1px solid var(--gmd-border);
    color: var(--gmd-text-muted);
    text-decoration: none;
    transition: all .12s ease;
}

.gmd-profile__social:hover,
.gmd-profile__social:focus {
    background: var(--gmd-primary);
    color: #fff;
    border-color: var(--gmd-primary);
    transform: translateY(-1px);
}

.gmd-profile__social .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.gmd-profile__body {
    background: var(--gmd-bg);
    border: 1px solid var(--gmd-border);
    border-radius: var(--gmd-radius-lg);
    box-shadow: var(--gmd-shadow);
    padding: 32px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .gmd-profile__body {
        padding: 20px;
    }
}

.gmd-profile__section {
    margin-bottom: 28px;
}

.gmd-profile__section:last-child {
    margin-bottom: 0;
}

.gmd-profile__section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--gmd-text);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gmd-primary);
    display: inline-block;
}

.gmd-profile__biography p {
    margin: 0 0 12px;
}

.gmd-profile__biography p:last-child {
    margin: 0;
}

.gmd-profile__contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gmd-profile__contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gmd-border);
}

.gmd-profile__contact li:last-child {
    border-bottom: 0;
}

.gmd-profile__contact .dashicons {
    color: var(--gmd-primary);
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.gmd-profile__contact a {
    color: var(--gmd-text);
    text-decoration: none;
    font-weight: 500;
}

.gmd-profile__contact a:hover {
    color: var(--gmd-primary);
    text-decoration: underline;
}

.gmd-profile__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}


/* =========================================================================
 * 7. ORGANIZATION CARD (grid variant)
 * ====================================================================== */

.gmd-orgs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}


/* Column modifiers (matches .gmd-members--cols-*) */

.gmd-orgs-grid--cols-1 {
    grid-template-columns: 1fr;
}

.gmd-orgs-grid--cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gmd-orgs-grid--cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gmd-orgs-grid--cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .gmd-orgs-grid--cols-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .gmd-orgs-grid,
    .gmd-orgs-grid--cols-3,
    .gmd-orgs-grid--cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .gmd-orgs-grid,
    .gmd-orgs-grid--cols-2,
    .gmd-orgs-grid--cols-3,
    .gmd-orgs-grid--cols-4 {
        grid-template-columns: 1fr;
    }
}

.gmd-org-card {
    background: var(--gmd-bg);
    border: 1px solid var(--gmd-border);
    border-radius: var(--gmd-radius-lg);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.gmd-org-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--gmd-shadow-lg);
    border-color: rgba(var(--gmd-primary-rgb), .35);
}

.gmd-org-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.gmd-org-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--gmd-bg-alt);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gmd-org-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gmd-org-card__placeholder {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--gmd-primary);
    opacity: .4;
}

.gmd-org-card__type {
    position: absolute;
    top: 10px;
    right: 10px;
}

.gmd-org-card__body {
    padding: 16px 18px 18px;
}

.gmd-org-card__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--gmd-text);
}

.gmd-org-card__excerpt {
    font-size: 13px;
    color: var(--gmd-text-muted);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* Flag pair (used inside org cards) */

.gmd-org-card__flags {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.gmd-org-card__flags img.gmd-flag {
    height: 16px;
    width: auto;
    border-radius: 2px;
}

.gmd-org-card__flags-arrow {
    color: var(--gmd-text-muted, #6b7280);
    font-size: 0.85rem;
}


/* =========================================================================
 * 8. ORGANIZATION DIRECTORY (COMMITTEES & CULTURAL FORUMS) — spec §4
 * ====================================================================== */

.gmd-org-directory {
    max-width: 1100px;
    margin: 0 auto;
    font-family: Georgia, "Times New Roman", serif;
    padding: 0 0 40px;
}


/* Header — beige/cream with gold accents (spec §4.1) */

.gmd-org-directory__header {
    background: #f4ecd8;
    border: 1px solid #e4d9bf;
    border-radius: 12px;
    padding: 48px 24px 40px;
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
}

.gmd-org-directory__emblem {
    font-size: 2.8rem;
    line-height: 1;
    margin-bottom: 16px;
    display: inline-block;
}

.gmd-org-directory__title {
    font-size: 2rem;
    color: #1e3a5f;
    margin: 0;
    letter-spacing: 0.04em;
    font-weight: 700;
    line-height: 1.2;
}

.gmd-org-directory__subtitle {
    color: #6b5d3f;
    margin: 10px 0 0;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gmd-org-directory__ornament {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.gmd-org-directory__ornament span {
    display: block;
    height: 2px;
    width: 40px;
    background: linear-gradient(90deg, transparent, #c9a961, transparent);
}

.gmd-org-directory__ornament span:nth-child(2) {
    width: 60px;
}


/* Two-column layout */

.gmd-org-directory__columns {
    display: grid;
    gap: 24px;
}

.gmd-org-directory__columns--2 {
    grid-template-columns: 1fr 1fr;
}

.gmd-org-directory__columns--1 {
    grid-template-columns: 1fr;
}

@media (max-width: 720px) {
    .gmd-org-directory__columns--2 {
        grid-template-columns: 1fr;
    }
}

.gmd-org-directory__column {
    min-width: 0;
}


/* Table-like listing (spec §4.3) */

.gmd-org-directory__table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gmd-org-directory__row {
    border-bottom: 1px solid #eef0f3;
    transition: background .12s ease;
}

.gmd-org-directory__row:last-child {
    border-bottom: 0;
}

.gmd-org-directory__row:hover {
    background: #f9fafb;
}

.gmd-org-directory__flags {
    padding: 12px 16px;
    white-space: nowrap;
    vertical-align: middle;
    width: 100px;
    text-align: left;
}

.gmd-org-directory__flags img {
    display: inline-block;
    margin-right: 4px;
    vertical-align: middle;
    height: 20px;
    width: auto;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}

.gmd-org-directory__flags img:last-child {
    margin-right: 0;
}

.gmd-org-directory__name {
    padding: 12px 16px;
    vertical-align: middle;
}

.gmd-org-directory__name a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
}

.gmd-org-directory__name a:hover,
.gmd-org-directory__name a:focus {
    text-decoration: underline;
    color: #1e40af;
}

.gmd-org-directory__excerpt {
    display: block;
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 3px;
    line-height: 1.4;
}


/* Empty state fallback */

.gmd-org-directory .gmd-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}


/* =========================================================================
 * 9. ORGANIZATION SINGLE — spec §5
 * ====================================================================== */

.gmd-org-single {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 40px;
}


/* Hero banner */

.gmd-org-single__hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #f4ecd8;
    padding: 64px 24px;
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
}

.gmd-org-single__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .35));
    pointer-events: none;
}

.gmd-org-single__hero-content {
    position: relative;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.gmd-org-single__flags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.gmd-org-single__flags img {
    height: 40px;
    width: auto;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.gmd-org-single__flags-arrow {
    font-size: 1.5rem;
    opacity: 0.7;
}

.gmd-org-single__type {
    display: inline-block;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, .9) !important;
    color: #1e3a5f !important;
}

.gmd-org-single__identity {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.gmd-org-single__logo {
    height: 64px;
    width: auto;
    border-radius: 6px;
    background: #fff;
    padding: 6px;
}

.gmd-org-single__title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #fff;
}

.gmd-org-single__excerpt {
    max-width: 720px;
    margin: 12px auto 0;
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .95);
}


/* Body — two-column layout with sidebar */

.gmd-org-single__body {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .gmd-org-single__body {
        grid-template-columns: 1fr;
    }
}

.gmd-org-single__main {
    min-width: 0;
}

.gmd-org-single__sidebar {
    min-width: 0;
}

.gmd-org-single__section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    padding: 24px;
    margin-bottom: 20px;
}

.gmd-org-single__section:last-child {
    margin-bottom: 0;
}

.gmd-org-single__section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #c9a961;
    color: #1e3a5f;
    display: inline-block;
}

.gmd-org-single__description {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #374151;
}

.gmd-org-single__description p {
    margin: 0 0 12px;
}

.gmd-org-single__description p:last-child {
    margin-bottom: 0;
}

.gmd-org-single__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gmd-org-single__list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
    line-height: 1.5;
}

.gmd-org-single__list li:last-child {
    border-bottom: 0;
}

.gmd-org-single__list img.gmd-flag {
    height: 16px;
    width: auto;
    border-radius: 2px;
}

.gmd-org-single__list .dashicons {
    color: #1e3a5f;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.gmd-org-single__list a {
    color: #1d4ed8;
    text-decoration: none;
}

.gmd-org-single__list a:hover,
.gmd-org-single__list a:focus {
    text-decoration: underline;
}

.gmd-org-single__contact-info {
    display: block;
    padding: 8px 0;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
}

.gmd-org-single__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}


/* Card title fallback (used in sidebar cards) */

.gmd-org-single__sidebar .gmd-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.gmd-org-single__sidebar .gmd-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1e3a5f;
    letter-spacing: .02em;
}


/* =========================================================================
 * 10. ARCHIVE HERO (member + country + category archives)
 * ====================================================================== */

.gmd-archive {
    position: relative;
}

.gmd-archive__hero {
    background: linear-gradient(135deg, rgba(var(--gmd-primary-rgb, 30, 58, 138), 0.08), rgba(var(--gmd-primary-rgb, 30, 58, 138), 0.02));
    padding: 48px 0 36px;
    border-bottom: 1px solid var(--gmd-border, #e5e7eb);
    margin-bottom: 32px;
    text-align: center;
}

.gmd-archive__title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--gmd-text, #1d2327);
    line-height: 1.2;
}

.gmd-archive__subtitle {
    font-size: 1rem;
    color: var(--gmd-text-muted, #6b7280);
    margin: 0 auto 6px;
    max-width: 720px;
    line-height: 1.55;
}

.gmd-archive__count {
    margin: 0;
}

.gmd-archive__body {
    padding-bottom: 48px;
}

@media (max-width: 782px) {
    .gmd-archive__hero {
        padding: 32px 0 24px;
    }
    .gmd-archive__title {
        font-size: 1.5rem;
    }
    .gmd-archive__subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 560px) {
    .gmd-archive__hero {
        padding: 24px 0 18px;
    }
    .gmd-archive__title {
        font-size: 1.25rem;
    }
}


/* =========================================================================
 * 11. COUNTRY ARCHIVE HERO
 * ====================================================================== */

.gmd-country-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.gmd-country-hero__flag {
    width: 64px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    flex-shrink: 0;
}

.gmd-country-hero__text {
    text-align: left;
}

.gmd-country-hero__count {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--gmd-text-muted, #6b7280);
}

@media (max-width: 640px) {
    .gmd-country-hero {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .gmd-country-hero__flag {
        width: 48px;
    }
    .gmd-country-hero__text {
        text-align: center;
    }
}


/* =========================================================================
 * 12. REGISTRATION FORM UX (from registration-form.js)
 * ====================================================================== */


/* Biography character counter */

.gmd-char-counter {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.gmd-char-counter.is-near-limit {
    color: #d97706;
    font-weight: 600;
}


/* Photo preview thumbnail */

.gmd-photo-preview {
    position: relative;
    display: inline-block;
    margin-top: 12px;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.gmd-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gmd-photo-preview__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.gmd-photo-preview__remove:hover {
    background: #d63638;
}

.gmd-photo-preview__remove .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}


/* Country flag preview next to the dropdown */

.gmd-country-flag {
    display: inline-block;
    margin-top: 6px;
    padding: 2px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}

.gmd-country-flag img {
    height: 16px;
    width: auto;
    display: block;
    border-radius: 2px;
}


/* Email domain hint */

.gmd-field-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #d97706;
}


/* Privacy policy link inside the consent label */

.gmd-privacy-link {
    color: #1d4ed8;
    text-decoration: underline;
}

.gmd-privacy-link:hover {
    color: #1e40af;
}


/* =========================================================================
 * 13. RESPONSIVE TRIM
 * ====================================================================== */

@media (max-width: 782px) {
    .gmd-directory__header {
        flex-direction: column;
        align-items: stretch;
    }
    .gmd-directory__tools {
        justify-content: space-between;
    }
    .gmd-org-directory__title {
        font-size: 1.5rem;
    }
    .gmd-org-single__title {
        font-size: 1.5rem;
    }
    .gmd-org-single__flags img {
        height: 32px;
    }
    .gmd-org-single__hero {
        padding: 40px 16px;
    }
    .gmd-org-single__section {
        padding: 18px;
    }
}