/* ------------------------------------------------------------------ */
/* Contact Us · News & Updates · News article · Profile                 */
/*                                                                      */
/* Four pages that share the same furniture, so they share one sheet    */
/* and cannot drift apart. Components are the site's own: bordered      */
/* white cards, pill tabs, red CTAs, navy headings with a red accent.   */
/* Logical properties throughout, so Arabic mirrors on its own.         */
/* ------------------------------------------------------------------ */

/* A label that only a screen reader reads — Bootstrap ships one, but it
   arrives from a CDN. */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Bootstrap's reboot normally supplies this and arrives from a CDN, so a
   padded card with a set width overflows without it. */
.page-section,
.page-section *,
.page-section *::before,
.page-section *::after {
    box-sizing: border-box;
}

.page-section {
    padding: clamp(34px, 3.4vw, 62px) 0 var(--section-gap);
}

    /* One word never leaves the shared gradient's navy end, so the accent is a
   flat maroon. */
    .page-section .accent {
        color: var(--accent);
    }

    .page-section .card-surface {
        border: 1px solid #E7E9F1;
        border-radius: 16px;
        background: var(--white);
    }

/* ---- Contact Us -------------------------------------------------------- */

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
    gap: clamp(20px, 2.4vw, 46px);
    align-items: start;
}

.contact-intro {
    margin: clamp(12px, 1.2vw, 20px) 0 clamp(22px, 2.2vw, 40px);
    max-width: 60ch;
    font-size: clamp(14px, .95vw, 16px);
    line-height: 1.75;
    color: var(--text-soft);
}

.contact-details {
    display: grid;
    gap: clamp(12px, 1.2vw, 20px);
    margin: 0 0 clamp(18px, 1.8vw, 32px);
    padding: 0;
    list-style: none;
}

    .contact-details li {
        display: flex;
        align-items: center;
        gap: clamp(10px, 1vw, 16px);
        font-size: clamp(12px, .95vw, 16px);
        color: var(--navy);
    }

    .contact-details i {
        flex-shrink: 0;
        display: grid;
        place-items: center;
        width: clamp(30px, 2.4vw, 40px);
        height: clamp(30px, 2.4vw, 40px);
        border: 1px solid #DDE0EA;
        border-radius: 50%;
        font-size: .85em;
        color: var(--navy);
    }

    .contact-details a {
        color: inherit;
        text-decoration: none;
    }

        .contact-details a:hover {
            color: var(--accent);
        }

/* A picture of the area rather than an embedded map: an iframe would pull a
   third-party script into every page load. Swap in the embed when there is
   a key for it. */
.contact-map {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    background: #F1F1F5;
    object-fit: cover;
}

/* The same two-column field grid intl.css gives its own forms. The class is
   not reused, because intl.js binds a submit handler to every `.intl-form`
   and resets it — this form has a handler of its own in pages.js, and the
   two fought over the same fields. */
.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 1.15vw, 20px);
}

    .contact-form .intl-field--wide,
    .contact-form .intl-consent,
    .contact-form .btn-submit,
    .contact-form .intl-form__status {
        grid-column: 1 / -1;
    }

@media (max-width: 575.98px) {
    .contact-form {
        grid-template-columns: 1fr;
    }
}

/* ---- News & Updates ----------------------------------------------------- */

.news-featured {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 1.5vw, 26px);
}

/* The whole card is the link, so the title does not need its own hit area
   and the image is free to be decorative. */
.news-hero {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    color: var(--white);
    text-decoration: none;
}

    .news-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .news-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(20, 28, 56, .05) 35%, rgba(20, 28, 56, .85) 100%);
    }

.news-hero__body {
    position: absolute;
    inset-inline: clamp(14px, 1.4vw, 26px);
    bottom: clamp(14px, 1.4vw, 26px);
    z-index: 1;
}

    .news-hero__body h3 {
        margin: 0;
        font-size: clamp(15px, 1.35vw, 25px);
        font-weight: 700;
        line-height: 1.3;
        color: var(--white);
    }

    .news-hero__body p {
        margin: clamp(7px, .7vw, 12px) 0 0;
        max-width: 52ch;
        font-size: clamp(11px, .85vw, 14px);
        line-height: 1.6;
        color: rgba(255, 255, 255, .88);
    }

.news-badge {
    position: absolute;
    inset-inline-start: clamp(14px, 1.4vw, 26px);
    top: clamp(14px, 1.4vw, 26px);
    z-index: 1;
    padding: 4px 11px;
    border-radius: 6px;
    background: #4FA8E8;
    font-size: clamp(9px, .7vw, 12px);
    font-weight: 500;
    color: var(--white);
}

.news-badge--dark {
    background: rgba(20, 28, 56, .78);
}

.news-badge--green {
    background: #1a906e;
}

.news-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: clamp(10px, .78vw, 13px);
    color: var(--text-soft);
}

.news-hero__body .news-date {
    margin-top: clamp(9px, .9vw, 15px);
    color: rgba(255, 255, 255, .85);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 1.3vw, 24px);
    margin: clamp(14px, 1.5vw, 26px) 0 0;
    padding: 0;
    list-style: none;
}

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #EDEFF5;
    border-radius: 14px;
    background: var(--white);
    overflow: hidden;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
}

    .news-card:hover {
        border-color: #DDE1EC;
        box-shadow: 0 6px 20px rgba(31, 49, 99, .07);
    }

