/* =========================================
   ADA Remediation — How We Help section
   WCAG 2.1 AA: 1.4.1 link distinction; 1.4.10 reflow at high zoom
   No layout/grid changes — link styling and fluid embedded media only.
   ========================================= */

/*
 * Hub layout: app.css sets .subpage__page--services .subpage__page--dynamic { margin-bottom: 0 },
 * so the program cards sit flush against the intro. Taller cards / stacking then cover the EEO link
 * (#word_eeo) when it lives in that intro block. Clear separation + stacking keeps the link visible.
 */
.subpage__page.subpage__page--services > .subpage__page--dynamic {
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.subpage__page.subpage__page--services > .content-default {
    position: relative;
    z-index: 1;
}

.subpage__page--services .thumbnail-hover__three {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

/* In-page body links distinguishable from surrounding text — all CMS wrappers in right column */
.subpage__page--services .subpage__page--dynamic a:not(.btn):not([class*="btn--"]),
.subpage__page--services .content-default .col-lg-9 a:not(.btn):not([class*="btn--"]) {
    text-underline-offset: 0.08em;
    font-weight: 700 !important;
}

.subpage__page--services .subpage__page--dynamic a:not(.btn):not([class*="btn--"]):hover,
.subpage__page--services .subpage__page--dynamic a:not(.btn):not([class*="btn--"]):focus,
.subpage__page--services .content-default .col-lg-9 a:not(.btn):not([class*="btn--"]):hover,
.subpage__page--services .content-default .col-lg-9 a:not(.btn):not([class*="btn--"]):focus {
    font-weight: 700 !important;
}

/* Reflow: prevent horizontal overflow from fixed-width CMS images and embeds at 400% zoom */
.subpage__page--services .subpage__page--dynamic img {
    max-width: 100%;
    height: auto;
}

.subpage__page--services .subpage__page--dynamic iframe,
.subpage__page--services .subpage__page--dynamic video {
    max-width: 100%;
}

/* Service hub cards: app.css sets .thumbnail-hover__overlay .btn--third { line-height: 0 }.
   Longer accessible labels wrap to multiple lines; zero line-height stacks them on top of each other. */
.subpage__page--services .thumbnail-hover__overlay .btn.btn--third,
.thumbnail-hover__three .thumbnail-hover__overlay .btn.btn--third {
    line-height: 1.35;
}

/*
 * Hub hover overlay: pin CTA to bottom so buttons align across cards; copy scrolls if uneven lengths.
 * (Centering the whole block made each button sit at a different height.)
 */
@media only screen and (min-width: 1024px) {
    .subpage__page--services .thumbnail-hover__three .thumbnail-hover__front {
        min-height: 390px;
    }

    .subpage__page--services .thumbnail-hover__three .thumbnail-hover__overlay {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        box-sizing: border-box;
        padding: 20px 10px 24px;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .subpage__page--services .thumbnail-hover__three .thumbnail-hover__overlay:before {
        display: none !important;
    }

    .subpage__page--services .thumbnail-hover__three .thumbnail-hover__overlay--content {
        position: relative;
        flex: 1 1 auto;
        width: 95%;
        height: auto !important;
        max-height: none;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        margin: 0 auto;
        padding-bottom: 0.75rem;
        box-sizing: border-box;
    }

    .subpage__page--services .thumbnail-hover__three .thumbnail-hover__overlay .btn.btn--third {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        flex-shrink: 0;
        width: 75%;
        max-width: 100%;
        margin-top: auto;
    }
}
