/* Small-PC and tablet-landscape compatibility layer.
 * Loaded after page-specific styles so legacy fixed widths cannot break layout.
 */

html,
body {
	max-width: 100%;
	overflow-x: hidden;
}

img,
video,
iframe,
table {
	max-width: 100%;
}

/* Wide desktop: align the logo and language switch to equal outer gutters. */
@media (min-width: 1367px) {
	:root {
		--header-gutter: max(20px, calc((100vw - 1440px) / 2));
	}

	.h-left {
		padding: 20px 0 20px var(--header-gutter);
		text-align: center;
		box-sizing: border-box;
	}

	.menu {
		width: calc(100% - 25px);
		max-width: none;
	}

	.guoqi {
		right: var(--header-gutter);
	}

	.header-phone {
		right: calc(var(--header-gutter) + 70px);
	}
}

@media (min-width: 992px) and (max-width: 1366px) {
	.container {
		width: calc(100% - 40px);
		max-width: 1170px;
		margin-right: auto;
		margin-left: auto;
	}

	.h-left {
		width: 21%;
		padding: 20px 0 20px 20px;
		text-align: center;
		box-sizing: border-box;
	}

	.h-left img {
		max-width: 210px;
	}

	.h-right {
		width: 79%;
	}

	.menu {
		width: calc(100% - 20px);
		margin-left: 0;
	}

	.menu > ul {
		padding-right: 60px;
		box-sizing: border-box;
	}

	.menu ul li {
		margin-right: 0;
		font-size: 14px;
	}

	.menu ul li a {
		padding-right: clamp(9px, 1.15vw, 16px);
		padding-left: clamp(9px, 1.15vw, 16px);
		white-space: nowrap;
	}

	.menu ul li:nth-child(2) .submenu {
		left: 0;
		width: min(780px, calc(100vw - 60px));
		margin-left: -70px;
		padding: 0 18px 24px;
		box-sizing: border-box;
	}

	.menu ul li:nth-child(2) .submenu p {
		min-width: 0;
		padding: 0 10px;
		flex: 1 1 0;
	}

	.menu ul li:nth-child(2) .submenu a {
		white-space: nowrap;
	}

	.guoqi {
		right: 0;
	}

	.ia,
	.pro-box,
	.contact-list,
	.index-news .container,
	footer .container .right .list {
		min-width: 0;
	}

	.ia-box {
		width: 42%;
		box-sizing: border-box;
	}

	#myTab3 {
		width: 32%;
	}

	#myTabContent3 {
		width: 65%;
	}

	#myTabContent3 ul li,
	.newsli .title,
	.newscontent {
		max-width: 100%;
		box-sizing: border-box;
	}

	.propic {
		width: 49%;
	}

	.protedian {
		width: 49%;
		box-sizing: border-box;
	}

	.pt-text {
		width: calc(100% - 84px);
	}

	.contact-list .cl {
		width: 49%;
		box-sizing: border-box;
	}

	.fanye .prev,
	.fanye .next {
		width: 50%;
		box-sizing: border-box;
	}

	.linklist {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 16px;
	}

	.linklist a {
		width: auto;
		margin: 0;
	}
}

