/* ==========================================================================
   TIQ SITE HEADER — forkable, transparent-overlay only.

   This file is the single source of truth for header visuals. It is:
     1. loaded by the Astro landing (BaseLayout stylesheets array), and
     2. pasted into Blogmaker "Header injections" wrapped in <style>…</style>.

   SECTION 1 (BAR) must be identical in both places.
   SECTION 2 (BLOGMAKER HOST) is only relevant on Blogmaker; it is inert on
   the landing because the selectors do not match anything there.

   Values are copied from the OLMO transparent header for pixel parity:
     menu.css  .tra-menu .wsmainfull / .wsmainwp / .desktoplogo / .wsmenu li a
     style.css .btn / .btn--stateblue / .hover--tra-black / .r-08 / Rubik
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;700&display=swap");

/* ==========================================================================
   SECTION 1 — BAR (shared: landing + Blogmaker)
   ========================================================================== */

.tiq-header {
	/* --- layout tokens: the only knobs that should ever move --------------- */
	--tiq-header-max: 1140px;        /* inner bar width         (.wsmainwp)                 */
	--tiq-header-gutter: 15px;       /* inner horizontal padding                            */
	--tiq-header-pad-y: 20px;        /* bar padding at top      (.tra-menu .wsmainfull)     */
	--tiq-header-pad-y-scrolled: 0px;/* bar padding after scroll                            */
	--tiq-header-inner-h: 80px;      /* logo/nav row height     (.desktoplogo line-height)  */
	--tiq-logo-h: 38px;              /* logo max-height         (.desktoplogo img)          */
	--tiq-link-size: 1.1rem;
	--tiq-link-weight: 500;
	--tiq-link-pad: 10px 15px;
	--tiq-link-gap: 16px;            /* was margin: 0 8px per link                          */
	--tiq-cta-gap: 60px;             /* extra space before the button (old .m-right)        */
	--tiq-btn-pad: 5px 16px;
	--tiq-btn-mt: 0px;               /* old float layout used 18px; flex centering replaces it */
	--tiq-z: 10050;
	/* --- color tokens ------------------------------------------------------- */
	--tiq-link-color: #181d27;       /* navbar-dark .h-link                                 */
	--tiq-link-hover: #21164c;
	--tiq-accent: rgb(28, 148, 84);  /* --stateblue / --traffiq-dark                        */
	--tiq-bar-bg-scrolled: #fff;
	--tiq-bar-shadow-scrolled: 0 2px 3px rgba(96, 96, 96, 0.13);
	--tiq-font: "Rubik", sans-serif;

	/* Do not use `all: initial` here: Gridlock sets `body { font-size: 0 }`, and
	   a dropped/invalid `all` rule would leave the bar with 0px type. Isolate
	   by re-declaring the properties we care about. */
	display: block;
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	width: 100%;
	z-index: var(--tiq-z, 10050);
	font-family: var(--tiq-font);
	font-size: 16px; /* beats Gridlock `body { font-size: 0 }` for descendants */
	line-height: 1.6666;
	color: #181d27;
	background-color: transparent;
	box-shadow: none;
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	/* Same 450ms ease as OLMO `.tra-menu .wsmainfull`. Do not combine with
	   animation-timeline: scroll() — that fights the JS class toggle and snaps. */
	transition: background-color 450ms ease-in-out, box-shadow 450ms ease-in-out;
}

.tiq-header,
.tiq-header * {
	box-sizing: border-box;
}

/* Solid state, added by site-header.js past 110px of scroll. */
.tiq-header.is-scrolled {
	background-color: var(--tiq-bar-bg-scrolled);
	box-shadow: var(--tiq-bar-shadow-scrolled);
}

/*------------------------------------------*/
/*  Bar row
/*------------------------------------------*/

.tiq-header__bar {
	display: flex;
	align-items: center;
	max-width: var(--tiq-header-max);
	margin-inline: auto;
	padding: var(--tiq-header-pad-y) var(--tiq-header-gutter);
	transition: padding 450ms ease-in-out;
}

.tiq-header.is-scrolled .tiq-header__bar {
	padding-top: var(--tiq-header-pad-y-scrolled);
	padding-bottom: var(--tiq-header-pad-y-scrolled);
}