/* The box owns the height and the photo is taken out of the flow inside it,
   so an image with an unusual intrinsic ratio cannot push the box taller.
   With the image left in flow its `height: 100%` did not always resolve, it
   fell back to its own height, and two of the eight cards came out with a
   photo 100px deeper than the rest. */
.news-card__media {
    position: relative;
    flex-shrink: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

    .news-card__media img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.news-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: clamp(12px, 1.2vw, 20px);
}

    .news-card__body h3 {
        margin: 0 0 clamp(10px, 1vw, 18px);
        font-size: clamp(12px, 1vw, 18px);
        font-weight: 500;
        line-height: 1.45;
        color: var(--navy);
    }

    .news-card__body .news-date {
        margin-top: auto;
        padding-block-start: clamp(9px, .9vw, 15px);
        border-block-start: 1px solid #EDEFF5;
    }

/* ---- the newsletter call to action -------------------------------------- */

.news-cta {
    max-width: 720px;
    margin: clamp(30px, 3.2vw, 58px) auto 0;
    padding: clamp(22px, 2.4vw, 44px);
    border: 1px solid #E7E9F1;
    border-radius: 18px;
    background: var(--white);
    text-align: center;
}

.news-cta__icon {
    font-size: clamp(19px, 1.6vw, 29px);
    color: var(--navy);
}

.news-cta h2 {
    margin: clamp(10px, 1vw, 18px) 0 clamp(9px, .9vw, 15px);
    font-size: clamp(19px, 1.8vw, 34px);
    font-weight: 700;
    color: var(--navy);
}

.news-cta p {
    margin: 0 auto clamp(16px, 1.7vw, 30px);
    max-width: 46ch;
    font-size: clamp(12px, .95vw, 16px);
    line-height: 1.7;
    color: var(--text-soft);
}

/* ---- the news article ---------------------------------------------------- */

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(220px, 21vw, 300px);
    gap: clamp(20px, 2.2vw, 42px);
    align-items: start;
}

/* A second, quieter breadcrumb above the article itself — the hero already
   carries the page-level one. */
.crumb-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 clamp(14px, 1.4vw, 24px);
    padding: 0;
    list-style: none;
    font-size: clamp(10px, .78vw, 13px);
    color: var(--text-soft);
}

    .crumb-line a {
        color: inherit;
        text-decoration: none;
    }

        .crumb-line a:hover {
            color: var(--accent);
        }

    .crumb-line li + li::before {
        content: "›";
        margin-inline-end: 8px;
    }

.pill-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    background: #0E6B5E;
    font-size: clamp(9px, .72vw, 12px);
    font-weight: 500;
    color: var(--white);
}

.article-title {
    margin: clamp(12px, 1.2vw, 20px) 0 0;
    max-width: 26ch;
    font-size: clamp(22px, 2.1vw, 40px);
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
}

.article-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: clamp(12px, 1.2vw, 22px);
    margin: clamp(16px, 1.6vw, 28px) 0;
    padding-block: clamp(12px, 1.2vw, 20px);
    border-block: 1px solid #EDEFF5;
}

.article-bar__meta {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(12px, 1.3vw, 24px);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: clamp(10px, .82vw, 14px);
    color: var(--text-soft);
}

    .article-bar__meta li {
        display: inline-flex;
        align-items: center;
        gap: 7px;
    }

.share-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(10px, .8vw, 13px);
    color: var(--text-soft);
}

    .share-row a {
        display: grid;
        place-items: center;
        width: clamp(26px, 2.1vw, 34px);
        height: clamp(26px, 2.1vw, 34px);
        border-radius: 50%;
        background: var(--navy);
        font-size: clamp(10px, .78vw, 13px);
        color: var(--white);
        text-decoration: none;
        transition: opacity .2s;
    }

        .share-row a:hover {
            opacity: .85;
        }

.article-photo {
    width: 100%;
    margin: 0 0 clamp(18px, 1.8vw, 32px);
    border-radius: 14px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.prose p {
    margin: 0 0 clamp(12px, 1.2vw, 20px);
    /*max-width: 78ch;*/
    font-size: clamp(14px, 1.92vw, 20px);
    line-height: 1.85;
    color: var(--text-soft);
}

.prose h2 {
    margin: clamp(22px, 2.2vw, 40px) 0 clamp(10px, 1vw, 16px);
    font-size: clamp(16px, 1.4vw, 26px);
    font-weight: 500;
    color: var(--navy);
}

/* A quote from a named person, set apart by a rule on the leading edge. */
.pull-quote {
    margin: clamp(18px, 1.8vw, 32px) 0;
    padding: clamp(14px, 1.5vw, 26px);
    border-inline-start: 4px solid var(--navy);
    border-radius: 0 12px 12px 0;
    background: #F4F5F8;
}

    .pull-quote p {
        margin: 0;
        font-size: clamp(11px, .9vw, 15px);
        line-height: 1.8;
        color: var(--text-soft);
    }

    .pull-quote cite {
        display: block;
        margin-top: clamp(9px, .9vw, 15px);
        font-size: clamp(10px, .8vw, 13px);
        font-style: normal;
        font-weight: 600;
        color: var(--navy);
    }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: clamp(18px, 1.8vw, 32px);
    padding-block-start: clamp(16px, 1.6vw, 28px);
    border-block-start: 1px solid #EDEFF5;
    width: 100%;
    font-size: clamp(11px, .85vw, 14px);
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
}

    .back-link:hover {
        color: var(--accent);
    }

