/* ==========================================================
   教育培训 · 机构详情页（简易版）
   依赖 edu.css 的顶部/面包屑/页脚，本文件只管详情主体
   ========================================================== */

/* ---------------- 主体两栏 ---------------- */
.ed-main {
	display: flex;
	gap: 28px;
	background: #fff;
	border: 1px solid #ebeef2;
	border-radius: 10px;
	padding: 20px;
}

/* ---------------- 图册 ---------------- */
.ed-gallery { flex: 0 0 500px; max-width: 500px; }

.ed-stage {
	position: relative;
	width: 100%;
	height: 312px;
	border-radius: 8px;
	overflow: hidden;
	background: #f2f4f7;
}
.ed-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-stage-ph {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	color: #b6bdc7; font-size: 13px;
}
.ed-imgcount {
	position: absolute; right: 10px; bottom: 10px;
	background: rgba(0, 0, 0, .5); color: #fff;
	font-size: 12px; line-height: 1; padding: 4px 9px; border-radius: 10px;
}

.ed-thumbs { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ed-arrow {
	width: 24px; height: 62px; flex: 0 0 24px;
	border: 0; border-radius: 4px; cursor: pointer;
	background: #f4f5f7; color: #8b949e; font-size: 18px; line-height: 1;
}
.ed-arrow:hover { background: #eceff3; color: #f5453f; }
/* flex:1 但 flex 项默认 min-width:auto，会被 10 张缩略图撑到 900+，
   整页出现横向滚动；min-width:0 后才肯收缩，配合 overflow:hidden 正确裁切 */
.ed-thumblist { display: flex; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
.ed-thumb {
	flex: 0 0 86px; width: 86px; height: 62px;
	border-radius: 6px; overflow: hidden;
	border: 2px solid transparent; background: #f2f4f7;
}
.ed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-thumb.on { border-color: #f5453f; }

/* ---------------- 右侧信息 ---------------- */
.ed-info { flex: 1; min-width: 0; }

.ed-name {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	margin: 2px 0 14px; font-size: 22px; line-height: 1.35; color: #1a1a1a; font-weight: 600;
}
.ed-v {
	font-style: normal; font-size: 12px; font-weight: 700; color: #fff;
	padding: 2px 7px; border-radius: 4px;
	background: linear-gradient(135deg, #ff9d00, #ff6a00);
}
.ed-guard {
	font-style: normal; font-size: 12px; color: #f5453f;
	background: #fff5f5; border: 1px solid #ffc9c4;
	padding: 1px 7px; border-radius: 4px;
}

.ed-rate {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	font-size: 13px; color: #6b7280; margin-bottom: 14px;
}
.ed-stars { color: #ff9500; letter-spacing: -1px; font-size: 14px; }
.ed-stars em { color: #e2e6ea; font-style: normal; }
.ed-score { color: #ff9500; font-size: 15px; font-weight: 600; }
.ed-quote {
	max-width: 340px; color: #4b5563;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ed-sep { color: #e2e6ea; }
.ed-review { color: #8b949e; }
.ed-review:hover { color: #f5453f; }

.ed-tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ed-tag {
	font-size: 12px; line-height: 18px; padding: 2px 8px; border-radius: 4px;
	color: #f5453f; background: #fff1f0; border: 1px solid #ffd7d3;
}
.ed-tag.gold { color: #d97706; background: #fffbeb; border-color: #fde68a; }
.ed-tag.plain { color: #6b7280; background: #f6f7f9; border-color: #e5e8ec; }

/* ---------------- 联系信息 ---------------- */
.ed-meta {
	list-style: none; margin: 0 0 18px; padding: 14px 0 0;
	border-top: 1px dashed #ebeef2;
}
.ed-meta li { display: flex; gap: 12px; font-size: 13px; color: #374151; padding: 5px 0; }
.ed-meta .k { flex: 0 0 68px; color: #9aa3af; }
.ed-meta .v { flex: 1; min-width: 0; word-break: break-all; }
.ed-meta a { color: #3b82f6; text-decoration: none; }
.ed-meta a:hover { text-decoration: underline; }
.ed-map { margin-left: 8px; }

/* ---------------- 按钮 ---------------- */
.ed-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ed-btn-outline,
.ed-btn-solid,
.ed-btn-plain {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 132px; height: 42px; padding: 0 22px;
	font-size: 15px; border-radius: 6px; text-decoration: none; cursor: pointer;
	border: 1px solid transparent; transition: all .16s;
}
.ed-btn-outline { color: #f5453f; background: #fff; border-color: #f5453f; }
.ed-btn-outline:hover { background: #fff5f5; }
.ed-btn-solid { color: #fff; background: #f5453f; border-color: #f5453f; }
.ed-btn-solid:hover { background: #e0342e; border-color: #e0342e; }
.ed-btn-solid[disabled] { opacity: .7; cursor: default; }
.ed-btn-plain { color: #6b7280; background: #fff; border-color: #e5e8ec; min-width: auto; }
.ed-btn-plain:hover { border-color: #cfd6de; color: #374151; }

.ed-side {
	display: flex; gap: 14px; margin-top: 14px;
	font-size: 12px; color: #9aa3af;
}
.ed-side-k { color: #f5453f; background: #fff1f0; padding: 1px 7px; border-radius: 3px; }

/* ---------------- 下方板块 ---------------- */
.ed-panel {
	background: #fff; border: 1px solid #ebeef2; border-radius: 10px;
	margin-top: 16px; padding: 18px 22px 20px;
}
.ed-panel-title {
	display: flex; align-items: center; gap: 8px;
	margin: 0 0 14px; font-size: 16px; font-weight: 600; color: #1a1a1a;
}
.ed-panel-title::before {
	content: ''; width: 3px; height: 14px; border-radius: 2px; background: #f5453f;
}
.ed-panel-body { font-size: 14px; color: #4b5563; line-height: 1.9; }
.ed-panel-body p { margin: 0; }
.ed-muted { color: #9aa3af; }

.ed-recs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ed-rec {
	display: flex; gap: 10px; padding: 10px;
	border: 1px solid #f0f2f5; border-radius: 8px;
	text-decoration: none; color: inherit; background: #fff;
}
.ed-rec:hover { border-color: #ffd7d3; background: #fffafa; }
.ed-rec .ph {
	flex: 0 0 74px; width: 74px; height: 74px; border-radius: 6px; overflow: hidden;
	background: #f2f4f7; color: #b6bdc7; font-size: 11px;
	display: flex; align-items: center; justify-content: center;
}
.ed-rec .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-rec .bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ed-rec .bd b {
	font-size: 13px; color: #1a1a1a; font-weight: 500;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ed-rec .rt { font-size: 12px; color: #ff9500; letter-spacing: -1px; }
.ed-rec .rt i { font-style: normal; letter-spacing: 0; margin-left: 4px; }
.ed-rec .sub { font-size: 12px; color: #9aa3af; }
.ed-rec:hover .bd b { color: #f5453f; }

/* ---------------- 空态 ---------------- */
.ed-empty {
	background: #fff; border: 1px solid #ebeef2; border-radius: 10px;
	padding: 70px 20px; text-align: center; color: #8b949e; font-size: 13px;
}
.ed-empty .big { font-size: 16px; color: #4b5563; margin-bottom: 10px; }
.ed-empty a { color: #f5453f; text-decoration: none; }

/* ---------------- 响应 ---------------- */
@media (max-width: 1080px) {
	.ed-main { flex-wrap: wrap; }
	/* min-width:0 必须给：flex 项默认 min-width:auto，会被封面图原始宽度（1000+px）
	   顶开，导致整页出现横向滚动、手机上内容全挤在左边 */
	.ed-gallery { flex: 1 1 100%; max-width: none; min-width: 0; }
	.ed-stage { height: 260px; }
	.ed-recs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
	.ed-main { padding: 14px; gap: 16px; }
	.ed-stage { height: 200px; }
	.ed-name { font-size: 18px; }
	.ed-actions .ed-btn-outline,
	.ed-actions .ed-btn-solid,
	.ed-actions .ed-btn-plain { flex: 1 1 100%; min-width: 0; }
	.ed-recs { grid-template-columns: minmax(0, 1fr); }
	.ed-quote { max-width: 100%; }
}

/* ---------------- 推荐课程（商品中心） ---------------- */
.ed-courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ed-course {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #f0f2f5;
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	transition: border-color .16s, box-shadow .16s, transform .16s;
}
.ed-course:hover {
	border-color: #ffd7d3;
	box-shadow: 0 8px 20px rgba(245, 69, 63, .09);
	transform: translateY(-2px);
}
.ed-course .ph {
	width: 100%;
	height: 134px;
	background: #f2f4f7;
	color: #b6bdc7;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.ed-course .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-course .bd { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.ed-course b {
	font-size: 14px;
	font-weight: 500;
	color: #1a1a1a;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 42px;
}
.ed-course .d { font-size: 12px; color: #9aa3af; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-course .pr { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.ed-course .pr em { font-style: normal; font-size: 17px; font-weight: 600; color: #ff5000; }
.ed-course .pr em i { font-style: normal; font-size: 12px; margin-right: 1px; }
.ed-course .pr s { font-size: 12px; color: #b6bdc7; }
.ed-course .pr .sv { margin-left: auto; font-size: 12px; color: #9aa3af; }

/* ---------------- 机构资讯（资讯中心） ---------------- */
.ed-news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ed-news-item {
	display: flex;
	gap: 12px;
	padding: 12px;
	background: #fff;
	border: 1px solid #f0f2f5;
	border-radius: 8px;
	text-decoration: none;
	transition: border-color .16s, background .16s;
}
.ed-news-item:hover { border-color: #ffd7d3; background: #fffafa; }
.ed-news-item .ph {
	flex: 0 0 104px;
	width: 104px;
	height: 70px;
	border-radius: 6px;
	overflow: hidden;
	background: #f2f4f7;
}
.ed-news-item .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-news-item .bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ed-news-item b {
	font-size: 13.5px;
	font-weight: 500;
	color: #1a1a1a;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ed-news-item:hover b { color: #f5453f; }
.ed-news-item .d { font-size: 12px; color: #9aa3af; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-news-item .dt { font-size: 12px; color: #b6bdc7; margin-top: auto; }

@media (max-width: 1080px) {
	.ed-courses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
	.ed-courses { grid-template-columns: minmax(0, 1fr); }
	.ed-news { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================
   右侧悬浮工具条：马上预约 / 扫码拨打 / 马上咨询
   ========================================================== */
.ed-dock {
	position: fixed;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 70;
	display: flex;
	align-items: center;
	gap: 10px;
}

.ed-dock-bar {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #ebeef2;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
	overflow: hidden;
}
.ed-dock-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	width: 64px;
	padding: 10px 4px;
	font-size: 12px;
	color: #4b5563;
	text-decoration: none;
	border-bottom: 1px solid #f2f4f7;
	transition: background .16s, color .16s;
}
.ed-dock-btn:last-child { border-bottom: 0; }
.ed-dock-btn svg { width: 20px; height: 20px; color: #6b7280; transition: color .16s; }
.ed-dock-btn:hover,
.ed-dock-btn.on { background: #fff5f5; color: #f5453f; }
.ed-dock-btn:hover svg,
.ed-dock-btn.on svg { color: #f5453f; }

.ed-dock-panel {
	order: -1;
	width: 320px;
	background: #fff;
	border: 1px solid #ebeef2;
	border-radius: 12px;
	box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
	padding: 16px 18px 18px;
}
.ed-dock-panel[hidden] { display: none; }
.ed-dock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ed-dock-head h3 { margin: 0; font-size: 16px; font-weight: 600; color: #1a1a1a; }
.ed-dock-x {
	width: 24px; height: 24px; line-height: 22px;
	text-align: center; border-radius: 50%;
	color: #9aa3af; text-decoration: none; font-size: 18px;
}
.ed-dock-x:hover { background: #f4f5f7; color: #f5453f; }
.ed-dock-sub { margin: 0 0 14px; font-size: 12.5px; color: #9aa3af; line-height: 1.6; }
.ed-dock-sub.center { text-align: center; }

.ed-field { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ed-field label {
	flex: 0 0 70px; text-align: right;
	font-size: 12.5px; color: #6b7280; line-height: 1.4;
}
.ed-field input {
	flex: 1; min-width: 0; box-sizing: border-box; height: 38px; padding: 0 12px;
	border: 1px solid #e3e6eb; border-radius: 6px;
	font-size: 13.5px; color: #222; outline: none; font-family: inherit;
}
.ed-field input:focus { border-color: #ffb3a7; box-shadow: 0 0 0 3px rgba(245, 69, 63, .08); }

/* 预约表单「选填」小标：去掉短信验证码后，称呼/备注都是可选项 */
.ed-field label .ed-opt {
	font-style: normal; font-size: 10.5px; font-weight: 400;
	color: #9aa3af; margin-left: 4px;
}

.ed-code { flex: 1; min-width: 0; display: flex; gap: 8px; }
.ed-code input { flex: 1; min-width: 0; }
.ed-code-btn {
	flex: 0 0 auto; height: 38px; padding: 0 12px;
	font-size: 12.5px; color: #f5453f; background: #fff;
	border: 1px solid #ffd7d3; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.ed-code-btn:hover:not([disabled]) { background: #fff5f5; }
.ed-code-btn[disabled] { color: #9aa3af; border-color: #e5e8ec; cursor: default; }

.ed-dock-msg { min-height: 18px; font-size: 12px; margin: 2px 0 8px; line-height: 1.5; }
.ed-dock-msg.err { color: #dc2626; }
.ed-dock-msg.ok { color: #16a34a; }

.ed-dock-submit {
	display: block; width: 100%; height: 40px;
	border: 0; border-radius: 6px;
	background: #f5453f; color: #fff;
	font-size: 14px; line-height: 40px; text-align: center;
	text-decoration: none; cursor: pointer;
}
.ed-dock-submit:hover { background: #e0342e; }
.ed-dock-submit[disabled] { opacity: .7; cursor: default; }
.ed-dock-submit.ghost { background: #fff; color: #f5453f; border: 1px solid #f5453f; margin-top: 10px; }
.ed-dock-submit.ghost:hover { background: #fff5f5; }

.ed-dock-panel.qr { width: 268px; text-align: center; }
.ed-dock-qr {
	width: 156px; height: 156px; margin: 6px auto 10px;
	display: flex; align-items: center; justify-content: center;
}
.ed-dock-qr img, .ed-dock-qr canvas { display: block; }
.ed-dock-tel { font-size: 16px; font-weight: 600; color: #1a1a1a; letter-spacing: .5px; margin-bottom: 6px; }
.ed-dock-tip { color: #9aa3af; font-size: 12px; }

/* 在线咨询 */
.ed-chat {
	height: 244px; overflow-y: auto;
	padding: 4px 10px 8px; background: #fafbfc;
	border-radius: 8px; margin-bottom: 10px;
}
.ed-chat-day { text-align: center; font-size: 11.5px; color: #b6bdc7; margin: 6px 0 10px; }
.ed-chat-msg {
	max-width: 84%; margin: 0 0 8px; padding: 8px 11px;
	border-radius: 10px; font-size: 13px; line-height: 1.55;
	word-break: break-word;
}
.ed-chat-msg.bot { background: #fff; border: 1px solid #eef1f5; color: #374151; border-top-left-radius: 3px; }
.ed-chat-msg.me { margin-left: auto; background: #f5453f; color: #fff; border-top-right-radius: 3px; }

.ed-chat-form { display: flex; gap: 8px; }
.ed-chat-form input {
	flex: 1; min-width: 0; height: 38px; padding: 0 12px;
	border: 1px solid #e3e6eb; border-radius: 6px;
	font-size: 13.5px; color: #222; outline: none; font-family: inherit;
}
.ed-chat-form input:focus { border-color: #ffb3a7; }
.ed-chat-form button {
	flex: 0 0 auto; height: 38px; padding: 0 16px;
	border: 0; border-radius: 6px; background: #f5453f;
	color: #fff; font-size: 13.5px; cursor: pointer;
}
.ed-chat-form button:hover { background: #e0342e; }

@media (min-width: 1400px) {
	/* 宽屏时挪到内容栏外侧，不压住右侧信息 */
	.ed-dock { right: calc((100vw - 1200px) / 2 - 80px); }
}
@media (max-width: 1080px) {
	.ed-dock { right: 10px; }
	.ed-dock-btn { width: 56px; font-size: 11.5px; }
	.ed-dock-panel { width: 300px; }
	.ed-dock-panel.qr { width: 258px; }
}
@media (max-width: 720px) {
	.ed-dock {
		top: auto; bottom: 14px; transform: none;
		flex-direction: column; align-items: flex-end;
	}
	.ed-dock-bar { flex-direction: row; }
	.ed-dock-btn { width: 62px; border-bottom: 0; border-right: 1px solid #f2f4f7; }
	.ed-dock-btn:last-child { border-right: 0; }
	.ed-dock-panel { width: calc(100vw - 28px); max-width: 340px; }
}

/* ===== 同品牌其他校区 ===== */
.ed-branches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.ed-branch {
	display: flex; flex-direction: column; gap: 6px;
	padding: 14px 16px; border-radius: 10px;
	background: #fff; border: 1px solid #eef1f7;
	text-decoration: none; color: inherit;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}

.ed-branch:hover {
	border-color: #bfd4ff;
	box-shadow: 0 4px 14px rgba(37, 99, 235, .08);
	transform: translateY(-1px);
}

.ed-branch .bh { display: flex; align-items: center; gap: 8px; }
.ed-branch .bh b { font-size: 15px; font-weight: 600; color: #0f172a; line-height: 1.4; }
.ed-branch .bh .main {
	font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 4px;
	background: #eff4ff; color: #2563eb; flex: none;
}

.ed-branch .ln {
	display: flex; gap: 6px; font-size: 13px; color: #475569; line-height: 1.7;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ed-branch .ln em { font-style: normal; color: #94a3b8; flex: none; min-width: 30px; }

@media (max-width: 768px) {
	.ed-branches { grid-template-columns: minmax(0, 1fr); }
}

/* ===== 全部课程：分类标签 + 分页 ===== */
.ed-panel-sub {
	margin-left: 6px;
	font-size: 13px;
	font-weight: 400;
	color: #9aa3af;
}

.ed-ctabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid #f0f2f5;
}

.ed-ctab {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #f5f7fa;
	color: #4b5563;
	font-size: 13px;
	line-height: 1.6;
	text-decoration: none;
	transition: background .15s, color .15s;
}

.ed-ctab i {
	font-style: normal;
	font-size: 11.5px;
	color: #9aa3af;
	font-variant-numeric: tabular-nums;
}

.ed-ctab:hover { background: #fff1f0; color: #f5453f; }
.ed-ctab:hover i { color: #f5453f; }
.ed-ctab.on { background: #f5453f; color: #fff; }
.ed-ctab.on i { color: rgba(255, 255, 255, .82); }

.ed-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid #f0f2f5;
}

.ed-pager .pg {
	min-width: 34px;
	height: 34px;
	padding: 0 12px;
	line-height: 32px;
	text-align: center;
	border: 1px solid #eef1f4;
	border-radius: 8px;
	background: #fff;
	color: #4b5563;
	font-size: 13px;
	text-decoration: none;
	font-variant-numeric: tabular-nums;
	transition: border-color .15s, color .15s;
}

.ed-pager .pg:hover { border-color: #f5453f; color: #f5453f; }
.ed-pager .pg.on { border-color: #f5453f; background: #f5453f; color: #fff; }
.ed-pager .pg.on:hover { color: #fff; }
.ed-pager .pg.is-off { color: #c8ced6; background: #fafbfc; cursor: not-allowed; }
.ed-pager .pg.is-off:hover { border-color: #eef1f4; color: #c8ced6; }
.ed-pager .pg-info { margin-left: auto; font-size: 12.5px; color: #9aa3af; }

@media (max-width: 768px) {
	.ed-courses { grid-template-columns: minmax(0, 1fr); }
	.ed-pager .pg-info { width: 100%; margin-left: 0; }
}

/* 课程区异步加载态 */
#edCourseList { transition: opacity .18s ease; }
#edCourses.is-loading #edCourseList { opacity: .4; pointer-events: none; }
#edCourses.is-loading .ed-ctab,
#edCourses.is-loading .ed-pager .pg { pointer-events: none; }
