/* 首页 V2 · Contact：左表单卡 + 右世界地图，共用样式在 nv2-base.css，本板块覆盖都在本文件 */

.nv2-contact {
	/* 卡宽唯一来源：地图左缘 / 宽度 / 留白都跟它走；430 是下限，再窄 Email/Tel 两列会被挤成竖排 */
	--nv2-card-w: min(var(--nv2-maxw) - 2 * var(--nv2-gutter), 100vw - 2 * var(--nv2-gutter), clamp(430px, 34vw, 650px));
	/* 版心到屏幕边缘的空白，算地图宽度时要减掉 */
	--nv2-bleed: calc(var(--nv2-gutter) + max(0px, (100vw - var(--nv2-maxw)) / 2));
	/* 地图压进卡片的固定距离 */
	--nv2-map-overlap: 80px;
	/* 地图顶边高出卡片顶边的距离 */
	--nv2-map-lift: 28px;
	/* 地图宽 = 视口 - 卡宽 + 压进量 - 左侧空白，封顶 1100px */
	--nv2-map-w: min(100vw - var(--nv2-card-w) + var(--nv2-map-overlap) - var(--nv2-bleed), 1100px);
	/* 标题下边距由 .nv2-home h2 的 1.4em 接管，不是 .nv2-title 里的 clamp */
	--nv2-title-mb: calc(1.4 * clamp(24px, 2.9vw, 42px));
	position: relative;
	padding-block: var(--nv2-sec-y);
	background: #fff;
	overflow: hidden;
}

/* 地图以 body 为定位父级，所以 top 就等于卡片顶 */
.nv2-contact__body {
	position: relative;
	display: flex;
	align-items: center;
	/* 卡片特别矮时才生效；card-w / map-w / overlap / lift 联动，改一个要重测地图上下留白 */
	min-height: calc(var(--nv2-map-w) / 1.8785 - var(--nv2-sec-y) - var(--nv2-title-mb) + 56px);
}

/* flex:none 防被压缩，卡宽只由 --nv2-card-w 决定 */
.nv2-contact__formwrap {
	position: relative;
	z-index: 2;
	flex: none;
	width: var(--nv2-card-w);
}

/* ---- 表单 ---- */
.nv2-form {
	padding: clamp(20px, 2.2vw, 34px);
	background: rgba(255, 255, 255, .72);
	border-radius: 16px;
	border: 1.5px solid rgba(255, 255, 255, 1);
	box-shadow: 0px 16px 40px rgba(23, 83, 134, 0.15);
	backdrop-filter: blur(8px);
}

.nv2-form__row--split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: clamp(12px, 1.2vw, 18px);
}

/* 带 .nv2-home 才压得过 base 的段落 margin；position:relative 给下面 sr-only label 当定位父级 */
.nv2-home .nv2-field {
	position: relative;
	margin: 0 0 clamp(12px, 1.2vw, 18px);
}

/* label 只负责可访问名称：绝对定位 + 1px 裁切隐藏，不能改回 display:none / visibility:hidden（读屏会丢掉）；for 与控件 id 必须成对 */
.nv2-home .nv2-field__label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0;
	color: #404040;
}

/* 带 .nv2-home 才压得过主题 style.css 的 input[type="email"] */
.nv2-home .nv2-field__input {
	display: block;
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	font-family: var(--nv2-font);
	font-size: 16px;
	font-weight: 400;
	color: #404040;
	background: #fff;
	border: 1px solid var(--nv2-ink);
	border-radius: 6px;
	transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
	-webkit-appearance: none;
	appearance: none;
}

/* 提示词颜色取 #767676（白底上正好 4.5:1 达 AA）；opacity:1 抵消浏览器默认的淡灰 */
.nv2-home .nv2-field__input::placeholder {
	color: #767676;
	opacity: 1;
}

.nv2-home .nv2-field__input:focus {
	outline: none;
	background: var(--nv2-blue-bg);
	border-color: var(--nv2-blue-bright);
	box-shadow: 0 0 0 3px rgba(37, 147, 255, .14);
}

/* 红边必须和 :focus 并列写，否则出错后一聚焦就被蓝边吃掉 */
.nv2-home .nv2-field__input.is-error,
.nv2-home .nv2-field__input.is-error:focus {
	border-color: #E05B4B;
}

/* 高度由模板里的 rows="6" 决定（约 120px）；这里写 min-height 会被输入的 44px 顶掉 */
.nv2-field__textarea {
	resize: vertical;
	line-height: 1.6;
}

/* ---- 自定义下拉：原生 select 只负责提交与 change，面板自己画 ---- */
.nv2-select {
	position: relative;
}

