.directory-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 90% 8%, rgba(184, 137, 53, 0.13), transparent 28rem),
        linear-gradient(180deg, rgba(15, 95, 85, 0.12), transparent 27rem),
        var(--page);
}

.directory-header {
    border-bottom: 1px solid rgba(15, 95, 85, 0.14);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
}

.directory-header-inner,
.directory-shell,
.directory-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.directory-header-inner {
    display: flex;
    min-height: 84px;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.directory-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
}

.directory-brand .brand-mark {
    width: 48px;
    height: 48px;
    font-size: 13px;
}

.directory-brand strong,
.directory-brand small {
    display: block;
}

.directory-brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
}

.directory-brand small {
    margin-top: 3px;
    color: var(--muted);
}

.directory-home-link {
    color: var(--green);
    font-weight: 800;
    text-decoration: none;
}

.directory-home-link:hover {
    color: var(--green-dark);
}

.directory-shell {
    padding: 46px 0 56px;
}

.directory-hero {
    overflow: hidden;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
    gap: 42px;
    align-items: center;
    border: 1px solid rgba(15, 95, 85, 0.17);
    border-radius: 14px;
    padding: 46px;
    background: linear-gradient(135deg, #fff, #faf8f2);
    box-shadow: var(--shadow);
}

.directory-hero::after {
    content: "EBA";
    position: absolute;
    right: -15px;
    bottom: -45px;
    color: rgba(15, 95, 85, 0.045);
    font: 700 150px/1 Georgia, serif;
    pointer-events: none;
}

.directory-hero-copy,
.directory-search {
    position: relative;
    z-index: 1;
}

.directory-hero h1 {
    font-size: clamp(38px, 5vw, 58px);
}

.directory-hero-copy > p:last-child {
    max-width: 560px;
    margin: 18px 0 0;
    color: #4f5b6d;
    font-size: 17px;
    line-height: 1.65;
}

.directory-search {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 40px rgba(24, 32, 51, 0.09);
}

.directory-search > label {
    margin-bottom: 10px;
    color: var(--green-dark);
    font-weight: 850;
}

.directory-search-box {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 2px solid var(--green);
    border-radius: 9px;
    padding: 0 14px;
    color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 95, 85, 0.08);
}

.directory-search-box:focus-within {
    box-shadow: 0 0 0 5px rgba(15, 95, 85, 0.15);
}

.directory-search-box input {
    min-width: 0;
    height: 56px;
    border: 0;
    padding: 0;
    box-shadow: none;
    font-size: 16px;
}

.directory-search-box input:focus,
.directory-search-box input:hover {
    border: 0;
    box-shadow: none;
}

.directory-clear {
    display: grid;
    width: 32px;
    min-width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    color: var(--muted);
    background: #edf1f4;
    box-shadow: none;
    font-size: 23px;
    line-height: 1;
}

.directory-clear:hover,
.directory-clear:focus {
    color: #fff;
    background: var(--green);
    box-shadow: none;
    transform: none;
}

.directory-search-hint {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.directory-results-section {
    margin-top: 26px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 30px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(24, 32, 51, 0.09);
}

.directory-results-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 22px;
}

.directory-results-heading h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
}

.directory-results-heading > p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.member-directory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.directory-member-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    background: linear-gradient(145deg, #fff, #fbfcfd);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.directory-member-card:hover {
    border-color: rgba(15, 95, 85, 0.38);
    box-shadow: 0 14px 34px rgba(24, 32, 51, 0.1);
    transform: translateY(-2px);
}

.directory-member-contact {
    display: grid;
    grid-column: 1 / -1;
    gap: 12px;
    min-width: 0;
    margin-top: 2px;
    padding-top: 14px;
    border-top: 1px solid #e9edef;
}

.directory-contact-item {
    position: relative;
    min-width: 0;
    padding-left: 27px;
}

.directory-contact-item::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 0;
    width: 17px;
    height: 17px;
    border-radius: 5px;
    background-color: #eaf5f2;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 11px;
}

.directory-contact-mobile::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f5f55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.33 1.78.62 2.63a2 2 0 0 1-.45 2.11L8 9.73a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.85.29 1.73.5 2.63.62A2 2 0 0 1 22 16.92Z'/%3E%3C/svg%3E");
}

.directory-address-item::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f5f55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

