/*
 * Accessibility Improvements — WCAG 2.1 Level AA
 * Last updated: 2026-05-03 (Batch 2)
 * Heart of Florida Health Center
 * Added: 2026-05-03
 *
 * This file contains targeted accessibility fixes and should not be edited
 * for general styling. See accessibility-updates/update-log.md for change history.
 */


/* ==========================================================================
   T1 — Skip to main content link (WCAG 2.4.1 Bypass Blocks)
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 12px 24px;
  background: #142847;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  z-index: 99999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #007c76;
  outline-offset: 2px;
}


/* ==========================================================================
   T2 — Mobile menu toggle button reset (WCAG 4.1.2 / 2.1.1)
   Prevents browser default button styles from breaking the existing layout.
   ========================================================================== */

button.mobile_menu_toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: stretch;
  text-align: right;
}

button.mobile_menu_toggle:focus-visible {
  outline: 3px solid #007c76;
  outline-offset: 3px;
  border-radius: 2px;
}


/* ==========================================================================
   T4 — Visible focus outlines on slider controls (WCAG 2.4.7 Focus Visible)
   The compiled theme CSS suppresses all outlines on slick elements via
   outline:none !important. These rules restore visible focus indicators
   for keyboard users. Must use !important to win the cascade.
   ========================================================================== */

.slick-prev:focus-visible,
.slick-next:focus-visible {
  outline: 3px solid #007c76 !important;
  outline-offset: 2px !important;
}

.slick-dots li button:focus-visible {
  outline: 3px solid #007c76 !important;
  outline-offset: 2px !important;
}

.slick-list :focus-visible {
  outline: 3px solid #007c76 !important;
  outline-offset: 2px !important;
  outline-width: 3px !important;
  outline-color: #007c76 !important;
}


/* ==========================================================================
   T7 / T8 — Slider pause/play button (WCAG 2.2.2 Pause, Stop, Hide)
   Button is injected by JS into #home_slider and #testimonials_slider.
   Only rendered when prefers-reduced-motion is not set (autoplay disabled
   entirely for users who prefer reduced motion).
   ========================================================================== */

/* Teal bg on mobile covers the slick dots area and any height-equalisation
   gap so shorter slides don't show a white strip below their content. */
@media screen and (max-width: 960px) {
  #home_slider .slick-slider,
  #home_slider .slick-list {
    background-color: #0d7b75;
  }
}


/* ==========================================================================
   T44 — Mobile slide content contrast (WCAG 1.4.3 Contrast Minimum)
   .slide_content p was #9ffbf5 on #19a69d = 2.5:1 — fails badly.
   Fix: semi-transparent dark scrim fading from rgba(0,0,0,0) at top to
   rgba(0,0,0,0.38) by 35% — transparent top meets wave seamlessly;
   effective rendered color on text = white on ~#106761 = 6.7:1.
   Desktop slide button uses #009d93 (3.37:1 on white) — fix to #007c76 (5.14:1).
   ========================================================================== */

@media screen and (max-width: 960px) {
  .slide_content {
    background: linear-gradient(to bottom, #19a69d 0%, #0d7b75 100px) !important;
  }

  .slide_content p {
    color: #fff !important;
  }
}

@media screen and (min-width: 961px) {
  .slide_content .button {
    color: #007c76 !important;
    border-color: #007c76 !important;
  }

  .slide_content .button:hover {
    color: #005f5c !important;
    border-color: #005f5c !important;
  }
}

/* Wrapper div injected by JS immediately after each slider.
   On mobile the home slider wrapper continues the teal background
   so the pause button sits flush against the slider visually. */
.slider-pause-wrap {
  text-align: right;
  background: transparent;
}

/* Desktop: pull the wrapper back up over the slider's bottom-right corner.
   pointer-events:none lets clicks pass through to the slick dots beneath;
   the button itself restores pointer-events so it remains clickable. */
@media screen and (min-width: 961px) {
  .slider-pause-wrap {
    position: relative;
    margin-top: -46px;
    z-index: 100;
    padding: 0 16px;
    pointer-events: none;
  }

  .slider-pause-btn {
    pointer-events: auto;
  }
}

/* Mobile: teal background continuation, button centered */
@media screen and (max-width: 960px) {
  #home_slider {
    margin-bottom: 0;
  }

  #home_slider + .slider-pause-wrap {
    background-color: #0d7b75;
    text-align: center;
    padding: 12px 16px 20px;
  }

  #testimonials_slider + .slider-pause-wrap {
    text-align: center;
    padding: 10px 16px;
  }
}

