/*
Theme Name: Metrex
Theme URI: https://www.metrex.ca
Description: Standalone WordPress theme for Metrex Systems Consulting Inc.
Version: 1.0.0
Author: Metrex
Author URI: https://www.metrex.ca
Text Domain: metrex
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   Custom Properties
   ========================================================================== */

:root {
	--color-bg: #000;
	--color-text: #fff;
	--color-heading: #addddd;
	--color-link: #addddd;
	--color-hover: #d8e055;
	--color-accent-dark: #00344a;
	--color-button-bg: #a3dcec;
	--color-button-hover: #d5e056;
	--font-body: Verdana, "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-heading: Optima, "Trebuchet MS", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--site-width: 940px;
	--content-width: 680px;
	--sidebar-width: 220px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body,
h1, h2, h3, h4, h5, h6,
p,
blockquote,
figure,
ol, ul,
dl, dd {
	margin: 0;
	padding: 0;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

body {
	background: var(--color-bg) url("images/background_2.jpg") repeat-x top center;
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 22px;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--color-heading);
	font-family: var(--font-heading);
	font-style: normal;
	font-weight: normal;
	line-height: 1.3;
	margin-bottom: 0.5em;
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
	margin-bottom: 1em;
}

b, strong {
	font-weight: bold;
}

em, i {
	font-style: italic;
}

blockquote {
	border-left: 3px solid var(--color-accent-dark);
	margin: 1em 0;
	padding: 0.5em 1em;
	font-style: italic;
}

code {
	background: var(--color-link);
	color: var(--color-accent-dark);
	padding: 2px 4px;
	font-size: 0.9em;
}

pre {
	background: rgba(0, 52, 74, 0.5);
	border: 1px solid var(--color-accent-dark);
	color: var(--color-text);
	padding: 1em;
	overflow-x: auto;
	margin-bottom: 1em;
}

pre code {
	background: transparent;
	color: inherit;
	padding: 0;
}

hr {
	border: 0;
	border-top: 1px solid var(--color-accent-dark);
	margin: 2em 0;
}

/* Links */

a,
a:visited {
	color: var(--color-link);
	text-decoration: none;
}

a:hover,
a:focus {
	color: var(--color-hover);
	text-decoration: underline;
}

.entry-content a {
	text-decoration: underline;
}

.entry-content a:hover {
	color: var(--color-hover);
}

/* Lists */

ul {
	list-style: disc outside none;
	margin: 0 0 1em 1.5em;
}

ol {
	list-style: decimal outside none;
	margin: 0 0 1em 1.5em;
}

li {
	margin-bottom: 0.25em;
}

ul.new {
	list-style-image: url("images/plus.png");
}

/* Tables */

table {
	width: 100%;
	margin-bottom: 1em;
	border: 1px solid var(--color-accent-dark);
}

th {
	background-color: var(--color-accent-dark);
	color: var(--color-text);
	padding: 8px 10px;
	text-align: left;
	font-weight: bold;
}

td {
	padding: 8px 10px;
	border: 1px solid var(--color-accent-dark);
}

/* ==========================================================================
   Layout
   ========================================================================== */

#body-container {
	background: transparent url("images/body_container.png") no-repeat bottom center;
	width: var(--site-width);
	margin: 0 auto;
	padding: 0 10px;
}

#container {
	clear: both;
	margin-bottom: 0;
	min-height: 500px;
}

#content {
	float: right;
	padding: 0 10px 20px 10px;
	width: var(--content-width);
}

/* ==========================================================================
   Header
   ========================================================================== */

#header-container {
	margin: 0 0 10px 0;
	padding: 0;
	float: left;
	position: relative;
	width: 100%;
}

#header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 25px;
	padding-bottom: 10px;
}

h1#logo {
	height: 40px;
	margin: 0;
	width: 210px;
	flex-shrink: 0;
}

h1#logo a {
	display: block;
	height: 40px;
	width: 210px;
}

