/* =========================================================
   ZPU Technical Website — Unified Stylesheet
   Covers: header.php, footer.php, hyper.php (serial console)
   ========================================================= */

/* ---------- Fonts ---------- */
@font-face {
	font-family: Roboto;
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	src: url("//www.zautomotive.com/cdn/fonts/roboto/roboto_n4.2019d890f07b1852f56ce63ba45b2db45d852cba.woff2") format("woff2"),
		 url("//www.zautomotive.com/cdn/fonts/roboto/roboto_n4.238690e0007583582327135619c5f7971652fa9d.woff") format("woff");
}
@font-face {
	font-family: Roboto;
	font-weight: 500;
	font-style: normal;
	font-display: swap;
	src: url("//www.zautomotive.com/cdn/fonts/roboto/roboto_n5.250d51708d76acbac296b0e21ede8f81de4e37aa.woff2") format("woff2"),
		 url("//www.zautomotive.com/cdn/fonts/roboto/roboto_n5.535e8c56f4cbbdea416167af50ab0ff1360a3949.woff") format("woff");
}
@font-face {
	font-family: Roboto;
	font-weight: 700;
	font-style: normal;
	font-display: swap;
	src: url("//www.zautomotive.com/cdn/fonts/roboto/roboto_n7.f38007a10afbbde8976c4056bfe890710d51dec2.woff2") format("woff2"),
		 url("//www.zautomotive.com/cdn/fonts/roboto/roboto_n7.94bfdd3e80c7be00e128703d245c207769d763f9.woff") format("woff");
}
@font-face {
	font-family: Roboto;
	font-weight: 400;
	font-style: italic;
	font-display: swap;
	src: url("//www.zautomotive.com/cdn/fonts/roboto/roboto_i4.57ce898ccda22ee84f49e6b57ae302250655e2d4.woff2") format("woff2"),
		 url("//www.zautomotive.com/cdn/fonts/roboto/roboto_i4.b21f3bd061cbcb83b824ae8c7671a82587b264bf.woff") format("woff");
}
@font-face {
	font-family: Roboto;
	font-weight: 500;
	font-style: italic;
	font-display: swap;
	src: url("//www.zautomotive.com/cdn/fonts/roboto/roboto_i5.0ae24363bf5844e2ee3295d84078d36c9bd0faf4.woff2") format("woff2"),
		 url("//www.zautomotive.com/cdn/fonts/roboto/roboto_i5.a9cdb6a43048799fe739d389c60b64059e33cf12.woff") format("woff");
}
@font-face {
	font-family: Roboto;
	font-weight: 700;
	font-style: italic;
	font-display: swap;
	src: url("//www.zautomotive.com/cdn/fonts/roboto/roboto_i7.7ccaf9410746f2c53340607c42c43f90a9005937.woff2") format("woff2"),
		 url("//www.zautomotive.com/cdn/fonts/roboto/roboto_i7.49ec21cdd7148292bffea74c62c0df6e93551516.woff") format("woff");
}

/* ---------- Root / Design Tokens ---------- */
:root {
	--page-width: 146rem;
	--spacing-base-1: 2rem;
	--grid-desktop-horizontal-spacing: 20px;
	--grid-desktop-vertical-spacing: 20px;
	--grid-mobile-horizontal-spacing: 15px;
	--grid-mobile-vertical-spacing: 15px;
	--border-radius-base: 2px;
	--buttons-radius: 2px;
	--inputs-radius: 2px;
	--inputs-border-width: 1px;
	--inputs-border-opacity: .2;
	--color-base-white: #fff;
	--color-base-text: 0, 0, 0;
	--color-base-text-alt: 0, 0, 0;
	--color-base-border: 218, 218, 218;
	--color-base-background-1: 255, 255, 255;
	--color-base-background-2: 248, 248, 248;
	--color-base-accent-1: 180, 0, 0;
	--color-base-accent-1-text: 255, 255, 255;
	--color-base-accent-2: 0, 0, 0;
	--color-base-accent-2-text: 255, 255, 255;
	--color-base-accent-3: 235, 235, 235;
	--color-base-accent-3-text: 255, 255, 255;
	--color-buttons-primary-background: 180, 0, 0;
	--color-buttons-primary-text: 255, 255, 255;
	--color-buttons-secondary-background: 0, 0, 0;
	--color-buttons-secondary-text: 255, 255, 255;
	--font-body-family: Roboto, sans-serif;
	--font-body-style: normal;
	--font-body-weight: 400;
	--font-bolder-weight: 500;
	--font-heading-family: Roboto, sans-serif;
	--font-heading-style: normal;
	--font-heading-weight: 500;
	--font-body-scale: 1.0;
	--font-heading-scale: 1.0;
	--font-buttons-family: Roboto, sans-serif;
}

