/*!
Theme Name: Kadence Child
Theme URI: https://www.kadencewp.com/kadence-theme/
Template: kadence
Author: Horizon Metal
Author URI: https://horizonmetalmesh.com/
Description: Custom Kadence child theme for the Horizon Metal industrial wire mesh website.
Version: 1.3.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: kadence-child
*/

/* Theme customization starts here
-------------------------------------------------------------- */

:root {
	--hm-navy: #292b90;
	--hm-navy-dark: #1e206e;
	--hm-ink: #1c1d3c;
	--hm-steel: #686a7d;
	--hm-line: #dedfeb;
	--hm-surface: #f5f5fa;
	--hm-white: #ffffff;
	--hm-red: #eb0000;
	--hm-red-dark: #c60000;
}

html {
	scroll-behavior: smooth;
}

body {
	letter-spacing: 0;
}

/* Reusable detail-page sharing links */
.hm-detail-share {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	margin-top: 24px;
	padding-top: 22px;
	border-top: 1px solid var(--hm-line);
}

.hm-detail-share__label {
	color: var(--hm-ink);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
}

.hm-detail-share__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hm-home-main .hm-detail-share__link {
	align-items: center;
	background: var(--hm-white);
	border: 1px solid var(--hm-line);
	border-radius: 50%;
	color: var(--hm-navy);
	display: inline-flex;
	flex: 0 0 38px;
	height: 38px;
	justify-content: center;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
	width: 38px;
}

.hm-detail-share__link svg {
	display: block;
	fill: currentColor;
	height: 17px;
	width: 17px;
}

.hm-home-main .hm-detail-share__link:hover,
.hm-home-main .hm-detail-share__link:focus-visible {
	background: var(--hm-red);
	border-color: var(--hm-red);
	color: var(--hm-white);
	transform: translateY(-2px);
}

.hm-detail-share__link:focus-visible {
	outline: 3px solid rgba(235, 0, 0, 0.22);
	outline-offset: 3px;
}

@media (max-width: 560px) {
	.hm-detail-share {
		align-items: flex-start;
		flex-direction: column;
	}
}

/* Shared site footer */
.hm-site-footer {
	--hm-shell: min(1180px, calc(100% - 48px));
	position: relative;
	overflow: hidden;
	background: var(--hm-navy-dark) url("assets/images/factory-floor.jpg") center / cover;
	color: rgba(255, 255, 255, 0.84);
	font-family: inherit;
	padding: 0;
}

.hm-site-footer *,
.hm-site-footer *::before,
.hm-site-footer *::after {
	box-sizing: border-box;
}

.hm-site-footer::before {
	position: absolute;
	inset: 0;
	content: "";
	background: rgba(13, 17, 74, 0.94);
	pointer-events: none;
}

.hm-site-footer > .hm-shell {
	position: relative;
	z-index: 1;
	padding-top: 48px;
	padding-bottom: 20px;
}

.hm-site-footer__top,
.hm-site-footer__grid,
.hm-site-footer__bottom {
	position: relative;
}

.hm-site-footer__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding-bottom: 32px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.hm-site-footer__brand {
	display: inline-flex;
	align-items: center;
	width: 190px;
	height: 52px;
}

.hm-site-footer__brand img {
	display: block;
	width: 180px;
	height: auto;
	filter: brightness(0) invert(1);
}

.hm-site-footer__social {
	display: flex;
	align-items: center;
	gap: 18px;
}