h1#logo a img {
	height: 40px;
	width: auto;
}

/* Primary Navigation */

#primary-menu {
	flex-shrink: 0;
}

#primary-menu ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 2px;
}

#primary-menu li {
	margin: 0;
}

#primary-menu a {
	display: block;
	padding: 10px 18px;
	color: var(--color-text);
	text-decoration: none;
	font-family: var(--font-heading);
	font-size: 16px;
	letter-spacing: 0.02em;
	background: rgba(0, 52, 74, 0.6);
	border: 1px solid rgba(173, 220, 221, 0.3);
	border-top: 3px solid rgba(173, 220, 221, 0.6);
	transition: all 0.25s ease;
}

#primary-menu a:hover {
	background: rgba(0, 52, 74, 0.95);
	color: var(--color-hover);
	border-color: var(--color-hover);
	box-shadow: 0 0 8px rgba(216, 224, 85, 0.3);
}

#primary-menu .current-menu-item a,
#primary-menu .current_page_item a {
	background: rgba(0, 52, 74, 0.9);
	color: var(--color-heading);
	border-color: rgba(173, 220, 221, 0.6);
	font-weight: bold;
}

/* ==========================================================================
   Feature Carousel (Homepage)
   ========================================================================== */

#feature-container {
	display: none;
}

body.home #feature-container {
	display: block;
	height: 330px;
	width: var(--site-width);
	position: relative;
	margin-bottom: 20px;
	overflow: hidden;
}

#feature-container .feature {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 330px;
	opacity: 0;
	transition: opacity 1s ease-in-out;
}

#feature-container .feature.active {
	opacity: 1;
}

#feature-container .feature img {
	width: 100%;
	height: 330px;
	object-fit: cover;
}

#feature-container .caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	line-height: 18px;
	color: var(--color-text);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
	font-size: 13px;
	padding: 6px 10px;
	background: rgba(128, 148, 0, 0.8);
}

/* ==========================================================================
   Content Area
   ========================================================================== */

.entry-title {
	color: var(--color-heading);
	font-family: var(--font-heading);
	font-weight: bold;
	font-size: 28px;
	line-height: 1.2;
	margin: 0 0 12px;
}

.entry-title a {
	color: var(--color-heading);
	text-decoration: none;
}

.entry-title a:hover {
	color: var(--color-hover);
}

.hfeed .entry-title {
	margin: 0;
}

.entry-meta {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
	margin-bottom: 1em;
}

.entry-meta a {
	color: var(--color-link);
}

.entry-content {
	margin-bottom: 1.5em;
}

.more-link {
	display: block;
	margin-top: 14px;
}

/* Breadcrumbs */

.breadcrumb-trail {
	font-size: 13px;
	margin-bottom: 8px;
	color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-trail a {
	color: var(--color-link);
}

/* Post Navigation */

.post-navigation {
	margin: 2em 0;
	padding: 1em 0;
	border-top: 1px solid var(--color-accent-dark);
	overflow: hidden;
}

.post-navigation .nav-previous {
	float: left;
	max-width: 48%;
}

.post-navigation .nav-next {
	float: right;
	max-width: 48%;
	text-align: right;
}

/* Pagination */

.pagination {
	margin: 2em 0;
	text-align: center;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	margin: 0 2px;
	border: 1px solid var(--color-accent-dark);
	color: var(--color-link);
	text-decoration: none;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
	background: var(--color-accent-dark);
	color: var(--color-text);
}

/* Images & Captions */

.wp-caption {
	margin: 0 0 1em;
	max-width: 100%;
	border: 0;
}

.wp-caption img {
	max-width: 100%;
	border: 1px solid var(--color-accent-dark);
}

.wp-caption .wp-caption-text {
	color: var(--color-heading);
	font-size: 12px;
	padding: 4px 0;
}

.alignleft {
	float: left;
	margin: 0 1em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1em;
}

.aligncenter {
	display: block;
	margin: 0 auto 1em;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
	width: var(--sidebar-width);
	padding: 55px 10px 20px 10px;
	float: left;
	color: var(--color-text);
}

#primary {
	width: var(--sidebar-width);
}