/*------------------------------------------*/
/*  Logo
/*------------------------------------------*/

.tiq-header__brand {
	display: flex;
	align-items: center;
	height: var(--tiq-header-inner-h);
	text-decoration: none;
}

.tiq-header__logo {
	display: inline-block;
	max-height: var(--tiq-logo-h);
	width: auto;
	height: auto;
	border: 0;
}

/*------------------------------------------*/
/*  Nav links
/*------------------------------------------*/

.tiq-header__nav {
	margin-left: auto;
}

.tiq-header__list {
	display: flex;
	align-items: center;
	gap: var(--tiq-link-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}

.tiq-header__list > li {
	display: block;
	margin: 0;
	padding: 0;
}

.tiq-header__link {
	display: block;
	font-family: var(--tiq-font);
	font-size: var(--tiq-link-size);
	font-weight: var(--tiq-link-weight);
	line-height: calc(var(--tiq-header-inner-h) - 20px); /* 60px: link box fills the 80px row */
	letter-spacing: 0;
	color: var(--tiq-link-color);
	text-decoration: none;
	padding: var(--tiq-link-pad);
	transition: color 400ms ease-in-out;
}

.tiq-header__link:hover {
	color: var(--tiq-link-hover);
}

/*------------------------------------------*/
/*  About dropdown (OLMO .sub-menu / .wsarrow)
/*------------------------------------------*/

.tiq-header__has-sub {
	position: relative;
}

.tiq-header__arrow {
	display: inline-block;
	position: relative;
	width: 0;
	height: 0;
	margin-left: 8px;
	vertical-align: middle;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 4px solid currentColor;
}

.tiq-header__sub {
	opacity: 0;
	visibility: hidden;
	position: absolute;
	top: 66px;
	left: 0;
	z-index: 1000;
	width: auto;
	min-width: 200px;
	margin: 0;
	padding: 10px 20px;
	list-style: none;
	background-color: #fff;
	border: solid 1px #eee;
	border-radius: 4px;
	box-shadow: 0 2px 3px rgba(96, 96, 96, 0.13);
	transform-origin: 0% 0%;
	transform: rotateX(-75deg);
	transition: transform 0.3s, opacity 0.3s;
}

.tiq-header__has-sub:hover > .tiq-header__sub,
.tiq-header__has-sub.is-sub-open > .tiq-header__sub {
	opacity: 1;
	visibility: visible;
	transform: rotateX(0deg);
}

.tiq-header__sub > li {
	display: block;
	margin: 0;
	padding: 0;
}

.tiq-header__sub-link {
	display: block;
	font-family: var(--tiq-font);
	font-size: 1.05rem;
	font-weight: 400;
	line-height: 22px;
	letter-spacing: 0;
	text-align: left;
	color: #6c757d;
	text-decoration: none;
	padding: 8px 0;
	border-radius: 4px;
	transition: all 0.3s ease-in-out;
}

.tiq-header__sub-link:hover {
	color: var(--tiq-link-hover);
	padding: 8px 0 8px 4px;
}

/*------------------------------------------*/
/*  CTA button
/*------------------------------------------*/

.tiq-header__cta {
	margin-left: var(--tiq-cta-gap);
}

.tiq-header__btn {
	display: inline-block;
	margin-top: var(--tiq-btn-mt);
	font-family: var(--tiq-font);
	font-size: 1.025rem;
	line-height: 30px;
	font-weight: 500;
	letter-spacing: 0;
	text-decoration: none;
	text-align: center;
	padding: var(--tiq-btn-pad);
	border: 2px solid var(--tiq-accent);
	border-radius: 8px;
	color: #fff;
	background-color: var(--tiq-accent);
	transition: all 400ms ease-in-out;
}

/* hover--tra-black: transparent bg, black text + border */
.tiq-header__btn:hover {
	color: #181d27;
	background-color: transparent;
	border-color: #181d27;
}

/*------------------------------------------*/
/*  Mobile toggle (hidden on desktop)
/*------------------------------------------*/

.tiq-header__toggle {
	display: none;
	margin-left: auto;
	padding: 10px;
	background: none;
	border: 0;
	cursor: pointer;
}

.tiq-header__toggle-bar {
	display: block;
	width: 26px;
	height: 2px;
	margin: 6px 0;
	background-color: #263b5e;
	transition: transform 250ms ease-in-out, opacity 250ms ease-in-out;
}

/*------------------------------------------*/
/*  Mobile (< 992px): white bar + full-page menu
/*  (menu covers the viewport below the bar, MailerLite-style;
/*   links centered horizontally, compact vertical rhythm)
/*------------------------------------------*/

@media (max-width: 991.98px) {

	.tiq-header {
		background-color: #fff;
		box-shadow: 0 0 2px rgba(50, 50, 50, 0.4);
	}

	.tiq-header__bar {
		padding-top: 0;
		padding-bottom: 0;
	}

	.tiq-header.is-scrolled .tiq-header__bar {
		padding-top: 0;
		padding-bottom: 0;
	}

	.tiq-header__toggle {
		display: block;
	}

	.tiq-header.is-open .tiq-header__toggle-bar:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}

	.tiq-header.is-open .tiq-header__toggle-bar:nth-child(2) {
		opacity: 0;
	}

	.tiq-header.is-open .tiq-header__toggle-bar:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}

	/* Full-page panel: fixed from below the 80px bar to the viewport bottom.
	   inset (not 100vh) so iOS chrome changes never leave a gap. JS locks
	   body scroll while open. */
	.tiq-header__nav {
		display: none;
		position: fixed;
		top: var(--tiq-header-inner-h);
		right: 0;
		bottom: 0;
		left: 0;
		margin: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		background-color: #fff;
		box-shadow: none;
	}

	.tiq-header.is-open .tiq-header__nav {
		display: flex;
		animation: tiq-header-nav-in 200ms ease-out;
	}

	@keyframes tiq-header-nav-in {
		from { opacity: 0; }
		to { opacity: 1; }
	}

	/* margin:auto centers the list vertically, but collapses to top-aligned
	   scrolling when the list outgrows the panel (submenu expanded on a
	   short screen) — align-items:center would clip the top items. */
	.tiq-header__list {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 4px;
		width: 100%;
		max-width: 420px;
		margin: auto;
		padding: 24px 20px 32px;
	}

	.tiq-header__link {
		font-size: 1.25rem;
		line-height: 1.4;
		padding: 8px 15px;
		text-align: center;
		color: var(--tiq-link-color);
	}

	.tiq-header__has-sub {
		position: relative;
		width: 100%;
	}

	/* Mobile: expand on tap (.is-sub-open), not hover — matches OLMO wsmenu-click */
	.tiq-header__sub {
		display: none;
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		min-width: 100%;
		width: 100%;
		margin: 0;
		padding: 2px 0 8px;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		background-color: transparent;
		text-align: center;
	}

	.tiq-header__has-sub.is-sub-open > .tiq-header__sub {
		display: block;
	}

	.tiq-header__has-sub:hover > .tiq-header__sub {
		display: none;
	}

	.tiq-header__has-sub.is-sub-open:hover > .tiq-header__sub {
		display: block;
	}

	.tiq-header__arrow {
		float: none;
		margin: 0 0 0 8px;
		border-top-color: rgba(0, 0, 0, 0.4);
	}

	.tiq-header__has-sub.is-sub-open > .tiq-header__link .tiq-header__arrow {
		transform: rotate(180deg);
	}

	.tiq-header__sub-link {
		font-size: 1rem;
		line-height: 1.4;
		padding: 6px 0;
		text-align: center;
		color: #6c757d;
	}

	.tiq-header__sub-link:hover {
		padding: 6px 0;
	}

	.tiq-header__cta {
		margin: 14px 0 0;
		padding: 0;
	}
}

