/* ============================================================
   NAVAN-MACHINE 主样式
   ============================================================ */

:root {
	--color-primary: #1b34aa;   /* 你的logo主色 */
	--color-primary-dark: #142a87;
	--color-accent: #f5821f;    /* 设计稿中的橙色高亮/按钮辅助色,可按实际微调 */
	--color-text: #333333;
	--color-text-light: #666666;
	--color-bg-light: #f7f8fa;
	--color-white: #ffffff;
	--container-width: 1200px;
	--radius: 4px;
	--transition: 0.25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--color-text);
	line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.3; }

.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 20px;
}

.btn {
	display: inline-block;
	padding: 12px 28px;
	border-radius: var(--radius);
	font-weight: 600;
	transition: background var(--transition), color var(--transition);
	cursor: pointer;
	border: 1px solid transparent;
}
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); }
.btn--outline { background: transparent; border-color: #ccc; color: var(--color-text); }
.btn--outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

.section { padding: 70px 0; }
.section__heading { text-align: center; max-width: 700px; margin: 0 auto 40px; }
.section__heading h2 { font-size: 32px; }
.section__heading p { color: var(--color-text-light); }
.section__heading--light h2,
.section__heading--light p { color: #fff; }
.section__heading--split { display: flex; justify-content: space-between; align-items: flex-end; text-align: left; max-width: none; }
.section__tag { color: var(--color-primary); font-weight: 600; text-transform: uppercase; font-size: 13px; }

/* ---------- Top bar ---------- */
.top-bar { background: #0d1526; color: #cfd3dc; font-size: 13px; }
.top-bar__inner { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.top-bar__slogan { display: flex; align-items: center; gap: 8px; }
.top-bar__contact { display: flex; align-items: center; gap: 20px; }
.top-bar__contact a { display: inline-flex; align-items: center; gap: 6px; color: #cfd3dc; }
.top-bar__contact a:hover { color: #fff; }
.top-bar__search-toggle { background: none; border: none; color: #cfd3dc; cursor: pointer; display: flex; align-items: center; }
.top-bar__search-toggle:hover { color: #fff; }
.top-bar i { font-size: 13px; }

/* ---------- Header / Nav (吸顶: 滚动时导航固定在顶部, top-bar随页面滚走) ---------- */
.site-header {
	background: #fff;
	box-shadow: 0 1px 6px rgba(0,0,0,0.06);
	position: sticky;
	top: 0;
	z-index: 200;
	transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.primary-menu { display: flex; gap: 32px; height: 100%; }
.primary-menu > li { position: static; } /* static: 让mega menu面板能相对整个视口(fixed)全宽展开,不受li定位限制 */
.menu-link.menu-depth-0 {
	display: flex; align-items: center; gap: 4px;
	height: 78px; font-weight: 600; color: var(--color-text);
	border-bottom: 2px solid transparent;
}
.primary-menu > li:hover > .menu-link,
.primary-menu > li.current-menu-item > .menu-link {
	color: var(--color-primary);
	border-bottom-color: var(--color-primary);
}
.menu-caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; }
.site-header__mobile-toggle { display: none; } /* 默认(电脑/平板)隐藏,手机端断点里改为flex显示 */

/* ---------- 下拉菜单(普通,非mega menu的项,如Solution/Service/About/Resources) ---------- */
.sub-menu-panel {
	display: none;
	position: absolute;
	top: 78px; left: 0;
	background: #fff;
	box-shadow: 0 10px 30px rgba(0,0,0,0.12);
	min-width: 220px;
	padding: 16px 0;
	border-radius: 0 0 var(--radius) var(--radius);
}
.sub-menu-panel .sub-menu-depth-1 { display: block; }
.sub-menu-panel .menu-link.menu-depth-1 {
	display: block; padding: 8px 24px; font-weight: 500; color: var(--color-text);
}
.sub-menu-panel .menu-link.menu-depth-1:hover { background: var(--color-bg-light); color: var(--color-primary); }

/* ---------- Mega Menu(仅Product菜单项,加了 mega-menu 这个CSS Class的项)
   效果对应参考图: 悬停后面板占据整个屏幕宽度,内容居中限宽,
   系列分组按"图标 + 粗体标题 + 具体产品列表"纵向排列,用CSS多列自动分成3列 ---------- */
.menu-item-has-children.mega-menu .sub-menu-panel {
	display: none;
	position: fixed;         /* fixed相对视口定位,才能做到"占据全宽"而不受父级container限制 */
	top: 78px;                /* 等于 .site-header__inner 的高度 */
	left: 0;
	width: 100%;
	min-width: 0;
	background: #eef0f3;
	box-shadow: 0 10px 30px rgba(0,0,0,0.12);
	padding: 48px 0;
	border-radius: 0;
}
.menu-item-has-children.mega-menu .sub-menu-panel .sub-menu-depth-1 {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 20px;
	columns: 3;
	column-gap: 60px;
}
.menu-item-has-children:hover > .sub-menu-panel { display: block; }

/* 系列分组(depth 1): 图标在上,标题在下,整组不允许被多列布局从中间截断 */
.mega-menu-group {
	break-inside: avoid;
	margin-bottom: 40px;
}
.mega-menu-group > .menu-link.menu-depth-1 {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 14px;
	pointer-events: none; /* 系列标题本身不可点击,仅作为分组标题(与参考图一致) */
}
.mega-menu-group .menu-item-icon { width: 44px; height: 44px; object-fit: contain; }
.mega-menu-group > .menu-link.menu-depth-1 .menu-link__text {
	font-size: 18px; font-weight: 700; color: var(--color-primary);
}

/* 具体产品(depth 2): 纯文字列表,可点击 */
.sub-menu-depth-2 { margin-left: 0; }
.sub-menu-depth-2 .menu-link.menu-depth-2 {
	display: block; padding: 6px 0; font-size: 15px; color: var(--color-text-light); pointer-events: auto;
}
.sub-menu-depth-2 .menu-link.menu-depth-2:hover { color: var(--color-primary); }

/* ---------- Hero (静态背景大图 + iconbox + H1 + 描述 + 双按钮 + 右侧产线图) ---------- */
.hero { position: relative; overflow: hidden; height: 750px; display: flex; align-items: center; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__inner {
	position: relative; z-index: 1;
	display: flex; align-items: center; justify-content: space-between; gap: 40px;
	padding: 80px 20px;
}
.hero__content { flex: 1; max-width: 560px; }
.hero__iconbox {
	display: inline-flex; align-items: center; gap: 8px;
	background: rgba(255,255,255,0.9); color: var(--color-primary);
	padding: 6px 16px; border-radius: 30px; font-weight: 600; font-size: 14px;
	margin-bottom: 20px;
}
.hero__iconbox i { font-size: 14px; color: var(--color-accent); }
.hero__title { font-size: 44px; }
.hero__title .highlight { color: var(--color-accent); display: block; }
.hero__desc { color: var(--color-text-light); max-width: 480px; margin-bottom: 28px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__side-image { flex: 1; max-width: 620px; }
.hero__side-image img { width: 100%; height: auto; }

/* 手机端: 背景图会通过 <picture> 的 source 自动切换为竖版素材,
   这里再把内容区改成纵向堆叠、右侧产线图收窄,避免和文字重叠 */
@media (max-width: 767px) {
	.hero { height: 520px; }
	.hero__inner { flex-direction: column; text-align: center; padding: 60px 20px; }
	.hero__content { max-width: 100%; }
	.hero__title { font-size: 30px; }
	.hero__actions { justify-content: center; }
	.hero__side-image { max-width: 320px; }
}


/* ---------- Card grid (热销机械 / 解决方案 共用) ---------- */
.card-grid { display: grid; gap: 20px; }
.card-grid--3col { grid-template-columns: repeat(3, 1fr); }
.card-grid--solutions { grid-template-columns: repeat(4, 1fr); }
.navan-card { display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: #fff; }
.navan-card__image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.navan-card__title { padding: 12px 16px; font-weight: 600; }
.navan-card--dark .navan-card__title,
.navan-card--dark-large .navan-card__title {
	position: absolute; bottom: 0; left: 0; right: 0;
	background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
	color: #fff;
}
.navan-card--dark-large { grid-row: span 2; grid-column: span 1; }
.navan-card__bar { color: var(--color-accent); margin-right: 4px; }

/* ---------- About ---------- */
.about__stats { display: flex; justify-content: space-around; text-align: center; margin-bottom: 50px; }
.about__stat-number { display: block; font-size: 32px; font-weight: 700; color: var(--color-primary); }
.about__grid { display: flex; gap: 50px; align-items: flex-start; }
.about__content, .about__media { flex: 1; }
.about__main-image { border-radius: var(--radius); margin-bottom: 12px; }
.about__gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

/* ---------- Why Choose (深色区块) ---------- */
.why-choose {
	background-color: var(--color-primary); /* 没设置背景图时的兜底色 */
	background-size: cover;
	background-position: center;
	position: relative;
}
.why-choose::before {
	/* 半透明主色蒙层,保证文字在背景图片上依然清晰可读 */
	content: '';
	position: absolute; inset: 0;
	background: rgba(27, 52, 170, 0.85);
}
.why-choose .container { position: relative; z-index: 1; }
.why-choose__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.why-choose__icon {
	display: inline-flex; width: 60px; height: 60px; border-radius: 50%;
	background: #fff; align-items: center; justify-content: center; margin-bottom: 16px;
}
.why-choose__icon i { font-size: 24px; color: var(--color-primary); }
.why-choose__item h3, .why-choose__item p { color: #fff; }
.why-choose__more { color: #fff; text-decoration: underline; }

/* ---------- Customer Satisfaction ---------- */
.customer-satisfaction__gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 24px 0 40px; }
.customer-satisfaction__brands { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; align-items: center; }
.customer-satisfaction__brands img { filter: grayscale(0%); }

/* ---------- Latest News ---------- */
.latest-news__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.article-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.article-row img { width: 80px; height: 60px; object-fit: cover; border-radius: var(--radius); }
.article-row__title { display: block; font-weight: 600; }
.article-row__date { display: block; color: var(--color-text-light); font-size: 13px; }

/* ---------- Footer ---------- */
.site-footer { background: #0d1526; color: #b7bcc8; padding-top: 60px; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; font-size: 13px; }
.site-footer__bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; }
.footer-contact-item i { margin-top: 3px; color: var(--color-accent); width: 16px; text-align: center; }
.footer-contact-item a { color: #b7bcc8; }
.footer-contact-item a:hover { color: #fff; }
.footer-contact-item__label { font-weight: 600; color: #fff; }

/* ---------- FAQ 手风琴 ---------- */
.faq-accordion { max-width: 800px; margin: 0 auto; padding: 40px 20px 80px; }
.faq-item { border-bottom: 1px solid #e5e5e5; }
.faq-item__question {
	width: 100%; display: flex; justify-content: space-between; align-items: center;
	background: none; border: none; text-align: left; padding: 20px 0;
	font-size: 17px; font-weight: 600; cursor: pointer; color: var(--color-text);
}
.faq-item__caret { transition: transform 0.25s ease; color: var(--color-primary); }
.faq-item.is-open .faq-item__caret { transform: rotate(180deg); }
.faq-item__answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item__answer-inner { padding-bottom: 20px; color: var(--color-text-light); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
	.card-grid--3col, .card-grid--solutions, .why-choose__grid,
	.latest-news__grid, .site-footer__grid { grid-template-columns: 1fr; }
}

/* ---------- 手机端(≤767px): 顶部信息条隐藏,导航收起为汉堡菜单 ---------- */
@media (max-width: 767px) {
	/* 顶部信息条只在电脑端/平板端显示,手机端完全隐藏 */
	.top-bar { display: none; }

	.site-header__inner { height: 64px; }
	.site-header__lang { order: 2; }
	.site-header__mobile-toggle {
		order: 3;
		display: flex; align-items: center; justify-content: center;
		width: 40px; height: 40px; margin-left: 8px;
		background: none; border: none; font-size: 20px; color: var(--color-text); cursor: pointer;
	}
	.lang-switcher__caret { display: none; } /* 手机端语言按钮简化,不显示下拉小箭头,节省空间 */

	/* 主导航默认收起,点击汉堡按钮后加 is-open 才展开 */
	.site-header__nav {
		display: none;
		position: fixed;
		top: 64px; left: 0; right: 0; bottom: 0;
		width: 100%;
		background: #fff;
		overflow-y: auto;
		z-index: 190;
		border-top: 1px solid #eee;
	}
	.site-header__nav.is-open { display: block; }

	.primary-menu { flex-direction: column; height: auto; gap: 0; }
	.primary-menu > li { border-bottom: 1px solid #f0f0f0; }

	/* 一级菜单: 加粗,横向占满,右侧带展开箭头 */
	.menu-link.menu-depth-0 {
		height: auto; padding: 16px 20px;
		font-weight: 700; border-bottom: none;
		justify-content: space-between;
	}
	.menu-caret { margin-top: 0; }

	/* 子菜单面板: 手机端取消fixed定位/多列布局,变成手风琴式纵向展开 */
	.sub-menu-panel,
	.menu-item-has-children.mega-menu .sub-menu-panel {
		display: none;
		position: static;
		width: 100%;
		min-width: 0;
		box-shadow: none;
		padding: 0;
		background: #fafafa;
		border-radius: 0;
	}
	.primary-menu > li.is-mobile-open > .sub-menu-panel { display: block; }

	/* 二级菜单: 缩进 */
	.sub-menu-panel .sub-menu-depth-1,
	.menu-item-has-children.mega-menu .sub-menu-panel .sub-menu-depth-1 {
		columns: 1; max-width: none; padding: 0;
	}
	.sub-menu-panel .menu-link.menu-depth-1 {
		padding: 12px 20px 12px 36px;
		font-weight: 600;
	}
	.mega-menu-group { margin-bottom: 0; break-inside: auto; }
	.mega-menu-group > .menu-link.menu-depth-1 {
		flex-direction: row; align-items: center; gap: 10px;
		padding: 12px 20px 12px 36px; margin-bottom: 0;
	}
	.mega-menu-group .menu-item-icon { width: 24px; height: 24px; }

	/* 三级菜单(具体产品): 进一步缩进 */
	.sub-menu-depth-2 .menu-link.menu-depth-2 {
		padding: 10px 20px 10px 56px;
	}
}
