/* Registered foreign delegates directory – plain CSS file. Do NOT add <style> or </style> tags here. */
/* ==========================================================================
   SVUM 2027 – International Delegates Directory
   File: assets/css/pages/delegates-directory.css
   Uses the site's own --primary-blue / --accent-gold variables, with the
   SVUM brand values as fall-backs. All classes are prefixed "dd-" so they
   never clash with the global theme styles.
   ========================================================================== */

:root {
    --dd-navy:        var(--primary-blue, #233862);
    --dd-navy-dark:   #172645;
    --dd-gold:        var(--accent-gold, #d4a72c);
    --dd-gold-soft:   rgba(212, 167, 44, 0.14);
    --dd-ink:         #1e293b;
    --dd-muted:       #64748b;
    --dd-line:        #e2e8f0;
    --dd-bg:          #f5f7fb;
    --dd-white:       #ffffff;
    --dd-radius:      14px;
    --dd-shadow:      0 6px 24px rgba(35, 56, 98, 0.08);
    --dd-shadow-lg:   0 18px 48px rgba(35, 56, 98, 0.18);
    --dd-ease:        cubic-bezier(.2, .7, .2, 1);
}

/* The [hidden] attribute must always win over display rules below */
.dd-card[hidden], .dd-country[hidden], .dd-chip[hidden], .dd-modal[hidden],
.dd-empty[hidden], .dd-reset[hidden] { display: none !important; }

html.dd-lock { overflow: hidden; }

.dd-hero, .dd-hero *, .dd-directory, .dd-directory *, .dd-modal, .dd-modal * { box-sizing: border-box; }

.dd-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* ---------- Eyebrow / headings (same pattern as other SVUM inner pages) ---------- */
.dd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dd-gold);
}
.dd-eyebrow::before {
    content: "";
    width: 28px; height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.dd-eyebrow--dark { color: var(--dd-gold); }

.dd-section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 36px;
}
.dd-section-head .dd-eyebrow::after {
    content: "";
    width: 28px; height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.dd-section-title {
    margin: 10px 0 10px;
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--dd-navy);
}
.dd-section-sub {
    margin: 0;
    color: var(--dd-muted);
    font-size: 16px;
    line-height: 1.6;
}

/* ---------- Buttons ---------- */
.dd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform .25s var(--dd-ease), box-shadow .25s var(--dd-ease), background .25s, color .25s, border-color .25s;
}
.dd-btn:hover { transform: translateY(-2px); text-decoration: none; }
.dd-btn:focus-visible { outline: 3px solid var(--dd-gold); outline-offset: 3px; }

.dd-btn--gold  { background: var(--dd-gold); color: var(--dd-navy-dark); box-shadow: 0 8px 22px rgba(212, 167, 44, .35); }
.dd-btn--gold:hover  { background: #e3b93c; color: var(--dd-navy-dark); }
.dd-btn--navy  { background: var(--dd-navy); color: var(--dd-white); box-shadow: 0 8px 22px rgba(35, 56, 98, .25); }
.dd-btn--navy:hover  { background: var(--dd-navy-dark); color: var(--dd-white); }
.dd-btn--ghost { background: transparent; color: var(--dd-white); border-color: rgba(255, 255, 255, .55); }
.dd-btn--ghost:hover { background: var(--dd-white); color: var(--dd-navy); border-color: var(--dd-white); }

/* ==========================================================================
   Hero / page banner
   ========================================================================== */
.dd-hero {
    position: relative;
    overflow: hidden;
    padding: 90px 0 80px;
    color: var(--dd-white);
    text-align: center;
    background:
        linear-gradient(135deg, rgba(23, 38, 69, .94) 0%, rgba(35, 56, 98, .88) 55%, rgba(35, 56, 98, .80) 100%),
        url("/assets/images/hero-3-1920.webp") center / cover no-repeat,
        var(--dd-navy);
}
.dd-hero::after {           /* gold accent line along the bottom */
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--dd-gold), transparent);
}
.dd-hero__inner { position: relative; z-index: 1; }
.dd-hero__title {
    margin: 14px 0 14px;
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--dd-white);
}
.dd-hero__lead {
    max-width: 680px;
    margin: 0 auto;
    font-size: clamp(16px, 1.6vw, 18px);
    line-height: 1.65;
    color: rgba(255, 255, 255, .85);
}