/* ---- the newsletter card ------------------------------------------------- */

.subscribe-card {
    padding: clamp(14px, 1.4vw, 24px);
    border-radius: 14px;
    background: #F4F5F8;
}

    .subscribe-card h3 {
        margin: 0 0 clamp(9px, .9vw, 15px);
        font-size: clamp(14px, 1.15vw, 20px);
        font-weight: 700;
        color: var(--navy);
    }

    .subscribe-card p {
        margin: 0 0 clamp(12px, 1.2vw, 20px);
        font-size: clamp(10px, .82vw, 14px);
        line-height: 1.6;
        color: var(--text-soft);
    }

    .subscribe-card input {
        width: 100%;
        margin-bottom: 9px;
        padding: clamp(9px, .85vw, 14px) clamp(12px, 1.1vw, 18px);
        border: 1px solid #DDE0EA;
        border-radius: 8px;
        background: var(--white);
        font: inherit;
        font-size: clamp(11px, .85vw, 14px);
        color: var(--text);
    }

    .subscribe-card button {
        width: 100%;
        padding: clamp(9px, .85vw, 14px);
        border: 0;
        border-radius: 8px;
        background: var(--navy);
        font: inherit;
        font-size: clamp(11px, .85vw, 14px);
        font-weight: 600;
        color: var(--white);
        cursor: pointer;
        transition: opacity .2s;
    }

        .subscribe-card button:hover {
            opacity: .9;
        }

.related-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: clamp(34px, 3.6vw, 66px) 0 clamp(14px, 1.5vw, 26px);
    padding-block-start: clamp(26px, 2.8vw, 50px);
    border-block-start: 1px solid #EDEFF5;
}

    .related-head h2 {
        margin: 0;
        font-size: clamp(19px, 1.8vw, 34px);
        font-weight: 700;
        color: var(--navy);
    }

    .related-head a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: clamp(14px, 0.95vw, 20px);
        font-weight: 600;
        color: var(--accent);
        text-decoration: none;
    }

/* ---- Profile -------------------------------------------------------------- */

.profile-card {
    display: flex;
    align-items: center;
    /* 56px between the photo and the text, 18px of padding, both measured off
     the design at 1367px. */
    gap: clamp(20px, 4.1vw, 68px);
    padding: clamp(14px, 1.32vw, 24px);
}

/* 225px at the design's own 1367px width — the card is built around it. */
.profile-card__photo {
    flex-shrink: 0;
    width: clamp(130px, 16.46vw, 240px);
    height: clamp(130px, 16.46vw, 240px);
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 20%;
}

.profile-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

    .profile-card__body h2 {
        margin: 0;
        /* The brand face, stated: the page's body font (Inter) is wider, and the
     name came out 202px against the design's 168px. Same bug as the pills
     below. */
        font-family: var(--font-family-base);
        /* 27px at the design's own 1367px width, where "Alaa Mohamed" measures
     168px across. */
        font-size: clamp(20px, 1.98vw, 32px);
        font-weight: 500;
        color: var(--navy);
    }

.profile-facts {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(9px, 1.21vw, 23px);
    margin: clamp(10px, 1vw, 18px) 0 clamp(14px, 1.4vw, 24px);
    padding: 0;
    list-style: none;
    font-family: var(--font-family-base);
    /* 17.7px at the design's own 1367px width: the five facts then run the
     design's 675px from the first letter to the last, and the glyphs stand
     the design's 15px tall. */
    font-size: clamp(12px, 1.295vw, 21px);
    color: var(--navy);
}

    .profile-facts b {
        color: var(--navy);
    }

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, .73vw, 13px);
}

.btn-pill {
    display: inline-flex;
    align-items: center;
    /* 36px tall at the design's own 1367px width. */
    padding: clamp(7px, .63vw, 11px) clamp(14px, 1.39vw, 24px);
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--red);
    font: inherit;
    font-family: var(--font-family-base);
    font-size: clamp(10px, .84vw, 14px);
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    cursor: pointer;
    transition: opacity .2s, background .2s, color .2s;
}

    .btn-pill:hover {
        opacity: .9;
        color: var(--white);
    }

.btn-pill--ghost {
    border-color: var(--navy);
    background: var(--white);
    color: var(--navy);
}

    .btn-pill--ghost:hover {
        background: #F5F6FA;
        color: var(--navy);
        opacity: 1;
    }

.btn-pill--danger {
    border-color: var(--red);
    background: var(--white);
    color: var(--red);
}

    .btn-pill--danger:hover {
        background: #FDF4F5;
        color: var(--red);
        opacity: 1;
    }