/* ==========================================================================
   SECTION 2 — BLOGMAKER HOST (Gridlock / theme-11 on traffiq.bmaker.app)

   Realized page: header HTML is wrapped in `.header-content` (theme: margin:20px)
   sitting *above* `.wrap > .top-wrap > .top-menu` (the "TraffIQ Blog" chrome)
   and `.hero` (#f2f5f9). Gridlock also sets `html * { margin:0; padding:0 }`
   and `body { font-size: 0 }`.

   Paste this whole file into Header injections. Also replace Settings >
   Custom Code > CSS with blogmaker/overrides.css.
   `.header-content` is a 120px (80px mobile) in-flow spacer so `.wrap`
   starts below the fixed bar.
   ========================================================================== */

/* In-flow spacer so `.wrap` starts below the fixed bar (20px + 80px + 20px).
   `div.` so this beats an older `.header-content { height: 70px }` paste. */
div.header-content {
	margin: 0 !important;
	padding: 0 !important;
	height: 120px !important;
	overflow: visible !important;
	position: static !important;
	transform: none !important;
	filter: none !important;
	perspective: none !important;
	contain: none !important;
	will-change: auto !important;
	font-size: 16px !important;
}

/* Hide Gridlock's own top bar ("TraffIQ Blog"). */
.top-menu {
	display: none !important;
}

