/* Targeted fixes retained separately from the legacy compiled stylesheet. */

/* Centre the Our Team title over equal decorative lines. */
.page-team .title-module .content-max-width {
    text-align: center;
}

.page-team .title-module h1 {
    margin-left: 0;
    padding-right: 32px;
    padding-left: 32px;
    text-align: center;
}

/* Keep clinician-name titles centred over equal decorative lines. */
.page-team-detail .title-module .content-max-width {
    text-align: center;
}

.page-team-detail .title-module h1 {
    margin-left: 0;
    padding-right: 32px;
    padding-left: 32px;
    text-align: center;
}

/*
 * The legacy CSS mixes four-column widths with three-column wrapping.
 * Use a centred flex grid so groups of two, three or four people remain
 * balanced without leaving a staff photo stranded against the left edge.
 */
.page-team .detail-container .team-module {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px 20px;
}

.page-team .detail-container h2 {
    text-align: center;
}

.page-team .detail-container .intro {
    text-align: center;
}

.page-team .team-module article {
    flex: 0 0 100%;
    width: 100%;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    text-align: center;
}

@media (min-width: 25em) {
    .page-team .team-module article {
        flex-basis: calc(50% - 10px);
        width: calc(50% - 10px);
    }
}

@media (min-width: 64em) {
    .page-team .team-module article {
        flex: 0 0 220px;
        width: 220px;
    }

    /*
     * The desktop header dropdown is a separate team module. Its legacy
     * stylesheet combines four-column widths with three-column clear rules,
     * which leaves gaps and pushes the fourth nurse onto a second row.
     * Inline-block cards preserve the existing jQuery tab show/hide behaviour.
     */
    .team-dropdown-module .team-module {
        float: none;
        text-align: center;
        font-size: 0;
    }

    .team-dropdown-module .team-module article {
        display: inline-block;
        vertical-align: top;
        width: calc(25% - 20px);
        margin: 0 10px 40px !important;
        float: none !important;
        clear: none !important;
        font-size: 16px;
        text-align: center;
    }
}

.page-contact .map-area .map iframe {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    border: 0;
}

.page-contact .map-directions {
    margin: 10px 0 0;
    text-align: right;
}

.page-contact .map-directions a {
    font-weight: 600;
}

/* Keep content visible while the external Typekit font loads or fails. */
.wf-loading a,
.wf-loading h1,
.wf-loading h2,
.wf-loading legend,
.wf-loading p {
    visibility: visible;
}

/* Keyboard skip link. */
.skip-link {
    position: absolute;
    top: 0;
    left: 16px;
    z-index: 2147483647;
    padding: 12px 16px;
    background: #fff;
    color: #111;
    transform: translateY(-120%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* Restore a visible keyboard focus indicator removed by the legacy CSS. */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #111 !important;
    outline-offset: 3px;
}

/* Preserve the hamburger's visual centre while enlarging its touch target. */
@media (max-width: 63.9375em) {
    .site-header .hamburger {
        top: 22px;
        right: calc(3% - 9px);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }
}