/* ---- the profile panels ---------------------------------------------------- */

.profile-layout {
    display: grid;
    grid-template-columns: clamp(200px, 19vw, 275px) minmax(0, 1fr);
    gap: clamp(14px, 1.6vw, 30px);
    align-items: start;
    margin-top: clamp(14px, 1.5vw, 26px);
}

.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: clamp(10px, 1vw, 18px);
    border-radius: 16px;
    background: #F4F6FB;
    list-style: none;
}

    .profile-menu button {
        width: 100%;
        padding: clamp(11px, 1.05vw, 18px) clamp(12px, 1.2vw, 22px);
        border: 0;
        border-radius: 10px;
        background: none;
        font: inherit;
        font-size: clamp(11px, .9vw, 15px);
        color: var(--navy);
        text-align: start;
        cursor: pointer;
        transition: background .2s, color .2s;
    }

        .profile-menu button:hover {
            background: #E7EBF5;
        }

        .profile-menu button.is-active {
            background: var(--navy);
            font-weight: 600;
            color: var(--white);
        }

.profile-panel {
    padding: clamp(14px, 1.5vw, 26px);
    border-radius: 16px;
    background: #F8FAFD;
}

    .profile-panel[hidden] {
        display: none;
    }

.profile-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: clamp(12px, 1.3vw, 22px);
}

    .profile-panel__head h3 {
        margin: 0;
        font-size: clamp(14px, 1.2vw, 21px);
        font-weight: 700;
        color: var(--navy);
    }

.filter-pills {
    display: flex;
    gap: 8px;
}

    .filter-pills button {
        padding: clamp(6px, .6vw, 10px) clamp(12px, 1.2vw, 20px);
        border: 1px solid #DDE0EA;
        border-radius: 999px;
        background: var(--white);
        font: inherit;
        font-size: clamp(10px, .78vw, 13px);
        color: var(--text-soft);
        cursor: pointer;
        transition: background .2s, border-color .2s, color .2s;
    }

        .filter-pills button.is-active {
            border-color: var(--navy);
            background: var(--navy);
            color: var(--white);
        }

/* ---- the patient card ------------------------------------------------------ */

.patient-card {
    display: flex;
    align-items: flex-start;
    gap: clamp(12px, 1.3vw, 24px);
    padding: clamp(14px, 1.4vw, 24px);
    border-radius: 14px;
    background: var(--white);
}

.patient-card__avatar {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: clamp(48px, 4.2vw, 76px);
    height: clamp(48px, 4.2vw, 76px);
    border: 2px solid #0E6B5E;
    border-radius: 50%;
    font-size: clamp(18px, 1.6vw, 30px);
    color: var(--navy);
}

.patient-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.patient-card__name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: clamp(9px, .95vw, 18px);
    margin: 0 0 clamp(10px, 1vw, 18px);
    font-size: clamp(14px, 1.2vw, 21px);
    font-weight: 700;
    color: var(--navy);
}

.patient-card__ref {
    font-size: clamp(10px, .82vw, 14px);
    font-weight: 600;
    color: #0E6B5E;
}

/* Three columns of label/value pairs that collapse to one on a phone. */
.patient-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(7px, .7vw, 12px) clamp(12px, 1.3vw, 24px);
    margin: 0;
    font-size: clamp(10px, .82vw, 14px);
}

    .patient-facts > div {
        display: flex;
        gap: 7px;
    }

    .patient-facts dt {
        flex-shrink: 0;
        color: var(--text-soft);
    }

    .patient-facts dd {
        margin: 0;
        font-weight: 600;
        color: var(--navy);
    }

/* ---- the history table ------------------------------------------------------ */

.history-block {
    margin-top: clamp(12px, 1.3vw, 22px);
    padding: clamp(14px, 1.4vw, 24px);
    border-radius: 14px;
    background: var(--white);
}

    .history-block h4 {
        margin: 0 0 clamp(12px, 1.3vw, 22px);
        font-size: clamp(12px, 1.05vw, 18px);
        font-weight: 500;
        color: var(--navy);
    }

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(9px, .78vw, 13px);
    font-weight: 600;
    color: var(--navy);
}

    .history-table td {
        padding: clamp(10px, 1vw, 17px) clamp(10px, 1.1vw, 20px);
    }

    .history-table tr:nth-child(odd) {
        background: #F4F6FA;
    }

    .history-table td:nth-child(2) {
        text-align: center;
    }

    .history-table td:last-child {
        text-align: end;
    }

/* ---- appointment cards -------------------------------------------------------- */

.appt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 1.3vw, 22px);
    margin-top: clamp(12px, 1.3vw, 22px);
}

.appt-card {
    padding: clamp(14px, 1.4vw, 24px);
    border-radius: 14px;
    background: var(--white);
}

    .appt-card[hidden] {
        display: none;
    }

.appt-card__top {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 1vw, 16px);
    margin-bottom: clamp(12px, 1.3vw, 22px);
}

