/*
Theme Name: Haifeng
Theme URI: https://haifengmachine.com/
Author: Haifeng
Description: Custom WordPress theme for Haifeng machinery content, products, projects, solutions, cases, news, and blog publishing.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: haifeng
*/

:root {
	--hf-green: #2b8a4f;
	--hf-green-dark: #1f6f3e;
	--hf-ink: #17212b;
	--hf-muted: #607080;
	--hf-line: #e4e8ec;
	--hf-soft: #f5f7f8;
	--hf-gold: #d6a84e;
	--hf-wrap: 1200px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	color: var(--hf-ink);
	font-family: "Inter", Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.65;
	background: #fff;
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
}

.hf-wrap {
	width: min(var(--hf-wrap), calc(100% - 32px));
	margin: 0 auto;
}

.hf-topbar {
	background: #eeeeee;
	color: var(--hf-green);
	font-size: 15px;
}

.hf-topbar .hf-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 44px;
}

.hf-contact,
.hf-social {
	display: flex;
	align-items: center;
	gap: 22px;
	flex-wrap: wrap;
}

.hf-site-header {
	background: #fff;
	border-bottom: 1px solid rgba(23, 33, 43, 0.08);
}

.hf-brand-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 28px 0 18px;
}

.hf-logo {
	display: inline-flex;
	align-items: center;
	color: var(--hf-green);
	font-size: 42px;
	line-height: 1;
	font-weight: 800;
	letter-spacing: 0;
	text-transform: uppercase;
}

.hf-logo-mark {
	display: inline-block;
	width: 44px;
	height: 44px;
	margin-right: 10px;
	background: var(--hf-green);
	clip-path: polygon(40% 0, 100% 0, 62% 100%, 0 100%);
}

.hf-logo .custom-logo {
	display: block;
	width: auto;
	max-width: 190px;
	max-height: 70px;
}

.hf-search {
	width: min(290px, 40vw);
	height: 36px;
	border-radius: 999px;
	border: 0;
	background: #f0f0f0;
	padding: 0 16px;
	color: var(--hf-muted);
}

.hf-nav-shell {
	background: var(--hf-green);
	border-radius: 30px;
	padding: 0 28px;
	margin-bottom: 20px;
}

.hf-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	flex-wrap: wrap;
}

.hf-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 64px;
	padding: 0 18px;
	color: #fff;
	font-weight: 700;
	white-space: nowrap;
}

.hf-nav a:hover,
.hf-nav .current-menu-item > a,
.hf-nav .current_page_item > a {
	background: rgba(255, 255, 255, 0.11);
}

.hf-hero {
	position: relative;
	overflow: hidden;
	padding: 82px 0 76px;
	background: #10251b;
	color: #fff;
}

.hf-page-hero {
	background: #fff;
	color: var(--hf-ink);
	padding: 42px 0 34px;
	border-bottom: 1px solid var(--hf-line);
}

.hf-page-hero .hf-eyebrow {
	color: var(--hf-green);
}

.hf-page-hero h1 {
	max-width: 1080px;
	margin: 0;
	color: var(--hf-green);
	font-size: clamp(34px, 4vw, 52px);
	line-height: 1.14;
	letter-spacing: 0;
}

.hf-page-hero p {
	max-width: 900px;
	margin: 14px 0 0;
	color: var(--hf-muted);
	font-size: 17px;
}

.hf-hero:after {
	content: "";
	position: absolute;
	right: -120px;
	bottom: -180px;
	width: min(620px, 70vw);
	aspect-ratio: 1;
	background: rgba(36, 132, 71, 0.42);
	border-radius: 50%;
}

.hf-hero .hf-wrap {
	position: relative;
	z-index: 1;
}

.hf-eyebrow {
	margin: 0 0 12px;
	color: var(--hf-gold);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hf-hero h1 {
	max-width: 920px;
	margin: 0;
	font-size: clamp(36px, 5vw, 62px);
	line-height: 1.08;
	letter-spacing: 0;
}

.hf-hero p {
	max-width: 760px;
	margin: 18px 0 0;
	color: rgba(255, 255, 255, 0.82);
	font-size: 18px;
}

.hf-hero-actions {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 30px;
}

.hf-button-light {
	background: #fff;
	color: var(--hf-green);
	border-color: #fff;
}

.hf-button-light:hover {
	background: rgba(255, 255, 255, 0.88);
	color: var(--hf-green-dark);
}

.hf-capability-band {
	background: #fff;
	border-bottom: 1px solid var(--hf-line);
}

.hf-capability-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	background: var(--hf-line);
}

.hf-capability-grid > div {
	min-height: 116px;
	padding: 24px;
	background: #fff;
}

.hf-capability-grid strong {
	display: block;
	color: var(--hf-green);
	font-size: 30px;
	line-height: 1.1;
}

.hf-capability-grid span {
	display: block;
	margin-top: 8px;
	color: var(--hf-muted);
}