:root,
.color-background-1 {
	--color-foreground: var(--color-base-text);
	--color-foreground-alt: var(--color-base-text-alt);
	--color-background: var(--color-base-background-1);
	--color-border: rgb(var(--color-base-border));
	--color-box-shadow: rgba(var(--color-base-border), .2);
	--color-accent-1: var(--color-base-accent-1);
	--color-accent-2: var(--color-base-accent-2);
	--color-button: var(--color-buttons-primary-background, var(--color-base-accent-1));
	--color-button-text: var(--color-buttons-primary-text, var(--color-base-accent-1-text));
}

.color-accent-1 {
	--color-foreground: var(--color-base-accent-1-text);
	--color-foreground-alt: var(--color-base-accent-1-text);
	--color-background: var(--color-base-accent-1);
	--color-border: rgba(var(--color-base-accent-3-text), .2);
	--color-box-shadow: rgba(var(--color-base-border), .05);
	--color-accent-1: var(--color-base-accent-1-text);
	--color-accent-2: var(--color-base-accent-2);
	--color-button: var(--color-base-accent-2);
	--color-button-text: var(--color-base-accent-2-text);
}

.color-accent-2 {
	--color-foreground: var(--color-base-accent-2-text);
	--color-foreground-alt: var(--color-base-accent-2-text);
	--color-background: var(--color-base-accent-2);
	--color-border: rgba(var(--color-base-accent-2-text), .25);
	--color-box-shadow: rgba(var(--color-base-border), .05);
	--color-accent-1: var(--color-base-accent-1-text);
	--color-accent-2: var(--color-base-accent-1);
	--color-button: var(--color-base-accent-1);
	--color-button-text: var(--color-base-accent-1-text);
}

/* ---------- Base / Reset ---------- */
html {
	box-sizing: border-box;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	height: 100%;
	font-size: calc(var(--font-body-scale) * 62.5%);
	scroll-behavior: smooth;
	line-height: 1.15;
	text-size-adjust: 100%;
}

* {
	box-sizing: inherit;
}

html,
body {
	margin: 0;
	padding: 0;
	background-color: #000;
}

body,
.color-background-1,
.color-background-2,
.color-accent-1,
.color-accent-2,
.color-accent-3 {
	color: rgb(var(--color-foreground));
	background-color: rgb(var(--color-background));
}

body {
	min-height: 100%;
	font-size: 1.5rem;
	line-height: calc(1 + .6 / var(--font-body-scale));
	font-family: var(--font-body-family);
	font-style: var(--font-body-style);
	font-weight: var(--font-body-weight);
	text-transform: none;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
	margin: 0;
}

a,
a:hover {
	text-decoration: none;
}

a,
area,
button,
[role="button"],
input,
label,
select,
summary,
textarea {
	touch-action: manipulation;
}

img {
	display: inline-block;
	vertical-align: middle;
	max-width: 100%;
	height: auto;
}

figure {
	margin: 0;
}

p {
	margin: 0 0 var(--spacing-base-1);
}

strong {
	font-weight: var(--font-bolder-weight);
}

ul,
ol {
	padding-left: 20px;
	margin: 0 0 var(--spacing-base-1) 0;
}

ul {
	list-style: disc;
}

ul li,
ol li {
	padding-bottom: 0.25rem;
}

.h2, h2 {
	font-size: calc(var(--font-heading-scale) * 2rem);
}

.widget-title,
.h6, h6 {
	font-size: calc(var(--font-heading-scale) * 1.4rem);
}

.visually-hidden {
	overflow: hidden;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip: rect(0, 0, 0, 0);
	position: absolute !important;
	overflow-wrap: normal !important;
}

.container {
	max-width: var(--page-width);
	margin: 0 auto;
	padding: 0 1.5rem;
}