.tiq-header,
.tiq-header * {
	box-sizing: border-box !important;
}

/* Kill UA / Gridlock underlines on every header link (a:link beats a lone class). */
.tiq-header a,
.tiq-header a:link,
.tiq-header a:visited,
.tiq-header a:hover,
.tiq-header a:active {
	text-decoration: none !important;
}

.tiq-header {
	display: block !important;
	position: fixed !important;
	top: 0 !important;
	right: 0 !important;
	left: 0 !important;
	width: 100% !important;
	max-width: none !important;
	height: auto !important;
	min-height: 80px !important;
	z-index: 10050 !important;
	font-family: "Rubik", sans-serif !important;
	font-size: 16px !important;
	line-height: 1.6666 !important;
	color: #181d27 !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
	background-color: transparent !important;
	box-shadow: none !important;
	transition: background-color 450ms ease-in-out, box-shadow 450ms ease-in-out !important;
}

.tiq-header.is-scrolled {
	background-color: #fff !important;
	box-shadow: 0 2px 3px rgba(96, 96, 96, 0.13) !important;
}

/* Logo left, nav right. max-width centered like .wsmainwp. */
.tiq-header__bar {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100% !important;
	max-width: 1140px !important;
	margin: 0 auto !important;
	padding: 20px 15px !important;
	transition: padding 450ms ease-in-out !important;
}