.hf-section {
	padding: 72px 0;
}

.hf-section-muted {
	background: var(--hf-soft);
}

.hf-section-head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 28px;
}

.hf-section-title {
	margin: 0;
	font-size: clamp(28px, 3.2vw, 42px);
	line-height: 1.15;
	letter-spacing: 0;
}

.hf-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.hf-card {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	background: #fff;
	border: 1px solid #e7ecea;
	border-radius: 8px;
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease;
}

.hf-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 34px rgba(23, 33, 43, 0.09);
}

.hf-card-media {
	display: block;
	aspect-ratio: 4 / 3;
	background: #dfe6e2;
	overflow: hidden;
}

.hf-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hf-card-body {
	padding: 24px;
}

.hf-card h2,
.hf-card h3 {
	margin: 0;
	font-size: 22px;
	line-height: 1.28;
	letter-spacing: 0;
}

.hf-card p {
	margin: 12px 0 0;
	color: var(--hf-muted);
}

.hf-card .hf-button {
	margin-top: auto;
}

.hf-meta {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 10px;
	color: var(--hf-green);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
}

.hf-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: 18px;
	padding: 0 18px;
	border: 1px solid var(--hf-green);
	border-radius: 4px;
	color: var(--hf-green);
	font-weight: 800;
}

.hf-button:hover {
	background: var(--hf-green);
	color: #fff;
}

.hf-button-solid {
	width: 100%;
	background: var(--hf-green);
	color: #fff;
}

.hf-button-solid:hover {
	background: var(--hf-green-dark);
	border-color: var(--hf-green-dark);
}

.hf-content {
	padding: 58px 0 78px;
}

.hf-content .hf-wrap {
	max-width: 980px;
}

.hf-single-content .hf-wrap {
	max-width: var(--hf-wrap);
}

.hf-detail-layout {
	display: grid;
	grid-template-columns: minmax(300px, 42%) minmax(0, 1fr);
	gap: 42px;
	align-items: start;
}

.hf-detail-media {
	position: sticky;
	top: 22px;
}

.hf-detail-body {
	min-width: 0;
}

.hf-detail-body > *:first-child {
	margin-top: 0;
}

.hf-content h2,
.hf-content h3 {
	margin: 36px 0 14px;
	line-height: 1.25;
	letter-spacing: 0;
}

.hf-content h2 {
	color: #4b5560;
	font-size: clamp(24px, 2.6vw, 34px);
}

.hf-content h3 {
	color: #4b5560;
	font-size: clamp(20px, 2vw, 26px);
}

.hf-content p,
.hf-content li {
	color: #42505d;
}

.hf-content figure {
	margin: 32px 0;
}

.hf-post-image {
	margin: 0 0 34px;
	border-radius: 8px;
	overflow: hidden;
	background: #eef3f0;
}

.hf-placeholder-media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	margin-bottom: 20px;
	border-radius: 8px;
	background: linear-gradient(135deg, #eff5f2, #dbe9e1);
	color: var(--hf-green);
	font-size: 22px;
	font-weight: 800;
	text-align: center;
}

.hf-pagination {
	margin-top: 38px;
}

.hf-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	margin: 0 3px 6px 0;
	border: 1px solid var(--hf-line);
	border-radius: 4px;
	color: var(--hf-ink);
}

.hf-pagination .current {
	background: var(--hf-green);
	border-color: var(--hf-green);
	color: #fff;
}

.hf-footer {
	background: #12251b;
	color: #d9e4df;
	padding: 52px 0 24px;
}

.hf-footer-grid {
	display: grid;
	grid-template-columns: 1.5fr repeat(3, 1fr);
	gap: 28px;
}

.hf-footer h2,
.hf-footer h3 {
	margin: 0 0 14px;
	color: #fff;
	letter-spacing: 0;
}

.hf-footer p,
.hf-footer a {
	color: #b8c8c1;
}

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

.hf-footer li + li {
	margin-top: 8px;
}

.hf-copyright {
	margin-top: 38px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	color: #91a7a0;
	font-size: 14px;
}

@media (max-width: 900px) {
	.hf-grid,
	.hf-footer-grid,
	.hf-capability-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hf-detail-layout {
		grid-template-columns: 1fr;
	}

	.hf-detail-media {
		position: static;
	}

	.hf-brand-row {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 640px) {
	.hf-topbar .hf-wrap,
	.hf-contact,
	.hf-social {
		align-items: flex-start;
		flex-direction: column;
		gap: 8px;
	}

	.hf-nav-shell {
		border-radius: 0;
		margin-left: -16px;
		margin-right: -16px;
	}

	.hf-nav {
		justify-content: flex-start;
	}

	.hf-nav a {
		min-height: 48px;
		padding: 0 12px;
	}

	.hf-grid,
	.hf-footer-grid,
	.hf-capability-grid {
		grid-template-columns: 1fr;
	}
}