.appt-card__icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: clamp(30px, 2.4vw, 40px);
    height: clamp(30px, 2.4vw, 40px);
    border-radius: 10px;
    background: #EEF1F9;
    font-size: clamp(12px, 1vw, 17px);
    color: var(--navy);
}

.appt-card__title {
    flex: 1 1 auto;
    min-width: 0;
}

    .appt-card__title h4 {
        margin: 0;
        font-size: clamp(13px, 1.1vw, 19px);
        font-weight: 500;
        color: var(--navy);
    }

.appt-card__ticket {
    margin: 4px 0 0;
    font-size: clamp(9px, .72vw, 12px);
    color: var(--text-soft);
}

.appt-status {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: #E9F7F0;
    font-size: clamp(9px, .72vw, 12px);
    font-weight: 500;
    color: #0E6B5E;
}

    .appt-status::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: currentColor;
    }

.appt-status--cancelled {
    background: #FBE9EC;
    color: var(--red);
}

.appt-card__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 1vw, 18px);
    margin: 0 0 clamp(12px, 1.3vw, 22px);
    font-size: clamp(9px, .78vw, 13px);
}

    .appt-card__facts dt {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 5px;
        color: var(--text-soft);
    }

    .appt-card__facts dd {
        display: flex;
        align-items: center;
        gap: 7px;
        margin: 0;
        font-weight: 500;
        color: var(--navy);
    }

    .appt-card__facts img {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        object-fit: cover;
    }

.appt-card__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(9px, .9vw, 15px);
}

.btn-line {
    padding: clamp(8px, .8vw, 13px);
    border: 1px solid #C9D4E8;
    border-radius: 8px;
    background: var(--white);
    font: inherit;
    font-size: clamp(10px, .8vw, 13px);
    color: #2C6FD1;
    cursor: pointer;
    transition: background .2s;
}

    .btn-line:hover {
        background: #F2F7FE;
    }

.btn-line--danger {
    border-color: #F0C3C9;
    color: var(--red);
}

    .btn-line--danger:hover {
        background: #FDF4F5;
    }

.panel-empty {
    margin: clamp(20px, 2vw, 34px) 0;
    font-size: var(--fs-sub);
    color: var(--text-soft);
    text-align: center;
}

/* ---- responsive ----------------------------------------------------------------- */

@media (max-width: 1199.98px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .contact-layout,
    .article-layout,
    .profile-layout,
    .appt-grid {
        grid-template-columns: 1fr;
    }

    .patient-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* A row of buttons reads better than a tall column once the panel is
     the full width of the page. */
    .profile-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }

        .profile-menu button {
            width: auto;
        }
}

@media (max-width: 767.98px) {
    .news-featured,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .profile-card,
    .patient-card {
        flex-wrap: wrap;
    }

    .patient-facts {
        grid-template-columns: 1fr;
    }

    /* The table's three columns do not fit; each row becomes a small block. */
    .history-table,
    .history-table tbody,
    .history-table tr,
    .history-table td {
        display: block;
        text-align: start !important;
    }

        .history-table tr {
            padding: clamp(10px, 1vw, 16px);
        }

        .history-table td {
            padding: 3px 0;
        }
}

/* ------------------------------------------------------------------ */
/* Profile — visits, tests, relatives and the reschedule dialog          */
/* ------------------------------------------------------------------ */

.appt-status--wait {
    background: #FDF1E3;
    color: #B5760E;
}

/* ---- My Visits ---------------------------------------------------------- */

.visit-grid,
.test-grid,
.relative-grid {
    display: grid;
    gap: clamp(12px, 1.2vw, 20px);
    margin: clamp(12px, 1.3vw, 22px) 0 0;
    padding: 0;
    list-style: none;
}

.visit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.test-grid,
.relative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* The whole card opens the summary, so it is a button rather than a div
   with a click handler — it reaches the keyboard for free. */
.visit-card {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 1px solid #E7E9F1;
    border-radius: 14px;
    background: var(--white);
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

    .visit-card:hover {
        border-color: #C9D4E8;
        box-shadow: 0 6px 20px rgba(31, 49, 99, .07);
    }

    .visit-card[hidden] {
        display: none;
    }

.visit-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: clamp(9px, .9vw, 15px);
    padding: clamp(12px, 1.2vw, 20px);
    border-block-end: 1px solid #EDEFF5;
}

.visit-card__clinic {
    font-size: clamp(12px, 1.05vw, 18px);
    font-weight: 700;
    color: var(--navy);
}

.visit-card__dept {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 6px;
    background: #EEF1F9;
    font-size: clamp(8px, .66vw, 11px);
    font-weight: 500;
    color: var(--navy);
}

.visit-card__dept--out {
    background: #E7EDFA;
    color: #2C4B8F;
}

.visit-card__dept--emergency {
    background: #E4F1F0;
    color: #0E6B5E;
}

.visit-card__dept--in {
    background: #E8EAF6;
    color: #3A4A86;
}

.visit-card__facts {
    display: grid;
    gap: clamp(7px, .7vw, 12px);
    margin: 0;
    padding: clamp(12px, 1.2vw, 20px);
    font-size: clamp(9px, .78vw, 13px);
}

    .visit-card__facts > div {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
    }

    .visit-card__facts dt {
        color: var(--text-soft);
    }

    .visit-card__facts dd {
        margin: 0;
        font-weight: 600;
        color: var(--navy);
        text-align: end;
    }

