/**
 * 全站响应式增强层（在 project.css / css3.css 之后加载）
 * 统一流式布局、防横向溢出、表格与弹层小屏适配
 */

/* ========== 根与盒模型 ========== */
html {
	box-sizing: border-box;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

/* ========== 主内容区不撑破视口 ========== */
.w,
.w1200,
.w1300,
.w1750,
.container,
.child_banner,
.child_banner2,
.child_banner3,
.nav_warp,
.m6,
.m12,
.m12_3,
.m13_warp,
.m20,
.footer .w,
.phont_head {
	max-width: 100%;
}

/* ========== 媒体与表单 ========== */
video,
embed,
object {
	max-width: 100%;
	height: auto;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
	max-width: 100%;
}

/* ========== 长文/富文本断行（防溢出） ========== */
.cn_conts,
.tab_cont,
.m15 .cn_conts,
.m6_1 .cn,
.m21 .cn,
.aboutus .cont,
.m17 .cont .cc,
.m19 .gp .item .t1 {
	overflow-wrap: anywhere;
	word-wrap: break-word;
}

/* ========== 详情页 m16 租金表：小屏横向滚动，不撑破整页 ========== */
.m16 .table-responsive-wrap {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-top: 30px;
	overscroll-behavior-x: contain;
}

.m16 .table-responsive-wrap .table {
	margin-top: 0;
}

.m16 .table-responsive-wrap table {
	min-width: 720px;
	width: 100%;
}

@media screen and (max-width: 1040px) {
	.m16 .table table thead {
		padding: 0 8px;
	}

	.m16 .table table thead tr td,
	.m16 .table table tbody tr td {
		padding-left: 8px;
		padding-right: 8px;
		white-space: nowrap;
	}
}

/* ========== m16 底栏电话/预约：小屏换行 ========== */
@media screen and (max-width: 768px) {
	.m16 .tels {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		flex-wrap: wrap;
		padding: 16px 12px;
		font-size: clamp(14px, 3.5vw, 20px);
		line-height: 1.45;
		text-align: center;
	}

	.m16 .tels img {
		margin-right: 6px;
		vertical-align: middle;
	}

	.m16 .tels a.cell_tels,
	.m16 .tels a {
		margin: 10px 0 0 0 !important;
		margin-left: 0 !important;
		font-size: clamp(14px, 3.5vw, 20px) !important;
		padding: 10px 18px !important;
		display: inline-block;
	}
}

/* ========== 首页等优势区 m3：中屏两列、小屏单列（覆盖旧 25% 四列挤字） ========== */
@media screen and (max-width: 900px) {
	.m3 .group {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
	}

	.m3 .group .item {
		width: calc(50% - 12px) !important;
		max-width: calc(50% - 12px);
		margin-left: 6px !important;
		margin-right: 6px !important;
		float: none !important;
	}
}

/* 与 css3 中 768 的 m3 四列 25% 冲突：本文件后加载，恢复为两列/单列 */
@media screen and (max-width: 768px) {
	.m3 .group {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
	}

	.m3 .group .item {
		width: calc(50% - 10px) !important;
		max-width: calc(50% - 10px);
		float: none !important;
	}

	.m3 .group .item .t1 {
		font-size: 14px;
	}
}

@media screen and (max-width: 520px) {
	.m3 .group .item {
		width: 100% !important;
		max-width: 100%;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
}

/* ========== 相册/户型/预约 弹层：限制不超出视口 ========== */
.xiangce_pop .box,
.xiangce_pops .box {
	width: min(1200px, calc(100vw - 24px)) !important;
	max-width: min(1200px, calc(100vw - 16px)) !important;
}

#tijiaobiaodan .box,
#huxingtu_pop .box {
	width: min(1200px, calc(100vw - 24px)) !important;
	max-width: min(1200px, calc(100vw - 16px)) !important;
}

@media screen and (max-width: 480px) {

	.xiangce_pop .box,
	.xiangce_pops .box,
	#tijiaobiaodan .box,
	#huxingtu_pop .box {
		width: calc(100vw - 12px) !important;
		max-width: calc(100vw - 8px) !important;
	}
}

/* ========== 地图模块 ========== */
.m18 .maps,
.mapBox {
	max-width: 100%;
	overflow: hidden;
}

.m18 .maps iframe,
.mapBox iframe {
	width: 100% !important;
	max-width: 100%;
	display: block;
	border: 0;
	min-height: 240px;
}

/* ========== 公寓列表顶栏搜索 ========== */
@media screen and (max-width: 768px) {
	.child_banner2 {
		background-position: center top !important;
	}

	.child_banner2 .sousuo {
		width: 92%;
		max-width: 100%;
		margin: 0 auto;
	}

	.child_banner2 .sousuo input.text,
	.child_banner2 .sousuo .text {
		width: 100%;
		box-sizing: border-box;
	}
}

/* ========== 子页大标题区 ========== */
@media screen and (max-width: 1040px) {
	.child_banner,
	.child_banner2,
	.child_banner3 {
		background-size: cover !important;
	}
}

/* 搜索框（首页轮播、列表顶栏等） */
.sousuo input.text,
.sousuo .text,
.sousuo input[type="text"] {
	box-sizing: border-box;
}