.hm-site-footer__social-label {
	color: rgba(255, 255, 255, 0.66);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hm-site-footer__social-links {
	display: flex;
	gap: 10px;
}

.hm-site-footer__social-link {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 50%;
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.hm-site-footer__social-link:hover,
.hm-site-footer__social-link:focus-visible {
	border-color: var(--hm-red);
	background: var(--hm-red);
	color: #fff;
	transform: translateY(-2px);
}

.hm-site-footer__grid {
	display: grid;
	grid-template-columns: 0.85fr 1.15fr 0.85fr 1.5fr;
	gap: 40px;
	padding: 42px 0 46px;
}

.hm-site-footer__column h2,
.hm-site-footer__contact h2 {
	margin: 0 0 18px;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.hm-site-footer__column ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-site-footer__column li + li {
	margin-top: 10px;
}

.hm-site-footer__column a,
.hm-site-footer__contact a {
	color: rgba(255, 255, 255, 0.72);
	font-size: 14px;
	line-height: 1.45;
	text-decoration: none;
	transition: color 160ms ease;
}

.hm-site-footer__column a:hover,
.hm-site-footer__column a:focus-visible,
.hm-site-footer__contact a:hover,
.hm-site-footer__contact a:focus-visible {
	color: #fff;
}

.hm-site-footer__contact {
	margin: 0;
	padding-left: 34px;
	border-left: 1px solid rgba(255, 255, 255, 0.16);
	font-style: normal;
}

.hm-site-footer__contact p {
	margin: 0 0 16px;
	color: rgba(255, 255, 255, 0.78);
	font-size: 14px;
	line-height: 1.65;
}

.hm-site-footer__contact > a:not(.hm-site-footer__contact-link) {
	display: block;
	margin-top: 9px;
}

.hm-site-footer__contact-link {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin-top: 22px;
	color: #fff !important;
	font-weight: 800;
}

.hm-site-footer__contact-link span {
	color: var(--hm-red);
	font-size: 18px;
}

.hm-site-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	color: rgba(255, 255, 255, 0.52);
	font-size: 12px;
}

.hm-site-footer__bottom p {
	margin: 0;
}

.hm-site-footer__legal {
	display: flex;
	align-items: center;
	gap: 9px;
}

.hm-site-footer__legal a {
	color: inherit;
	text-decoration: none;
}

.hm-site-footer__legal a:hover,
.hm-site-footer__legal a:focus-visible {
	color: #fff;
}

@media (max-width: 840px) {
	.hm-site-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 34px 24px;
	}

	.hm-site-footer__contact {
		padding-left: 0;
		border-left: 0;
	}
}

@media (max-width: 560px) {
	.hm-site-footer {
		--hm-shell: calc(100% - 28px);
	}

	.hm-site-footer > .hm-shell {
		padding-top: 34px;
	}

	.hm-site-footer__top,
	.hm-site-footer__bottom {
		align-items: flex-start;
		flex-direction: column;
	}

	.hm-site-footer__top {
		gap: 24px;
		padding-bottom: 26px;
	}

	.hm-site-footer__social {
		align-items: flex-start;
		flex-direction: column;
		gap: 10px;
	}

	.hm-site-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: 28px 18px;
		padding: 32px 0 34px;
	}

	.hm-site-footer__column--wide,
	.hm-site-footer__contact {
		grid-column: 1 / -1;
	}

	.hm-site-footer__bottom {
		gap: 12px;
	}
}

/* ------------------------------------------------------------------ *
 * Email modal — opens site-wide when any mailto: link is clicked.    *
 * Markup lives in footer.php; behaviour in assets/js/email-modal.js. *
 * ------------------------------------------------------------------ */