.directory-contact-label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.directory-contact-value,
.directory-mobile-link {
    overflow-wrap: anywhere;
    color: #374151;
    font-size: 13px;
    font-style: normal;
    line-height: 1.48;
}

.directory-address-item .directory-contact-value {
    white-space: pre-line;
}

.directory-mobile-link {
    display: inline-flex;
    align-items: center;
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
}

.directory-mobile-link:hover,
.directory-mobile-link:focus {
    color: var(--gold);
    text-decoration: underline;
}

.directory-contact-empty {
    color: var(--muted);
}

.directory-address-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.directory-member-photo,
.directory-member-photo img,
.directory-photo-fallback {
    width: 92px;
    height: 112px;
    border-radius: 8px;
}

.directory-member-photo {
    overflow: hidden;
    background: var(--soft);
}

.directory-member-photo img {
    display: block;
    object-fit: cover;
}

.directory-photo-fallback {
    display: grid;
    place-items: center;
    color: var(--green);
    background: linear-gradient(145deg, #e8f2ef, #f5efe2);
    font: 700 34px Georgia, serif;
}

.directory-member-content {
    min-width: 0;
}

.directory-member-type {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 8px;
    color: var(--green-dark);
    background: #eaf5f2;
    font-size: 11px;
    font-weight: 850;
}

.directory-member-content h3 {
    overflow-wrap: anywhere;
    margin: 9px 0 12px;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    line-height: 1.2;
}

.directory-member-content dl,
.directory-member-content dd {
    margin: 0;
}

.directory-member-content dl {
    display: grid;
    gap: 8px;
}

.directory-member-content dl > div {
    min-width: 0;
}

.directory-member-content dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.directory-member-content dd {
    overflow-wrap: anywhere;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 750;
}

.directory-footer {
    padding: 0 0 34px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 980px) {
    .directory-hero {
        grid-template-columns: 1fr;
    }

    .member-directory-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .directory-header-inner {
        min-height: 64px;
    }

    .directory-brand small,
    .directory-home-link {
        font-size: 12px;
    }

    .directory-brand strong {
        font-size: 15px;
    }

    .directory-brand .brand-mark {
        width: 38px;
        height: 38px;
    }

    .directory-shell {
        width: min(100% - 24px, 1120px);
        padding: 12px 0 30px;
    }

    .directory-hero,
    .directory-results-section {
        padding: 16px;
        border-radius: 10px;
    }

    .directory-hero {
        gap: 14px;
    }

    .directory-hero h1 {
        font-size: 32px;
    }

    .directory-hero-copy > p:last-child {
        margin-top: 9px;
        font-size: 14px;
        line-height: 1.45;
    }

    .directory-search {
        padding: 12px;
    }

    .directory-search-box input {
        height: 50px;
    }

    .directory-search-hint {
        margin-top: 8px;
    }

    .directory-results-section {
        margin-top: 10px;
    }

    .directory-results-heading {
        margin-bottom: 12px;
    }

    .directory-results-heading {
        display: block;
    }

    .directory-results-heading h2 {
        font-size: 23px;
    }

    .directory-results-heading > p {
        margin-top: 5px;
        font-size: 12px;
    }

    .member-directory-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .directory-address-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .search-active .directory-hero {
        position: sticky;
        top: 6px;
        z-index: 8;
        padding: 10px;
        border-color: rgba(15, 95, 85, 0.28);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 10px 28px rgba(24, 32, 51, 0.14);
        backdrop-filter: blur(12px);
    }

    .search-active .directory-hero-copy,
    .search-active .directory-search > label,
    .search-active .directory-search-hint {
        display: none;
    }

    .search-active .directory-search {
        border: 0;
        padding: 0;
        box-shadow: none;
    }

    .search-active .directory-results-heading .section-kicker {
        display: none;
    }
}

@media (max-width: 420px) {
    .directory-header-inner {
        width: min(100% - 24px, 1120px);
    }

    .directory-home-link {
        max-width: 52px;
        text-align: right;
    }

    .directory-member-card {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 12px;
        padding: 13px;
    }

    .directory-member-photo,
    .directory-member-photo img,
    .directory-photo-fallback {
        width: 72px;
        height: 88px;
    }

    .directory-member-content h3 {
        margin: 7px 0 9px;
        font-size: 18px;
    }

    .directory-member-content dl {
        gap: 5px;
    }

    .directory-member-contact {
        gap: 10px;
        padding-top: 11px;
    }
}