.dd-stats {
    list-style: none;
    margin: 36px auto 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}
.dd-stat {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    min-width: 200px;
    padding: 16px 22px;
    text-align: left;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--dd-radius);
    backdrop-filter: blur(6px);
}
.dd-stat__icon {
    grid-row: span 2;
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--dd-gold);
    color: var(--dd-navy-dark);
    font-size: 18px;
}
.dd-stat strong { font-size: 28px; line-height: 1; font-weight: 800; color: var(--dd-white); }
.dd-stat span:last-child { font-size: 13px; color: rgba(255, 255, 255, .75); letter-spacing: .02em; }

.dd-hero__actions {
    margin-top: 34px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

/* ==========================================================================
   Directory
   ========================================================================== */
.dd-directory {
    padding: 70px 0 90px;
    background: var(--dd-bg);
}

/* ---------- Toolbar ---------- */
.dd-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    background: var(--dd-white);
    border: 1px solid var(--dd-line);
    border-radius: var(--dd-radius);
    box-shadow: var(--dd-shadow);
}
.dd-field { position: relative; }
.dd-field > i {
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    color: var(--dd-muted);
    font-size: 14px;
    pointer-events: none;
}
.dd-field input,
.dd-field select {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--dd-line);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--dd-ink);
    font: inherit;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.dd-field select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}
.dd-field input:focus,
.dd-field select:focus {
    outline: none;
    border-color: var(--dd-navy);
    background-color: var(--dd-white);
    box-shadow: 0 0 0 4px rgba(35, 56, 98, .12);
}
.dd-reset {
    height: 50px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: var(--dd-gold-soft);
    color: var(--dd-navy);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.dd-reset:hover { background: rgba(212, 167, 44, .28); }

.dd-result-count {
    min-height: 22px;
    margin: 14px 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--dd-muted);
}

/* ---------- Country chips ---------- */
.dd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 40px;
}
.dd-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--dd-white);
    border: 1px solid var(--dd-line);
    border-radius: 50px;
    color: var(--dd-navy);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.dd-chip:hover { border-color: var(--dd-gold); box-shadow: var(--dd-shadow); transform: translateY(-1px); text-decoration: none; color: var(--dd-navy); }
.dd-chip img { width: 20px; height: 15px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.dd-chip__count {
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 50px;
    background: var(--dd-navy);
    color: var(--dd-white);
    font-size: 12px;
    text-align: center;
}

/* ---------- Country block ---------- */
.dd-country {
    margin-bottom: 48px;
    scroll-margin-top: 120px;
}
.dd-country__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 22px;
    border-bottom: 2px solid var(--dd-line);
    position: relative;
}
.dd-country__head::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 90px; height: 2px;
    background: var(--dd-gold);
}
.dd-country__title { display: flex; align-items: center; gap: 16px; }
.dd-country__title h3 {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 800;
    color: var(--dd-navy);
}
.dd-flag {
    width: 52px; height: 39px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .05);
}
.dd-flag--blank {
    display: grid; place-items: center;
    background: #e2e8f0;
    color: #94a3b8;
    font-size: 18px;
}
.dd-country__count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    background: var(--dd-gold-soft);
    color: var(--dd-navy);
    font-size: 14px;
    font-weight: 700;
}
.dd-country__count i { color: var(--dd-gold); }

