/*
Theme Name: Forward House
Description: Forward House child theme of Salient (parent: forward-house)
Theme URI:   https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Author: Rain
Author URI:  https://rain-digital.ca
Template: forward-house
Version: 1.0
*/

/* GTranslate language links (English / Français): lay out side by side.
   Moved here from Customizer > Additional CSS. */
.gtranslate_wrapper {
	display: flex;
	gap: 0.9rem;
	margin-bottom: 0.3rem;
	justify-content: center;
}
/* js/a11y.js wraps the switcher in a "Language" nav, which makes it the last
   child, where Salient removes its margin; keep the gap on the nav instead. */
.fh-lang-nav {
	margin-bottom: 0.3rem;
}

/* ==========================================================================
   Accessibility overrides (WCAG 2.2 AA)
   Only for things Salient has no theme option or element setting for.
   Brand colours live in Salient > Accent Colors; see .ddev/commands/web/brand-colours.
   ========================================================================== */

/* 1.4.3 Contrast: Salient hardcodes the "Page" / "Post" label on search
   results as #999 (2.8:1). #757575 matches the footer secondary text (4.6:1). */
body.search #search-results article .inner-wrap .title > span {
	color: #757575;
}

/* 1.3.1 Heading structure: some section headings had to become H2 (they sit
   right under the page H1) but should keep their H3 look. Add class "fh-h3"
   to an H2 (or "Extra class name" on a Custom Heading). Also used on the
   Our Teams H1, which is styled like the section headings under it.
   Sizes copy Salient > Typography > H3 (25px / 700) and Salient's smaller
   H3 sizes on narrower screens; update them here if H3 typography changes.
   !important is needed to beat Salient's own !important Custom Heading sizes. */
h1.fh-h3,
h2.fh-h3 {
	font-size: 25px !important;
	line-height: 25px !important;
	font-weight: 700 !important;
}
@media only screen and (max-width: 1300px) and (min-width: 1000px) {
	h1.fh-h3, h2.fh-h3 { font-size: 22px !important; line-height: 22px !important; }
}
@media only screen and (max-width: 999px) {
	h1.fh-h3, h2.fh-h3 { font-size: 20px !important; line-height: 20px !important; }
}

/* 1.3.1 Heading structure: page titles that were split over two H1s are now
   one H1; the second line sits in <span class="fh-title-line"> with the same
   8px gap the old separate headings had. */
.fh-title-line {
	display: block;
	margin-top: 8px;
}

/* 1.3.1 Heading structure: team member job titles were H5 headings placed
   above each name. js/a11y.js turns them into plain text with this class;
   it copies Salient's H5 look on team cards (20px / 700, 5px gap). */
.row .team-member .team-meta p.fh-team-role {
	font-family: Helvetica, sans-serif;
	font-size: 20px;
	line-height: 1em;
	font-weight: 700;
	color: #333;
	margin: 0 0 5px;
	padding: 0;
}

/* 2.1.2 / 2.4.7: Close button added to team bios by js/a11y.js. Mouse users
   close the bio by clicking anywhere, so it only appears when keyboard
   focus lands on it (which happens as soon as a bio opens by keyboard). */
.nectar_team_member_overlay .fh-team-bio-close {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.nectar_team_member_overlay .fh-team-bio-close:focus-visible {
	position: static;
	width: auto;
	height: auto;
	overflow: visible;
	clip: auto;
	margin-bottom: 1.5em;
	padding: 0.5em 1.1em;
	border: 2px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

/* 2.4.7 Focus visible: slider dots made focusable by js/a11y.js. */
.slider-pagination .swiper-pagination-switch:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
	box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.6);
}

/* 2.3.3 Animation from interactions: Salient has no reduced-motion setting.
   When the visitor's device asks for reduced motion, entrance effects,
   the title scribble and slider slides appear instantly instead of moving,
   and the scroll parallax on the Accessibility page stays still. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		animation-delay: 0s !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
		scroll-behavior: auto !important;
	}
	[data-scroll-animation="true"] > .vc_column-inner {
		transform: none !important;
	}
}

/* 1.4.3 Contrast: the "multiple visible" testimonial slider fades inactive
   slides to 30% opacity, which turns the body text into #c2c2c2 (1.8:1).
   70% is the lowest that passes (#707070, 4.95:1) and keeps the faded look. */
.testimonial_slider[data-style="multiple_visible"] blockquote:not(.is-selected) {
	opacity: 0.7;
}
/* Salient also fades the person's name under each testimonial to 60%
   (#858585, 3.7:1), and on the faded slides above that drops to 2.35:1.
   Names use the same 70% (#707070) instead; on faded slides the name is
   left at full strength so the slide's 70% gives the same shade. */
.testimonial_slider blockquote .title,
.nectar_single_testimonial .title {
	opacity: 0.7;
}
.testimonial_slider[data-style="multiple_visible"] blockquote:not(.is-selected) .title {
	opacity: 1;
}

/* 1.4.1 Use of Color: Salient > General Link Style "Basic Underline" underlines
   links in text but also switches them to the text colour, with no option to
   keep the colour. Put the accent colour back (Salient > Accent Color, so it
   follows that setting). Links on dark sections and in team bios keep the text
   colour Salient gives them. */
body .wpb_text_column a,
body p a,
body .nectar-fancy-ul a,
body .wp-block-quote a,
body .wp-block-list a {
	color: var(--nectar-accent-color);
}
body .span_12.light .wpb_text_column a,
body .span_12.light p a,
body .nectar_team_member_overlay a {
	color: inherit;
}
