@charset "utf-8";
/* teacher-detail.css —— 教师个人页（displayinfo-teacher.htm）专属
   左信息右介绍，枣红主题；仅本页用。
   本文件后半段是「CMS 标签 {内容} 富文本规范化」相关样式。 */

/* ================================================================
   一、页面布局
   ================================================================ */

.tchr-detail{display:flex;align-items:flex-start;gap:.6rem;margin-top:.1rem;}
/* 左栏：长方形头像 + 装饰背景图（参考 psy.szu.edu.cn）+ 姓名 + 信息列表 */
.tchr-left{width:3.4rem;flex-shrink:0;position:relative;z-index:1;text-align:center;}
/* 装饰图1：右上角大圆点底图（shizi_d_bg1.jpg） */
.tchr-left:after{content:'';background:url(../images/shizi_d_bg1.jpg) center no-repeat;background-size:cover;width:3.26rem;height:3.26rem;position:absolute;top:0;right:0;z-index:-1;}
/* 装饰图2：左侧小装饰（shizi_d_bg2.jpg） */
.tchr-left:before{content:'';background:url(../images/shizi_d_bg2.jpg) center no-repeat;background-size:cover;width:.98rem;height:.98rem;position:absolute;top:50%;left:10%;z-index:-1;}
.tchr-left .photo-wrap{position:relative;z-index:1;width:3.04rem;margin:0 auto;padding:.08rem 0 0;}
/* 长方形头像框：3:4 比例适配标准照，微圆角 + 双边框 + 投影，层次丰富 */
.tchr-left .photo{width:2.4rem;height:3.2rem;margin:0 auto;border-radius:.08rem;overflow:hidden;background-size:cover;background-position:center top;background-color:#f5f5f5;border:.04rem solid #fff;box-shadow:0 0 0 .02rem rgb(208 218 242 / 15%), 0 .06rem .2rem rgba(0, 0, 0, .12);}
.tchr-left .photo img{display:none;}
.tchr-left h2{font-size:.34rem;color:#7e0001;font-weight:bold;margin:.32rem 0 0;line-height:1.3;}
.tchr-left .en{font-size:.16rem;color:#93683a;margin-top:.08rem;}
.tchr-info{margin-top:.4rem;text-align:left;padding:0 .15rem;}
.tchr-info p{font-size:.16rem;color:#333;line-height:.3rem;margin-bottom:.04rem;word-break:break-all;}
.tchr-info p b{color:#7e0001;font-weight:bold;margin-right:.06rem;}
/* 右栏：介绍正文 */
.tchr-right{flex:1;min-width:0;}


/* ================================================================
   二、{内容} 富文本规范化（只统一三件事：字体 / 行距 / 首行缩进）
   ---------------------------------------------------------------
   后台正文由编辑人员在 Word / WPS / 富文本编辑器里写，粘贴进 CMS 后会带出
   各种 font-family / font-size / color / line-height / text-indent / margin、
   负缩进、居中对齐、nowrap、背景色、<div> 当段落、span 多层嵌套、
   空段落占位、全角空格缩进……。

   这里不猜具体写法，只做「把排版重置成同一套，再统一字号/行距/首行缩进」：
   - 保留：加粗、斜体、下划线、删除线、上下标、表格、图片；不改颜色、不加小标题；
   - 重置：字体、字号、字色、行高、字距、缩进、对齐、浮动、背景、边框；
   - 字号用 **px + 断点**（不走 rem）：本站 html font-size 在窄屏反而变小
     （100→95→90→85→80→75px），用 rem 写正文会「越到手机越小」，
     所以正文改用固定 px 并按屏幕给三档，保证桌面和手机都能看清。

   实现分两层，任一层单独生效都能用：
   ① 本文件 CSS —— 用 !important 压过后台写死的内联样式；
   ② js/app.js 的「教师简介规范化」段 —— 做 CSS 做不到的结构清洗
      （div→p、拆 span、按 <br> 拆段、删空段、清段首尾空白）。
   ================================================================ */

/* 2.1 正文基准：字体 / 字号 / 行距 / 字色 */
.tchr-bio,
.tchr-bio .wp_articlecontent{
  font-size:17px!important;          /* 桌面 17px（原来 .16rem 在 1440 宽只有 14.4px） */
  line-height:2!important;
  color:#333!important;
  letter-spacing:normal!important;
  word-spacing:normal!important;
  margin:0!important;
  padding:0!important;
  word-break:break-word;
  overflow-wrap:break-word;
}

/* 2.2 抹平内联排版：任何标签都不许自带字体/字号/字色/行高/缩进/对齐/浮动/背景/边框 */
.tchr-bio p,.tchr-bio div,.tchr-bio span,.tchr-bio font,.tchr-bio center,
.tchr-bio address,.tchr-bio section,.tchr-bio article,
.tchr-bio li,.tchr-bio dt,.tchr-bio dd,.tchr-bio dl,
.tchr-bio ul,.tchr-bio ol,.tchr-bio blockquote,
.tchr-bio table,.tchr-bio thead,.tchr-bio tbody,.tchr-bio tfoot,.tchr-bio tr,
.tchr-bio td,.tchr-bio th,.tchr-bio caption,.tchr-bio colgroup,.tchr-bio col,
.tchr-bio h1,.tchr-bio h2,.tchr-bio h3,.tchr-bio h4,.tchr-bio h5,.tchr-bio h6,
.tchr-bio figure,.tchr-bio figcaption,.tchr-bio small,.tchr-bio big,.tchr-bio mark,
.tchr-bio tt,.tchr-bio kbd,.tchr-bio var,.tchr-bio cite,.tchr-bio q,.tchr-bio abbr{
  font-family:inherit!important;
  font-size:inherit!important;
  line-height:inherit!important;
  color:inherit!important;
  font-weight:inherit!important;
  font-style:inherit!important;
  text-indent:0!important;
  letter-spacing:normal!important;
  word-spacing:normal!important;
  white-space:normal!important;
  text-transform:none!important;
  float:none!important;
  position:static!important;
  background:transparent!important;
  border:0 none!important;
  margin-left:0!important;
  margin-right:0!important;
  padding-left:0!important;
  padding-right:0!important;
}
/* 加粗/斜体/下划线/删除线按标签补回（后台若用内联 font-weight 表达，JS 也会保留） */
.tchr-bio b,.tchr-bio strong{font-weight:bold!important;}
.tchr-bio i,.tchr-bio em,.tchr-bio cite,.tchr-bio var{font-style:italic!important;}
.tchr-bio u,.tchr-bio ins{text-decoration:underline!important;}
.tchr-bio s,.tchr-bio del,.tchr-bio strike{text-decoration:line-through!important;}

/* 2.3 段落节奏：段间距 + 两端对齐 + 首行缩进两字 */
.tchr-bio p,
.tchr-bio .bio-p{
  margin:0 0 12px!important;
  padding:0!important;
  text-align:justify;
  text-indent:2em!important;
}
.tchr-bio p:last-child{margin-bottom:0!important;}
/* 首段（通常是「个人简介：」或开篇总述）不缩进 */
.tchr-bio>:first-child,
.tchr-bio .wp_articlecontent>:first-child{
  text-indent:0!important;
}
/* 段落内用 <br> 换行的不额外撑高 */
.tchr-bio br{line-height:0;}

/* 2.4 空块不占位置（JS 已删，这里兜底 :empty） */
.tchr-bio p:empty,
.tchr-bio div:empty,
.tchr-bio li:empty{display:none!important;}

/* 2.5 老编辑器的 <center> 不再整段居中（图片另行居中） */
.tchr-bio center{display:block!important;text-align:inherit!important;}

/* 2.6 图片：不超出栏宽（纯安全兜底，不加任何装饰） */
.tchr-bio img{max-width:100%!important;height:auto!important;}

/* 2.7 表格：只在窄屏给一个横向滚动容器，外观不动 */
.tchr-bio .bio-tbl{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}

/* 2.8 上下标保持小字 */
.tchr-bio sup,.tchr-bio sub{font-size:.75em!important;line-height:0;}
.tchr-bio sup{vertical-align:super!important;}
.tchr-bio sub{vertical-align:sub!important;}


/* ================================================================
   三、多端适配（按屏幕给字号，桌面/平板/手机都保持可读）
   ================================================================ */

/* ≥1201px 桌面：17px / 行高 2.0（2.1 已定义） */

@media(max-width:1024px){
  .tchr-detail{flex-direction:column;gap:.4rem;}
  .tchr-left{width:100%;max-width:5rem;margin:0 auto;}
  /* 移动端头像等比缩小，居中显示 */
  .tchr-left .photo{width:2rem;height:2.67rem;}
  .tchr-right{padding:0;}
  /* 左栏信息（职务职称/电子邮箱…）在窄屏也放大，避免 rem 越缩越小 */
  .tchr-info p{font-size:15px!important;line-height:1.9!important;margin-bottom:2px!important;}
  .tchr-info p b{font-size:15px!important;}
  .tchr-bio,
  .tchr-bio .wp_articlecontent{font-size:17px!important;line-height:1.95!important;}
}
@media(max-width:750px){
  .tchr-bio,
  .tchr-bio .wp_articlecontent{font-size:16px!important;line-height:1.95!important;}
  .tchr-bio p,.tchr-bio .bio-p{margin-bottom:10px!important;}
}
@media(max-width:540px){
  .tchr-bio,
  .tchr-bio .wp_articlecontent{font-size:16px!important;line-height:1.9!important;}
}
@media(max-width:360px){
  .tchr-bio,
  .tchr-bio .wp_articlecontent{font-size:15px!important;}
}
