/* =============================================================================
   Med-Link - colour contrast fixes (WCAG 2.2 AA)
   -----------------------------------------------------------------------------
   Loaded after Cornerstone's generated CSS (see functions.php), so these rules
   override it on equal specificity.

   The brand teal #00aac3 is 2.8:1 on white, so where it is used for text on a
   light background, or behind white text, it is replaced by a darker shade of
   the same teal. Teal on the dark navy sections stays #00aac3 (6.9:1 there).
   ========================================================================== */

:root {
  --teal-text:       #007891;  /* 5.1:1 on white, 4.6:1 on #f3f3f3; white text on it 5.1:1 */
  --teal-text-photo: #006f87;  /* headlines over the washed-out page-header photos */
  --grey-text:       #6d6d6d;  /* replaces #999 body text: 4.7:1 on #f3f3f3 */
}


/* Buttons with white text on teal
   -------------------------------------------------------------------------- */
.x-masthead .x-anchor-button:not(.has-graphic):not(:hover),        /* header "Get Started" */
.x-off-canvas .x-anchor-button:not(:hover),                         /* mobile menu "Get Started" / "Call Us" */
.x-section .x-anchor-button.has-graphic[href^="tel:"]:not(:hover) { /* Contact "Call Offices" */
  background-color: var(--teal-text);
}


/* Mobile menu: current page / hovered sub-menu item
   -------------------------------------------------------------------------- */
.x-off-canvas .sub-menu .x-anchor[class*="active"] .x-anchor-text-primary,
.x-off-canvas .sub-menu .x-anchor:hover .x-anchor-text-primary {
  color: var(--teal-text);
}


/* Tabs: hovered / active tab label
   -------------------------------------------------------------------------- */
.x-tabs > .x-tabs-list button:hover,
.x-tabs > .x-tabs-list button[class*="active"] {
  color: var(--teal-text);
}


/* Accordions (FAQ)
   -------------------------------------------------------------------------- */
.x-acc > .x-acc-item > .x-acc-header:not(:hover):not([class*="active"]) > .x-acc-header-content > .x-acc-header-indicator {
  color: var(--teal-text);                                          /* closed "▸" */
}
.x-acc > .x-acc-item > .x-acc-header[role="button"]:hover,
.x-acc > .x-acc-item > .x-acc-header[role="button"][class*="active"] {
  background-color: var(--teal-text);                               /* hovered / open question bar */
}


/* Links on light backgrounds (hover keeps its colour)
   -------------------------------------------------------------------------- */
.gform_wrapper a:not(:hover),                                       /* form consent links */
.x-acc-content a:not(:hover),                                       /* FAQ answers */
.page-id-92 .x-content a:not(:hover) {                              /* Accessibility page */
  color: var(--teal-text);
}

.gform_wrapper,
.error404 .entry-404 {
  color: var(--grey-text);
}

.x-text.app-teal-heading .x-text-content-text-primary,
.x-text.app-teal-subheading .x-text-content-text-subheadline {
  color: var(--teal-text);
}
.x-text.app-teal-heading-photo .x-text-content-text-primary {
  color: var(--teal-text-photo);
}

.page-id-74 .x-text .x-text-content-text-subheadline {              /* Get Started: "All information is transmitted securely..." */
  color: #65787f;                                                   /* was #677a81 = 4.49:1 */
}
.x-colophon a[href*="nueramarketing"]:not(:hover) .x-anchor-text-primary { /* footer credit */
  color: #a6d7de;                                                   /* was #9cccd3 = 4.1:1 on the footer gradient */
}

.home #cs-content > .x-section:first-child > .x-bg::after {
  content: "";
  position: absolute;
  inset: 70px 0 0;
  z-index: 2;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 50px);
          mask-image: linear-gradient(180deg, transparent 0, #000 50px);
  background: linear-gradient(180deg, rgba(0, 18, 25, .6) 0%, rgba(0, 18, 25, .6) 28%, rgba(0, 18, 25, 0) 46%); /* text centred at the top */
}
@media (min-width: 979px) {
  .home #cs-content > .x-section:first-child > .x-bg::after {
    background: linear-gradient(90deg, rgba(0, 18, 25, .6) 0%, rgba(0, 18, 25, .55) 50%, rgba(0, 18, 25, 0) 72%); /* text on the left */
  }
}
@media (max-width: 978px) {
  .home #cs-content > .x-section:first-child p.x-text-content-text-primary {
    color: #fff;                                                    /* eyebrow is navy on small screens */
  }
}