.typography-body {
	font-family: var(--font-body-family);
	font-style: var(--font-body-style);
	font-weight: var(--font-body-weight);
}

/* ---------- Header ---------- */
.section-header {
	background: rgb(var(--color-background));
	z-index: 50;
}

.section-header-sticky-always {
	position: sticky;
	top: 0;
}

.header {
	position: relative;
}

/* Announcement bar */
.announcement-bar-wrapper {
	border-bottom: 1px solid var(--color-border);
}

.announcement-bar {
	display: flex;
	justify-content: center;
	text-align: center;
	padding: 0.75rem 0;
	font-size: calc(var(--font-body-scale) * 1.3rem);
	line-height: normal;
}

.announcement-bar-right {
	display: none;
}

.announcement-bar-social-links-wrap {
	margin-left: 1.5rem;
	line-height: 0;
}

.announcement-bar-social-links-wrap .list-social-link {
	width: auto;
	height: auto;
	border: 0;
	box-shadow: none;
	padding: 0.15rem 0.3rem 0;
}

/* Head mast (logo row) */
.head-mast {
	display: grid;
	grid-template-areas:
		"head-start head-end"
		"head-mid   head-mid";
	padding: 1.5rem 0;
	position: relative;
}

.head-slot {
	display: flex;
	align-items: center;
	margin: 0;
	column-gap: 1rem;
}

.head-slot-start {
	grid-area: head-start;
	flex: 0 0 auto;
}

.head-slot-mid {
	grid-area: head-mid;
	display: flex;
	align-items: center;
	margin-top: 1.5rem;
	flex: 1 1 auto;
}

.head-slot-end {
	grid-area: head-end;
	justify-self: end;
	flex: 0 0 auto;
	padding-left: 1.5rem;
}

.head-slot-item {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	margin: 0;
}