.nv2-select__native {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* 带 .nv2-home 才压得过主题的 button 默认样式；text-transform / font-weight 必须显式写，否则提示词被顶成大写粗体 */
.nv2-home .nv2-select__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	font-family: var(--nv2-font);
	font-size: clamp(14px, 1vw, 16px);
	font-weight: 400;
	text-transform: none;
	text-align: left;
	color: var(--nv2-ink);
	background: #fff;
	border: 1px solid var(--nv2-ink);
	border-radius: 6px;
	cursor: pointer;
	transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

/* 下拉没选中时显示的就是 placeholder 文案，颜色跟输入框保持一致 */
.nv2-home .nv2-select__trigger.is-placeholder {
	color: #767676;
}

.nv2-home .nv2-select__trigger:hover {
	border-color: var(--nv2-blue-bright);
}

/* focus 也要：选完 option 会把焦点还给触发按钮 */
.nv2-home .nv2-select__trigger:focus,
.nv2-home .nv2-select__trigger[aria-expanded="true"] {
	background: var(--nv2-blue-bg);
	border-color: var(--nv2-blue-bright);
	box-shadow: 0 0 0 3px rgba(37, 147, 255, .14);
	outline: none;
}

/* 同理：红边要和 focus / 展开态并列，才不会被蓝边吃掉 */
.nv2-home .nv2-select__trigger.is-error,
.nv2-home .nv2-select__trigger.is-error:focus,
.nv2-home .nv2-select__trigger.is-error[aria-expanded="true"] {
	border-color: #E05B4B;
}

.nv2-select__arrow {
	flex: none;
	width: 12px;
	height: 8px;
	background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%230071C3' d='M6 8 0 2.2 1.2 1 6 5.6 10.8 1 12 2.2z'/%3E%3C/svg%3E") center / 12px 8px no-repeat;
	transition: transform .25s ease;
}

.nv2-home .nv2-select__trigger[aria-expanded="true"] .nv2-select__arrow {
	transform: rotate(180deg);
}

/* 带 .nv2-home：否则 nv2-base 的 .nv2-home ul 重置会抢掉面板 padding */
.nv2-home .nv2-select__panel {
	position: absolute;
	z-index: 6;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	max-height: 258px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--nv2-blue-pale);
	border-radius: 10px;
	box-shadow: 0 16px 34px rgba(0, 50, 95, .18);
	overflow-y: auto;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.nv2-select.is-open .nv2-select__panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.nv2-select__option {
	padding: 10px 12px;
	font-size: clamp(14px, 1vw, 16px);
	line-height: 1.35;
	color: var(--nv2-ink);
	border-radius: 6px;
	cursor: pointer;
}

.nv2-select__option:hover,
.nv2-select__option.is-hover {
	background: var(--nv2-blue-bg);
}

.nv2-select__option.is-selected {
	color: var(--nv2-blue);
	font-weight: 600;
	background: var(--nv2-blue-pale);
}

/* 同理：SUBMIT 与提示文字的间距也要 .nv2-home 前缀才顶得住通用段落 margin */
.nv2-home .nv2-form__note {
	margin: 12px 0 0;
	min-height: 1.2em;
	font-size: 14px;
	text-align: center;
	color: var(--nv2-blue);
}

.nv2-form__note.is-error {
	color: #D2472F;
}

/* SUBMIT 按稿 20px/500 白字，限定在 .nv2-contact 里；下拉触发按钮不带 nv2-btn--block，不受影响 */
.nv2-home .nv2-contact .nv2-btn--block {
	font-size: 20px;
	font-weight: 500;
	color: #fff;
}

/* ---- 地图与标点 ---- */
/* 地图左缘压进卡片 80px，宽度看 --nv2-map-w，高度按素材比例 2504/1333 */
.nv2-contact__map {
	position: absolute;
	z-index: 1;
	left: calc(var(--nv2-card-w) - var(--nv2-map-overlap));
	width: var(--nv2-map-w);
	/* 顶到卡片上缘再抬高 lift，各宽度都是「地图压过卡片上方」 */
	top: calc(-1 * var(--nv2-map-lift));
	aspect-ratio: 2504 / 1333;
	background: url("../images/home02/contact-map.webp") center / 100% 100% no-repeat;
}

.nv2-contact__pins {
	position: absolute;
	inset: 0;
	/* 铺满地图但不接点击，否则会盖住大洲热区 */
	pointer-events: none;
}

/* 标点坐标只改下面三行（百分比相对整幅地图）；电话邮箱在后台「联系信息」改 */
.nv2-contact__pins .nv2-pin:nth-child(1) {
	--nv2-pin-x: 16%;
	--nv2-pin-y: 28%;
}

.nv2-contact__pins .nv2-pin:nth-child(2) {
	--nv2-pin-x: 44%;
	--nv2-pin-y: 19%;
}

.nv2-contact__pins .nv2-pin:nth-child(3) {
	--nv2-pin-x: 81%;
	--nv2-pin-y: 38%;
}

/* ---- 大洲热区：点整片大洲切换联系方式 ---- */
.nv2-contact__zones {
	position: absolute;
	inset: 0;
}

.nv2-zone {
	position: absolute;
	top: 0;
	bottom: 0;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

/* 分界按素材实际经度：西经 35° ≈30%，东经 60° ≈58.5% */
.nv2-zone--americas {
	left: 0;
	width: 30%;
}

.nv2-zone--emea {
	left: 30%;
	width: 28.5%;
}

.nv2-zone--apac {
	left: 58.5%;
	width: 41.5%;
}

.nv2-pin {
	/* 椭圆阴影跟着图钉一起缩放，都取这个变量 */
	--nv2-pin-w: clamp(18px, 1.5vw, 26px);
	position: absolute;
	/* 坐标来自上面 nth-child，没命中时兜底居中 */
	left: var(--nv2-pin-x, 50%);
	top: var(--nv2-pin-y, 50%);
	width: var(--nv2-pin-w);
	transform: translate(-50%, -100%);
	line-height: 0;
	/* 图钉不接点击，点击归整片大洲热区 */
	pointer-events: none;
}

.nv2-pin svg {
	display: block;
	width: 100%;
	height: auto;
	fill: var(--nv2-orange);
	filter: drop-shadow(0 4px 8px rgba(0, 60, 110, .28));
	transition: transform .25s ease;
}

.nv2-pin.is-hover svg,
.nv2-pin.is-active svg {
	transform: scale(1.18);
}

/* 常驻的深色小椭圆；两个椭圆都要 z-index:-1 才退到针体后面 */
.nv2-pin::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 115%;
	width: calc(var(--nv2-pin-w) * .62);
	height: calc(var(--nv2-pin-w) * .2);
	transform: translate(-50%, -58%);
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(193, 68, 14, .8), rgba(193, 68, 14, .45) 66%, rgba(193, 68, 14, 0));
	z-index: -1;
}