.visit-card__facts--foot {
    border-block-start: 1px solid #EDEFF5;
}

/* ---- the visit summary ---------------------------------------------------- */

.visit-detail[hidden],
.visit-list[hidden] {
    display: none;
}

.visit-detail__back {
    width: auto;
    margin: 0 0 clamp(12px, 1.3vw, 22px);
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.summary-head {
    padding: clamp(12px, 1.3vw, 22px);
    border-radius: 14px;
    background: var(--white);
}

    .summary-head h3 {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: clamp(9px, .9vw, 15px);
        margin: 0;
        font-size: clamp(15px, 1.3vw, 23px);
        font-weight: 700;
        color: var(--navy);
    }

    .summary-head p {
        display: flex;
        flex-wrap: wrap;
        gap: clamp(12px, 1.2vw, 22px);
        margin: clamp(7px, .7vw, 12px) 0 0;
        font-size: clamp(9px, .78vw, 13px);
        color: var(--text-soft);
    }

        .summary-head p span {
            display: inline-flex;
            align-items: center;
            gap: 7px;
        }

.summary-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: clamp(16px, 1.6vw, 28px) 0 clamp(10px, 1vw, 16px);
    font-size: clamp(13px, 1.1vw, 19px);
    font-weight: 700;
    color: var(--navy);
}

    .summary-title i {
        color: #0E6B5E;
    }

.vitals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 1vw, 18px);
    margin: 0;
    padding: 0;
    list-style: none;
}

    .vitals li {
        padding: clamp(12px, 1.2vw, 20px);
        border: 1px solid #E7E9F1;
        border-radius: 12px;
        background: var(--white);
        font-size: clamp(9px, .78vw, 13px);
        color: var(--text-soft);
    }

.vitals__label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: clamp(7px, .7vw, 12px);
}

    .vitals__label i {
        color: #2C6FD1;
    }

.vitals b {
    font-size: clamp(16px, 1.45vw, 26px);
    font-weight: 700;
    color: var(--navy);
}

.vitals i:not(.vitals__label i) {
    font-style: normal;
}

.summary-accordion {
    display: grid;
    gap: clamp(9px, .9vw, 15px);
    margin-top: clamp(14px, 1.4vw, 24px);
}

    .summary-accordion details {
        border: 1px solid #E7E9F1;
        border-radius: 12px;
        background: var(--white);
    }

    .summary-accordion summary {
        display: flex;
        align-items: center;
        gap: clamp(9px, .9vw, 15px);
        padding: clamp(12px, 1.2vw, 20px);
        font-size: clamp(11px, .95vw, 16px);
        font-weight: 700;
        color: var(--navy);
        cursor: pointer;
        list-style: none;
    }

        .summary-accordion summary::-webkit-details-marker {
            display: none;
        }

        /* The plus/minus is drawn rather than set in an icon font, so the open and
   closed states cannot disagree if the font is slow or blocked. */
        /* A 12x12 box with the strokes painted inside it. A 2px-tall box clipped
   the upright stroke away, so every row showed a minus whether it was open
   or not. */
        .summary-accordion summary::after {
            content: "";
            flex-shrink: 0;
            width: 12px;
            height: 12px;
            margin-inline-start: auto;
            background: linear-gradient(var(--navy), var(--navy)) center / 12px 2px no-repeat;
        }

    .summary-accordion details:not([open]) summary::after {
        background: linear-gradient(var(--navy), var(--navy)) center / 12px 2px no-repeat, linear-gradient(var(--navy), var(--navy)) center / 2px 12px no-repeat;
    }

.summary-accordion__icon {
    display: grid;
    place-items: center;
    width: clamp(24px, 1.9vw, 32px);
    height: clamp(24px, 1.9vw, 32px);
    border-radius: 8px;
    background: #EEF1F9;
    font-size: clamp(9px, .75vw, 13px);
    color: #2C6FD1;
}

.summary-accordion ul {
    margin: 0;
    padding: 0 clamp(12px, 1.2vw, 20px) clamp(12px, 1.2vw, 20px);
    list-style: none;
}

.summary-accordion li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding-block: clamp(6px, .6vw, 10px);
    font-size: clamp(9px, .8vw, 14px);
    color: var(--text-soft);
}

    .summary-accordion li span {
        flex-shrink: 0;
        font-size: clamp(8px, .68vw, 11px);
        color: #8C96AE;
    }

.summary-tables {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 1.3vw, 24px);
}

.mini-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #E7E9F1;
    border-radius: 12px;
    background: var(--white);
    font-size: clamp(9px, .75vw, 13px);
    overflow: hidden;
}

    .mini-table th {
        padding: clamp(9px, .9vw, 15px) clamp(10px, 1vw, 16px);
        background: #F4F6FA;
        font-weight: 500;
        color: var(--text-soft);
        text-align: start;
    }

    .mini-table td {
        padding: clamp(10px, 1vw, 16px);
        border-block-start: 1px solid #EDEFF5;
        color: var(--navy);
    }