.sidebar .widget {
	margin-bottom: 1.5em;
}

.sidebar .widget-title {
	color: var(--color-heading);
	font-family: var(--font-heading);
	font-size: 16px;
	margin-bottom: 0.5em;
}

.sidebar ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sidebar ul li {
	margin: 0;
	padding: 4px 0;
	border-bottom: 1px solid rgba(0, 52, 74, 0.5);
}

.sidebar ul li:last-child {
	border-bottom: 0;
}

.sidebar a {
	color: var(--color-link);
	text-decoration: none;
}

.sidebar a:hover {
	color: var(--color-hover);
}

/* Contact Button (sidebar widget) */

#primary .contact a {
	background: var(--color-link);
	border-radius: 1rem;
	width: 220px;
	height: 103px;
	display: block;
	text-align: right;
	color: #00131a;
	font-family: var(--font-heading);
	padding: 0.5rem;
	font-weight: bold;
	transform: scale(0.9);
}
#primary .contact a:hover {
	background: var(--color-hover);
	box-shadow: 0 0 10px rgba(213, 224, 86, 0.5);
}
#primary .contact a span {
	display: block;
	font-size: 17px;
}
#primary .contact a .contact-us {
	display: block;
	font-size: 40px;
	margin: 0.5rem 0 0.3rem 0;
	border-bottom: 2px solid #00131ace;
	padding-bottom: 0.4rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

#footer-container {
	height: 119px;
	margin: 0;
	clear: both;
}

#footer {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	position: relative;
	left: 229px;
	width: 693px;
	height: 90px;
	top: 8px;
	padding: 10px 15px;
	font-size: 12px;
	color: var(--color-text);
	line-height: 1.7;
}

#footer .name {
	font-weight: bold;
	color: var(--color-heading);
	font-size: 13px;
}

#footer .contact {
	text-align: right;
}

#footer a {
	color: var(--color-link);
}

#footer a:hover {
	color: var(--color-hover);
}

/* ==========================================================================
   Colophon (below body-container)
   ========================================================================== */

#colophon {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: var(--site-width);
	margin: 0 auto;
	padding: 10px 10px 20px;
	font-size: 11px;
	color: var(--color-text);
	line-height: 1.5;
}

#colophon a {
	color: var(--color-link);
	text-decoration: none;
}

#colophon a:hover {
	color: var(--color-hover);
}

/* ==========================================================================
   Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
textarea,
select {
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid var(--color-accent-dark);
	color: #333;
	padding: 8px 10px;
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 22px;
	width: 100%;
	max-width: 400px;
	transition: border-color 0.2s;
	border-radius: 8px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--color-link);
	background: rgba(255, 255, 255, 1);
}

textarea {
	max-width: 100%;
	min-height: 150px;
	resize: vertical;
}

select {
	max-width: 300px;
	cursor: pointer;
}

label {
	display: block;
	margin-bottom: 4px;
	font-weight: bold;
}

.required {
	color: var(--color-hover);
}

button,
input[type="submit"],
input[type="button"],
.button,
.submit {
	background: var(--color-bg);
	border: 1px solid var(--color-accent-dark);
	color: var(--color-link);
	padding: 7px 15px 8px;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 22px;
	cursor: pointer;
	transition: all 0.25s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.button:hover,
.submit:hover {
	color: var(--color-hover);
	background: rgba(0, 52, 74, 0.5);
	border-color: var(--color-hover);
	box-shadow: 0 0 8px rgba(216, 224, 85, 0.3);
}

/* ==========================================================================
   Contact Form 7
   ========================================================================== */

.wpcf7-form table {
	border: none;
}

.wpcf7-form td,
.wpcf7-form th {
	border: none;
	background: transparent;
}