/* The button — inline-block so it respects text-align on the wrapper */
.slider-pause-btn {
  display: inline-block;
  padding: 5px 16px;
  background: rgba(20, 40, 71, 0.82);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 3px;
  line-height: 1.5;
}

.slider-pause-btn:hover {
  background: #142847;
}

.slider-pause-btn:focus-visible {
  outline: 3px solid #007c76;
  outline-offset: 3px;
}


/* ==========================================================================
   T18 — Desktop sub-menu keyboard access via :focus-within (WCAG 2.1.1 Keyboard)
   Mirrors the existing li:hover > ul.sub-menu rule so keyboard users can
   open dropdowns by tabbing into the parent menu item.
   ========================================================================== */

@media screen and (min-width: 961px) {
  ul#top-menu li:focus-within > ul.sub-menu {
    display: inherit;
  }
}


/* ==========================================================================
   T9 — Lime green "Read More" buttons (WCAG 1.4.3 Contrast Minimum)
   White on #b6d546 = 1.67:1 — fails 4.5:1.
   Fix: dark navy (#142847) on lime = 9.4:1.
   Covers #top_3_boxes READ MORE buttons, blog Continue Reading link,
   and the #find_the_location bar which shares the same background.
   ========================================================================== */

#content #top_3_boxes a.button,
body.page-id-24373 #content a.button {
  color: #142847 !important;
}

a.continue_reading {
  color: #142847 !important;
}

a.continue_reading:hover {
  color: #142847 !important;
}

#find_the_location,
#find_the_location h2,
#find_the_location a {
  color: #142847 !important;
}

#find_the_location a:hover {
  color: #142847 !important;
  text-decoration: underline;
}


/* ==========================================================================
   T10 — Patient Portal header button (WCAG 1.4.3 Contrast Minimum)
   White on #74c749–#b6d546 lime gradient = 2.10:1 — fails 4.5:1.
   Fix: dark navy on lime gradient = ~9:1.
   ========================================================================== */

#header_patient_portal,
#header_patient_portal a,
#mobile_patient_portal,
#mobile_patient_portal a {
  color: #142847 !important;
}


/* ==========================================================================
   T11 — Pay My Bill button (WCAG 1.4.3 Contrast Minimum)
   White on #f05259 = 3.47:1 — fails 4.5:1.
   Fix: darken background to #c0392b; white on #c0392b = 5.05:1.
   ========================================================================== */

#header_pay_my_bill,
#mobile_pay_my_bill {
  background-color: #c0392b !important;
}


/* ==========================================================================
   T12 — "Call Us Anytime" orange bar (WCAG 1.4.3 Contrast Minimum)
   White on #fc8f10 orange gradient = 2.31:1 — fails 4.5:1.
   Fix: dark navy on orange = 6.93:1.
   ========================================================================== */

#appointments_button,
#appointments_button a,
#mobile_appointments_button,
#mobile_appointments_button a {
  color: #142847 !important;
}


/* ==========================================================================
   T13 — Blog post title links and news "Read More" buttons
   (WCAG 1.4.3 Contrast Minimum)
   #00a9a4 on white = 2.91:1 — fails 4.5:1.
   Fix: #007c76 on white = 5.14:1 (already the site's accessible teal).
   ========================================================================== */

#content h2.blog_post_title a {
  color: #007c76 !important;
}

#recent_news .button {
  color: #007c76 !important;
  border-color: #007c76 !important;
}


/* ==========================================================================
   T14 — Desktop nav link hover state (WCAG 1.4.3 Contrast Minimum)
   #009D93 on white = 3.22:1 — fails 4.5:1.
   Default colour (#007c76 = 5.14:1) already passes — hover only.
   Fix: #005f5c on white = 6.48:1.
   ========================================================================== */