/* ---- Lab and Radiology tests ---------------------------------------------- */

.test-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: clamp(9px, .9vw, 15px) clamp(10px, 1vw, 16px);
    height: 100%;
    padding: clamp(12px, 1.2vw, 20px);
    border: 1px solid #E7E9F1;
    border-radius: 14px;
    background: var(--white);
}

.test-card__icon {
    display: grid;
    place-items: center;
    width: clamp(30px, 2.4vw, 40px);
    height: clamp(30px, 2.4vw, 40px);
    border-radius: 10px;
    background: #E4F1F0;
    font-size: clamp(12px, 1vw, 17px);
    color: #0E6B5E;
}

.test-card__body {
    min-width: 0;
}

    .test-card__body h4 {
        margin: 0;
        font-size: clamp(12px, 1.05vw, 18px);
        font-weight: 500;
        color: var(--navy);
    }

.test-card__cat {
    margin: 4px 0 0;
    font-size: clamp(9px, .75vw, 13px);
    color: var(--text-soft);
}

.test-card__foot {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: clamp(9px, .9vw, 15px);
    padding-block-start: clamp(9px, .9vw, 15px);
    border-block-start: 1px solid #EDEFF5;
}

.test-card__when {
    display: grid;
    gap: 4px;
    font-size: clamp(8px, .7vw, 12px);
    color: var(--text-soft);
}

    .test-card__when b {
        font-size: clamp(9px, .78vw, 13px);
        font-weight: 600;
        color: var(--navy);
    }

.test-card__dl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-inline: clamp(12px, 1.2vw, 20px);
    text-decoration: none;
}

/* ---- Family members --------------------------------------------------------- */

.relative-row {
    position: relative;
    height: 100%;
    padding: clamp(12px, 1.2vw, 20px);
    border: 1px solid #E7E9F1;
    border-radius: 14px;
    background: var(--white);
}

.relative-row__tools {
    position: absolute;
    inset-inline-end: clamp(12px, 1.2vw, 20px);
    top: clamp(12px, 1.2vw, 20px);
    display: flex;
    gap: 9px;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: clamp(24px, 1.9vw, 32px);
    height: clamp(24px, 1.9vw, 32px);
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    font-size: clamp(10px, .82vw, 14px);
    cursor: pointer;
    transition: background .2s;
}

.icon-btn--edit {
    color: #0E6B5E;
}

.icon-btn--del {
    color: var(--red);
}

.icon-btn:hover {
    background: #F2F4FA;
}

.relative-row__facts {
    display: grid;
    gap: clamp(7px, .7vw, 12px);
    margin: 0;
    /* Room for the two tools in the corner, so a long name cannot run under
     them. */
    padding-inline-end: clamp(62px, 5vw, 86px);
    font-size: clamp(9px, .8vw, 14px);
}

    .relative-row__facts > div {
        display: flex;
        gap: 8px;
    }

    .relative-row__facts dt {
        flex-shrink: 0;
        color: var(--text-soft);
    }

    .relative-row__facts dd {
        margin: 0;
        font-weight: 600;
        color: var(--navy);
    }

/* ---- the reschedule dialog ---------------------------------------------------- */

/* Bootstrap owns `.modal`, `.modal-dialog` and `.modal-content` — the box is
   shaped through them rather than by redefining `.modal`, and the backdrop,
   Escape and the scroll lock all come from Bootstrap. */
#reschedule .modal-dialog {
    max-width: min(560px, calc(100vw - 32px));
}

#reschedule .modal-content {
    border: 0;
    border-radius: 16px;
    background: var(--white);
    color: var(--text);
}

/* Only for a page served without Bootstrap's JS, which is what draws the
   backdrop and sets the box on screen. */
#reschedule.modal--bare {
    position: fixed;
    inset: 0;
    z-index: 1055;
    overflow: auto;
    background: rgba(20, 28, 56, .45);
}

    #reschedule.modal--bare .modal-dialog {
        margin: clamp(12px, 2vh, 28px) auto;
    }

.modal__box {
    padding: clamp(18px, 1.8vw, 32px);
}

.modal__title {
    margin: 0 0 clamp(14px, 1.5vw, 26px);
    /* It only takes focus so the dialog opens on the heading rather than on a
     read-only field; it is not a control, so it draws no ring. */
    outline: none;
    font-size: clamp(15px, 1.3vw, 23px);
    font-weight: 700;
    color: var(--navy);
    text-align: center;
}

.modal__field {
    display: block;
    margin-bottom: clamp(10px, 1vw, 16px);
}

    .modal__field span,
    .modal__label {
        display: block;
        margin-bottom: 6px;
        font-size: clamp(10px, .8vw, 13px);
        color: var(--text-soft);
    }

    .modal__field input {
        width: 100%;
        padding: clamp(9px, .9vw, 15px) clamp(12px, 1.1vw, 18px);
        border: 0;
        border-radius: 8px;
        /* Read-only rather than disabled: the value still reaches the form and a
     screen reader still announces it. */
        background: #DEDEDE;
        font: inherit;
        font-size: clamp(10px, .85vw, 14px);
        font-weight: 600;
        color: var(--navy);
    }