.hm-email-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 17, 45, 0.62);
}
.hm-email-modal.is-open {
	display: flex;
}
body.hm-email-modal-open {
	overflow: hidden;
}
.hm-email-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #fff;
	border-radius: 14px;
	padding: 30px 30px 26px;
	box-shadow: 0 24px 64px rgba(15, 17, 45, 0.35);
	color: var(--hm-ink, #1c1d3c);
}
.hm-email-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #5a5c7a;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
.hm-email-modal__close:hover,
.hm-email-modal__close:focus {
	background: #f0f1f8;
	color: var(--hm-ink, #1c1d3c);
}
.hm-email-modal__eyebrow {
	margin: 0 0 6px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #6a6c8f;
}
.hm-email-modal__title {
	margin: 0 0 10px;
	font-size: 1.35rem;
	line-height: 1.25;
	color: var(--hm-ink, #1c1d3c);
}
.hm-email-modal__intro {
	margin: 0 0 18px;
	font-size: 0.95rem;
	line-height: 1.6;
	color: #4a4c66;
}
.hm-email-modal__form {
	margin-bottom: 18px;
}
.hm-email-modal__fallback {
	margin: 0 0 18px;
	font-size: 0.92rem;
	line-height: 1.6;
	color: #4a4c66;
}
.hm-email-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	border-top: 1px solid #e6e7f0;
	padding-top: 18px;
}
.hm-email-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid var(--hm-ink, #1c1d3c);
	background: var(--hm-ink, #1c1d3c);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.hm-email-modal__btn:hover,
.hm-email-modal__btn:focus {
	opacity: 0.88;
}
.hm-email-modal__btn--outline {
	background: transparent;
	color: var(--hm-ink, #1c1d3c);
}
.hm-email-modal__btn--outline:hover,
.hm-email-modal__btn--outline:focus {
	background: #f0f1f8;
	opacity: 1;
}
@media (max-width: 600px) {
	.hm-email-modal__dialog {
		padding: 24px 20px 20px;
	}
	.hm-email-modal__actions .hm-email-modal__btn {
		flex: 1 1 100%;
	}
}

/* ------------------------------------------------------------------ *
 * Floating enquiry bubble — bottom-right widget on every page.       *
 * ------------------------------------------------------------------ */
.hm-fab {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 13px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--hm-red, #eb0000);
	color: #fff;
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.02em;
	box-shadow: 0 10px 28px rgba(235, 0, 0, 0.35), 0 2px 6px rgba(15, 17, 45, 0.18);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hm-fab:hover,
.hm-fab:focus {
	background: var(--hm-red-dark, #c60000);
	transform: translateY(-2px);
	box-shadow: 0 14px 34px rgba(235, 0, 0, 0.45), 0 3px 8px rgba(15, 17, 45, 0.22);
}

.hm-fab__icon {
	width: 24px;
	height: 24px;
}

.hm-fab__label {
	display: inline;
}

@media (max-width: 600px) {
	.hm-fab {
		padding: 14px;
	}
	.hm-fab__label {
		display: none;
	}
}

.hm-enquiry-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 17, 45, 0.62);
	overflow-y: auto;
}

.hm-enquiry-modal.is-open {
	display: flex;
	animation: hm-enquiry-fade 0.2s ease;
}

body.hm-enquiry-modal-open {
	overflow: hidden;
}

.hm-enquiry-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 40px);
	/* KEY FIX: never show a horizontal scrollbar. */
	overflow-x: hidden;
	overflow-y: auto;
	background: #fff;
	border-radius: 18px;
	padding: 36px 32px 28px;
	box-shadow: 0 28px 72px rgba(15, 17, 45, 0.4);
	color: var(--hm-ink, #1c1d3c);
	animation: hm-enquiry-rise 0.24s ease;
	box-sizing: border-box;
}

.hm-enquiry-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #f2f3f9;
	color: #5a5c7a;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.hm-enquiry-modal__close:hover,
.hm-enquiry-modal__close:focus {
	background: #e2e4f0;
	color: var(--hm-ink, #1c1d3c);
}

.hm-enquiry-modal__eyebrow {
	margin: 0 0 6px;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hm-red, #eb0000);
}

.hm-enquiry-modal__title {
	margin: 0 0 10px;
	font-size: 1.55rem;
	line-height: 1.2;
	font-weight: 700;
	color: var(--hm-navy, #292b90);
	letter-spacing: -0.01em;
}

.hm-enquiry-modal__intro {
	margin: 0 0 22px;
	font-size: 0.95rem;
	line-height: 1.6;
	color: #4a4c66;
}

.hm-enquiry-modal__form {
	margin: 0;
	width: 100%;
	box-sizing: border-box;
}

/* Reset FluentForm to align with dialog padding and prevent overflow. */
.hm-enquiry-modal__form .fluentform,
.hm-enquiry-modal__form > form {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.hm-enquiry-modal__form .ff-el-group,
.hm-enquiry-modal__form .ff-el-form-bottom,
.hm-enquiry-modal__form .ff-el-input--label,
.hm-enquiry-modal__form .ff-el-input--content {
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	max-width: 100%;
	box-sizing: border-box;
}

/* Input/textarea styling. */
.hm-enquiry-modal__form input[type="text"],
.hm-enquiry-modal__form input[type="email"],
.hm-enquiry-modal__form input[type="tel"],
.hm-enquiry-modal__form input[type="url"],
.hm-enquiry-modal__form input[type="number"],
.hm-enquiry-modal__form select,
.hm-enquiry-modal__form textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	border-radius: 10px;
	border: 1px solid #d8dae8;
	padding: 12px 14px;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--hm-ink, #1c1d3c);
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hm-enquiry-modal__form input:focus,
.hm-enquiry-modal__form select:focus,
.hm-enquiry-modal__form textarea:focus {
	outline: 0;
	border-color: var(--hm-red, #eb0000);
	box-shadow: 0 0 0 3px rgba(235, 0, 0, 0.14);
}

.hm-enquiry-modal__form textarea {
	min-height: 110px;
	resize: vertical;
}

/* Labels */
.hm-enquiry-modal__form .ff-el-input--label label,
.hm-enquiry-modal__form label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--hm-ink, #1c1d3c);
	margin-bottom: 6px;
	display: block;
}

/* Submit button — match brand red. */
.hm-enquiry-modal__form button[type="submit"],
.hm-enquiry-modal__form input[type="submit"],
.hm-enquiry-modal__form .ff-btn-submit,
.hm-enquiry-modal__form .ff_submit_btn,
.hm-enquiry-modal__form .ff-el-form-bottom button {
	width: 100%;
	padding: 14px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--hm-red, #eb0000);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 6px 18px rgba(235, 0, 0, 0.28);
}

.hm-enquiry-modal__form button[type="submit"]:hover,
.hm-enquiry-modal__form .ff-btn-submit:hover,
.hm-enquiry-modal__form .ff-el-form-bottom button:hover {
	background: var(--hm-red-dark, #c60000);
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(235, 0, 0, 0.36);
}

@keyframes hm-enquiry-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes hm-enquiry-rise {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
	.hm-enquiry-modal {
		padding: 12px;
	}
	.hm-enquiry-modal__dialog {
		padding: 32px 22px 24px;
		max-height: calc(100vh - 24px);
	}
	.hm-enquiry-modal__close {
		top: 10px;
		right: 10px;
	}
	.hm-enquiry-modal__title {
		font-size: 1.35rem;
	}
}