.wpcf7-form p {
	margin-bottom: 1.2em;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.wpcf7-form select {
	display: block;
	margin-top: 4px;
}

.wpcf7-form .wpcf7-submit {
	padding: 0.5rem 1rem;
	border-radius: 0;
	background: var(--color-button-bg);
	border: 1px solid transparent;
	color: var(--color-bg);
	font-weight: bold;
	cursor: pointer;
	transition: all 0.25s ease;
}

.wpcf7-form .wpcf7-submit:hover {
	background: var(--color-button-hover);
	color: var(--color-bg);
	box-shadow: 0 0 10px rgba(213, 224, 86, 0.4);
}

.wpcf7-not-valid-tip {
	color: #e74c3c;
	font-size: 12px;
}

.wpcf7-response-output {
	border: 1px solid var(--color-accent-dark);
	padding: 10px;
	margin: 1em 0;
}

/* Hide reCAPTCHA badge on non-contact pages */
body:not(.page-contact) .grecaptcha-badge {
	visibility: hidden;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
	margin-top: 2em;
}

.comments-title {
	color: var(--color-heading);
	font-size: 20px;
	margin-bottom: 1em;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list li {
	margin: 0;
}

.comment-list .comment-body {
	background: var(--color-bg);
	border: 1px solid var(--color-accent-dark);
	padding: 1em;
	margin-bottom: 1em;
}

.comment-list .children {
	list-style: none;
	margin: 0 0 0 2em;
	padding: 0;
}

.comment-meta,
.comment-author {
	color: var(--color-text);
	font-size: 13px;
	margin-bottom: 0.5em;
}

.comment-author .fn {
	font-weight: bold;
	color: var(--color-heading);
}

.comment-author .avatar {
	float: left;
	margin-right: 10px;
	border-radius: 3px;
}

.comment-content {
	clear: both;
}

.comment-reply-link {
	color: var(--color-link);
	font-size: 12px;
}

.comment-respond {
	margin-top: 2em;
}

.comment-form label {
	display: block;
	margin-bottom: 2px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	margin-bottom: 1em;
}

.comments-closed {
	display: none;
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.search-form {
	display: flex;
	gap: 4px;
}

.search-form .search-field {
	flex: 1;
	max-width: none;
}

.search-form .search-submit {
	flex-shrink: 0;
}

/* ==========================================================================
   404 & Search Results
   ========================================================================== */

.error-404 .entry-content,
.search-no-results .entry-content {
	background: transparent;
	border: none;
	padding: 2em 0;
}

/* ==========================================================================
   Contact Page Layout
   ========================================================================== */

.contact-info {
	overflow: hidden;
	margin-bottom: 1.5em;
}

.contact-info .address,
.contact-info .email-phone {
	float: left;
}

.contact-info .address {
	width: 290px;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.warning {
	background: transparent url("images/warning.png") repeat scroll 0 top;
	border: 1px solid rgb(157, 37, 31);
	padding: 10px;
	margin: 10px 0;
}

.success {
	background: transparent url("images/success.png") repeat scroll 0 top;
	padding: 10px;
	border: 1px solid rgb(178, 186, 42);
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--color-bg);
	border: 1px solid var(--color-accent-dark);
	clip: auto !important;
	display: block;
	font-size: 14px;
	height: auto;
	left: 5px;
	padding: 15px 23px 14px;
	top: 5px;
	width: auto;
	z-index: 100000;
}

.clearfix::after {
	content: "";
	display: table;
	clear: both;
}

/* ==========================================================================
   WordPress Block Editor Compatibility
   ========================================================================== */

.wp-block-image img {
	max-width: 100%;
	height: auto;
}

.wp-block-quote {
	border-left: 3px solid var(--color-accent-dark);
	padding: 0.5em 1em;
	margin: 1em 0;
}

.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--color-accent-dark);
}

.wp-block-table table {
	width: 100%;
}

.wp-block-button .wp-block-button__link {
	background: var(--color-button-bg);
	color: var(--color-bg);
	padding: 8px 20px;
	text-decoration: none;
	font-weight: bold;
}

.wp-block-button .wp-block-button__link:hover {
	background: var(--color-button-hover);
}

/* ==========================================================================
   Responsive — Tablet (max-width: 960px)
   ========================================================================== */

@media screen and (max-width: 960px) {

	body {
		background: linear-gradient(to bottom, #003050 0%, var(--color-bg) 280px);
		background-color: var(--color-bg);
	}

	body::after {
		content: "";
		display: block;
		height: 120px;
		background: linear-gradient(to bottom, var(--color-bg), #003050);
	}

	#body-container {
		width: 100%;
		max-width: var(--site-width);
		padding: 0 15px;
		background-image: none;
	}

	#header {
		flex-wrap: wrap;
		gap: 8px;
	}

	body.home #feature-container {
		width: 100%;
		height: auto;
	}

	#feature-container .feature {
		height: auto;
		position: absolute;
		top: 0;
		left: 0;
	}

	#feature-container .feature.active {
		position: relative;
	}

	#feature-container .feature img {
		width: 100%;
		height: auto;
		object-fit: contain;
	}

	#content {
		width: 100%;
		float: none;
		padding: 0 0 20px 0;
	}

	.sidebar {
		width: 100%;
		float: none;
		padding: 20px 0;
		display: flex;
		flex-wrap: wrap;
		gap: 20px;
	}

	.sidebar .widget {
		flex: 1;
		min-width: 200px;
	}

	#primary {
		width: 100%;
	}

	#footer-container {
		height: auto;
	}

	#footer {
		position: static;
		width: 100%;
		height: auto;
		padding: 15px 0;
	}

	#colophon {
		padding: 10px 15px 20px;
	}
}