/* ---------- Cards ---------- */
.dd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}
.dd-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: var(--dd-white);
    border: 1px solid var(--dd-line);
    border-radius: var(--dd-radius);
    box-shadow: 0 2px 8px rgba(35, 56, 98, .04);
    overflow: hidden;
    transition: transform .3s var(--dd-ease), box-shadow .3s var(--dd-ease), border-color .3s;
}
.dd-card::before {               /* gold bar that grows on hover */
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--dd-navy), var(--dd-gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--dd-ease);
}
.dd-card:hover { transform: translateY(-5px); box-shadow: var(--dd-shadow-lg); border-color: transparent; }
.dd-card:hover::before { transform: scaleX(1); }

.dd-card__top { display: flex; align-items: center; gap: 14px; }
.dd-avatar {
    flex: 0 0 auto;
    width: 54px; height: 54px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dd-navy), #34548f);
    color: var(--dd-white);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .03em;
    box-shadow: 0 0 0 3px var(--dd-white), 0 0 0 5px var(--dd-gold-soft);
}
.dd-avatar--lg { width: 72px; height: 72px; font-size: 24px; }

.dd-card__id { min-width: 0; }
.dd-card__name {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--dd-navy);
    overflow-wrap: anywhere;
}
.dd-card__role {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--dd-muted);
    overflow-wrap: anywhere;
}

.dd-card__meta { margin: 0; display: grid; gap: 10px; }
.dd-card__meta > div { display: flex; align-items: flex-start; gap: 12px; }
.dd-card__meta dt {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 8px;
    background: #f1f5f9;
    color: var(--dd-navy);
    font-size: 13px;
}
.dd-card__meta dd {
    margin: 0;
    padding-top: 5px;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--dd-ink);
    overflow-wrap: anywhere;
}

.dd-tag {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 50px;
    background: var(--dd-gold-soft);
    color: #8a6a12;
    font-size: 12.5px;
    font-weight: 700;
}

.dd-card__btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 18px;
    border: 1.5px solid var(--dd-navy);
    border-radius: 10px;
    background: transparent;
    color: var(--dd-navy);
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .25s, color .25s;
}
.dd-card__btn i { transition: transform .25s var(--dd-ease); }
.dd-card__btn:hover,
.dd-card:hover .dd-card__btn { background: var(--dd-navy); color: var(--dd-white); }
.dd-card__btn:hover i { transform: translateX(4px); }
.dd-card__btn:focus-visible { outline: 3px solid var(--dd-gold); outline-offset: 2px; }

/* ---------- Empty states ---------- */
.dd-empty {
    max-width: 640px;
    margin: 0 auto;
    padding: 56px 32px;
    text-align: center;
    background: var(--dd-white);
    border: 1px dashed #cbd5e1;
    border-radius: var(--dd-radius);
}
.dd-empty--compact { padding: 40px 28px; margin-bottom: 48px; }
.dd-empty__icon {
    width: 72px; height: 72px;
    margin: 0 auto 18px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--dd-gold-soft);
    color: var(--dd-gold);
    font-size: 28px;
}
.dd-empty h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; color: var(--dd-navy); }
.dd-empty p  { margin: 0 0 24px; color: var(--dd-muted); line-height: 1.6; }

/* ---------- Bottom CTA ---------- */
.dd-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 20px;
    padding: 36px 40px;
    border-radius: 18px;
    color: var(--dd-white);
    background:
        radial-gradient(circle at 100% 0%, rgba(212, 167, 44, .25), transparent 45%),
        linear-gradient(135deg, var(--dd-navy-dark), var(--dd-navy));
    box-shadow: var(--dd-shadow-lg);
}
.dd-cta h2 { margin: 0 0 6px; font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; color: var(--dd-white); }
.dd-cta p  { margin: 0; color: rgba(255, 255, 255, .8); }
.dd-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Profile modal
   ========================================================================== */
.dd-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.dd-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(4px);
    animation: ddFade .25s ease;
}
.dd-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--dd-white);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
    animation: ddRise .35s var(--dd-ease);
}
.dd-modal__dialog:focus { outline: none; }