.modal__label {
    margin-top: clamp(14px, 1.4vw, 24px);
}

.mini-cal {
    padding: clamp(10px, 1vw, 16px) 0;
}

.mini-cal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: clamp(10px, 1vw, 16px);
}

.mini-cal__label {
    margin: 0;
    font-size: clamp(12px, 1.05vw, 18px);
    font-weight: 500;
    line-height: 1.2;
    color: var(--navy);
    text-align: center;
}

/* The year sits under the month name, small and grey, as in the design. */
.mini-cal__year {
    display: block;
    font-size: clamp(9px, .72vw, 12px);
    font-weight: 400;
    color: var(--text-soft);
}

.mini-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: clamp(3px, .35vw, 6px);
}

/* The day, weekday and arrow styles live in detail.css for the booking page;
   this page does not load that sheet, so the dialog carries its own copy
   rather than pulling in a whole stylesheet for three rules. */
.mini-cal .calendar__dow {
    padding: 6px 0;
    font-size: clamp(9px, .72vw, 12px);
    font-weight: 600;
    color: var(--text-soft);
    text-align: center;
}

.mini-cal .calendar__day {
    /* A set row height, not a square: at the dialog's 560px the cells are 72px
     wide, and square cells made the calendar 450px tall and pushed Save off
     the bottom of the screen. The design's rows are 38px. */
    display: grid;
    place-items: center;
    height: clamp(30px, 2.55vw, 38px);
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    font: inherit;
    font-size: clamp(11px, .85vw, 14px);
    color: var(--navy);
    cursor: pointer;
    transition: background .2s, color .2s;
}

    .mini-cal .calendar__day:hover:not(:disabled) {
        background: #F0F3FA;
    }

    .mini-cal .calendar__day:disabled {
        color: #B9BFCE;
        cursor: default;
    }

    /* The days either side of the month are shown rather than hidden, greyed,
   so the grid keeps a full rectangle the way the design draws it. */
    .mini-cal .calendar__day.is-outside {
        color: #C7CCD9;
        cursor: default;
    }

    .mini-cal .calendar__day.is-selected {
        background: var(--navy);
        font-weight: 700;
        color: var(--white);
    }

.mini-cal .calendar__nav {
    display: grid;
    place-items: center;
    width: clamp(26px, 2.1vw, 34px);
    height: clamp(26px, 2.1vw, 34px);
    padding: 0;
    border: 1px solid #DDE0EA;
    border-radius: 50%;
    background: var(--white);
    font: inherit;
    font-size: clamp(10px, .78vw, 13px);
    color: var(--navy);
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

    .mini-cal .calendar__nav:hover:not(:disabled) {
        border-color: var(--navy);
        background: #F5F6FA;
    }

    .mini-cal .calendar__nav:disabled {
        color: #B9BFCE;
        cursor: default;
    }

/* Font Awesome draws the chevrons, so they are mirrored by hand in Arabic. */
[dir="rtl"] .mini-cal .calendar__nav i {
    transform: scaleX(-1);
}

.modal__status {
    margin: clamp(9px, .9vw, 15px) 0 0;
    font-size: clamp(10px, .8vw, 13px);
    color: #1a906e;
}

.modal__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 1vw, 18px);
    margin-top: clamp(14px, 1.5vw, 26px);
}

    .modal__actions .btn-pill {
        justify-content: center;
        padding-block: clamp(10px, .95vw, 16px);
        font-size: clamp(11px, .9vw, 15px);
        background: var(--navy);
    }

    .modal__actions .btn-pill--ghost {
        background: var(--white);
    }

/* ---- responsive ------------------------------------------------------------------ */

@media (max-width: 1199.98px) {
    .visit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vitals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .summary-tables {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .visit-grid,
    .test-grid,
    .relative-grid {
        grid-template-columns: 1fr;
    }

    .test-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .relative-row__facts {
        padding-inline-end: 0;
    }

    .relative-row__tools {
        position: static;
        justify-content: flex-end;
        margin-bottom: clamp(7px, .7vw, 12px);
    }
}

@media (max-width: 575.98px) {
    .vitals {
        grid-template-columns: 1fr;
    }
}


/* ---- the gallery ------------------------------------------------------- */

/* One track, translated sideways. `scroll-snap` would do the same with less
   script, but the dots have to report the active slide either way, and a
   transform keeps the two in step without a scroll listener. */
.gallery {
    margin: clamp(16px, 1.6vw, 28px) 0 0;
    border-radius: 16px;
    overflow: hidden;
}

.gallery__viewport {
    overflow: hidden;
    border-radius: 16px;
}

.gallery__track {
    display: flex;
    transition: transform .45s ease;
}

.gallery__slide {
    flex: 0 0 100%;
    aspect-ratio: 16 / 8;
}

    .gallery__slide img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.gallery__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: clamp(10px, 1vw, 16px);
}

.gallery__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #C9CEDC;
    cursor: pointer;
    transition: width .2s, background .2s;
}

    .gallery__dot.is-active {
        width: 26px;
        border-radius: 999px;
        background: var(--red);
    }
