/* ==========================================================================
   CLS base: shared design tokens + site-wide accessibility
   Loads after theme.css and custom.css (see header.php).

   This file is the single source of truth for colors. New templates, snippets
   and WPBakery custom CSS should use these variables, never raw hex values.
   See README-CLS.md for how the theme's CSS is organized.
   ========================================================================== */

:root {
	/* Area colors. Each area has three values:
	   color = the designated area color (accents, bars, large text)
	   deep  = a deep shade (color-block headers, buttons with white text)
	   tint  = a light shade (text on the deep shade)  */
	--cls-advocacy:          #007a8a;  /* teal */
	--cls-advocacy-deep:     #003d45;
	--cls-advocacy-tint:     #5bc2ce;

	--cls-programs:          #00acd8;  /* light blue (I&E / programs) */
	--cls-programs-deep:     #00566c;
	--cls-programs-tint:     #8fddf2;

	--cls-events:            #8a9094;  /* grey */
	--cls-events-deep:       #3d4447;  /* suggested; no brand dark grey yet */
	--cls-events-tint:       #c9cdd0;

	--cls-membership:        #76bc21;  /* green (membership, cost savings, providers) */
	--cls-membership-deep:   #3b5e10;
	--cls-membership-tint:   #b6de80;

	--cls-general-deep:      #1a2a3a;  /* general CLS brand pages (About Us); accent bar uses all four area colors */
	--cls-general-tint:      #b9c6d2;

	/* Type: both families come from the Adobe Fonts (Typekit) kit loaded by the site */
	--cls-font-display: "bebas-neue", sans-serif;          /* headings */
	--cls-font-body:    "arial-nova-condensed", sans-serif; /* body text, labels, buttons */

	/* Text and surfaces */
	--cls-ink:          #1a2a3a;  /* headings, strong text        15:1 on white */
	--cls-text:         #333333;  /* body text                    12.6:1 */
	--cls-text-muted:   #555555;  /* labels, meta, captions       7.5:1 (replaces #888) */
	--cls-link:         #007a8a;  /* links in body copy           5.1:1 */
	--cls-link-hover:   #003d45;
	--cls-line:         #e2e6ea;  /* borders and dividers */
	--cls-surface-alt:  #f2f8f9;  /* light panels */

	/* Focus ring: dark on light backgrounds, white on dark ones (.cls-on-dark) */
	--cls-focus:        #003d45;
	--cls-focus-on-dark:#ffffff;

	/* Space between the standard page header and the first content block, on every page type.
	   Change it here and it changes everywhere (WPBakery pages and the PHP templates). */
	--cls-header-gap:   48px;
}
@media (max-width: 767px) {
	:root { --cls-header-gap: 32px; }
}

/* --------------------------------------------------------------------------
   Space below the standard page header on WPBakery pages.
   The header row has the class "cls-adv-header-row"; WPBakery inserts a
   .vc_row-full-width spacer after stretched rows, so both cases are covered.
   Advocacy section rows (.cls-adv-band) already have their own padding, so for
   those the band's top padding is set to the same gap instead of adding margin.
   -------------------------------------------------------------------------- */
.cls-adv-header-row + .vc_row:not(.cls-adv-band),
.cls-adv-header-row + .vc_row-full-width + .vc_row:not(.cls-adv-band) {
	margin-top: var(--cls-header-gap) !important;
}
.cls-adv-header-row + .vc_row.cls-adv-band,
.cls-adv-header-row + .vc_row-full-width + .vc_row.cls-adv-band {
	padding-top: var(--cls-header-gap) !important;
}

/* --------------------------------------------------------------------------
   Keyboard focus
   theme.css (from the original 2022 build) removes outlines on every element
   with `* { outline: 0 }`. This restores a visible ring for keyboard users only;
   mouse clicks are unaffected because :focus-visible is used.
   -------------------------------------------------------------------------- */
:focus-visible {
	outline: 2px solid var(--cls-focus) !important;
	outline-offset: 2px;
}

/* Dark surfaces: standard page header, footer bands, and any element given .cls-on-dark */
.clsx-header :focus-visible,
.cls-on-dark :focus-visible,
.pp-resources :focus-visible,
.provider-hero :focus-visible,
.cls-news-fallback-header :focus-visible {
	outline-color: var(--cls-focus-on-dark) !important;
}