.dd-modal__close {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 2;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: var(--dd-white);
    font-size: 16px;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.dd-modal__close:hover { background: var(--dd-gold); color: var(--dd-navy-dark); transform: rotate(90deg); }
.dd-modal__close:focus-visible { outline: 3px solid var(--dd-gold); outline-offset: 2px; }

.dd-modal__head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 30px 64px 28px 30px;
    color: var(--dd-white);
    background: linear-gradient(135deg, var(--dd-navy-dark), var(--dd-navy));
    border-bottom: 3px solid var(--dd-gold);
}
.dd-modal__head .dd-avatar { background: var(--dd-gold); color: var(--dd-navy-dark); box-shadow: 0 0 0 4px rgba(255, 255, 255, .15); }
.dd-modal__head h3 { margin: 6px 0 4px; font-size: 24px; font-weight: 800; line-height: 1.25; color: var(--dd-white); overflow-wrap: anywhere; }
.dd-modal__head p  { margin: 0; color: rgba(255, 255, 255, .8); font-size: 15px; }

.dd-modal__body { padding: 26px 30px 8px; }
.dd-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 24px;
}
.dd-facts > div {
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--dd-line);
}
.dd-facts dt {
    margin-bottom: 4px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--dd-muted);
}
.dd-facts dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--dd-ink); overflow-wrap: anywhere; }

.dd-modal__label {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--dd-navy);
}
.dd-modal__profile {
    padding: 18px 20px;
    border-left: 4px solid var(--dd-gold);
    border-radius: 0 10px 10px 0;
    background: #fbfaf5;
    color: #334155;
    font-size: 15px;
    line-height: 1.75;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.dd-modal__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
    padding: 20px 30px 26px;
    border-top: 1px solid var(--dd-line);
}
.dd-modal__foot p { flex: 1 1 260px; margin: 0; font-size: 14px; color: var(--dd-muted); }
.dd-modal__foot .dd-btn { padding: 12px 22px; font-size: 14px; }

@keyframes ddFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ddRise { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
    .dd-toolbar { grid-template-columns: 1fr 1fr; }
    .dd-field--search { grid-column: 1 / -1; }
    .dd-reset { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .dd-hero { padding: 64px 0 56px; }
    .dd-stats { gap: 10px; }
    .dd-stat { min-width: 0; flex: 1 1 calc(50% - 10px); padding: 14px; }
    .dd-stat__icon { width: 38px; height: 38px; font-size: 15px; }
    .dd-stat strong { font-size: 22px; }
    .dd-hero__actions .dd-btn { width: 100%; }

    .dd-directory { padding: 48px 0 64px; }
    .dd-toolbar { grid-template-columns: 1fr; padding: 12px; }
    .dd-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-bottom: 32px; scrollbar-width: thin; }
    .dd-chip { flex: 0 0 auto; }

    .dd-country__title { gap: 12px; }
    .dd-flag { width: 44px; height: 33px; }
    .dd-grid { grid-template-columns: 1fr; gap: 16px; }
    .dd-card { padding: 20px; }

    .dd-cta { padding: 28px 22px; }
    .dd-cta__actions, .dd-cta__actions .dd-btn { width: 100%; }

    .dd-modal { padding: 0; align-items: flex-end; }
    .dd-modal__dialog { max-height: 92vh; border-radius: 18px 18px 0 0; }
    .dd-modal__head { padding: 24px 60px 22px 20px; }
    .dd-modal__body { padding: 22px 20px 4px; }
    .dd-modal__foot { padding: 18px 20px 24px; }
    .dd-modal__foot .dd-btn { width: 100%; }
    .dd-facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .dd-card, .dd-card::before, .dd-btn, .dd-chip, .dd-modal__dialog, .dd-modal__backdrop { transition: none !important; animation: none !important; }
}