/**
 * Accessibility Fixes - Michigan Cosmetic Surgery
 * Fixes Lighthouse contrast and link distinguishability issues.
 * Brand colors: Primary teal #14828e, Gold #f6d270, Dark #1a1a2e, White #ffffff
 *
 * WCAG AA minimum contrast ratios:
 *   - Normal text: 4.5:1
 *   - Large text (18px+ or 14px+ bold): 3:1
 *
 * Generated: 2026-03-26
 */

/* ==========================================================================
   1. LINK UNDERLINES - Content area links must be distinguishable
   ========================================================================== */

/* Default: all links in content areas get underline */
#main-content a,
.entry-content a,
.et_pb_text a,
.post-content a,
.et_pb_promo_description a,
.et_pb_toggle_content a,
.et_pb_tab_content a,
.et_pb_accordion_item a,
#main-footer .footer-widget a {
  text-decoration: underline;
}

/* Remove underline on hover (visual feedback reversal) */
#main-content a:hover,
.entry-content a:hover,
.et_pb_text a:hover,
.post-content a:hover,
.et_pb_promo_description a:hover,
.et_pb_toggle_content a:hover,
.et_pb_tab_content a:hover,
.et_pb_accordion_item a:hover,
#main-footer .footer-widget a:hover {
  text-decoration: none;
}

/* ==========================================================================
   2. EXEMPT: Navigation links - clearly identifiable as nav, no underline
   ========================================================================== */

#main-header a,
#main-header nav a,
#et-secondary-nav a,
.et_mobile_menu a,
#top-header a,
.menu-item a,
nav a,
.et-menu a,
.dvmm_menu_inner_container a,
#main-footer #et-footer-nav a,
#footer-bottom a {
  text-decoration: none;
}

/* ==========================================================================
   3. EXEMPT: Button-styled links - visually distinct, no underline needed
   ========================================================================== */

.et_pb_button,
.et_pb_more_button,
a.et_pb_button,
.et_pb_bg_layout_dark a,
.et_pb_cta_button,
.et_pb_pricing_table_button,
.et_pb_newsletter_button,
.et_pb_contact_submit,
.wp-element-button,
.wp-block-button__link,
.et_pb_slide_description a.et_pb_button,
a.et_pb_promo_button {
  text-decoration: none !important;
}

/* ==========================================================================
   4. EXEMPT: Image links, logo links, social icons
   ========================================================================== */

.et_pb_image a,
.et_pb_image_container a,
.entry-featured-image-url,
.et-social-icon a,
.et_pb_social_media_follow_network_link,
.et_pb_gallery_item a,
#logo,
a[class*="image"],
a[class*="gallery"],
a[class*="logo"] {
  text-decoration: none !important;
}

/* ==========================================================================
   5. COLOR CONTRAST FIXES
   Ensure minimum 4.5:1 contrast ratio on white backgrounds
   ========================================================================== */

/* Fix light gray text - common Divi issue (#999, #aaa, #bbb, #ccc on white) */
.et_pb_text,
.et_pb_text p,
.et_pb_blurb_description,
.et_pb_toggle_content,
.et_pb_tab_content,
body .et_pb_post .post-content,
.et_pb_module p,
.entry-content p {
  color: #1a1a2e;
}

/* Ensure body text is dark enough */
body,
body .entry-content,
body #main-content {
  color: #1a1a2e;
}

/* Fix Divi module description text that may be too light */
.et_pb_blurb_description,
.et_pb_team_member_description,
.et_pb_testimonial_description,
.et_pb_pricing_content li {
  color: #333333;
}

/* Fix inline styles that set light colors - use !important sparingly */
.et_pb_text_inner span[style*="color: #999"],
.et_pb_text_inner span[style*="color: #aaa"],
.et_pb_text_inner span[style*="color: #bbb"],
.et_pb_text_inner span[style*="color: #ccc"],
.et_pb_text_inner span[style*="color:#999"],
.et_pb_text_inner span[style*="color:#aaa"],
.et_pb_text_inner span[style*="color:#bbb"],
.et_pb_text_inner span[style*="color:#ccc"] {
  color: #595959 !important;
}

/* Fix meta text (dates, authors, categories) - often too light */
.et_pb_post .post-meta,
.et_pb_post .post-meta a,
.published,
.post-meta span,
.et_pb_member_position {
  color: #595959;
}

/* Fix placeholder text in forms */
input::placeholder,
textarea::placeholder {
  color: #595959;
}

/* ==========================================================================
   6. TEAL LINK COLOR ADJUSTMENTS
   #14828e on white = ~4.1:1 (fails AA for normal text)
   #0e6e78 on white = ~5.0:1 (passes AA)
   ========================================================================== */

/* Darken teal links to pass contrast on white backgrounds */
a,
.et_pb_text a,
.entry-content a,
.post-content a,
#main-content a {
  color: #0e6e78;
}

a:hover,
.et_pb_text a:hover,
.entry-content a:hover,
.post-content a:hover,
#main-content a:hover {
  color: #14828e;
}

/* "read more" / "more-link" styling */
a.more-link {
  color: #0e6e78;
  text-decoration: underline;
  font-weight: 600;
}

a.more-link:hover {
  color: #14828e;
  text-decoration: none;
}

/* ==========================================================================
   7. FOOTER CONTRAST FIXES
   ========================================================================== */

/* Ensure footer text has sufficient contrast */
#main-footer,
#main-footer .footer-widget,
#main-footer .footer-widget li,
#main-footer .footer-widget p {
  color: #e0e0e0;
}

#main-footer .footer-widget a {
  color: #ffffff;
  text-decoration: underline;
}

#main-footer .footer-widget a:hover {
  color: #f6d270;
  text-decoration: none;
}

#footer-bottom,
#footer-bottom p,
#footer-bottom .et-social-icon a {
  color: #cccccc;
}

/* ==========================================================================
   8. FOCUS INDICATORS
   Visible focus states for keyboard navigation
   ========================================================================== */

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
.et_pb_button:focus {
  outline: 2px solid #14828e;
  outline-offset: 2px;
}

/* Skip to content link (if present) */
.screen-reader-text:focus {
  outline: 2px solid #14828e;
  outline-offset: 2px;
}

/* ==========================================================================
   9. HEADING CONTRAST
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.entry-title a,
.et_pb_module_header,
.et_pb_toggle_title {
  color: #1a1a2e;
}

/* Headings on dark backgrounds keep white */
.et_pb_bg_layout_dark h1,
.et_pb_bg_layout_dark h2,
.et_pb_bg_layout_dark h3,
.et_pb_bg_layout_dark h4,
.et_pb_bg_layout_dark h5,
.et_pb_bg_layout_dark h6,
.et_pb_bg_layout_dark .et_pb_module_header {
  color: #ffffff;
}

/* Dark background sections keep light text */
.et_pb_bg_layout_dark,
.et_pb_bg_layout_dark p,
.et_pb_bg_layout_dark a,
.et_pb_bg_layout_dark li {
  color: #ffffff;
}

.et_pb_bg_layout_dark a {
  text-decoration: underline;
}

.et_pb_bg_layout_dark a:hover {
  text-decoration: none;
}
