/* =============================================
   SVSEF Accessibility — Color Contrast & Focus
   WCAG 2.x AA. Targets Uncode's own color-class
   system (brand blue #4192b4 = color id 190371).

   NOTE: all overrides are prefixed with `body` to
   beat Uncode's inline color rules, which share the
   same specificity and would otherwise win on source
   order.
   ============================================= */

/* =============================================
   SCREEN-READER-ONLY (visually hidden) utility
   Used for injected h1 / hidden headings on any page.
   ============================================= */
.svsef-sr-h1 {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =============================================
   RED ERROR / EMPHASIS TEXT (WCAG 1.4.3)
   Pure red (#ff0000) on light bg = 3.7:1 (fails).
   Common in third-party form error messages
   (e.g. "form could not be loaded"). Darken to an
   accessible red that stays clearly red (~6:1).
   ============================================= */
body [style*="color: red"],
body [style*="color:red"],
body [style*="color: #ff0000"],
body [style*="color:#ff0000"],
body [style*="color: #f00"],
body [style*="color:#f00"],
body [style*="color: rgb(255, 0, 0)"],
body [style*="color:rgb(255,0,0)"] {
  color: #c00000 !important;
}

/* =============================================
   SKIP TO CONTENT (WCAG 2.4.1)
   ============================================= */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 99999;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.1s;
}
.skip-link:focus { top: 0; }

/* =============================================
   BRAND BLUE #4192b4 (Uncode color id 190371)
   3.5:1 — fails AA.
   On LIGHT backgrounds  -> #0e5a7c (7.6:1 on white)
   On DARK backgrounds   -> #6db3d6 (6:1 on navy)
   ============================================= */

/* --- TEXT uses on LIGHT backgrounds --- */
body .text-color-190371-color,
body .text-color-190371-color a,
body .icon-color-190371,
body .un-btn-txt-color-190371,
body .hover-color-190371-color a:hover,
body .hover-color-190371-color.unmenu-title:hover,
body .active-color-190371-color.active {
  color: #0e5a7c !important;
  fill: #0e5a7c !important;
}

/* --- DARK sections: ALL text & links must LIGHTEN, not darken.
       Higher specificity (.style-dark prefix) so these beat both the
       brand-blue rule above AND the events ul[role=list] rule below,
       which would otherwise darken links sitting on a dark background. --- */
body .style-dark .text-color-190371-color,
body .style-dark .text-color-190371-color a,
body .style-dark .icon-color-190371,
body [class*="style-dark"] .text-color-190371-color,
body [class*="style-dark"] .text-color-190371-color a,
body .style-dark a,
body [class*="style-dark"] a,
body .style-dark ul[role="list"] > li a,
body .style-dark .uncont a {
  color: #9fd4ec !important;
  fill: #9fd4ec !important;
}

/* --- BACKGROUND uses (white text sits on top) -> darken bg --- */
body .style-color-190371-bg,
body .btn-color-190371,
body .btn-color-190371.btn-flat,
body .un-btn-color-190371,
body .un-btn-color-190371:hover,
body .btn.btn-lg.btn-color-190371 {
  background-color: #0e5a7c !important;
  border-color: #0e5a7c !important;
  color: #ffffff !important;
}
body .btn-color-190371 *,
body .btn-color-190371.btn-flat * {
  color: #ffffff !important;
}

/* --- Outline buttons (transparent bg, brand-blue text) -> darken text --- */
body .btn-color-190371.btn-outline:not(.btn-text-skin),
body .btn-color-190371.btn-outline:not(.btn-text-skin) * {
  color: #0e5a7c !important;
  border-color: #0e5a7c !important;
}

/* --- Borders --- */
body .border-color-190371-color,
body .un-btn-brdr-color-190371 { border-color: #0e5a7c !important; }

/* --- Inline-styled buttons with brand-blue background (e.g. inline
       `background:#4192b4` registration buttons). Darken bg, white text. --- */
body a[style*="background:#4192b4"],
body a[style*="background: #4192b4"],
body a[style*="background-color:#4192b4"],
body a[style*="background-color: #4192b4"],
body a[style*="4192b4"] {
  background-color: #0e5a7c !important;
  color: #ffffff !important;
}
body a[style*="4192b4"] * { color: #ffffff !important; }

/* =============================================
   COUNTDOWN / EVENT TILES & EVENTS-MANAGER LISTS
   #4192b4 on cream
   ============================================= */
body .countdown span,
body .countdown small,
body [class*="countdown"] span,
body [class*="countdown"] small,
body .em > li,
body .em > li a,
body .events-manager a,
body ul[role="list"] > li,
body ul[role="list"] > li a {
  color: #0e5a7c !important;
}

/* =============================================
   CONTENT LINK BLUES (#3372f0 etc.)
   ============================================= */
body .entry-content a,
body .post-content a,
body .wp-block-paragraph a,
body [class*="vc_column"] p a,
body h5 > a,
body h5 a,
body a.x_OWAAutoLink,
body a[class*="OWAAutoLink"] {
  color: #0e5a7c !important;
  text-decoration: underline;
}

/* Heading links whose color is applied via CSS variable / JS with
   !important — beat them with html-prefixed contextual specificity.
   (e.g. homepage event-title h5 links rendering #3372f0 on cream) */
html body .vc_row h5 a,
html body [class*="style-color"] h5 a,
html body h5 a:link,
html body h5 a:visited,
html body h5 a:hover,
html body h4 a:link,
html body h4 a:visited,
html body h6 a:link,
html body h6 a:visited {
  color: #0e5a7c !important;
  text-decoration: underline !important;
}

/* Events Manager plugin: its links/buttons use
   `.em.pixelbones a { color: var(--accent-color) !important }`
   where --accent-color = #3372f0 (only 3.7:1 on cream). Redefine the
   variable to the accessible brand blue, and add a higher-specificity
   (0,2,2 > EM's 0,2,1) direct override for links. */
body .em,
body .em.pixelbones,
body [class*="events-manager"] {
  --accent-color: #0e5a7c !important;
}
body .em.pixelbones a,
body .em.pixelbones h5 a,
body .em.pixelbones h4 a,
body .em a {
  color: #0e5a7c !important;
}

/* =============================================
   BRAND YELLOW #ffd200 (Uncode color id "vyce")
   Used for decorative section numbers ("01/02/03")
   and accents. As TEXT on a light background it is
   only 1.45:1 — impossible to meet AA in yellow. On
   light backgrounds, darken to a readable gold
   (#8a6d00 = 4.9:1). On dark sections, keep the bright
   brand yellow (passes on dark).
   ============================================= */
body .text-color-vyce-color,
body .text-color-vyce-color * {
  color: #8a6d00 !important;
  fill: #8a6d00 !important;
}
body .style-dark .text-color-vyce-color,
body .style-dark .text-color-vyce-color *,
body [class*="style-dark"] .text-color-vyce-color,
body [class*="style-dark"] .text-color-vyce-color * {
  color: #ffd200 !important;
  fill: #ffd200 !important;
}

/* =============================================
   MUTED .btn-link TEXT BUTTONS (WCAG 1.4.3)
   "Next ›" / "‹ Prev" use #5a5c5e at 65% alpha
   (= 2.9:1). Force solid AA-compliant gray; keep
   light in dark sections.
   ============================================= */
body .btn-link,
body span.btn-link,
body a.btn-link,
body .btn-link.btn-icon-right,
body .btn-link.btn-icon-left,
body .btn-link i {
  color: #4a4c4e !important;
  opacity: 1 !important;
}
body .style-dark .btn-link,
body [class*="style-dark"] .btn-link,
body .style-dark .btn-link i {
  color: #e8eef2 !important;
}

/* =============================================
   LINK-IN-TEXT-BLOCK (WCAG 1.4.1)
   Links inside paragraphs must be distinguishable
   by more than color — underline them. Excludes
   buttons. Covers content, 404, and widget text.
   NOTE: footer is excluded below (dark bg, nav lists).
   ============================================= */
body p a:not([class*="btn"]):not(.button):not(.more-link),
body .uncont li a:not([class*="btn"]):not(.button) {
  text-decoration: underline !important;
}

/* =============================================
   HEADING / TITLE LINKS — no underline required
   These are standalone links (the whole heading is
   the link), NOT links within a text block, so WCAG
   1.4.1 does not require an underline. Color alone
   distinguishes them; underline looks heavy on large
   bold titles. Keep color, remove underline.
   ============================================= */
html body h1 a, html body h2 a, html body h3 a,
html body h4 a, html body h5 a, html body h6 a,
html body h1 a:link, html body h2 a:link, html body h3 a:link,
html body h4 a:link, html body h5 a:link, html body h6 a:link,
html body h1 a:visited, html body h2 a:visited, html body h3 a:visited,
html body h4 a:visited, html body h5 a:visited, html body h6 a:visited,
html body .heading-text a,
html body .h1 a, html body .h2 a, html body .h3 a,
html body .h4 a, html body .h5 a, html body .h6 a,
html body .em.pixelbones h2 a, html body .em.pixelbones h3 a,
html body .em.pixelbones h4 a, html body .em.pixelbones h5 a {
  text-decoration: none !important;
}

/* =============================================
   FOOTER LINKS (WCAG 1.4.3)
   The footer has a dark background. The brand-blue
   darkening (#0e5a7c) above makes links unreadable
   there, so force LIGHT links (~13:1 on dark). Footer
   nav lists are not text blocks, so no underline is
   required — underline on hover for affordance.
   ============================================= */
body #colophon a,
body .site-footer a,
body footer.site-footer a,
body .site-footer .uncont a,
body .site-footer li a,
body .site-footer p a {
  color: #e8eef4 !important;
  text-decoration: none !important;
}
body #colophon a:hover,
body #colophon a:focus,
body .site-footer a:hover,
body .site-footer a:focus {
  color: #ffffff !important;
  text-decoration: underline !important;
}

/* =============================================
   TILE TEXT OVERLAYS (WCAG 1.4.3)
   ============================================= */
body .tmb .t-entry-visual-overlay,
body .tmb .t-overlay,
body .t-entry-visual-cont .t-entry-visual-overlay {
  background-color: rgba(0, 0, 0, 0.6) !important;
}
body .tmb .t-entry-visual-overlay *,
body .tmb .t-overlay *,
body .t-entry-visual-cont .t-entry-visual-overlay * {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* =============================================
   LIGHT-GRAY BODY TEXT (#999 on light gray)
   Includes inline missing-image placeholders
   (e.g. XC Gold Team broken image: color:#999)
   ============================================= */
body [style*="color: #999999"],
body [style*="color:#999999"],
body [style*="color: #999"],
body [style*="color:#999"] {
  color: #595959 !important;
}

/* =============================================
   THIRD-PARTY: Instagram Feed buttons (Smash Balloon)
   "Follow" (.sbi_follow_btn) AND "Load More"
   (.sbi_load_btn / .sbi_btn_text) — brand-blue bg
   (#4192b4) with white text = 3.5:1. Darken bg.
   ============================================= */
body .sbi_follow_btn,
body .sbi_follow_btn span,
body a.sbi_follow_btn,
body .sbi_load_btn,
body .sbi_load_btn .sbi_btn_text,
body .sbi_btn_text,
body .sb_instagram_header a,
body #sb_instagram .sbi_load_btn {
  background-color: #0e5a7c !important;
  color: #ffffff !important;
}
body .sbi_follow_btn span,
body .sbi_load_btn .sbi_btn_text { color: #ffffff !important; }

/* =============================================
   HEADER NAV (WCAG 1.4.3)
   The theme dims inactive top-level nav titles to
   50% alpha — rgba(32,45,81,0.5) = effective #9096a8
   on the white header (2.95:1, fails). Force SOLID
   navy (alpha 1): visible on the light header and
   ~11:1. Do NOT use white — the header is light, so
   white text would be invisible.
   ============================================= */
body .navbar-main .dropdown-toggle[data-type="title"],
body .navbar-main .dropdown-toggle[data-type="title"] > span,
body .menu-primary-inner > .menu-item > .dropdown-toggle {
  color: #202d51 !important;
}

/* =============================================
   CAROUSEL PAUSE BUTTON (WCAG 2.2.2)
   ============================================= */
.svsef-carousel-pause {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 100;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.svsef-carousel-pause:hover { background: rgba(0, 0, 0, 0.9); }
.svsef-carousel-pause:focus { outline: 3px solid #ffbf47; outline-offset: 2px; }

/* =============================================
   FOCUS VISIBILITY (WCAG 2.4.7)
   ============================================= */
*:focus { outline: 3px solid #ffbf47 !important; outline-offset: 2px !important; }
*:focus:not(:focus-visible) { outline: none !important; }
*:focus-visible { outline: 3px solid #ffbf47 !important; outline-offset: 2px !important; }

/* =============================================
   YOUTUBE EMBED
   ============================================= */
iframe[src*="youtube"],
iframe[src*="youtu.be"] { display: block; }
