/* Disease Finder Directory CSS
   Version: 1.0.0
*/

/*root css*/
:root {
    --dph-level-01: #B10000;
    --dph-level-02: #B56109;
    --dph-level-03: #6300A6;
    --dph-level-04: #003f70;
    --dph-other: #52616d;

    --dph-level-01-bckgrnd: linear-gradient(180deg, #B10000 0%, #940000 55%, #6F0000 100%);
    --dph-level-02-bckgrnd: linear-gradient(180deg, #B56109 0%, #9B4F00 55%, #7A3D00 100%);
    --dph-level-03-bckgrnd: linear-gradient(180deg, #6300A6 0%, #52008B 55%, #3D006B 100%);
    --dph-level-04-bckgrnd: linear-gradient(180deg, #003f70 0%, #00335C 55%, #002442 100%);
    --dph-other-bckgrnd: linear-gradient(180deg, #52616d 0%, #43515C 55%, #34414C 100%);

    --dph-level-01-arrow: linear-gradient(90deg, rgba(255, 255, 255, .18), transparent 42%), #B10000;
    --dph-level-02-arrow: linear-gradient(90deg, rgba(255, 255, 255, .18), transparent 42%), #B56109;
    --dph-level-03-arrow: linear-gradient(90deg, rgba(255, 255, 255, .18), transparent 42%), #6300A6;
    --dph-level-04-arrow: linear-gradient(90deg, rgba(255, 255, 255, .18), transparent 42%), #003f70;
    --dph-other-arrow: linear-gradient(90deg, rgba(255, 255, 255, .18), transparent 42%), #52616d;

    --dph-level-01-hover: linear-gradient(180deg, #CE0000, #B10000, #8A0000);
    --dph-level-02-hover: linear-gradient(180deg, #D4720B, #B56109, #914D04);
    --dph-level-03-hover: linear-gradient(180deg, #7800C9, #6300A6, #4C0080);
    --dph-level-04-hover: linear-gradient(180deg, #005291, #003f70, #002C4F);
    --dph-other-hover: linear-gradient(180deg, #647582, #52616d, #404C56);
}

.disease-result-credentials a.inline-link {
    color: var(--active-accent);
    display: inline-block;
    text-decoration: underline;
    text-decoration-color: var(--ph-gold);
    text-decoration-thickness: 0px;
    text-underline-offset: 3px;
    font-weight: 700;
    transition: text-decoration-thickness 0.25s ease, color 0.25s ease;
}

.disease-result-credentials a.inline-link:hover,
.disease-result-credentials a.inline-link:focus {
    color: var(--ph-dark-blue);
    text-decoration-thickness: 2px;
}


/* ==========================================================
   disease Finder Directory
   ========================================================== */

.diseases-list,
.diseases-list * {
    box-sizing: border-box;
}

.diseases-list {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.disease-loading,
.disease-error {
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
    color: #003f70;
    background: #f8fbfe;
    border: 1px solid #d8e2ea;
    border-radius: 14px;
}

.disease-finder {
    width: 100%;
}

/* ==========================================================
   Directory Hero
   ========================================================== */

.disease-finder-hero {
    position: relative;

    margin: 0 auto;
    padding: 1.5rem;

    background:
        linear-gradient(135deg,
            rgb(0 104 182 / 6%) 0%,
            rgb(0 90 156 / 4%) 55%,
            rgb(0 70 123 / 6%) 100%),
        #ffffff;

    border: 1px solid #d8e2ea;
    border-radius: 14px;

    box-shadow:
        0 8px 20px rgb(0 63 112 / 6%),
        inset 0 1px 0 rgb(255 255 255 / 70%);
}

.disease-finder-label {
    display: inline-block;
    margin: 0 0 .75rem;
    padding: .35rem .7rem;

    color: #003f70;
    background: #ffffff;

    border: 1px solid #cfe0ec;
    border-radius: 999px;

    font-size: .78rem !important;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.disease-finder-hero h2 {
    margin: 0 0 .75rem;

    color: #003f70;

    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.15;
}

.disease-finder-hero p {
    /*max-width: 980px;*/
    margin: 0 0 1rem;

    color: #43515c;

    font-size: 1rem;
    line-height: 1.65;
}

.disease-finder-hero p:last-of-type {
    margin-bottom: 0;
}

/* ==========================================================
   Search Bar
   ========================================================== */

.disease-finder-search.disease-finder-search-simple {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 165px;
    align-items: end !important;
    gap: 12px;

    width: 100%;
    margin: 1.5rem 0 0 !important;
    padding: 1.15rem !important;

    background: #ffffff !important;
    border: 1px solid #cfe0ec !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 26px rgba(0, 63, 112, .12) !important;

    overflow: visible;
}

.disease-search-box {
    position: relative;
    min-width: 0;
}

.disease-search-box input {
    width: 100% !important;
    min-height: 56px !important;

    margin: 0 !important;
    padding: 0 3rem 0 1rem !important;

    color: #24313a !important;
    background: #ffffff !important;

    border: 1px solid #bccdd9 !important;
    border-radius: 10px !important;

    font-size: 1rem !important;
    line-height: 1.4 !important;
    box-shadow: none !important;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.disease-search-box input::placeholder {
    color: #6c7a86;
}

.disease-search-box input:focus {
    border-color: #005a9c !important;
    box-shadow: 0 0 0 4px rgba(0, 90, 156, .12) !important;
    outline: none !important;
}

.disease-search-box input::-webkit-search-cancel-button,
.disease-search-box input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.disease-search-clear {
    position: absolute !important;
    right: .65rem !important;
    bottom: 9px !important;
    top: auto !important;
    z-index: 3;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    width: 38px !important;
    height: 38px !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #52616d;
    background: transparent;

    border: 0 !important;
    border-radius: 999px;

    font-size: 1rem;
    line-height: 1;

    cursor: pointer;
    transform: none !important;
}

.disease-search-clear:hover,
.disease-search-clear:focus {
    color: #003f70;
    background: #eef6fb;
}

.disease-search-clear:focus-visible {
    outline: 3px solid #b9d8ea;
    outline-offset: 2px;
}

.disease-search-button,
.disease-search-button-large {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .5rem;

    width: 100% !important;
    min-width: 0;
    height: 56px !important;
    min-height: 56px !important;

    margin: 0 !important;
    padding: 0 1.25rem !important;

    color: #ffffff !important;
    background: #005a9c !important;

    border: 1px solid #005a9c !important;
    border-radius: 10px !important;

    font-size: 1rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    cursor: pointer;

    transition:
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.disease-search-button:hover,
.disease-search-button:focus,
.disease-search-button-large:hover,
.disease-search-button-large:focus {
    background: #003f70 !important;
    border-color: #003f70 !important;
}

.disease-search-button:focus-visible,
.disease-search-button-large:focus-visible {
    outline: 3px solid #b9d8ea;
    outline-offset: 3px;
}

/* ==========================================================
   Results Area
   ========================================================== */

.disease-results-area,
.disease-results-full {
    width: 100%;
    min-width: 0;
    padding: 0;
    background: transparent;
}

/* ==========================================================
   Results Header
   ========================================================== */

.disease-results-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;

    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;

    background: #ffffff;

    border: 1px solid #cfe0ec;
    border-radius: 0 0 16px 16px;

    box-shadow: 0 10px 24px rgba(6, 28, 96, .08);
}

.disease-results-top>div {
    flex: 1;
}

.disease-results-top h3 {
    margin: 0 0 .2rem;

    color: var(--dph-h2-color);

    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
}

.disease-results-top p {
    margin: 0;
    color: #66717d;
    font-size: .85rem;
}

.disease-sort {
    display: flex;
    align-items: center;
    gap: .75rem;

    margin-left: auto;
}

.disease-sort span {
    white-space: nowrap;

    color: var(--dph-h3-color);

    font-size: .85rem;
    font-weight: 700;
}

.disease-sort select {
    min-width: 180px;
    height: 44px;
    padding: 0 .9rem;

    color: #24313a;
    background: #ffffff;

    border: 1px solid #c9d0d8;
    border-radius: 10px;

    font-size: .95rem;
}

.disease-sort select:focus {
    outline: none;
    border-color: var(--dph-blue-2);
    box-shadow: 0 0 0 3px rgba(58, 80, 148, .15);
}

/* ==========================================================
   Results List
   ========================================================== */

.disease-results-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;

    margin-top: 1.5rem;
    /*padding: .95rem;
    background: #f3f4f6;
    border: 1px solid #e1e5e9;
    border-radius: 18px;*/
}

/* ==========================================================
   Result Cards
   ========================================================== */

.disease-result-card {
    position: relative;

    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;

    min-width: 0;
    min-height: 100%;
    padding: 0;

    background: #ffffff;

    border: 1px solid #d8e2ea;
    border-radius: 16px;

    overflow: hidden;

    box-shadow: 0 8px 22px rgba(0, 63, 112, .07);

    transition:
        box-shadow .22s ease,
        border-color .22s ease;
}

.disease-result-card:hover {
    border-color: #b9d8ea;
    box-shadow: 0 14px 34px rgba(0, 63, 112, .14);
}

.disease-result-accent {
    position: relative;

    width: 56px;
    min-height: 100%;
    overflow: visible;

    background:
        linear-gradient(180deg,
            #0068b6 0%,
            #005a9c 55%,
            #00467b 100%);
}

.disease-result-accent::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg,
            rgba(255, 255, 255, .18),
            transparent 42%);
}

.disease-result-card:hover .disease-result-accent {
    background: var(--active-hover-gradient, var(--dph-other-hover));
}

.disease-result-main {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    padding: 1rem 1.25rem 1.15rem 0;
}

.disease-result-role {
    display: block;
    max-width: 100%;
    min-width: 100%;
    min-height: 0;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0.6rem 0 0;
    text-align: left;
    margin: 0.25rem 0 0.5rem 0;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.4;

    border-top: 1px dashed rgba(74, 93, 110, 0.25);
}

.disease-result-main h3 {
    position: relative;
    margin: 0 0 .25rem;
    color: #003f70;
    font-size: clamp(0.82rem, 2vw, 1.15rem);
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.disease-result-main h3::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -26px;
    width: 24px;
    height: 40px;
    background: var(--active-accent, #52616d);
    clip-path: polygon(0 0,
            100% 50%,
            0 100%);

    transform: translateY(-50%);
    transition:
        background .25s ease,
        transform .25s ease;
}

.disease-result-card:hover .disease-result-main h3::before {
    background: var(--active-hover-accent, #0063ad);
    transform: translateY(-50%) translateX(2px);
}

.disease-result-credentials {
    position: relative;
    display: inline-block;
    width: fit-content;
    margin: .35rem 0 .9rem;
    padding-bottom: .35rem;
    color: #4f6273;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.8; /*1.35*/
    letter-spacing: .02em;
}

/*.disease-result-credentials::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 52px;
    height: 2px;
    background: #d6a439;
    border-radius: 999px;
}*/

.disease-result-bio {
    margin-top: auto !important;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    color: #3f4a54;
    font-size: .96rem;
    line-height: 1.65;
}

.disease-result-action {
    display: flex;
    justify-content: flex-start;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #edf2f6;
}

.disease-profile-button {
    min-width: 140px;
    padding: .5rem 1rem;

    color: #ffffff;
    background: #003a54;

    border: 1px solid #003a54;
    border-radius: 10px;

    font-size: .85rem;
    font-weight: 800;
    text-align: center;

    cursor: pointer;

    transition:
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.disease-profile-button:hover,
.disease-profile-button:focus {
    color: #ffffff;
    background: #0f578b;
    border-color: #0f578b;

    box-shadow: 0 6px 14px rgba(0, 90, 156, .24);
}

.disease-profile-button:focus-visible {
    outline: 3px solid #b9d8ea;
    outline-offset: 3px;
}

/* ==========================================================
   Pagination
   ========================================================== */

.disease-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .75rem;
    width: max-content;
    max-width: 100%;

    margin: 2rem auto 0 auto !important;
    padding: .9rem 1.2rem;
    background: #ffffff;
    border: 1px solid #d6dbe2;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(6, 28, 96, .08);
}

/* New structured UL alignment parameters removing standard bullet styles */
.lineage-documents-pagination__list {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.lineage-documents-pagination__item {
    margin: 0;
    padding: 0;
}

/* Button layout handling your target lineage elements and legacy fallback buttons */
.pagination-btn,
.lineage-documents-pagination__button,
.disease-pagination button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;

    color: var(--dph-blue);
    background: #ffffff;

    border: 1px solid #ccd4dd;
    border-radius: 999px;

    font-size: .9rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

/* Uniform interaction states using your application theme parameters */
.pagination-btn:hover:not(:disabled),
.pagination-btn:focus:not(:disabled),
.lineage-documents-pagination__button:hover:not(:disabled),
.lineage-documents-pagination__button:focus:not(:disabled),
.disease-pagination button:hover:not(:disabled),
.disease-pagination button:focus:not(:disabled),
.pagination-number.is-active,
.pagination-btn.is-active {
    color: #ffffff;
    background: var(--dph-blue-2);
    border-color: var(--dph-blue-2);
}

/* Lift and soft shadow dropdown hover animations */
.pagination-btn:hover:not(:disabled),
.lineage-documents-pagination__button:hover:not(:disabled),
.disease-pagination button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(6, 28, 96, .12);
}

/* Disabled system ADA layout locks */
.pagination-btn:disabled,
.lineage-documents-pagination__button:disabled,
.disease-pagination button:disabled {
    color: #8a929d;
    background: #f1f2f4;
    border-color: #ccd4dd;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Micro-copy spacer rulesets */
.pagination-pages {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.pagination-ellipsis,
.disease-pagination span {
    padding: 0 .35rem;
    color: #6b7280;
    font-weight: 800;
}

/* ==========================================================
   Empty State
   ========================================================== */

.disease-empty-state {
    margin: 2rem auto 0;
    padding: 2rem;

    text-align: center;

    background: #f8fbfe;

    border: 1px dashed #b9d8ea;
    border-radius: 16px;
}

.disease-empty-state i {
    color: #005a9c;
    font-size: 2rem;
}

.disease-empty-state h3 {
    margin: .75rem 0 .35rem;

    color: #003f70;
}

.disease-empty-state p {
    margin: 0;

    color: #52616d;
}

/* ==========================================================
   disease Modal
   ========================================================== */

body.modal-open {
    overflow: hidden;
}

.disease-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.disease-modal.is-open {
    display: grid;
    place-items: center;
    padding: 1rem;
}

.disease-modal-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(0, 90, 156, .22), transparent 42%),
        rgba(8, 22, 35, .72);
    backdrop-filter: blur(4px);
}

/* Modal container */
.disease-modal-dialog {
    position: relative;
    z-index: 1;

    width: min(860px, 100%);
    max-height: calc(100vh - 2rem);

    display: flex;
    flex-direction: column;

    background: #fff;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .65);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .34);

    overflow: hidden;
}

/* Content automatically sizes to its contents */
.disease-modal-content {
    flex: 0 1 auto;
    padding: 1.75rem 2rem 2rem;

    overflow-y: auto;
}

.disease-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;

    width: 32px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #003f70;
    background: #ffffff;

    border: 1px solid #cfe0ec;
    border-radius: 999px;

    font-size: 1.85rem;
    line-height: 1;

    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 63, 112, .14);
    transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.disease-modal-close:hover,
.disease-modal-close:focus {
    color: #ffffff;
    background: #005a9c;
    box-shadow: 0 10px 24px rgba(0, 90, 156, .28);
    transform: translateY(-1px);
    outline: none;
}

.disease-modal-header {
    position: relative;
    padding: 2rem 4.75rem 1.75rem 2rem;

    background:
        linear-gradient(135deg, rgba(0, 90, 156, .08), rgba(0, 90, 156, .02)),
        linear-gradient(135deg, #f9fcff 0%, #eef7fc 100%);

    border-top: 7px solid #005a9c;
    border-bottom: 1px solid #d7e5ee;
}

.disease-modal-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;

    margin: 0 0 .85rem;
    padding: .4rem .7rem;

    color: #004f8c;
    background: #ffffff;

    border: 1px solid #cfe0ec;
    border-radius: 999px;

    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.disease-modal-label::before {
    content: "";
    width: .5rem;
    height: .5rem;
    background: #005a9c;
    border-radius: 999px;
}

.disease-modal-name {
    margin: 0;
    max-width: 18ch;

    color: #003f70;

    font-size: clamp(1.65rem, 4vw, 2.6rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.03em;
}

.disease-modal-credentials {
    position: relative;
    display: inline-block;
    margin: .7rem 0 0;
    padding-bottom: .65rem;
    color: #536675;

    font-size: .98rem;
    font-weight: 800;
    letter-spacing: .01em;
}

.disease-modal-credentials::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 52px;
    height: 2px;

    background: #d6a439;
    border-radius: 999px;
}

.disease-modal-role {
    display: inline-flex;
    align-items: center;

    margin: 1rem 0 0;
    padding: .5rem .75rem;

    color: #003f70;
    background: #ffffff;

    border-left: 5px solid #005a9c;
    border-radius: 8px;

    font-size: .9rem;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(0, 90, 156, .09);
}

.disease-modal-content {
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    padding: 1.75rem 2rem 2rem;
}

.disease-modal-bio {
    max-width: 78ch;
    margin: 0;

    color: #34424f;

    font-size: 1.03rem;
    line-height: 1.75;
}

.disease-modal-bio::first-line {
    color: #23313c;
    font-weight: 650;
}

/* ==========================================================
   Hero Action Bar
   ========================================================== */

.hero-action-bar .hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.hero-action-bar .hero-btn {
    flex: 0 1 320px;
    max-width: 320px;
    font-size: 1rem;
}

/* Hidden via JS */
.disease-results-list[hidden],
.disease-pagination[hidden] {
    display: none !important;
}

/* Desktop */
.pagination-icon {
    display: none;
}


/* ==========================================================
   Responsive
   ========================================================== */
@media (min-width: 769px) {
    .disease-read-more {
        display: none;
    }
}

@media (max-width: 768px) {

    .diseases-list {
        padding: 0 .95rem 2.5rem;
    }

    .disease-finder-hero {
        padding: 1.15rem;
    }

    .disease-finder-hero h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .disease-finder-hero p {
        font-size: .96rem;
        line-height: 1.6;
    }

    .disease-results-list {
        gap: .9rem;
        margin-top: 1rem;
        padding: .85rem;
        border-radius: 14px;
    }

    .disease-result-card {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 1rem;
        border-radius: 14px;
    }

    .disease-result-accent {
        width: 44px;
    }

    .disease-result-main {
        padding: 1rem 1rem 1rem 0;
    }

    .disease-result-main h3::before {
        left: -21px;
        width: 18px;
        height: 32px;
    }

    .disease-result-role {
        margin-bottom: .75rem;
        font-size: .68rem;
    }

    /* ======================================================
       Mobile Read More
       ====================================================== */

    .disease-result-bio {
        position: relative;

        overflow: hidden;

        font-size: .95rem;
        line-height: 1.65;
    }

    .disease-result-card.is-expanded .disease-result-bio {
        display: block;
        overflow: visible;
    }

    .disease-result-card:not(.is-expanded) .disease-result-bio::after {
        content: "";

        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;

        height: 2.2rem;

        background: linear-gradient(to bottom,
                rgb(255 255 255 / 0%),
                #ffffff 90%);

        pointer-events: none;
    }

    .disease-read-more {
        display: inline-flex;
        align-items: center;
        gap: .3rem;
        align-self: flex-start;
        margin-top: .75rem;
        padding: .35rem .75rem;

        color: #fff;
        background: var(--dph-blue);
        border: 0;
        border-radius: 999px;
        font-size: .78rem;
        font-weight: 800;
        line-height: 1;
        cursor: pointer;
        margin: 0 auto;
    }

    .disease-read-more:hover,
    .disease-read-more:focus {
        background: var(--dph-blue-2);
    }

    .disease-read-more::after {
        content: "\f107";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: .68rem;
    }

    .disease-result-card.is-expanded .disease-read-more::after {
        content: "\f106";
    }

    .disease-result-bio {
        display: block;
        max-height: 0em;
        /*6.6em*/
        overflow: hidden;

        transition:
            max-height .35s ease,
            opacity .25s ease;
    }

    .disease-result-card.is-expanded .disease-result-bio {
        max-height: 1000px;
        overflow: visible;
    }

    .disease-read-more {
        transition:
            background-color .2s ease,
            transform .2s ease;
    }

    .disease-result-card.is-expanded .disease-read-more {
        margin-top: .9rem;
    }

    .disease-read-more:hover {
        transform: translateY(-1px);
    }
}

@media (max-width: 600px) {

    .diseases-list {
        padding: 0 .75rem 2rem;
    }

    .disease-finder-hero {
        padding: 1rem;
        border-radius: 12px;
        border-bottom: 1px solid #d8e2ea;
    }

    .disease-finder-hero h2 {
        font-size: 1.45rem;
        line-height: 1.2;
    }

    .disease-finder-hero p {
        font-size: .94rem;
        line-height: 1.55;
    }

    .disease-results-list {
        padding: .75rem;
        background: #f6f7f9;
    }

    .disease-result-card {
        grid-template-columns: 1fr;
        gap: 0;
        border-top: 5px solid var(--card-accent, #005a9c);
    }

    .disease-result-accent {
        display: none;
    }

    .disease-result-main {
        padding: 1rem;
    }

    .disease-result-main h3::before {
        content: none;
    }

    .disease-result-main h3 {
        font-size: 1.2rem;
    }

    .disease-result-role {
        max-width: 100%;
        margin-bottom: .7rem;
        white-space: normal;
    }

    .disease-result-credentials {
        margin: .25rem 0 .7rem;
        font-size: .86rem;
    }

    .disease-result-bio {
        font-size: .93rem;
        line-height: 1.6;
    }

    .disease-pagination {
        width: unset;
        flex-wrap: wrap;
        gap: .5rem;
        padding: .75rem;
        border-radius: 16px;
    }

    .pagination-btn,
    .disease-pagination button {
        min-width: 28px;
        height: 28px;
        padding: 0 .425rem;
        font-size: .85rem;
    }
}

@media (max-width: 480px) {

    .disease-content-body {
        max-height: 80px;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
    }

    .diseases-list {
        padding: 0 .6rem 1.75rem;
    }

    .disease-finder-hero {
        padding: .9rem;
    }

    .disease-finder-hero h2 {
        font-size: 1.3rem;
    }

    .disease-finder-hero p {
        font-size: .9rem;
    }

    .disease-results-list {
        gap: .75rem;
        padding: .6rem;
        border-radius: 12px;
    }

    .disease-result-main {
        padding: .6rem;
    }

    .disease-result-main h3 {
        font-size: 1.12rem;
    }

    .disease-result-role {
        padding: .22rem .55rem;
        font-size: .75rem;
        line-height: 1.25;
    }

    .disease-result-credentials {
        font-size: .78rem;
    }

    .disease-result-credentials::after {
        width: 42px;
    }

    .disease-result-bio {
        font-size: .9rem;
        line-height: 1.55;
    }

    .pagination-text {
        display: none;
    }

    .pagination-icon {
        display: inline;
        font-size: 1.2rem;
        font-weight: 700;
        line-height: 1;
    }

    .pagination-btn:first-child,
    .pagination-btn:last-child {
        width: 40px;
        min-width: 40px;
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .disease-result-card,
    .pagination-btn,
    .disease-pagination button {
        transition: none;
    }

    .disease-result-card:hover,
    .pagination-btn:hover:not(:disabled),
    .disease-pagination button:hover:not(:disabled) {
        transform: none;
    }
}

/* ==========================================================
   disease Finder — Arabic and Farsi RTL Support
   Add at the END of the disease finder stylesheet
========================================================== */

/*
   :lang() works whether the language is placed on:
   - <html lang="ar">
   - <body lang="ar">
   - a translated parent element
   - .diseases-list itself
*/
.diseases-list:lang(ar),
.diseases-list:lang(fa),
.diseases-list[dir="rtl"],
[dir="rtl"] .diseases-list {
    direction: rtl;
    text-align: start;
}

/* Ensure all disease text follows the inherited RTL direction */
.diseases-list:lang(ar) :where(h1, h2, h3, h4, h5, h6,
    p, span, strong, label,
    button, input, select, option),
.diseases-list:lang(fa) :where(h1, h2, h3, h4, h5, h6,
    p, span, strong, label,
    button, input, select, option),
.diseases-list[dir="rtl"] :where(h1, h2, h3, h4, h5, h6,
    p, span, strong, label,
    button, input, select, option),
[dir="rtl"] .diseases-list :where(h1, h2, h3, h4, h5, h6,
    p, span, strong, label,
    button, input, select, option) {
    direction: rtl;
    text-align: start;
}

/* ==========================================================
   Hero
========================================================== */

.diseases-list:lang(ar) .disease-finder-hero,
.diseases-list:lang(fa) .disease-finder-hero,
.diseases-list[dir="rtl"] .disease-finder-hero,
[dir="rtl"] .diseases-list .disease-finder-hero {
    direction: rtl;
    text-align: right;
}

.diseases-list:lang(ar) .disease-finder-label,
.diseases-list:lang(fa) .disease-finder-label,
.diseases-list[dir="rtl"] .disease-finder-label,
[dir="rtl"] .diseases-list .disease-finder-label {
    letter-spacing: 0;
    text-transform: none;
}

/* ==========================================================
   Search
========================================================== */

.diseases-list:lang(ar) .disease-search-box input,
.diseases-list:lang(fa) .disease-search-box input,
.diseases-list[dir="rtl"] .disease-search-box input,
[dir="rtl"] .diseases-list .disease-search-box input {
    direction: rtl;
    text-align: right;

    /* Space for clear button on the left */
    padding-right: 1rem !important;
    padding-left: 3rem !important;
}

.diseases-list:lang(ar) .disease-search-clear,
.diseases-list:lang(fa) .disease-search-clear,
.diseases-list[dir="rtl"] .disease-search-clear,
[dir="rtl"] .diseases-list .disease-search-clear {
    right: auto !important;
    left: .65rem !important;
}

/* Keep search icon and label in a natural order */
.diseases-list:lang(ar) .disease-search-button,
.diseases-list:lang(ar) .disease-search-button-large,
.diseases-list:lang(fa) .disease-search-button,
.diseases-list:lang(fa) .disease-search-button-large,
.diseases-list[dir="rtl"] .disease-search-button,
.diseases-list[dir="rtl"] .disease-search-button-large,
[dir="rtl"] .diseases-list .disease-search-button,
[dir="rtl"] .diseases-list .disease-search-button-large {
    direction: rtl;
}

/* ==========================================================
   Results Header and Sort
========================================================== */

.diseases-list:lang(ar) .disease-results-top,
.diseases-list:lang(fa) .disease-results-top,
.diseases-list[dir="rtl"] .disease-results-top,
[dir="rtl"] .diseases-list .disease-results-top {
    direction: rtl;
    text-align: right;
}

.diseases-list:lang(ar) .disease-sort,
.diseases-list:lang(fa) .disease-sort,
.diseases-list[dir="rtl"] .disease-sort,
[dir="rtl"] .diseases-list .disease-sort {
    margin-right: auto;
    margin-left: 0;
}

.diseases-list:lang(ar) .disease-sort select,
.diseases-list:lang(fa) .disease-sort select,
.diseases-list[dir="rtl"] .disease-sort select,
[dir="rtl"] .diseases-list .disease-sort select {
    direction: rtl;
    text-align: right;
}

/* ==========================================================
   Result Cards
   Move the blue accent from left to right
========================================================== */

.diseases-list:lang(ar) .disease-result-card,
.diseases-list:lang(fa) .disease-result-card,
.diseases-list[dir="rtl"] .disease-result-card,
[dir="rtl"] .diseases-list .disease-result-card {
    direction: rtl;

    /* Main content first, accent second */
    grid-template-columns: minmax(0, 1fr) 56px;
}

/* Blue accent becomes the right column */
.diseases-list:lang(ar) .disease-result-accent,
.diseases-list:lang(fa) .disease-result-accent,
.diseases-list[dir="rtl"] .disease-result-accent,
[dir="rtl"] .diseases-list .disease-result-accent {
    grid-column: 2;
    grid-row: 1;
}

/* Reverse the accent highlight */
.diseases-list:lang(ar) .disease-result-accent::before,
.diseases-list:lang(fa) .disease-result-accent::before,
.diseases-list[dir="rtl"] .disease-result-accent::before,
[dir="rtl"] .diseases-list .disease-result-accent::before {
    background:
        linear-gradient(270deg,
            rgba(255, 255, 255, .18),
            transparent 42%);
}

/* Main content becomes the left grid column */
.diseases-list:lang(ar) .disease-result-main,
.diseases-list:lang(fa) .disease-result-main,
.diseases-list[dir="rtl"] .disease-result-main,
[dir="rtl"] .diseases-list .disease-result-main {
    grid-column: 1;
    grid-row: 1;

    direction: rtl;
    text-align: right;

    /* Reverse original right-side padding */
    padding: 1rem 0 1.15rem 1.25rem;
}

/* Keep role label aligned with the RTL starting edge */
.diseases-list:lang(ar) .disease-result-role,
.diseases-list:lang(fa) .disease-result-role,
.diseases-list[dir="rtl"] .disease-result-role,
[dir="rtl"] .diseases-list .disease-result-role {
    align-self: flex-start;
    text-align: center;
    letter-spacing: 0;
}

/* Move title arrow to the right side */
.diseases-list:lang(ar) .disease-result-main h3::before,
.diseases-list:lang(fa) .disease-result-main h3::before,
.diseases-list[dir="rtl"] .disease-result-main h3::before,
[dir="rtl"] .diseases-list .disease-result-main h3::before {
    left: auto;
    right: -26px;

    clip-path: polygon(100% 0,
            0 50%,
            100% 100%);
}

/* Reverse hover movement */
.diseases-list:lang(ar) .disease-result-card:hover .disease-result-main h3::before,
.diseases-list:lang(fa) .disease-result-card:hover .disease-result-main h3::before,
.diseases-list[dir="rtl"] .disease-result-card:hover .disease-result-main h3::before,
[dir="rtl"] .diseases-list .disease-result-card:hover .disease-result-main h3::before {
    transform: translateY(-50%) translateX(-2px);
}

/* Move gold credential underline to the right */
.diseases-list:lang(ar) .disease-result-credentials::after,
.diseases-list:lang(fa) .disease-result-credentials::after,
.diseases-list[dir="rtl"] .disease-result-credentials::after,
[dir="rtl"] .diseases-list .disease-result-credentials::after {
    right: 0;
    left: auto;
}

/* Profile button starts from the right */
.diseases-list:lang(ar) .disease-result-action,
.diseases-list:lang(fa) .disease-result-action,
.diseases-list[dir="rtl"] .disease-result-action,
[dir="rtl"] .diseases-list .disease-result-action {
    justify-content: flex-start;
}

/* ==========================================================
   Modal
========================================================== */

.diseases-list:lang(ar) .disease-modal,
.diseases-list:lang(fa) .disease-modal,
.diseases-list[dir="rtl"] .disease-modal,
[dir="rtl"] .disease-modal {
    direction: rtl;
    text-align: right;
}

/* Move close button to upper-left */
.diseases-list:lang(ar) .disease-modal-close,
.diseases-list:lang(fa) .disease-modal-close,
.diseases-list[dir="rtl"] .disease-modal-close,
[dir="rtl"] .disease-modal-close {
    right: auto;
    left: 1rem;
}

/* Reverse modal header spacing */
.diseases-list:lang(ar) .disease-modal-header,
.diseases-list:lang(fa) .disease-modal-header,
.diseases-list[dir="rtl"] .disease-modal-header,
[dir="rtl"] .disease-modal-header {
    padding: 2rem 2rem 1.75rem 4.75rem;
}

/* Gold underline on right */
.diseases-list:lang(ar) .disease-modal-credentials::after,
.diseases-list:lang(fa) .disease-modal-credentials::after,
.diseases-list[dir="rtl"] .disease-modal-credentials::after,
[dir="rtl"] .disease-modal-credentials::after {
    right: 0;
    left: auto;
}

/* Modal role border moves to right */
.diseases-list:lang(ar) .disease-modal-role,
.diseases-list:lang(fa) .disease-modal-role,
.diseases-list[dir="rtl"] .disease-modal-role,
[dir="rtl"] .disease-modal-role {
    border-left: 0;
    border-right: 5px solid #005a9c;
}

/* ==========================================================
   Pagination
========================================================== */

.diseases-list:lang(ar) .disease-pagination,
.diseases-list:lang(fa) .disease-pagination,
.diseases-list[dir="rtl"] .disease-pagination,
[dir="rtl"] .diseases-list .disease-pagination,
.diseases-list:lang(ar) .pagination-pages,
.diseases-list:lang(fa) .pagination-pages,
.diseases-list[dir="rtl"] .pagination-pages,
[dir="rtl"] .diseases-list .pagination-pages {
    direction: rtl;
}

/* ==========================================================
   Responsive RTL Overrides
========================================================== */

@media (max-width: 768px) {

    .diseases-list:lang(ar) .disease-result-card,
    .diseases-list:lang(fa) .disease-result-card,
    .diseases-list[dir="rtl"] .disease-result-card,
    [dir="rtl"] .diseases-list .disease-result-card {
        grid-template-columns: minmax(0, 1fr) 44px;
    }

    .diseases-list:lang(ar) .disease-result-main,
    .diseases-list:lang(fa) .disease-result-main,
    .diseases-list[dir="rtl"] .disease-result-main,
    [dir="rtl"] .diseases-list .disease-result-main {
        padding-right: 0;
        padding-left: 1rem;
    }
}

@media (max-width: 520px) {

    .diseases-list:lang(ar) .disease-result-main,
    .diseases-list:lang(fa) .disease-result-main,
    .diseases-list[dir="rtl"] .disease-result-main,
    [dir="rtl"] .diseases-list .disease-result-main {
        padding-right: 0;
        padding-left: .85rem;
    }

    .diseases-list:lang(ar) .disease-modal-header,
    .diseases-list:lang(fa) .disease-modal-header,
    .diseases-list[dir="rtl"] .disease-modal-header,
    [dir="rtl"] .disease-modal-header {
        padding-right: 1.25rem;
        padding-left: 3.75rem;
    }
}

/* ==========================================================
   RTL disease CARD CORRECTION
   Keep the grid physically LTR, while the content remains RTL.
   Add this at the absolute END of the CSS file.
========================================================== */

/* ----------------------------------------------------------
   Desktop and tablet
---------------------------------------------------------- */

.diseases-list:lang(ar) .disease-result-card,
.diseases-list:lang(fa) .disease-result-card,
.diseases-list[dir="rtl"] .disease-result-card,
[dir="rtl"] .diseases-list .disease-result-card {
    /*
       Important:
       Keep the grid itself LTR so column 1 remains physically
       left and column 2 remains physically right.
    */
    direction: ltr;

    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 1.25rem;
}

/* Main content remains RTL and occupies the left/main column */
.diseases-list:lang(ar) .disease-result-main,
.diseases-list:lang(fa) .disease-result-main,
.diseases-list[dir="rtl"] .disease-result-main,
[dir="rtl"] .diseases-list .disease-result-main {
    grid-column: 1;
    grid-row: 1;

    direction: rtl;
    text-align: right;

    padding:
        1rem 0 1.15rem 1.25rem;
}

/* Blue accent occupies the physical right column */
.diseases-list:lang(ar) .disease-result-accent,
.diseases-list:lang(fa) .disease-result-accent,
.diseases-list[dir="rtl"] .disease-result-accent,
[dir="rtl"] .diseases-list .disease-result-accent {
    grid-column: 2;
    grid-row: 1;

    position: relative;
    width: 56px;
    z-index: 2;
}

/* Reverse the subtle highlight inside the blue accent */
.diseases-list:lang(ar) .disease-result-accent::before,
.diseases-list:lang(fa) .disease-result-accent::before,
.diseases-list[dir="rtl"] .disease-result-accent::before,
[dir="rtl"] .diseases-list .disease-result-accent::before {
    background:
        linear-gradient(270deg,
            rgba(255, 255, 255, .18),
            transparent 42%);
}

.diseases-list:lang(ar) .disease-result-accent::after,
.diseases-list:lang(fa) .disease-result-accent::after,
.diseases-list[dir="rtl"] .disease-result-accent::after,
[dir="rtl"] .diseases-list .disease-result-accent::after {
    content: "";

    position: absolute;
    top: 62px;
    left: -18px;
    z-index: 4;

    width: 21px;
    height: 40px;

    background: #005a9c;

    clip-path: polygon(100% 0,
            0 50%,
            100% 100%);

    transition:
        background-color .25s ease,
        transform .25s ease;
}

.diseases-list:lang(ar) .disease-result-card:hover .disease-result-accent::after,
.diseases-list:lang(fa) .disease-result-card:hover .disease-result-accent::after,
.diseases-list[dir="rtl"] .disease-result-card:hover .disease-result-accent::after,
[dir="rtl"] .diseases-list .disease-result-card:hover .disease-result-accent::after {
    background: #0063ad;
    transform: translateX(-2px);
}

/*
   Disable the original title arrow in RTL.
   The new arrow is now attached to the accent bar.
*/
.diseases-list:lang(ar) .disease-result-main h3::before,
.diseases-list:lang(fa) .disease-result-main h3::before,
.diseases-list[dir="rtl"] .disease-result-main h3::before,
[dir="rtl"] .diseases-list .disease-result-main h3::before {
    content: none !important;
    display: none !important;
}

/* Role begins from the right side of the translated content */
.diseases-list:lang(ar) .disease-result-role,
.diseases-list:lang(fa) .disease-result-role,
.diseases-list[dir="rtl"] .disease-result-role,
[dir="rtl"] .diseases-list .disease-result-role {
    align-self: flex-start;
    direction: rtl;
    text-align: center;
}

/* Gold underline begins from the right */
.diseases-list:lang(ar) .disease-result-credentials::after,
.diseases-list:lang(fa) .disease-result-credentials::after,
.diseases-list[dir="rtl"] .disease-result-credentials::after,
[dir="rtl"] .diseases-list .disease-result-credentials::after {
    right: 0;
    left: auto;
}

/* ----------------------------------------------------------
   Tablet
---------------------------------------------------------- */

@media (max-width: 768px) {

    .diseases-list:lang(ar) .disease-result-card,
    .diseases-list:lang(fa) .disease-result-card,
    .diseases-list[dir="rtl"] .disease-result-card,
    [dir="rtl"] .diseases-list .disease-result-card {
        direction: ltr;
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 1rem;
    }

    .diseases-list:lang(ar) .disease-result-accent,
    .diseases-list:lang(fa) .disease-result-accent,
    .diseases-list[dir="rtl"] .disease-result-accent,
    [dir="rtl"] .diseases-list .disease-result-accent {
        width: 44px;
    }

    .diseases-list:lang(ar) .disease-result-main,
    .diseases-list:lang(fa) .disease-result-main,
    .diseases-list[dir="rtl"] .disease-result-main,
    [dir="rtl"] .diseases-list .disease-result-main {
        padding:
            1rem 0 1rem 1rem;
    }

    .diseases-list:lang(ar) .disease-result-accent::after,
    .diseases-list:lang(fa) .disease-result-accent::after,
    .diseases-list[dir="rtl"] .disease-result-accent::after,
    [dir="rtl"] .diseases-list .disease-result-accent::after {
        top: 58px;
        left: -17px;

        width: 18px;
        height: 32px;
    }
}

/* ----------------------------------------------------------
   Mobile
   Preserve the existing mobile design:
   no vertical accent and no arrow.
---------------------------------------------------------- */

@media (max-width: 600px) {

    .diseases-list:lang(ar) .disease-result-card,
    .diseases-list:lang(fa) .disease-result-card,
    .diseases-list[dir="rtl"] .disease-result-card,
    [dir="rtl"] .diseases-list .disease-result-card {
        grid-template-columns: 1fr;
        gap: 0;

        border-top: 5px solid #005a9c;
    }

    .diseases-list:lang(ar) .disease-result-accent,
    .diseases-list:lang(fa) .disease-result-accent,
    .diseases-list[dir="rtl"] .disease-result-accent,
    [dir="rtl"] .diseases-list .disease-result-accent {
        display: none;
    }

    .diseases-list:lang(ar) .disease-result-main,
    .diseases-list:lang(fa) .disease-result-main,
    .diseases-list[dir="rtl"] .disease-result-main,
    [dir="rtl"] .diseases-list .disease-result-main {
        grid-column: 1;
        padding: 1rem;

        direction: rtl;
        text-align: right;
    }
}

/* ==========================================================
   Prevent Horizontal Overflow in Arabic and Farsi
========================================================== */

/* Prevent the document from becoming wider than the viewport */
html:lang(ar),
html:lang(fa),
html[dir="rtl"] {
    max-width: 100%;
    overflow-x: clip;
}

/* Fallback for browsers that do not fully support overflow: clip */
@supports not (overflow: clip) {

    html:lang(ar),
    html:lang(fa),
    html[dir="rtl"] {
        overflow-x: hidden;
    }
}

html:lang(ar) body,
html:lang(fa) body,
html[dir="rtl"] body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

/* Make all major disease containers shrink correctly */
.diseases-list:lang(ar),
.diseases-list:lang(fa),
.diseases-list[dir="rtl"],
[dir="rtl"] .diseases-list,
.diseases-list:lang(ar) .disease-finder,
.diseases-list:lang(fa) .disease-finder,
.diseases-list[dir="rtl"] .disease-finder,
[dir="rtl"] .diseases-list .disease-finder,
.diseases-list:lang(ar) .disease-finder-hero,
.diseases-list:lang(fa) .disease-finder-hero,
.diseases-list[dir="rtl"] .disease-finder-hero,
[dir="rtl"] .diseases-list .disease-finder-hero,
.diseases-list:lang(ar) .disease-results-area,
.diseases-list:lang(fa) .disease-results-area,
.diseases-list[dir="rtl"] .disease-results-area,
[dir="rtl"] .diseases-list .disease-results-area,
.diseases-list:lang(ar) .disease-results-list,
.diseases-list:lang(fa) .disease-results-list,
.diseases-list[dir="rtl"] .disease-results-list,
[dir="rtl"] .diseases-list .disease-results-list,
.diseases-list:lang(ar) .disease-result-card,
.diseases-list:lang(fa) .disease-result-card,
.diseases-list[dir="rtl"] .disease-result-card,
[dir="rtl"] .diseases-list .disease-result-card,
.diseases-list:lang(ar) .disease-result-main,
.diseases-list:lang(fa) .disease-result-main,
.diseases-list[dir="rtl"] .disease-result-main,
[dir="rtl"] .diseases-list .disease-result-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Allow translated content to wrap instead of expanding the page */
.diseases-list:lang(ar) :where(h1, h2, h3, h4, h5, h6,
    p, span, strong, a, button,
    label, li, div),
.diseases-list:lang(fa) :where(h1, h2, h3, h4, h5, h6,
    p, span, strong, a, button,
    label, li, div),
.diseases-list[dir="rtl"] :where(h1, h2, h3, h4, h5, h6,
    p, span, strong, a, button,
    label, li, div),
[dir="rtl"] .diseases-list :where(h1, h2, h3, h4, h5, h6,
    p, span, strong, a, button,
    label, li, div) {
    max-width: 100%;
    min-width: 0;

    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Prevent the role pill from forcing excess width */
.diseases-list:lang(ar) .disease-result-role,
.diseases-list:lang(fa) .disease-result-role,
.diseases-list[dir="rtl"] .disease-result-role,
[dir="rtl"] .diseases-list .disease-result-role {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
}

/* Keep the search and result controls inside their containers */
.diseases-list:lang(ar) .disease-finder-search,
.diseases-list:lang(fa) .disease-finder-search,
.diseases-list[dir="rtl"] .disease-finder-search,
[dir="rtl"] .diseases-list .disease-finder-search,
.diseases-list:lang(ar) .disease-results-top,
.diseases-list:lang(fa) .disease-results-top,
.diseases-list[dir="rtl"] .disease-results-top,
[dir="rtl"] .diseases-list .disease-results-top {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.diseases-list:lang(ar) .disease-sort,
.diseases-list:lang(fa) .disease-sort,
.diseases-list[dir="rtl"] .disease-sort,
[dir="rtl"] .diseases-list .disease-sort {
    min-width: 0;
    flex-wrap: wrap;
}

.diseases-list:lang(ar) .disease-sort select,
.diseases-list:lang(fa) .disease-sort select,
.diseases-list[dir="rtl"] .disease-sort select,
[dir="rtl"] .diseases-list .disease-sort select {
    max-width: 100%;
}

.diseases-list:lang(ar) .disease-result-card,
.diseases-list:lang(fa) .disease-result-card,
.diseases-list[dir="rtl"] .disease-result-card,
[dir="rtl"] .diseases-list .disease-result-card {
    overflow: hidden;
}

@media (max-width: 768px) {

    .diseases-list:lang(ar),
    .diseases-list:lang(fa),
    .diseases-list[dir="rtl"],
    [dir="rtl"] .diseases-list {
        padding-inline: .95rem;
    }

    .diseases-list:lang(ar) .disease-results-list,
    .diseases-list:lang(fa) .disease-results-list,
    .diseases-list[dir="rtl"] .disease-results-list,
    [dir="rtl"] .diseases-list .disease-results-list {
        padding-inline: .85rem;
    }
}

@media (max-width: 600px) {

    .diseases-list:lang(ar),
    .diseases-list:lang(fa),
    .diseases-list[dir="rtl"],
    [dir="rtl"] .diseases-list {
        padding-inline: .75rem;
    }

    .diseases-list:lang(ar) .disease-results-list,
    .diseases-list:lang(fa) .disease-results-list,
    .diseases-list[dir="rtl"] .disease-results-list,
    [dir="rtl"] .diseases-list .disease-results-list {
        padding-inline: .75rem;
    }
}

.diseases-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    max-width: 800px;
    margin: 2rem auto;
    padding: 2.5rem 2rem;

    background-color: #fff8f8;
    border: 1px solid #f8d7da;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.05);
}

.diseases-error::before {
    content: "\f071";
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
    font-weight: 900;
    color: #dc3545;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1;
    display: inline-block;
}

.diseases-error h2 {
    margin: 0 0 0.75rem 0;
    color: #842029;
    font-size: clamp(1.25rem, 4vw, 1.6rem);
    font-weight: 700;
    line-height: 1.3;
}

.diseases-error p {
    margin: 0;
    color: #664d03;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

.diseases-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    width: 100%;
    min-height: 250px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
    box-sizing: border-box;
}

.diseases-loading .fa-spinner {
    font-size: 2.5rem;
    color: var(--ph-blue, #005a9c);
    opacity: 0.85;
}

.diseases-loading span {
    font-size: 1.05rem;
    font-weight: 500;
    color: #555555;
    letter-spacing: 0.01em;

    animation: loadingPulse 1.8s ease-in-out infinite;
}


@keyframes loadingPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}


.align-credentials {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.phone-icon-color {
    font-size: 3rem;
}

#diseases-results-list,
.diseases-results-list {
    display: grid !important;

    grid-template-columns: 1fr;
    /*repeat(auto-fit, minmax(300px, 1fr)) !important;*/

    /* Gaps between row blocks and column blocks */
    gap: 1.5rem !important;
    width: 100% !important;
    max-width: 1000px !important;
    margin: 1.5rem auto !important;
    box-sizing: border-box !important;
}

@media (max-width: 1100px) and (min-width: 769px) {

    #diseases-results-list,
    .diseases-results-list {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

.directory-controls-row {
    display: flex;
    align-items: stretch;
    gap: 16px;
    max-width: 1000px;
    /*margin: 0 auto 1.5rem auto;*/
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
    width: 100%;
}

.search-box-wrapper {
    flex: 1;
    min-width: 0;
}

.search-box-wrapper input {
    width: 100%;
    height: 100%;
    min-height: 46px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #0369a1 !important;
    border-radius: 8px;
    box-sizing: border-box;
}

.custom-dropdown-container {
    position: relative;
    flex: 0 1 320px;
    min-width: 0;
    width: 100%;
}

.directory-controls-row input[type="text"] {
    color: #0369a1 !important;
}

#disease-search-input::placeholder {
    color: #0369a1 !important;
}

.dropdown-trigger-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: 46px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    color: #0369a1;
    background-color: #ffffff;
    border: 1px solid #0369a1;
    border-radius: 8px;
    cursor: pointer;
    box-sizing: border-box;
}

.dropdown-trigger-btn .trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-menu-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 9999;

    width: 100%;
    max-height: 320px;
    margin: 0;
    padding: 6px 0;
    list-style: none;

    background-color: #ffffff;
    border: 1px solid #bbbbbb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    box-sizing: border-box;
    display: none;
}

.dropdown-menu-list.is-open {
    display: block !important;
}

.dropdown-menu-item {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #444444;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1.4;
    white-space: normal !important;
    word-break: break-word !important;
    font-weight: 600;
}

.dropdown-menu-item:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.dropdown-menu-item:hover {
    background-color: #f1f3f5;
    color: #000000;
}

.dropdown-menu-item.reset-item {
    font-weight: 700;
    color: var(--ph-blue, #005a9c);
    border-bottom: 1px solid #eeeeee;
}

.dropdown-trigger-btn .trigger-icon {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-block;
    color: #0369a1;
}

.dropdown-trigger-btn[aria-expanded="true"] .trigger-icon {
    transform: rotate(180deg) !important;
    color: var(--ph-blue, #005a9c);
}


@media (max-width: 576px) {
    .directory-controls-row {
        flex-direction: column !important;
        gap: 0px !important;
    }

    .custom-dropdown-container {
        flex: 1 1 auto !important;
        width: 100% !important;
    }
}

.diseases-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    width: 100%;
    grid-column: 1 / -1;
    min-height: 300px;
    padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 3vw, 2rem); 
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    box-sizing: border-box;
}

.diseases-no-results .fa-magnifying-glass {
    font-size: clamp(2rem, 8vw, 3rem);
    color: #6c757d;
    margin-bottom: 1.25rem;
    opacity: 0.7;
}

.diseases-no-results h3 {
    margin: 0 0 0.5rem 0;
    font-size: clamp(1.15rem, 5vw, 1.4rem); 
    color: #333333;
    font-weight: 700;
}

.diseases-no-results p {
    margin: 0 0 1.5rem 0;
    max-width: 100%; 
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    color: #666666;
    line-height: 1.5;
}


@media (max-width: 480px) {
    .diseases-no-results {
        min-height: 250px;
    }
    .diseases-no-results p {
        max-width: 280px;
    }
}

.reset-directory-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--ph-blue, #005a9c);
    border: 1px solid var(--ph-blue, #005a9c);
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.reset-directory-btn:hover {
    background-color: var(--ph-dark-blue, #003a66);
    border-color: var(--ph-dark-blue, #003a66);
}

.reset-directory-btn:active {
    transform: scale(0.98);
}

.custom-dropdown-container {
    flex: 0 0 280px;
}


.legal-requirement-badge {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.5rem 0;
    padding: 0.5rem 0.7rem;
    background-color: rgba(0, 90, 156, 0.04);
    border-left: 3px solid var(--ph-blue, #005a9c);
    border-radius: 0 4px 4px 0;
}

.legal-badge-icon {
    margin-top: 0.15rem;
    font-size: 0.85rem;
    color: var(--ph-blue, #005a9c);
    flex-shrink: 0;
}

.legal-badge-text {
    margin: 0 !important;
    font-size: 0.7rem;
    line-height: 1.4;
    color: #333333;
}

.legal-code-highlight {
    font-weight: 600;
    padding: 0.05rem 0.25rem;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    white-space: wrap;
    transition: all 0.2s ease-in-out;
}

span.legal-code-highlight {
    color: #111111;
    background-color: rgba(0, 0, 0, 0.03);
}

a.legal-code-highlight {
    color: var(--ph-blue, #005a9c);
    background-color: rgba(0, 90, 156, 0.06);
    background-image: none !important;
    border-color: rgba(0, 90, 156, 0.15);
    text-decoration: none;
    display: inline-block;
}

a.legal-code-highlight:hover {
    color: #ffffff !important;
    background-color: var(--ph-blue, #005a9c) !important;
    border-color: var(--ph-blue, #005a9c) !important;
    box-shadow: 0 2px 4px rgba(0, 90, 156, 0.15) !important;
    text-decoration: none !important;
}

.jurisdiction-notice-block {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0.3rem 0;
    padding: 0.5rem 0.75rem;
    background-color: rgba(108, 117, 125, 0.05);
    border-left: 3px solid #495057;
    border-radius: 0 4px 4px 0;
}

.jurisdiction-icon {
    margin-top: 0.2rem;
    font-size: 0.85rem;
    color: #495057;
    flex-shrink: 0;
}

.jurisdiction-text {
    margin: 0 !important;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #212529;
}

.jurisdiction-text strong {
    color: #111111;
    font-weight: 700;
    margin-right: 0.15rem;
}

.additional-instructions-block {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0.5rem 0 0 0;
    padding: 0.5rem 0.75rem;
    background-color: rgba(108, 117, 125, 0.05);
    border-left: 3px solid #495057;
    border-radius: 0 4px 4px 0;
}

.additional-instructions-icon {
    margin-top: 0.2rem;
    font-size: 0.85rem;
    color: #495057;
    flex-shrink: 0;
}

.additional-instructions-text {
    margin: 0 !important;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #212529;
}

.additional-instructions-text strong {
    color: #111111;
    font-weight: 700;
    margin-right: 0.15rem;
}

.disease-result-subname {
    display: block;
    color: #4a5d6e;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
    margin: 0.2rem 0 0.2rem 0;
    /*padding-bottom: 0.2rem;
    border-bottom: 1px dashed rgba(74, 93, 110, 0.25);*/
}

@media (max-width: 768px) {

    #diseases-results-list,
    .diseases-results-list {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* Ensure the card main body context handles the anchor position */
.disease-result-main {
    position: relative;
}

/* Badge styling anchored to top right */
.when-to-report-badge {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-bottom-left-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #e5e7eb;
}

.when-to-report-badge i {
    color: var(--active-accent);
    font-size: 0.85rem;
}

/* Base desktop fallback behavior: Targets h3 when preceded by a badge inside the main area */
.disease-result-main .when-to-report-badge+h3.dynamic-margin-title {
    margin-top: 1.5rem !important;
    /* Matches 1-line desktop baseline */
}

/* Match the exact JS length thresholds on Desktop screens (> 876px) */
@media (min-width: 877px) {
    .disease-result-main .when-to-report-badge+h3[data-desktop-margin="0rem"] {
        margin-top: 0rem !important;
    }

    .disease-result-main .when-to-report-badge+h3[data-desktop-margin="1.5rem"] {
        margin-top: 1.5rem !important;
    }

    .disease-result-main .when-to-report-badge+h3[data-desktop-margin="3.0rem"] {
        margin-top: 3.0rem !important;
    }

    .disease-result-main .when-to-report-badge+h3[data-desktop-margin="3.5rem"] {
        margin-top: 3.5rem !important;
    }

    /* Updated from 4.5rem to 3.5rem */
}

/* Medium layout monitors: handles tablet view compression (876px to 481px) */
@media (max-width: 876px) and (min-width: 481px) {
    .disease-result-main .when-to-report-badge+h3.dynamic-margin-title {
        margin-top: 3.5rem !important;
        /* Matches 1-line tablet baseline */
    }

    .disease-result-main .when-to-report-badge+h3[data-tablet-margin="0rem"] {
        margin-top: 0rem !important;
    }

    .disease-result-main .when-to-report-badge+h3[data-tablet-margin="3.5rem"] {
        margin-top: 3.5rem !important;
    }

    /* Updated from 6.5rem to 3.5rem */
    .disease-result-main .when-to-report-badge+h3[data-tablet-margin="5.5rem"] {
        margin-top: 5.5rem !important;
    }
}

@media(max-width: 768px) {
    .disease-result-main h3 {
        font-size: 1.2rem;
    }

    .disease-result-subname {
        font-size: 0.85rem;
    }
}

/* Mobile Breakpoint layout safety reset */
@media (max-width: 480px) {
    .disease-result-main h3.dynamic-margin-title {
        padding-right: 0 !important;
    }

    .disease-result-main .when-to-report-badge {
        position: static;
        margin-bottom: 8px;
        display: inline-flex;
    }

    /* Force margin off completely on phones since the badge wraps into standard text flow */
    .disease-result-main .when-to-report-badge+h3.dynamic-margin-title {
        margin-top: 0 !important;
    }
}

/* --- Targeted FontAwesome Layout Modifier Overrides --- */
.phone-icon-color.icon-size-large {
    font-size: 3rem !important;
    width: 80px !important;
}

.phone-icon-color.icon-size-small {
    font-size: 1rem !important;
    width: 16px !important;
}

.additional-instructions-text a.inline-link {
    color: var(--active-accent);
    display: inline-block;
    text-decoration: underline;
    text-decoration-color: var(--ph-gold);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    font-weight: 700;
}

.additional-instructions-text a.inline-link:hover,
.additional-instructions-text a.inline-link:focus {
    color: var(--ph-dark-blue);
    text-decoration-thickness: 2px;
}

/* ==========================================================
   CalREDIE Preferred Reporting Method
   Uses the current disease card color
   ========================================================== */

.calredie-preferred-reporting {
  display: flex;
  align-items: center;
  gap: 0.9rem;

  width: 100%;
  margin: 0.75rem 0;
  padding: 0.9rem 1rem;

  /*
   * IMPORTANT:
   * Follow the current disease card color instead
   * of always using blue.
   */
  background-color: var(--active-accent);
  color: #ffffff;

  border-radius: 8px;
  box-sizing: border-box;
}


/* ==========================================================
   Desktop Icon
   ========================================================== */

.calredie-preferred-reporting__icon {
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 52px;
  width: 52px;
  height: 52px;

  color: #ffffff;

  font-size: 1.55rem;

  background-color: rgba(
    255,
    255,
    255,
    0.16
  );

  border-radius: 8px;
}


/* ==========================================================
   Text Area
   ========================================================== */

.calredie-preferred-reporting__content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;

  flex: 1 1 auto;
  min-width: 0;
}


/* ==========================================================
   Preferred Label
   ========================================================== */

.calredie-preferred-reporting__label {
  display: block;

  color: #ffffff;

  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;

  text-transform: uppercase;
  letter-spacing: 0.04em;

  opacity: 0.92;
}


/* ==========================================================
   Main CalREDIE Text
   ========================================================== */

.calredie-preferred-reporting__text {
  color: #ffffff;

  font-size: clamp(
    1.05rem,
    1rem + 0.35vw,
    1.25rem
  );

  font-weight: 700;
  line-height: 1.45;

  overflow-wrap: anywhere;
}


/* ==========================================================
   Links
   ========================================================== */

.calredie-preferred-reporting__text a,
.calredie-preferred-reporting__text .inline-link {
  color: #ffffff !important;

  font-weight: 800;

  text-decoration: underline !important;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}


.calredie-preferred-reporting__text a:hover,
.calredie-preferred-reporting__text .inline-link:hover {
  color: #ffffff !important;

  text-decoration-thickness: 3px;
}


.calredie-preferred-reporting__text a:focus-visible,
.calredie-preferred-reporting__text .inline-link:focus-visible {
  color: #ffffff !important;

  outline: 3px solid #ffffff;
  outline-offset: 3px;

  border-radius: 2px;
}


/* ==========================================================
   Tablet
   ========================================================== */

@media (max-width: 768px) {

  .calredie-preferred-reporting {
    gap: 0.75rem;

    padding: 0.8rem 0.9rem;
  }


  .calredie-preferred-reporting__icon {
    flex: 0 0 44px;

    width: 44px;
    height: 44px;

    font-size: 1.35rem;
  }


  .calredie-preferred-reporting__text {
    font-size: 1.05rem;
  }

}


/* ==========================================================
   Small Mobile
   ========================================================== */

@media (max-width: 480px) {

  .calredie-preferred-reporting {
    align-items: flex-start;

    gap: 0.65rem;

    padding: 0.75rem;

    border-radius: 7px;
  }


  .calredie-preferred-reporting__icon {
    flex: 0 0 38px;

    width: 38px;
    height: 38px;

    font-size: 1.15rem;
  }


  .calredie-preferred-reporting__label {
    font-size: 0.68rem;
  }


  .calredie-preferred-reporting__text {
    font-size: 1rem;
    line-height: 1.4;
  }

}

/* ==========================================================
   Alternate Reporting Methods
   Uses the current disease card color
   ========================================================== */

.disease-result-card .alternate-reporting-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;

  width: fit-content;
  max-width: 100%;

  margin: 1rem 0 0.55rem;
  padding: 0.45rem 0.75rem;

  background-color: color-mix(
    in srgb,
    var(--active-accent) 12%,
    #ffffff
  );

  color: var(--active-accent);

  border-left: 4px solid var(--active-accent);
  border-radius: 5px;

  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.01em;

  box-sizing: border-box;
}


/* Alternate heading icon */
.disease-result-card
.alternate-reporting-heading
i {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  color: var(--active-accent);

  font-size: 0.9rem;
  line-height: 1;
}


/* Alternate heading text */
.disease-result-card
.alternate-reporting-heading
span {
  color: var(--active-accent);

  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}


/* ==========================================================
   Alternate Reporting Rows
   Keep original white/background appearance
   ========================================================== */

.disease-result-card
.reporting-channels-group--alternate {
  padding: 0;
  margin-bottom: 0.5rem;

  background: transparent;

  border: 0;
  border-radius: 0;
}


/* Do not add backgrounds to individual methods */
.disease-result-card
.reporting-channels-group--alternate
.disease-result-credentials {
  background: transparent;
}


/* ==========================================================
   Tablet
   ========================================================== */

@media (max-width: 768px) {

  .disease-result-card
  .alternate-reporting-heading {
    gap: 0.4rem;

    margin-top: 0.85rem;
    margin-bottom: 0.5rem;

    padding: 0.4rem 0.65rem;

    font-size: 0.83rem;
  }

  .disease-result-card
  .alternate-reporting-heading
  i {
    font-size: 0.86rem;
  }

}


/* ==========================================================
   Small Mobile
   ========================================================== */

@media (max-width: 480px) {

  .disease-result-card
  .alternate-reporting-heading {
    gap: 0.38rem;

    margin-top: 0.75rem;
    margin-bottom: 0.45rem;

    padding: 0.38rem 0.6rem;

    font-size: 0.8rem;

    border-left-width: 3px;
  }

  .disease-result-card
  .alternate-reporting-heading
  i {
    font-size: 0.82rem;
  }

}