/* 选中才叠淡黄大椭圆；::before 树序在前，深色小椭圆永远压在上面 */
.nv2-pin::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 115%;
	width: calc(var(--nv2-pin-w) * 2.6);
	height: calc(var(--nv2-pin-w) * .78);
	transform: translate(-50%, -52%);
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(255, 208, 160, .95), rgba(255, 208, 160, .78) 70%, rgba(255, 208, 160, 0));
	opacity: 0;
	transition: opacity .25s ease;
	z-index: -1;
}

/* 淡黄只在 is-active 出现，悬停预览不算选中 */
.nv2-pin.is-active::before {
	opacity: 1;
}

.nv2-pin__bubble {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 10px);
	display: flex;
	flex-direction: column;
	gap: 6px;
	/* 钉死 210px：长邮箱不折行就会撑宽气泡，顶到 992 时的屏幕右缘 */
	width: 210px;
	padding: 12px 16px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 14px 34px rgba(0, 50, 95, .2);
	font-size: clamp(13px, .95vw, 15px);
	line-height: 1.45;
	color: var(--nv2-ink);
	text-align: left;
	white-space: normal;
	opacity: 0;
	visibility: hidden;
	transform: translateX(-50%) translateY(8px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
	pointer-events: none;
	z-index: 5;
}

/* 热区悬停预览 + 当前选中都展开气泡；气泡自己放开 pointer-events 好点里面的链接 */
.nv2-pin.is-hover .nv2-pin__bubble,
.nv2-pin.is-active .nv2-pin__bubble {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
	pointer-events: auto;
}

.nv2-pin__bubble a {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--nv2-ink);
}

.nv2-pin__bubble a:hover {
	color: var(--nv2-blue);
}

.nv2-pin__bubble a i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--nv2-blue);
	color: #fff;
	font-size: 10px;
	flex: none;
}

@media (max-width: 991px) {

	/* 窄屏上下堆叠，表单卡整宽 */
	.nv2-contact__formwrap {
		width: 100%;
		min-width: 0;
	}

	/* 手机版不显示世界地图，body 也不再为它长高 */
	.nv2-contact__body {
		min-height: 0;
	}

	/* 地图整块隐藏，内部的标点/热区/气泡跟着消失 */
	.nv2-contact__map {
		display: none;
	}
}

@media (max-width: 560px) {
	.nv2-form {
		padding: 18px;
		border-radius: 12px;
		box-shadow: 0 12px 28px rgba(0, 56, 104, .1);
	}
}