.head-slot-end .head-slot-item {
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.head-slot-end .head-slot-item:last-child {
	padding-right: 0;
}

.head-slot-end .head-slot-item-icons {
	padding-left: 0;
}

.head-slot-item-icons {
	line-height: 0;
	display: flex;
	align-items: center;
}

.head-slot-item-icons svg path {
	fill: rgb(var(--color-foreground-alt));
}

.head-slot-nav-link {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	height: 44px;
	width: 44px;
	position: relative;
	color: currentcolor;
}

.head-slot-nav-link svg {
	width: 24px;
	height: 24px;
	transition: transform 0.18s;
}

.head-slot-nav-link:hover svg {
	transform: scale(1.1);
}

.header-heading a {
	color: currentcolor;
}

.header-heading img,
.header-heading svg {
	width: auto;
	max-width: 100%;
	height: auto;
}

/* Navigation */
.navigation-wrapper {
	display: none;
	background-color: rgb(var(--color-background));
	color: rgb(var(--color-foreground));
}

.navigation-menu {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	line-height: normal;
	flex-wrap: wrap;
}

.navigation-menu li {
	position: relative;
}

.navigation-menu > li {
	display: inline-block;
}

.navigation-menu > .navigation-item {
	display: block;
}

.navigation-menu a {
	display: block;
	overflow-wrap: break-word;
}

.navigation-menu > .navigation-item > a {
	position: relative;
}

.navigation-item {
	padding: 0;
	height: 100%;
}

.navigation-item > a {
	font-size: calc(var(--font-body-scale) * 1.3rem);
	color: currentcolor;
	font-weight: var(--font-bolder-weight);
	padding: 0.8rem 0;
	height: 100%;
	display: flex;
	align-items: center;
}

.navigation-announcement-bar > .navigation-item > a {
	margin-left: 2rem;
	padding: 0;
	text-underline-offset: 0.4rem;
	text-decoration-thickness: 0.1rem;
	transition: text-decoration 0.18s;
	text-decoration-color: transparent;
	font-weight: var(--font-body-weight);
}

.navigation-announcement-bar > .navigation-item > a:hover {
	text-decoration: underline;
	text-decoration-color: currentcolor;
}

.navigation-main > .navigation-item {
	text-transform: uppercase;
	height: 5rem;
}

.navigation-main > .navigation-item:first-child {
	padding-left: 0;
}

/* Custom dark nav (nav-main-2) */
.nav-main-2 {
	display: flex;
	justify-content: center;
	background: linear-gradient(#1a1a1a, #111);
	border-top: 1px solid #2a2a2a;
	border-bottom: 1px solid #2a2a2a;
	margin: 0;
	padding: 0 16px;
}

.nav-main-2 .navigation-menu {
	display: flex;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-main-2 .navigation-item {
	display: flex;
	align-items: stretch;
}

.nav-main-2 .navigation-item > a:hover {
	color: #fff;
	border-bottom-color: #b40000;
	background: rgba(255, 255, 255, 0.04);
}

.nav-main-2 .navigation-item.active > a,
.nav-main-2 .navigation-item > a.active {
	color: #fff;
	border-bottom-color: #b40000;
}

.nav-main-2 .navigation-item + .navigation-item > a {
	border-left: 1px solid rgba(255, 255, 255, 0.07) !important;
}

/* ---------- Social Icons (shared header + footer) ---------- */
.list-inline-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 2rem;
}

.list-inline-menu li {
	padding: 0;
}

.list-social {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.list-social-item {
	padding: 0;
	margin: 0;
}

.list-social-link {
	width: 3.2rem;
	height: 3.2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	box-shadow: 0 0 0 .1rem rgb(var(--color-foreground), .25);
	line-height: 0;
	transition: box-shadow 0.18s;
}

.list-social-link:hover {
	box-shadow: 0 0 0 .1rem rgb(var(--color-foreground), .6);
}

.list-social-link svg {
	width: 1.3rem;
	height: 1.3rem;
}

.list-social-link svg path {
	fill: rgb(var(--color-foreground), .9);
}

/* ---------- Footer ---------- */
footer {
	position: relative;
	z-index: 2;
}

.grid {
	display: flex;
	flex-wrap: wrap;
	padding: 0;
	margin: 0;
	list-style: none;
	column-gap: var(--grid-mobile-horizontal-spacing);
	row-gap: var(--grid-mobile-vertical-spacing);
}

.grid-item {
	width: calc(25% - var(--grid-mobile-horizontal-spacing) * 3 / 4);
	max-width: calc(50% - var(--grid-mobile-horizontal-spacing) / 2);
	flex: 0 0 auto;
	list-style: none;
	padding: 0;
}

.grid-item > :last-child {
	margin-bottom: 0;
}

.grid-1-col .grid-item {
	max-width: 100%;
	width: 100%;
}

.widget-media-footer-0 {
	max-width: 340px;
}

.rte > :last-child {
	margin-bottom: 0;
}

.list-unstyled {
	margin: 0;
	padding: 0;
	list-style: none;
}

.link-text {
	color: currentcolor;
	text-underline-offset: 0.3rem;
	text-decoration-thickness: 0.1rem;
	transition: text-decoration 0.18s;
	text-decoration-color: transparent;
}

.link-text:hover {
	text-decoration: underline;
	text-decoration-color: currentcolor;
}

.footer-social-links-wrap {
	padding: 1.5rem 0;
	display: flex;
	justify-content: center;
}

/* ---------- Form Elements (shared) ---------- */
button,
[type="button"],
[type="reset"],
[type="submit"] {
	font-family: inherit;
	appearance: button;
}

select {
	appearance: none;
	background-clip: padding-box;
	background-image:
		linear-gradient(45deg, transparent 50%, currentcolor 50%),
		linear-gradient(135deg, currentcolor 50%, transparent 50%);
	background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	max-width: 100%;
	font-family: var(--font-body-family);
	font-style: var(--font-body-style);
	font-weight: var(--font-body-weight);
	padding-right: 3.2rem;
	text-transform: none;
}

label,
.label,
legend {
	display: block;
	margin: 0 0 0.8rem;
	line-height: normal;
	cursor: pointer;
	font-size: calc(var(--font-body-scale) * 1.5rem);
	font-weight: 400;
}

input[type="checkbox"],
input[type="radio"] {
	margin: 0 2px 0 0;
	line-height: normal;
	width: auto;
	height: auto;
	flex: 0 0 auto;
	vertical-align: top;
	accent-color: rgb(var(--color-accent-1));
}

button:disabled,
input:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---------- Serial Console (hyper.php) ---------- */
.serial-app {
	max-width: 820px;
	margin: 40px auto;
	padding: 18px;
	background: #0f0f0f;
	border-radius: 12px;
	font-family: system-ui, -apple-system, sans-serif;
	color: #eee;
}

.serial-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	font-size: 14px;
}

.header-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.serial-command-row {
	margin-bottom: 10px;
}

.serial-command-row input {
	width: 100%;
	box-sizing: border-box;
}

.serial-controls {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
}

.serial-options {
	display: flex;
	gap: 14px;
	align-items: center;
	margin-bottom: 10px;
	font-size: 12px;
	color: #bbb;
}

.serial-options label {
	display: flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
}

/* Serial console inputs override the global input styles */
.serial-app input[type="text"] {
	padding: 10px;
	border-radius: 8px;
	border: none;
	background: #111;
	color: #fff;
	font-size: 14px;
	width: 100%;
	box-sizing: border-box;
	height: auto;
	box-shadow: none;
}

.serial-app input::placeholder {
	color: #777;
}

.select-input {
	padding: 8px 10px;
	border-radius: 6px;
	border: none;
	background: #111;
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	width: auto;
	height: auto;
	box-shadow: none;
}

.select-input:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.connect-btn {
	padding: 6px 12px;
	border-radius: 6px;
	border: none;
	background: #16a34a;
	color: #fff;
	cursor: pointer;
	font-size: 12px;
	white-space: nowrap;
	transition: background 0.15s;
}

.connect-btn:hover {
	background: #15803d;
}

.connect-btn.disconnect {
	background: #b40000;
}

.connect-btn.disconnect:hover {
	background: #8a0000;
}

.status {
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 12px;
	white-space: nowrap;
}

.status.disconnected {
	background: #442222;
	color: #ffb3b3;
}

.status.connected {
	background: #224422;
	color: #aaffaa;
}

button#send {
	padding: 10px 18px;
	border-radius: 8px;
	border: none;
	background: #b40000;
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.15s;
}

button#send:hover:not(:disabled) {
	background: #8a0000;
}