/* --------------------------------------------------------------------------
   Skip link (header.php). Hidden until a keyboard user tabs to it.
   -------------------------------------------------------------------------- */
.cls-skip-link {
	position: absolute;
	left: 12px;
	top: -100px;
	z-index: 100000;
	padding: 12px 18px;
	background: var(--cls-advocacy-deep);
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
	border-radius: 0 0 6px 6px;
}
.cls-skip-link:focus,
.cls-skip-link:focus-visible {
	top: 0;
	outline-color: #fff !important;
	outline-offset: -4px;
}

/* Target sits right after the fixed site header; keep it clear of the header when jumped to. */
.cls-skip-target {
	display: block;
	scroll-margin-top: 140px;
}
.cls-skip-target:focus {
	outline: none !important;
}

/* --------------------------------------------------------------------------
   Screen-reader-only text (WordPress core class, defined here in case the
   theme or a plugin doesn't load it on the front end).
   -------------------------------------------------------------------------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   Respect reduced-motion preferences across the site
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

/* --------------------------------------------------------------------------
   Link and legacy-component colors (contrast fixes)
   theme.css (2022) uses brand green #76bc21 and light blue #00acd8 as TEXT
   colors on white, which fail WCAG contrast (2.3:1 and 2.7:1). These rules
   keep the same components but switch text to colors that pass.
   Green/light blue stay as backgrounds and accents, where they work.
   -------------------------------------------------------------------------- */
a { color: var(--cls-link); }
a:hover { color: var(--cls-link-hover); }

.primary-link,
.link-with-right-arrow,
.link-with-right-arrow:after,
.link-with-down-arrow,
.link-with-down-arrow:after,
.call-to-action-module p a,
.breadcrumbs a {
	color: var(--cls-link);
}

/* WPBakery tabs: light-blue titles -> deep programs blue (8.2:1).
   Accordions are styled in the Customizer's Additional CSS (teal on white / white on teal), so they're left alone here. */
.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-tab > a,
.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-tab.vc_active > a,
.vc_tta-tabs .vc_tta-panel-title a,
.vc_tta-tabs .vc_tta-panel.vc_active .vc_tta-panel-title,
.vc_tta-tabs .vc_tta-panel.vc_active .vc_tta-panel-title a {
	color: var(--cls-programs-deep) !important;
}

/* Legacy buttons with white text on light blue -> deep programs blue background */
.primary-button:hover,
.button-with-down-arrow {
	background: var(--cls-programs-deep);
}

/* Space below the standard header on the search results page */
.cls-search-page { padding-top: var(--cls-header-gap); }

/* --------------------------------------------------------------------------
   Header search: magnifier button in the top bar opens a search bar under the
   header (header.php). New class names, because the Customizer hides the old
   div.header-search with !important.
   -------------------------------------------------------------------------- */
.cls-search-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 36px; height: 36px; margin: 0 6px 0 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--cls-ink); font-size: 18px; cursor: pointer; }
.cls-search-toggle:hover { background: #eef3f4; color: var(--cls-link); }
.cls-search-toggle[aria-expanded="true"] { background: #eef3f4; color: var(--cls-link); }
.cls-search-panel { background: #fff; border-top: 1px solid var(--cls-line); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08); padding: 16px 0; }
.cls-search-panel[hidden] { display: none; }
.cls-search-form { display: flex; gap: 10px; max-width: 760px; }
.cls-search-form input[type="search"] { flex: 1; min-width: 0; height: 48px; padding: 0 16px; font-size: 18px; border: 1px solid #c9d6da; border-radius: 6px; background: #fff; color: var(--cls-text); }
.cls-search-form button[type="submit"] { height: 48px; margin: 0; padding: 0 22px; border: 2px solid var(--cls-advocacy); background: var(--cls-advocacy); color: #fff; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 14px; cursor: pointer; }
.cls-search-form button[type="submit"]:hover { background: var(--cls-advocacy-deep); border-color: var(--cls-advocacy-deep); }

/* 404 page: the Customizer makes every h1 white (for photo headers), which hid the 404 heading */
h1.wrp404-tag { color: var(--cls-ink) !important; }

