/* NGOpedia NGO Directory — isolated styles, independent of legacy CSS and Bootstrap */
.ngo-directory-page {
    --ngo-navy: #102e52;
    --ngo-blue: #155eef;
    --ngo-teal: #079b8e;
    --ngo-orange: #f6a623;
    --ngo-ink: #172b45;
    --ngo-muted: #687b91;
    --ngo-line: #dce6f1;
    color: var(--ngo-ink);
    background: #f4f8fd;
    font-family: 'DM Sans', Arial, sans-serif;
    overflow: hidden;
}
.ngo-directory-page *,
.ngo-directory-page *::before,
.ngo-directory-page *::after { box-sizing: border-box; }
.ngo-directory-container {
    width: min(100% - 48px, 1280px);
    margin-inline: auto;
}
.ngo-directory-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(ellipse at 82% 18%, rgba(54,123,245,.35), transparent 32%),
        radial-gradient(ellipse at 8% 100%, rgba(7,155,142,.23), transparent 36%),
        linear-gradient(120deg, #0a2140, #102e52 58%, #12527b);
}
.ngo-hero-pattern {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .13;
    background-image: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(90deg, #000, transparent 90%);
}
.ngo-hero-content { position: relative; padding-top: 66px; padding-bottom: 88px; }
.ngo-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #bde9e5;
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .13em;
}
.ngo-eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: #51e0b5; box-shadow: 0 0 0 5px rgba(81,224,181,.13); }
.ngo-directory-hero h1 {
    max-width: 850px;
    margin: 24px 0 18px;
    color: #fff;
    font: 800 clamp(2.45rem, 5vw, 4.35rem)/1.08 'Manrope', 'DM Sans', Arial, sans-serif;
    letter-spacing: -.055em;
}
.ngo-directory-hero h1 span { color: #ffbd4a; }
.ngo-directory-hero p { max-width: 760px; margin: 0; color: #d3deec; font-size: 1.04rem; line-height: 1.85; }
.ngo-hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.ngo-hero-pills span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(255,255,255,.07); color: #e2ebf5; font-size: .78rem; font-weight: 600; }
.ngo-hero-pills i { color: #7be0d1; }
.ngo-hero-curve { position: absolute; left: -5%; right: -5%; bottom: -72px; height: 100px; border-radius: 50% 50% 0 0; background: #f4f8fd; }
.ngo-directory-main { position: relative; padding: 0 0 82px; background: #f4f8fd; }
.ngo-search-panel {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    align-items: center;
    gap: 32px;
    margin-top: -38px;
    padding: 28px 30px;
    border: 1px solid #e0e9f4;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(16,46,82,.11);
}
.ngo-section-kicker { display: block; margin-bottom: 8px; color: var(--ngo-blue); font-size: .68rem; font-weight: 900; letter-spacing: .14em; }
.ngo-search-copy h2, .ngo-results-heading h2 { margin: 0; color: var(--ngo-ink); font: 800 clamp(1.35rem, 2vw, 1.85rem)/1.25 'Manrope', 'DM Sans', Arial, sans-serif; letter-spacing: -.035em; }
.ngo-search-copy p { margin: 9px 0 0; color: var(--ngo-muted); font-size: .87rem; line-height: 1.6; }
.ngo-search-form { display: flex; align-items: stretch; gap: 10px; min-width: 0; }
.ngo-search-input-wrap { position: relative; flex: 1; min-width: 0; }
.ngo-search-input-wrap > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #8293a8; pointer-events: none; }
.ngo-search-input {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 15px 12px 44px;
    border: 1px solid #d7e2ef;
    border-radius: 12px;
    outline: none;
    background: #f9fbfe;
    color: var(--ngo-ink);
    font: 500 .87rem 'DM Sans', Arial, sans-serif;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.ngo-search-input::placeholder { color: #91a0b2; }
.ngo-search-input:focus { border-color: #7aa8ff; background: #fff; box-shadow: 0 0 0 4px rgba(21,94,239,.1); }
.ngo-search-button {
    flex: 0 0 auto;
    min-height: 50px;
    padding: 0 21px;
    border: 0;
    border-radius: 12px;
    background: var(--ngo-blue);
    color: #fff;
    font: 800 .86rem 'DM Sans', Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(21,94,239,.18);
    transition: transform .2s, background .2s, box-shadow .2s;
}
.ngo-search-button:hover { transform: translateY(-1px); background: #0d4bd0; box-shadow: 0 11px 22px rgba(21,94,239,.25); }
.ngo-results-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 54px 0 24px; }
.ngo-results-note { display: inline-flex; align-items: center; gap: 8px; color: #71839a; font-size: .78rem; font-weight: 700; }
.ngo-results-note i { color: var(--ngo-teal); }
.ngo-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.ngo-directory-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 242px;
    flex-direction: column;
    padding: 23px;
    overflow: hidden;
    border: 1px solid #dfe8f2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(16,46,82,.045);
    transition: transform .22s, border-color .22s, box-shadow .22s;
}
.ngo-directory-card::after { position: absolute; right: -35px; top: -42px; width: 115px; height: 115px; border-radius: 50%; background: #eff5ff; content: ""; transition: transform .25s; }
.ngo-directory-card:hover { transform: translateY(-5px); border-color: #c7d9ee; box-shadow: 0 18px 38px rgba(16,46,82,.1); }
.ngo-directory-card:hover::after { transform: scale(1.2); }
.ngo-card-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-bottom: 19px; }
.ngo-card-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: #e6f0ff; color: var(--ngo-blue); font-size: 1.1rem; }
.ngo-card-label { color: #8a9bb0; font-size: .63rem; font-weight: 900; letter-spacing: .12em; }
.ngo-card-name { position: relative; z-index: 1; display: block; color: var(--ngo-ink); font: 800 1.06rem/1.45 'Manrope', 'DM Sans', Arial, sans-serif; text-decoration: none; overflow-wrap: anywhere; }
.ngo-card-name:hover { color: var(--ngo-blue); }
.ngo-card-status { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: var(--ngo-teal); font-size: .76rem; font-weight: 700; }
.ngo-card-location { display: flex; align-items: flex-start; gap: 9px; margin-top: 17px; color: #71839a; font-size: .82rem; line-height: 1.5; overflow-wrap: anywhere; }
.ngo-location-icon { display: inline-grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; margin-top: -4px; border-radius: 8px; background: #fff2dc; color: #cf850b; }
.ngo-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 18px; }
.ngo-card-footer > span { color: #8999ac; font-size: .72rem; font-weight: 700; }
.ngo-card-link { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid #dce8f8; border-radius: 11px; background: #edf4ff; color: var(--ngo-blue); text-decoration: none; transition: background .2s, color .2s; }
.ngo-card-link:hover { background: var(--ngo-blue); color: #fff; }
.ngo-directory-bottom { display: flex; align-items: center; gap: 17px; margin-top: 36px; padding: 24px 27px; border: 1px solid #d6e9e7; border-radius: 18px; background: linear-gradient(100deg, #e8f4ff, #e9f9f5); }
.ngo-bottom-icon { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 15px; background: #fff; color: var(--ngo-teal); font-size: 1.25rem; box-shadow: 0 6px 15px rgba(16,46,82,.06); }
.ngo-directory-bottom strong { display: block; color: var(--ngo-ink); font: 800 .95rem 'Manrope', Arial, sans-serif; }
.ngo-directory-bottom p { margin: 5px 0 0; color: var(--ngo-muted); font-size: .81rem; line-height: 1.6; }
.ngo-directory-bottom > a { display: inline-flex; align-items: center; gap: 9px; margin-left: auto; padding: 12px 15px; border-radius: 11px; background: var(--ngo-navy); color: #fff; font-size: .8rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.ngo-directory-bottom > a:hover { background: var(--ngo-blue); }
.ngo-directory-page a:focus-visible, .ngo-directory-page input:focus-visible { outline: 3px solid rgba(21,94,239,.3); outline-offset: 3px; }
@media (max-width: 1000px) {
    .ngo-search-panel { grid-template-columns: 1fr; gap: 20px; }
    .ngo-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .ngo-directory-container { width: calc(100% - 36px); }
    .ngo-hero-content { padding-top: 48px; padding-bottom: 80px; }
    .ngo-directory-hero h1 { font-size: clamp(2.25rem, 10vw, 3.2rem); }
    .ngo-directory-hero p { font-size: .94rem; }
    .ngo-hero-pills { gap: 8px; }
    .ngo-hero-pills span { font-size: .7rem; }
    .ngo-search-panel { margin-top: -34px; padding: 22px 18px; border-radius: 18px; }
    .ngo-search-form { flex-direction: column; }
    .ngo-search-button { width: 100%; }
    .ngo-results-heading { align-items: flex-start; flex-direction: column; margin-top: 40px; }
    .ngo-directory-grid { grid-template-columns: 1fr; gap: 14px; }
    .ngo-directory-card { min-height: 220px; padding: 21px; }
    .ngo-directory-bottom { align-items: flex-start; flex-wrap: wrap; padding: 20px; }
    .ngo-directory-bottom > div { flex: 1 1 calc(100% - 70px); }
    .ngo-directory-bottom > a { width: 100%; justify-content: center; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .ngo-directory-page *, .ngo-directory-page *::before, .ngo-directory-page *::after { transition: none !important; }
}