.small-btn {
	padding: 4px 10px;
	border-radius: 6px;
	border: none;
	background: #333;
	color: #fff;
	cursor: pointer;
	font-size: 12px;
	margin-left: auto;
	transition: background 0.15s;
}

.small-btn:hover {
	background: #444;
}

.serial-app pre {
	background: #000;
	color: #ff3b3b;
	padding: 12px;
	height: 320px;
	overflow-y: auto;
	border: none;
	border-radius: 8px;
	font-size: 13px;
	margin: 0;
	white-space: pre-wrap;
	word-break: break-all;
}

/* ---------- Responsive ---------- */
@media screen and (min-width: 990px) {
	.navigation-wrapper {
		display: block;
	}

	.announcement-bar-right {
		display: flex;
		align-items: center;
	}

	.head-mast {
		grid-template-areas: "head-start head-end";
		grid-template-columns: auto auto;
		justify-content: space-between;
		align-items: center;
	}

	.head-slot-mid {
		grid-area: unset;
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
		margin-top: 0;
		pointer-events: none;
		white-space: nowrap;
	}

	.grid {
		column-gap: var(--grid-desktop-horizontal-spacing);
		row-gap: var(--grid-desktop-vertical-spacing);
	}

	.grid-5-col-tablet .grid-item {
		width: calc(20% - var(--grid-desktop-horizontal-spacing) * 4 / 5);
		max-width: calc(20% - var(--grid-desktop-horizontal-spacing) * 4 / 5);
	}
}

/* Force the mobile nav to always show on ZPU site */
@media screen and (max-width: 989px) {
	.navigation-wrapper {
		display: block !important;
	}
}

@media screen and (max-width: 749px) {
	.footer-blocks-wrapper {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}

	.footer-blocks-wrapper .grid-item:first-child {
		grid-column: 1 / -1;
		text-align: center;
	}

	.footer-blocks-wrapper .grid-item:first-child figure {
		margin: 0 auto 16px;
	}

	.footer-blocks-wrapper .grid-item:first-child .rte {
		max-width: 90%;
		margin: 0 auto;
	}

	.serial-app {
		margin: 20px 10px;
		padding: 12px;
	}

	.serial-header {
		flex-wrap: wrap;
	}
}