@media screen and (min-width: 961px) {
  nav ul#top-menu > li a:hover {
    color: #005f5c !important;
  }
}


/* ==========================================================================
   T15 — Grey header bar utility links (WCAG 1.4.3 Contrast Minimum)
   #666 on #ddd = 4.23:1 — just below 4.5:1.
   Fix: #555 on #ddd = 5.09:1.
   ========================================================================== */

#aux_links a {
  color: #555 !important;
}


/* ==========================================================================
   T39 — "Our Mission" section body text (WCAG 1.4.3 Contrast Minimum)
   Original lime bg (#d3e27d) restored. #005a4a on #d3e27d = 5.03:1 — passes.
   position:relative required for ::after fade overlay.
   ========================================================================== */

#our_mission {
  color: #005a4a !important;
  position: relative;
  padding-bottom: 180px !important;
}

#our_mission::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, #ffffff);
  pointer-events: none;
}


/* ==========================================================================
   T40 — Homepage slide H2 heading (WCAG 1.4.3 Contrast Minimum — large text)
   #dc5d5e at 44px bold = large text; WCAG requires 3:1 (not 4.5:1).
   Measured ~3.64:1 — passes large-text threshold against typical slide images.
   No color change applied; visual contrast is adequate for large text.
   Note: if future slides introduce near-white image backgrounds behind the
   heading text, the colour should be revisited at that time.
   ========================================================================== */


/* ==========================================================================
   Utility — Visually hidden text for screen readers only (WCAG 2.4.4)
   Used by T32 to add unique context to repeated "READ MORE" link labels.
   Standard .sr-only pattern: element is in the DOM but not visible.
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ==========================================================================
   T24 — "Why Choose" section headings (WCAG 1.3.1 Info and Relationships)
   <strong> replaced with <h3> in front-page.php. Reset h3 default size and
   margin so the visual appearance stays identical to the former <strong>.
   Color darkened from #e61b1b (4.24:1 on #f7f7f7 — fails) to #c01717 (5.50:1 — passes).
   ========================================================================== */

#why_choose_hof h3 {
  color: #c01717;
  font-size: 1em;
  font-weight: 700;
  margin: 0 0 0.3em 0;
  line-height: inherit;
}


/* ==========================================================================
   T25 — "Our Mission/Vision/Values" headings (WCAG 1.3.1 Info and Relationships)
   <strong> replaced with <h2> in includes/our-mission-content-section.php.
   h2 at 1.6em bold = WCAG large text (3:1 threshold). #005a4a = 5.03:1 — passes.
   ========================================================================== */

#our_mission h2 {
  color: #005a4a !important;
  font-weight: 900;
  font-size: 1.6em;
  margin: 0.75em 0 0.1em;
}

#our_mission h2:first-child {
  margin-top: 0;
}


/* ==========================================================================
   T45 — Careers link in grey header bar (WCAG 1.4.3 Contrast Minimum)
   #666666 at opacity .9 on #ddd ≈ 3.55:1 — fails 4.5:1.
   Fix: #595959 at full opacity = 5.14:1 on #ddd.
   ========================================================================== */

#header_employment a,
#header_employment a:hover,
#mobile_employment a,
#mobile_employment a:hover {
  color: #595959 !important;
  opacity: 1 !important;
}


/* ==========================================================================
   T46 — Google Translate widget text (WCAG 1.4.3 Contrast Minimum)
   GT injects grey text (~#888) on #ddd grey bar = ~2.1:1 — fails 4.5:1.
   Fix: #595959 = 5.14:1 on #ddd.
   ========================================================================== */

#google_translate_element .goog-te-gadget {
  color: #595959 !important;
}

#google_translate_element .goog-te-gadget a,
#google_translate_element .goog-te-gadget a:visited {
  color: #595959 !important;
}


/* ==========================================================================
   T47 — Top 3 boxes section headings (WCAG 1.4.3 Contrast Minimum)
   #b6d546 lime on white = 1.67:1 — fails even large text 3:1 threshold.
   Fix: #6a7d00 dark olive-lime = 4.75:1 on white.
   ========================================================================== */

#top_3_boxes strong {
  color: #6a7d00 !important;
}
