/*
 * CD Environmental – accessibility fixes (axe-core audit, December 2026)
 * Loaded after style.css and custom.css.
 */

/* 1. Visible keyboard focus (WCAG 2.4.7)
   custom.css used to remove every outline with `* { outline: none !important; }`.
   Maroon ring plus a white halo so it shows on light, dark and photo backgrounds. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #962342 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px #fff !important;
}

/* 2. Sectors carousel arrows – minimum 24px target size (WCAG 2.5.8).
   Buttons were 45 x 13px. Now 45 x 44px with the arrow centred;
   top margin reduced so the overall spacing looks the same. */
.sectors-section .owl-nav {
    margin-top: 25px;
}
.sectors-section .owl-nav button {
    min-width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
.sectors-section .owl-nav button span {
    width: 100%;
}

/* 3. Links inside body text must not rely on colour alone (WCAG 1.4.1, axe: link-in-text-block). */
#content .fl-rich-text p a:not(.fl-button),
#content .fl-module-fl-post-content p a:not(.fl-button),
#content .fl-module-fl-post-content li a:not(.fl-button),
#content .entry-content > p a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* 4. Phone and email links – minimum 24px target height (WCAG 2.5.8). */
#content a[href^="tel:"],
#content a[href^="mailto:"] {
    display: inline-block;
    min-height: 24px;
    line-height: 24px;
}

/* 5. Homepage slider – keep white headings readable on the photo slides
   that have no dark box behind the text (WCAG 1.4.3). */
.n2-ss-slider .n2-ss-layer h1,
.n2-ss-slider .n2-ss-layer h2,
.n2-ss-slider .n2-ss-layer h3,
.n2-ss-slider .n2-ss-layer .n2-ss-item-content {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 0 12px rgba(0, 0, 0, 0.45);
}

/* 6. Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* 7. Formidable Forms submit button (Careers page): white on #579af6 was 2.85:1.
   Brand maroon gives 8.6:1 (WCAG 1.4.3). */
.with_frm_style .frm_button_submit,
.with_frm_style .frm_submit button,
.with_frm_style .frm_submit input[type="submit"] {
    background: #962342 !important;
    border-color: #962342 !important;
    color: #fff !important;
}
.with_frm_style .frm_button_submit:hover,
.with_frm_style .frm_submit button:hover,
.with_frm_style .frm_submit input[type="submit"]:hover {
    background: #213045 !important;
    border-color: #213045 !important;
}
