/*
 * PromiseCare — Accessibility Fixes
 * Created 2026-05-12 in response to Lighthouse/axe-core audit findings.
 * Each block notes the WCAG rule and the contrast ratio it brings the element to.
 *
 * Audit baseline (incognito, Lighthouse 13.0.2, mobile + desktop):
 *   - color-contrast: 10 items
 *   - link-in-text-block: 2 items
 *   - target-size: 4 items (mobile)
 */

/* -----------------------------------------------------------------------------
 * 1. "Life-threatening emergency? Call 911" hero callout
 *    Was: #eb0000 on #f7f9fc  (4.39 — fails WCAG AA)
 *    Now: #b91c1c on #f7f9fc  (~6.32 — passes AA + AAA for normal text)
 *
 *    The 911 callout is the most safety-critical text on the homepage; bumping
 *    contrast well above the 4.5 floor so it stays compliant if the background
 *    shade ever drifts.
 * -------------------------------------------------------------------------- */
.elementor-element-c911df9,
.elementor-element-c911df9 p,
.elementor-element-c911df9 a,
.elementor-element-c911df9 strong,
.elementor-element-c911df9 span {
	color: #b91c1c !important;
}

/* -----------------------------------------------------------------------------
 * 2. Newsletter "Subscribe to Newsletter" button
 *    Was: #ffffff on #ff0e89  (3.69 — fails)
 *    Now: #ffffff on #c70370  (~8.20 — passes AA + AAA)
 *
 *    Brand pink darkened just enough to clear AA with white text; same visual
 *    family, no harsh black-on-pink swap.
 * -------------------------------------------------------------------------- */
button#sign-up,
button#sign-up:hover,
button#sign-up:focus {
	background-color: #c70370 !important;
	border-color: #c70370 !important;
}

/* -----------------------------------------------------------------------------
 * 3. Article / loop excerpts
 *    Was: #777777 on #ffffff  (4.47 — fails by 0.03)
 *    Now: #595959 on #ffffff  (~7.00 — passes AA + AAA)
 *
 *    Scoped to .elementor-post__excerpt so it doesn't repaint every "#777"
 *    on the site.
 * -------------------------------------------------------------------------- */
article.elementor-post .elementor-post__excerpt,
article.elementor-post .elementor-post__excerpt p {
	color: #595959 !important;
}

/* -----------------------------------------------------------------------------
 * 4. Program-card "Read More »" links (red on cream)
 *    Was: #eb0000 on #fff4d7  (4.23 — fails)
 *    Now: #b91c1c on #fff4d7  (~6.05 — passes AA)
 *
 *    Visited state matched so the contrast holds after click.
 * -------------------------------------------------------------------------- */
a.elementor-post__read-more,
a.elementor-post__read-more:link,
a.elementor-post__read-more:visited {
	color: #b91c1c !important;
}

/* -----------------------------------------------------------------------------
 * 5. Footer copyright line
 *    Was: rgba(255,255,255,0.4) → renders as #6a717d on #061227  (3.80 — fails)
 *    Now: rgba(255,255,255,0.75) → renders as ~#c1c4ca on #061227  (~7.5 — passes)
 *
 *    Inline style means we need !important to override.
 * -------------------------------------------------------------------------- */
footer p[style*="rgba(255,255,255,0.4)"],
footer .elementor-element p[style*="rgba(255,255,255,0.4)"] {
	color: rgba(255, 255, 255, 0.75) !important;
}

/* -----------------------------------------------------------------------------
 * 6. Phone-number links in hero (link-in-text-block)
 *    Phone links currently rely on color alone to indicate they're tappable.
 *    WCAG 1.4.1 requires a non-color affordance.  Underline on the tel: links
 *    in any hero/slider context.
 * -------------------------------------------------------------------------- */
.has_eae_slider a[href^="tel:"],
.elementor-section a[href^="tel:"]:not(.elementor-button),
header a[href^="tel:"]:not(.elementor-button) {
	text-decoration: underline !important;
	text-underline-offset: 2px;
}

/* -----------------------------------------------------------------------------
 * 7. Mobile tap-target size (footer social + legal links)
 *    LinkedIn, Instagram, Privacy Policy, Medical Disclaimer.  WCAG 2.5.8
 *    requires 24×24 (AA) / 44×44 (AAA) clickable area.  We hit AAA so
 *    fat-finger taps don't accidentally land on the wrong link.
 *
 *    Only applies at ≤768px so desktop footer typography is untouched.
 * -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
	footer a[href*="linkedin"],
	footer a[href*="instagram"],
	footer a[href*="facebook"],
	footer a[href*="twitter"],
	footer a[href*="youtube"],
	footer a[href*="privacy"],
	footer a[href*="disclaimer"],
	footer a[href*="terms"],
	footer .elementor-icon-list-item > a,
	footer .elementor-social-icon {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		min-width: 44px;
		padding: 6px 8px;
	}
}