/* ==========================================================================
   Responsive — Mobile (max-width: 600px)
   ========================================================================== */

@media screen and (max-width: 600px) {

	body {
		font-size: 13px;
		line-height: 20px;
	}

	h1 { font-size: 24px; }
	h2 { font-size: 20px; }
	h3 { font-size: 18px; }

	.entry-title {
		font-size: 22px;
	}

	/* Header: logo left, nav right */

	#header {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		padding-top: 12px;
		padding-bottom: 8px;
	}

	h1#logo {
		width: auto;
		height: auto;
		margin-bottom: 0;
	}

	h1#logo a {
		width: auto;
		height: 28px;
	}

	h1#logo a img {
		height: 28px;
		width: auto;
	}

	#primary-menu ul {
		gap: 0;
	}

	#primary-menu a {
		font-size: 13px;
		padding: 6px 10px;
		border-top-width: 2px;
	}

	/* Carousel */

	body.home #feature-container {
		margin-bottom: 15px;
	}

	#feature-container .caption {
		font-size: 11px;
		line-height: 15px;
		padding: 5px 8px;
	}

	#feature-container .caption br {
		display: none;
	}

	/* Sidebar: single column */

	.sidebar {
		flex-direction: column;
	}

	.sidebar .widget {
		min-width: 0;
	}

	#primary .contact a {
		width: 100%;
		max-width: 220px;
	}

	/* Footer: stack */

	#footer {
		flex-direction: column;
		gap: 8px;
	}

	#footer .contact {
		text-align: left;
	}

	#colophon {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	/* Forms */

	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="tel"],
	input[type="number"],
	input[type="search"],
	input[type="password"],
	select {
		max-width: 100%;
	}

	select {
		max-width: 100%;
	}

	/* Tables: horizontal scroll */

	table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Post navigation: stack */

	.post-navigation .nav-previous,
	.post-navigation .nav-next {
		float: none;
		max-width: 100%;
		text-align: left;
		margin-bottom: 0.5em;
	}

	/* Comments: reduce nesting */

	.comment-list .children {
		margin-left: 1em;
	}

	/* Contact page layout */

	.contact-info .address,
	.contact-info .email-phone {
		float: none;
		width: 100%;
	}
}