@media (min-width: 768px) and (max-width: 991px) {
	.container {
		width: calc(100% - 30px);
		max-width: none;
		margin-right: auto;
		margin-left: auto;
	}

	header {
		height: 82px;
		background: rgba(6, 49, 145, .96);
	}

	.h-left {
		width: 65%;
		height: 82px;
		padding: 14px 24px 14px 15px;
		text-align: center;
		border-bottom-right-radius: 36px;
		box-sizing: border-box;
	}

	.h-left img {
		width: auto;
		max-width: 205px;
		max-height: 54px;
	}

	.h-right {
		float: right !important;
		width: 35%;
		height: 82px;
	}

	.menu,
	.header-phone {
		display: none !important;
	}

	.menu-btn.visible-xs {
		display: block !important;
		position: absolute;
		top: 29px;
		right: 62px;
		z-index: 101;
		width: 42px;
		cursor: pointer;
	}

	header .menu-btn p {
		width: 28px;
		height: 2px;
		margin: 6px;
		background: #fff;
		transition: transform .25s ease, opacity .25s ease;
	}

	header .menu-btn.active p:first-of-type {
		position: relative;
		top: 8px;
		transform: rotate(45deg);
	}

	header .menu-btn.active p:nth-of-type(2) {
		opacity: 0;
	}

	header .menu-btn.active p:last-of-type {
		position: relative;
		bottom: 8px;
		transform: rotate(-45deg);
	}

	.float-right.visible-xs {
		display: block !important;
		position: fixed;
		top: 0;
		left: -100%;
		z-index: 100;
		width: min(360px, 48vw);
		height: 100%;
		overflow-y: auto;
		background: #073190;
		text-align: center;
		transition: left .3s ease;
	}

	header .float-right.active {
		left: 0;
	}

	header .float-right .zhanwei {
		height: 82px;
	}

	header .float-right a {
		display: block;
		padding: 0 18px;
		border-bottom: 1px solid rgba(255, 255, 255, .16);
		color: #fff;
		font-size: 16px;
		line-height: 52px;
	}

	.guoqi {
		top: 20px;
		right: 12px;
	}

	/* Low-resolution PC: keep the complete horizontal navigation and language switch. */
	.h-left {
		width: 18.5%;
		padding-right: 12px;
		padding-left: 12px;
		text-align: center;
	}

	.h-left img {
		max-width: 150px;
	}

	.h-right {
		width: 81.5%;
	}

	.menu {
		display: block !important;
		width: calc(100% - 12px) !important;
		max-width: none;
		margin-left: 0;
	}

	.menu > ul {
		display: flex;
		align-items: stretch;
		width: 100%;
		padding-right: 58px;
		box-sizing: border-box;
		white-space: nowrap;
	}

	.guoqi {
		right: 0;
	}

	.menu ul li {
		float: none;
		min-width: 0;
		margin-right: 0;
		font-size: 12px;
		flex: 1 1 auto;
	}

	.menu ul li > a {
		padding-right: 5px;
		padding-left: 5px;
		text-align: center;
		white-space: nowrap;
	}

	.header-phone,
	.menu-btn.visible-xs,
	.float-right.visible-xs {
		display: none !important;
	}

	.menu ul li:nth-child(2) .submenu {
		position: fixed;
		top: 82px;
		left: 15px;
		width: calc(100vw - 30px);
		margin-left: 0;
		padding: 0 12px 20px;
		box-sizing: border-box;
	}

	.menu ul li:nth-child(2) .submenu p {
		min-width: 0;
		padding: 0 8px;
		flex: 1 1 0;
	}

	.menu ul li:nth-child(2) .submenu p b {
		font-size: 13px;
		line-height: 44px;
	}

	.menu ul li:nth-child(2) .submenu a {
		font-size: 12px;
		line-height: 32px;
		white-space: nowrap;
	}

	.menu ul li:not(:nth-child(2)) .submenu {
		min-width: 150px;
	}

	.caselist {
		display: flex;
		flex-wrap: wrap;
		align-items: stretch;
		width: 100%;
	}

	.caselist .cassdong {
		width: 32%;
		max-width: 32%;
		height: auto;
		margin-right: 2%;
		box-sizing: border-box;
	}

	.caselist .cassdong:nth-child(3n) {
		margin-right: 0;
	}

	.caselist .cassdong img {
		height: auto;
	}

	.n-banner {
		margin-top: 82px;
	}

	.ia,
	.pro-box,
	.contact-list,
	.index-news .container,
	footer .container .right .list {
		display: flex;
		flex-wrap: wrap;
	}

	.ia-box,
	#myTab3,
	#myTabContent3,
	.propic,
	.protedian,
	.contact-list .cl,
	.newscontent,
	.newspic {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	.propic,
	.newspic {
		margin-bottom: 24px;
	}

	.pt-text,
	.newsli .title {
		width: calc(100% - 84px);
		max-width: 100%;
	}

	#myTab3 {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 10px;
		margin-bottom: 24px;
	}

	#myTab3 > li,
	#myTab3 > li > a {
		width: 100%;
		box-sizing: border-box;
	}

	#myTabContent3 ul li {
		width: 100%;
		box-sizing: border-box;
	}

	.contact-list .cl + .cl {
		margin-top: 20px;
	}

	.fanye .prev,
	.fanye .next {
		width: 50%;
		box-sizing: border-box;
	}

	.linklist {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 15px;
	}

	.linklist a {
		width: auto;
		margin: 0;
	}

	.footer-consult .consult-form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.footer-consult .consult-field-wide {
		grid-column: span 2;
	}

	footer .container .right .list {
		gap: 24px;
	}

	footer .container .fcontact,
	footer .container .fwechat {
		width: auto;
		margin: 0;
	}
}

@media (max-width: 767px) {
	.container {
		width: 100%;
		box-sizing: border-box;
	}

	.pro-content,
	.new-con,
	.single,
	.message-form {
		overflow-wrap: anywhere;
	}

	.pro-content table,
	.new-con table {
		display: block;
		width: 100% !important;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.footer-consult .consult-form {
		width: 100%;
		box-sizing: border-box;
	}

	.caselist .cassdong {
		width: 100%;
		max-width: 100%;
		height: auto;
		margin-right: 0;
	}
}

/* Medium desktop keeps both phone and language switch; narrower screens keep the language switch. */
@media (min-width: 1201px) and (max-width: 1366px) {
	.menu > ul {
		padding-right: 220px;
	}

	.header-phone {
		display: flex !important;
		right: 70px;
	}
}

@media (min-width: 992px) and (max-width: 1200px) {
	.h-left {
		width: 19%;
	}

	.h-right {
		width: 81%;
	}

	.header-phone {
		display: none !important;
	}
}

/* Product / case / solution / video lists: always keep three columns on small PCs. */
@media (min-width: 768px) and (max-width: 1359px) {
	.caselist {
		display: grid !important;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px 2%;
		width: 100%;
	}

	.caselist::before,
	.caselist::after {
		display: none;
		content: none;
	}

	.caselist .cassdong,
	.caselist .cassdong:nth-child(3n) {
		float: none !important;
		width: auto !important;
		max-width: none !important;
		height: auto !important;
		margin: 0 !important;
		box-sizing: border-box;
	}

	.caselist .cassdong > a,
	.caselist .cassdong > a > img {
		display: block;
		width: 100% !important;
		max-width: 100%;
		height: auto;
	}
}
