.a1801-clergy-directory {
    --a1801-border: #d6d6d6;
    --a1801-row-alt: #f3f3f3;
    --a1801-text: #222;
    --a1801-link: #0b5f95;
    --a1801-heading: #242424;
    color: var(--a1801-text);
    width: 100%;
}

.a1801-clergy-section {
    margin: 0 0 3rem;
}

.a1801-clergy-heading {
    color: var(--a1801-heading);
    font-size: clamp(1.55rem, 2vw, 2rem);
    line-height: 1.2;
    margin: 0 0 1rem;
}

.a1801-clergy-search-label {
    display: block;
    max-width: 100%;
}

.a1801-clergy-search {
    background: #fff;
    border: 1px solid #b8b8b8;
    border-radius: 2px;
    box-sizing: border-box;
    color: #222;
    font: inherit;
    min-height: 44px;
    padding: 10px 12px;
    width: min(100%, 420px);
}

.a1801-clergy-search:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, .18);
    outline: none;
}


.a1801-clergy-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.a1801-clergy-table {
    border-collapse: collapse;
    margin: 0;
    table-layout: fixed;
    width: 100%;
}

.a1801-clergy-table th,
.a1801-clergy-table td {
    border: 0;
    padding: 11px 14px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.a1801-clergy-table th {
    border-bottom: 1px solid var(--a1801-border);
    font-weight: 700;
}

.a1801-clergy-table tbody tr:nth-child(odd):not(.a1801-clergy-no-results) {
    background: var(--a1801-row-alt);
}

.a1801-clergy-table a {
    color: var(--a1801-link);
    text-decoration: none;
}

.a1801-clergy-table a:hover,
.a1801-clergy-table a:focus {
    text-decoration: underline;
}

.a1801-clergy-table th:nth-child(1),
.a1801-clergy-table td:nth-child(1) {
    width: 31%;
}

.a1801-clergy-table th:nth-child(2),
.a1801-clergy-table td:nth-child(2) {
    width: 24%;
}

.a1801-clergy-table th:nth-child(3),
.a1801-clergy-table td:nth-child(3) {
    width: 29%;
}

.a1801-clergy-table th:nth-child(4),
.a1801-clergy-table td:nth-child(4) {
    width: 16%;
}

.a1801-clergy-no-results td {
    background: #fff;
    padding: 20px 14px;
    text-align: center;
}

@media (max-width: 760px) {
    .a1801-clergy-table,
    .a1801-clergy-table thead,
    .a1801-clergy-table tbody,
    .a1801-clergy-table th,
    .a1801-clergy-table td,
    .a1801-clergy-table tr {
        display: block;
        width: 100%;
    }

    .a1801-clergy-table thead {
        border: 0;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        white-space: nowrap;
        width: 1px;
    }

    .a1801-clergy-table tbody tr {
        border: 1px solid var(--a1801-border);
        margin-bottom: 12px;
        padding: 8px 0;
    }

    .a1801-clergy-table tbody tr:nth-child(odd):not(.a1801-clergy-no-results) {
        background: #fff;
    }

    .a1801-clergy-table td {
        display: grid;
        grid-template-columns: minmax(88px, 34%) 1fr;
        gap: 10px;
        padding: 7px 12px;
    }

    .a1801-clergy-table td::before {
        content: attr(data-label);
        font-weight: 700;
    }

    .a1801-clergy-no-results td {
        display: block;
    }

    .a1801-clergy-no-results td::before {
        content: none;
    }
}


.a1801-clergy-pagination {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 20px;
}

.a1801-clergy-page-button {
    align-items: center;
    background: #fff;
    border: 1px solid #b8b8b8;
    border-radius: 4px;
    color: #222;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 1.15rem;
    height: 40px;
    justify-content: center;
    line-height: 1;
    min-width: 44px;
    padding: 0 12px;
    transition: background-color .15s ease, border-color .15s ease;
}

.a1801-clergy-page-button:hover:not(:disabled),
.a1801-clergy-page-button:focus-visible:not(:disabled) {
    background: #f3f3f3;
    border-color: #7d7d7d;
}

.a1801-clergy-page-button:focus-visible {
    box-shadow: 0 0 0 2px rgba(34, 113, 177, .18);
    outline: none;
}

.a1801-clergy-page-button:disabled {
    cursor: default;
    opacity: .38;
}

.a1801-clergy-page-status {
    color: #555;
    font-size: .92rem;
    min-width: 92px;
    text-align: center;
}


/* Mobile and tablet improvements */
.a1801-clergy-directory,
.a1801-clergy-directory * {
    box-sizing: border-box;
}

.a1801-clergy-directory {
    max-width: 100%;
    overflow: hidden;
}

.a1801-clergy-search {
    max-width: 100%;
}

.a1801-clergy-table td,
.a1801-clergy-table th,
.a1801-clergy-table a {
    overflow-wrap: anywhere;
    word-break: normal;
}

@media (max-width: 900px) {
    .a1801-clergy-section {
        margin-bottom: 2.5rem;
    }

    .a1801-clergy-search {
        width: 100%;
    }

    .a1801-clergy-table-wrap {
        overflow: visible;
    }

    .a1801-clergy-table,
    .a1801-clergy-table tbody,
    .a1801-clergy-table tr,
    .a1801-clergy-table td {
        display: block;
        width: 100%;
    }

    .a1801-clergy-table {
        table-layout: auto;
    }

    .a1801-clergy-table thead {
        border: 0;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        white-space: nowrap;
        width: 1px;
    }

    .a1801-clergy-table tbody {
        display: grid;
        gap: 14px;
    }

    .a1801-clergy-table tbody tr {
        background: #fff !important;
        border: 1px solid var(--a1801-border);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
        margin: 0;
        overflow: hidden;
        padding: 0;
    }

    .a1801-clergy-table td {
        align-items: start;
        border-bottom: 1px solid #ececec;
        display: grid;
        gap: 10px;
        grid-template-columns: minmax(78px, 30%) minmax(0, 1fr);
        min-width: 0;
        padding: 10px 12px;
    }

    .a1801-clergy-table td:last-child {
        border-bottom: 0;
    }

    .a1801-clergy-table td::before {
        color: #333;
        content: attr(data-label);
        font-weight: 700;
    }

    .a1801-clergy-table td a {
        display: inline-block;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .a1801-clergy-no-results {
        box-shadow: none !important;
    }

    .a1801-clergy-no-results td {
        display: block;
        padding: 18px 12px;
        text-align: center;
    }

    .a1801-clergy-no-results td::before {
        content: none;
    }

    .a1801-clergy-pagination {
        gap: 10px;
        margin-top: 18px;
    }

    .a1801-clergy-page-button {
        min-height: 44px;
        min-width: 46px;
    }
}

@media (max-width: 480px) {
    .a1801-clergy-heading {
        font-size: 1.55rem;
    }

    .a1801-clergy-search {
        font-size: 16px;
        min-height: 46px;
    }

    .a1801-clergy-table td {
        display: block;
        padding: 10px 12px;
    }

    .a1801-clergy-table td::before {
        display: block;
        margin-bottom: 4px;
    }

    .a1801-clergy-page-status {
        min-width: auto;
    }
}


/* Mobile layout corrections */
@media (max-width: 900px) {
    .a1801-clergy-table th:nth-child(1),
    .a1801-clergy-table th:nth-child(2),
    .a1801-clergy-table th:nth-child(3),
    .a1801-clergy-table th:nth-child(4),
    .a1801-clergy-table td:nth-child(1),
    .a1801-clergy-table td:nth-child(2),
    .a1801-clergy-table td:nth-child(3),
    .a1801-clergy-table td:nth-child(4) {
        width: 100% !important;
    }

    .a1801-clergy-table tbody tr {
        width: 100%;
    }

    .a1801-clergy-table td {
        box-sizing: border-box;
        min-width: 0;
        width: 100% !important;
    }

    .a1801-clergy-table td::before {
        min-width: 0;
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    .a1801-clergy-table tbody {
        gap: 16px;
    }

    .a1801-clergy-table tbody tr {
        border-radius: 10px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, .06);
    }

    .a1801-clergy-table td {
        border-bottom: 1px solid #ececec;
        display: block !important;
        padding: 12px 14px;
        text-align: left;
    }

    .a1801-clergy-table td::before {
        color: #222;
        display: block;
        font-size: .82rem;
        font-weight: 700;
        letter-spacing: .02em;
        line-height: 1.2;
        margin: 0 0 5px;
        text-transform: uppercase;
    }

    .a1801-clergy-table td,
    .a1801-clergy-table td a {
        font-size: 1rem;
        line-height: 1.5;
    }

    .a1801-clergy-table td a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .a1801-clergy-table td:empty {
        display: none !important;
    }

    .a1801-clergy-table td:empty::before {
        content: none;
    }

    .a1801-clergy-no-results td {
        display: block !important;
    }

    .a1801-clergy-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}


.a1801-clergy-extra {
    border-top: 1px solid #dddddd;
    font-size: .9rem;
    line-height: 1.45;
    margin-top: 8px;
    padding-top: 7px;
}
.a1801-clergy-extra-item + .a1801-clergy-extra-item { margin-top: 4px; }
.a1801-clergy-extra-item strong { font-weight: 700; }


/* v1.2.4 Welcome splash contrast adjustment */
.a1801-welcome-hero,
.a1801-clergy-welcome-hero,
.a1801-welcome-header {
    background: linear-gradient(135deg, #4f8fc7 0%, #2f6fa8 100%) !important;
    color: #ffffff !important;
}
.a1801-welcome-hero h1,
.a1801-welcome-hero h2,
.a1801-welcome-hero p,
.a1801-clergy-welcome-hero h1,
.a1801-clergy-welcome-hero h2,
.a1801-clergy-welcome-hero p,
.a1801-welcome-header h1,
.a1801-welcome-header h2,
.a1801-welcome-header p {
    color: #ffffff !important;
}


/* v1.2.5 - Improve Welcome header brand text contrast */
.a1801-welcome-hero .a1801-welcome-eyebrow,
.a1801-welcome-hero .a1801-brand,
.a1801-welcome-hero .a1801-brand-name,
.a1801-clergy-welcome-hero .a1801-welcome-eyebrow,
.a1801-clergy-welcome-hero .a1801-brand,
.a1801-clergy-welcome-hero .a1801-brand-name,
.a1801-welcome-header .a1801-welcome-eyebrow,
.a1801-welcome-header .a1801-brand,
.a1801-welcome-header .a1801-brand-name {
    color: #ffffff !important;
}
