/* 文德学校官网 补充样式（响应式适配 + 模板微调） */

/* 内容区通用容器在窄屏下的自适应 */
@media screen and (max-width: 768px) {
    .wd-main { width: 94% !important; margin-left: auto !important; margin-right: auto !important; }
    .wd-news-list .wd-item { height: auto !important; border-bottom: 1px solid #eeeeee; padding: 10px 0; }
    .wd-news-list .wd-item .wd-date { width: 70px !important; font-size: 1rem !important; line-height: 2rem !important; }
    .wd-news-list .wd-item .wd-text { width: 100% !important; float: none !important; }
    .wd-news-list .wd-item .wd-cover { width: 100% !important; float: none !important; height: auto !important; }
    .wd-news-list .wd-item .wd-cover img { width: 100% !important; height: auto !important; margin-top: 5px !important; }
    /* 图库移动端为原站 mobile-section 双列46vw结构(gallery.html), 不再用栅格化覆盖 */
    .wd-video-grid .wd-vcard { width: 94% !important; float: none !important; margin-left: auto !important; margin-right: auto !important; }
    .wd-teacher-grid .wd-tcard { width: 44% !important; margin-right: 3% !important; margin-bottom: 15px; }
    .wd-teacher-grid .wd-tcard img { width: 100% !important; height: auto !important; }
    .wd-tabs { display: block !important; text-align: center; }
    .wd-tabs > a, .wd-tabs > div { display: inline-block; margin: 4px 2px !important; float: none !important; }
    .wd-modal-body { width: 92% !important; }
    .WDModal { width: 94% !important; margin-left: -47% !important; height: 84% !important; overflow: auto; }
    .WDModalBody { width: 92% !important; }
    .wd-pagination { padding: 10px 0; }
    .wd-pagination li { float: none; display: inline-block; margin: 3px; }
    .wd-article-content img { max-width: 100% !important; height: auto !important; }
    .wd-detail-title { font-size: 1.2rem !important; line-height: 1.8 !important; }
}

/* 分页(bootstrap分页渲染为原站样式) */
.wd-pagination .pagination { margin: 20px 0; }
.wd-pagination .pagination > li > a,
.wd-pagination .pagination > li > span {
    color: #666;
    border: 1px solid #e0e0e0;
    margin: 0 3px;
    border-radius: 3px;
}
.wd-pagination .pagination > .active > a,
.wd-pagination .pagination > .active > a:focus,
.wd-pagination .pagination > .active > a:hover {
    background-color: #1c93ea;
    border-color: #1c93ea;
    color: #fff;
}

/* 页面主内容默认宽度 */
.wd-container { width: 1280px; margin-left: auto; margin-right: auto; position: relative; }

/* 文章正文 */
.wd-article-content { line-height: 2; color: #333; font-size: 16px; overflow: hidden; }
.wd-article-content p { margin: 0.5em 0; }
.wd-article-content img { max-width: 100%; height: auto; }

/* 详情页上一篇/下一篇 */
.wd-prevnext { border-top: 1px solid #eee; margin-top: 30px; padding: 12px 0; font-size: 14px; color: #888; }
.wd-prevnext a { color: #0f95fd; }

/* ===== 内页移动端适配 ===== */
@media screen and (max-width: 768px) {
    /* banner: 流式显示, 隐藏轮播克隆层 */
    .wd-banner-wrap .BannerDiv { height: auto !important; }
    .wd-banner-wrap .BannerDiv > div:first-child img { width: 100% !important; height: auto !important; }
    .wd-banner-wrap .banner_absolute { display: none !important; }
    /* 快捷条隐藏 */
    .wd-quickstrip { display: none !important; }
    /* 栏目标题 */
    .wd-main { width: 94% !important; }
    /* 信息页: banner流式 + 隐藏快捷条 + 容器流式 */
    .wd-info-content .BannerDiv { height: auto !important; }
    .wd-info-content .BannerDiv img { width: 100% !important; height: auto !important; }
    .wd-info-content .banner_absolute { display: none !important; }
    .wd-info-content div[style*="width:1042px"] { display: none !important; }
    .wd-info-content div[style*="width:1280px"],
    .wd-info-content div[style*="width:1225px"],
    .wd-info-content div[style*="width:1400px"],
    .wd-info-content div[style*="width:1000px"] { width: 96% !important; margin-left: auto !important; margin-right: auto !important; }
    .wd-info-content img { max-width: 100%; height: auto; }
    /* 首页桌面横幅隐藏(移动版有自己的内容) */
    .wd-home-banner { display: none !important; }
}

/* ===== 中英双语 ===== */

/* 英文版图片翻译: 全部采用 _en 后缀图片(GD生成, 仅替换文字区域), 模板内 wd_is_en() 三元切换;
   生成脚本 runtime/i18n/gen_quick_en.php(M1-M5) / gen_en_imgs2.php+fix_en_imgs3.php(banner/海报/占位图等) */

/* 英文版: PC导航项宽度自适应(原92px定宽装不下英文), 定位由wende.js按实际offset计算
   2026-08 修复: 8个英文菜单总宽~984px, 加上Logo与边距在≤1440px视口放不下, float:right导航
   换行掉到固定白条(113px)下方压住轮播图; 缩字号/内边距/图标右距把导航收窄到~844px,
   使≥1366px视口稳定单行, 更窄视口由下方≤1350px加高白条规则兜住 */
body.lang-en .desktops-section .NavDiv > div[style*="width:92px"] {
    width: auto !important; padding: 0 7px;
}
body.lang-en .desktops-section .NavDiv > div[style*="width:92px"] > a { font-size: 13px; white-space: nowrap; }
/* 英文版: 语言切换/微信图标右距23px→10px, 为长英文菜单腾出横向空间 */
body.lang-en .desktops-section .NavDiv > div[style*="margin-right:22px"] { margin-right: 10px; }
/* 英文版: 下拉子栏目字号缩小, 避免超出206px单元格; nowrap保持单行, 防止长英文(如
   "International Division Admissions")在206px格内折行撑高某排, 导致下行距比其他菜单大 */
body.lang-en .NavOverHid a { font-size: 15px; white-space: nowrap; }

/* 英文版: 移动端顶栏/菜单文字无字距问题由模板内联处理; 校友/热点英文加长时防溢出 */
body.lang-en .wd-tabs { white-space: normal; }

/* 英文版首页招生卡(招生信息白色圆角卡 750x135px, ZhaoShengDiv 内):
   文章英文标题 ~110字符 在 18px/行高35px 下折为两行, 叠加内边距+摘要后撑破卡高,
   蓝字溢出白卡落到蓝色背景上; 压缩 字号/行距/内边距/摘要区 把内容收进卡内(卡片尺寸不变),
   再对右栏 overflow:hidden 兜底, 任何异常长文都不会再画出卡外 */
body.lang-en .ZhaoShengDiv div[style*="font-size:18px"] {
    font-size: 15px !important;
    line-height: 20px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}
body.lang-en .ZhaoShengDiv div[style*="font-size:13px;line-height:22px"] {
    font-size: 12px !important;
    line-height: 18px !important;
    height: 72px !important;
}
body.lang-en .ZhaoShengDiv div[style*="width:593px"] { overflow: hidden !important; }

@media screen and (max-width: 768px) {
    body.lang-en .desktops-section .NavDiv > div[style*="width:92px"] { padding: 0 4px; }
}
/* 英文版窄桌面(≤1350): 单行放不下时导航整体换行到第二行, 加高固定白条把菜单兜在白底上,
   避免像修复前那样菜单压到轮播图照片上(y=113 以下无白底); 取1350为界留出字体渲染余量 */
@media screen and (max-width: 1350px) {
    body.lang-en .desktops-section > div[style*="position:fixed"],
    body.lang-en .desktops-section > div[style*="position:fixed"] > div[class="transparent95"] {
        height: 172px !important;
    }
}

/* 图库卡片标题单行省略(超长英文精简展示, 全名在悬停提示与弹窗中完整展示);
   卡片高度归一后 float 行自然对齐, 消除因标题折行造成的错位与大留白 */
body.lang-en .wd-gtitle { font-size: 17px !important; }

/* PC弹窗可滚动(移动端768px断点已有), 竖版证书限高后长标题完整可见 */
.WDModal { overflow: auto; }

@media screen and (max-width: 768px) {
    body.lang-en .wd-gtitle { font-size: 0.72rem !important; }
}

/* 移动端首页轮播: 隐藏 FlexSlider 控制指示器(style.css 未加载, 默认 ol 序号+数字文字叠成 "1.1 2.2") */
.flexslider .flex-control-nav { display: none; }

/* 首页视频卡片封面统一按容器高度裁剪显示(源图比例不一时不再出现卡片高矮不一) */
.VideoDiv > a > img,
.VideoMore > a > img { height: 100%; object-fit: cover; }

/* 首页招生卡封面(PC 156x167 / 移动 27vw 相框):
   原模板把源图强行拉伸为 289x167 再居中裁进窄框, 图片既变形又被裁掉约一半;
   改为适配相框完整展示(object-fit:contain 等比缩放不裁切), 相框与卡片尺寸不变 */
.ZhaoShengDiv div[style*="width:156px"] > div {
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin-left: 0 !important;
}
.ZhaoShengDiv div[style*="width:156px"] > div > img {
    width: 100% !important;
    height: 100% !important;
    float: none !important;
    object-fit: contain !important;
}
.mobile-section div[style*="width:27vw"] > div {
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin-left: 0 !important;
}
.mobile-section div[style*="width:27vw"] > div > img {
    width: 100% !important;
    height: 100% !important;
    float: none !important;
    object-fit: contain !important;
}

/* 用户要求: 隐藏封面相框的白色描边(原模板 polaroid 白框), 白底承接 contain 等比留白,
   避免框线残影与顶部凌空处透蓝 */
.ZhaoShengDiv div[style*="width:156px"] {
    border: 0 !important;
    background: #fff !important;
}
.mobile-section div[style*="width:27vw"] {
    border: 0 !important;
    background: #fff !important;
}

/* ===== 页脚(单一输出版, 2026-08整改) ===== */
/* 版权/地址/备案只输出一份, PC/移动仅字号行距差异; 取代原 desktops/mobile 双份重复结构 */
.wd-footer-info { background-color: #333333; text-align: center; color: #fff; padding: 14px 10px; font-size: 16px; }
.wd-footer-info .wd-footer-c { line-height: 28px; }
.wd-footer-info .wd-footer-addr { line-height: 24px; }
.wd-footer-info .wd-footer-beian { line-height: 22px; margin-top: 2px; }
.wd-footer-info .wd-footer-beian a { color: #9c9c9c; font-size: 12px; text-decoration: none; }
.wd-footer-info .wd-footer-beian a:hover { color: #fff; }

@media screen and (max-width: 768px) {
    .wd-footer-info { font-size: 12px; padding: 10px 8px; }
    .wd-footer-info .wd-footer-c { line-height: 20px; }
    .wd-footer-info .wd-footer-addr { line-height: 18px; }
}