.tiq-header.is-scrolled .tiq-header__bar {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.tiq-header__brand {
	display: flex !important;
	align-items: center !important;
	flex: 0 0 auto !important;
	margin: 0 auto 0 0 !important; /* auto-right pushes nav to the end if space-between is ignored */
	height: 80px !important;
}

.tiq-header__toggle {
	display: none !important;
}

.tiq-header__nav {
	display: flex !important;
	align-items: center !important;
	flex: 0 0 auto !important;
	margin: 0 0 0 auto !important;
}

.tiq-header__list {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	flex-wrap: nowrap !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	gap: 16px !important;
}

.tiq-header__list > li {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

a.tiq-header__link {
	display: block !important;
	font-family: "Rubik", sans-serif !important;
	font-size: 18px !important; /* 1.1rem at 16px root — px so body{font-size:0} cannot shrink em */
	font-weight: 500 !important;
	line-height: 60px !important;
	color: #181d27 !important;
	padding: 10px 15px !important;
	margin: 0 !important;
	letter-spacing: 0 !important;
	text-decoration: none !important;
}

.tiq-header__has-sub {
	position: relative !important;
}

.tiq-header__arrow {
	display: inline-block !important;
	position: relative !important;
	width: 0 !important;
	height: 0 !important;
	margin-left: 8px !important;
	vertical-align: middle !important;
	border-left: 4px solid transparent !important;
	border-right: 4px solid transparent !important;
	border-top: 4px solid currentColor !important;
}

.tiq-header__sub {
	opacity: 0 !important;
	visibility: hidden !important;
	position: absolute !important;
	top: 66px !important;
	left: 0 !important;
	z-index: 1000 !important;
	width: auto !important;
	min-width: 200px !important;
	margin: 0 !important;
	padding: 10px 20px !important;
	list-style: none !important;
	background-color: #fff !important;
	border: solid 1px #eee !important;
	border-radius: 4px !important;
	box-shadow: 0 2px 3px rgba(96, 96, 96, 0.13) !important;
	transform-origin: 0% 0% !important;
	transform: rotateX(-75deg) !important;
	transition: transform 0.3s, opacity 0.3s !important;
}

.tiq-header__has-sub:hover > .tiq-header__sub,
.tiq-header__has-sub.is-sub-open > .tiq-header__sub {
	opacity: 1 !important;
	visibility: visible !important;
	transform: rotateX(0deg) !important;
}

.tiq-header__sub > li {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

a.tiq-header__sub-link {
	display: block !important;
	font-family: "Rubik", sans-serif !important;
	font-size: 17px !important;
	font-weight: 400 !important;
	line-height: 22px !important;
	letter-spacing: 0 !important;
	text-align: left !important;
	color: #6c757d !important;
	text-decoration: none !important;
	padding: 8px 0 !important;
	margin: 0 !important;
	border-radius: 4px !important;
}

a.tiq-header__sub-link:hover {
	color: #21164c !important;
	padding: 8px 0 8px 4px !important;
	text-decoration: none !important;
}

.tiq-header__cta {
	margin: 0 0 0 60px !important;
}

a.tiq-header__btn {
	display: inline-block !important;
	font-family: "Rubik", sans-serif !important;
	font-size: 16px !important;
	line-height: 30px !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	text-align: center !important;
	text-decoration: none !important;
	color: #fff !important;
	background-color: rgb(28, 148, 84) !important;
	border: 2px solid rgb(28, 148, 84) !important;
	border-radius: 8px !important;
	padding: 5px 16px !important;
	margin: 0 !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

a.tiq-header__btn:hover {
	color: #181d27 !important;
	background-color: transparent !important;
	border-color: #181d27 !important;
	text-decoration: none !important;
}

@media (max-width: 991.98px) {
	div.header-content {
		height: 80px !important; /* mobile bar has no extra padding */
	}

	.tiq-header {
		background-color: #fff !important;
	}

	.tiq-header__toggle {
		display: block !important;
	}

	.tiq-header__nav {
		display: none !important;
		margin: 0 !important;
	}

	.tiq-header.is-open .tiq-header__nav {
		display: flex !important;
	}

	/* Mirror SECTION 1: centered column, compact rhythm. Everything the
	   desktop rules above pin with !important must be re-pinned here. */
	.tiq-header.is-open .tiq-header__list {
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		gap: 4px !important;
		width: 100% !important;
		max-width: 420px !important;
		margin: auto !important;
		padding: 24px 20px 32px !important;
	}

	a.tiq-header__link {
		font-size: 20px !important;
		line-height: 1.4 !important;
		padding: 8px 15px !important;
		text-align: center !important;
	}

	.tiq-header__has-sub {
		position: relative !important;
		width: 100% !important;
	}

	.tiq-header__sub {
		display: none !important;
		position: static !important;
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
		min-width: 100% !important;
		width: 100% !important;
		margin: 0 !important;
		padding: 2px 0 8px !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		background-color: transparent !important;
		text-align: center !important;
	}

	.tiq-header__has-sub.is-sub-open > .tiq-header__sub {
		display: block !important;
	}

	.tiq-header__has-sub:hover > .tiq-header__sub {
		display: none !important;
	}

	.tiq-header__has-sub.is-sub-open:hover > .tiq-header__sub {
		display: block !important;
	}

	.tiq-header__arrow {
		float: none !important;
		margin: 0 0 0 8px !important;
		border-top-color: rgba(0, 0, 0, 0.4) !important;
	}

	a.tiq-header__sub-link {
		font-size: 16px !important;
		line-height: 1.4 !important;
		padding: 6px 0 !important;
		text-align: center !important;
		color: #6c757d !important;
	}

	a.tiq-header__sub-link:hover {
		padding: 6px 0 !important;
	}

	.tiq-header__cta {
		margin: 14px 0 0 !important;
		padding: 0 !important;
	}
}

/* Design Studio (editor.blogmaker.app only). `.customization` is z-index
   9990; the bar is 10050 and full-viewport, so it paints over the left
   panel. Drop the bar below the studio chrome. `.customization-wrap` is
   not on the live blog. */
.customization-wrap .tiq-header {
	z-index: 9980 !important;
}

@media (min-width: 1501px) {
	.customization-wrap .tiq-header {
		left: 391px !important;
		width: calc(100% - 391px) !important;
	}
}
