/*
Theme Name: Kehui School
Theme URI: https://example.com
Author: Kehui
Description: 中职/技校招生官网主题，含专业、视频、招生简章、报名表单与基础 SEO。
Version: 1.0.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: kehui
*/

:root{
  --c-main:#1f5fbf;--c-main-d:#174a95;--c-accent:#f28b1c;
  --c-text:#333;--c-muted:#777;--c-line:#e6e8ec;--c-bg:#f5f7fa;
  --w:1200px;--r:8px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{font:15px/1.7 -apple-system,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--c-text);background:#fff}
a{color:var(--c-main);text-decoration:none}a:hover{color:var(--c-main-d)}
img{max-width:100%;height:auto;display:block}
ul{list-style:none}
.wrap{max-width:var(--w);margin:0 auto;padding:0 16px}
.btn{display:inline-block;padding:10px 22px;border-radius:var(--r);background:var(--c-main);color:#fff;border:0;cursor:pointer;font-size:15px;line-height:1.4}
.btn:hover{background:var(--c-main-d);color:#fff}
.btn-accent{background:var(--c-accent)}.btn-accent:hover{background:#d8760e}
.btn-outline{background:transparent;border:1px solid var(--c-main);color:var(--c-main)}
.sec{padding:48px 0}
.sec-title{text-align:center;margin-bottom:28px}
.sec-title h2{font-size:26px;color:#222}
.sec-title p{color:var(--c-muted);margin-top:6px}
.grid{display:grid;gap:20px}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}

/* header */
.topbar{background:var(--c-main);color:#fff;font-size:13px}
.topbar .wrap{display:flex;justify-content:space-between;align-items:center;height:34px}
.topbar a{color:#fff}
.site-header{border-bottom:1px solid var(--c-line);background:#fff;position:sticky;top:0;z-index:50}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between;height:70px}
.logo{display:flex;align-items:center;gap:10px;font-size:22px;font-weight:700;color:#222}
.logo img{height:46px;width:auto}
.nav ul{display:flex;gap:6px}
.nav a{display:block;padding:8px 14px;color:#333;font-size:16px;border-radius:var(--r)}
.nav li.current-menu-item>a,.nav li.current_page_item>a,.nav a:hover{background:var(--c-bg);color:var(--c-main)}
.nav-toggle{display:none;background:none;border:0;font-size:26px;cursor:pointer}
.header-tel{font-size:18px;font-weight:700;color:var(--c-accent);white-space:nowrap}

/* hero */
.hero{background:linear-gradient(135deg,var(--c-main),#3b82d9);color:#fff;padding:70px 0}
.hero .wrap{display:grid;grid-template-columns:1.2fr .8fr;gap:40px;align-items:center}
.hero h1{font-size:38px;line-height:1.3;margin-bottom:16px}
.hero p{font-size:17px;opacity:.9;margin-bottom:24px}
.hero-form{background:#fff;border-radius:12px;padding:24px;color:#333;box-shadow:0 10px 30px rgba(0,0,0,.15)}
.hero-form h3{margin-bottom:14px;font-size:20px}

/* cards */
.card{background:#fff;border:1px solid var(--c-line);border-radius:var(--r);overflow:hidden;transition:.2s}
.card:hover{box-shadow:0 8px 24px rgba(0,0,0,.08);transform:translateY(-2px)}
.card .thumb{aspect-ratio:3/2;overflow:hidden;background:var(--c-bg)}
.card .thumb img{width:100%;height:100%;object-fit:cover}
.card .body{padding:14px 16px}
.card h3{font-size:17px;margin-bottom:6px}
.card h3 a{color:#222}
.card .meta{font-size:13px;color:var(--c-muted)}
.card .desc{font-size:14px;color:#555;margin-top:6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tag{display:inline-block;background:#eef3fb;color:var(--c-main);font-size:12px;padding:1px 8px;border-radius:4px;margin-right:6px}
.video-card .thumb{position:relative}
.video-card .thumb::after{content:"▶";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:40px;background:rgba(0,0,0,.25)}

/* list */
.news-list li{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px dashed var(--c-line)}
.news-list li a{color:#333}
.news-list li time{color:var(--c-muted);font-size:13px;white-space:nowrap;margin-left:12px}

/* single */
.breadcrumb{font-size:13px;color:var(--c-muted);padding:14px 0}
.breadcrumb a{color:var(--c-muted)}
.breadcrumb span+span::before{content:"›";margin:0 6px}
.page-head{background:var(--c-bg);padding:30px 0}
.page-head h1{font-size:28px}
.main{display:grid;grid-template-columns:1fr 320px;gap:32px;padding:30px 0 50px}
.content h1{font-size:28px;margin-bottom:12px}
.content .meta{color:var(--c-muted);font-size:13px;margin-bottom:20px}
.entry{font-size:16px;line-height:1.9}
.entry p,.entry ul,.entry ol,.entry table{margin-bottom:1em}
.entry h2{font-size:22px;margin:1.4em 0 .6em;padding-left:10px;border-left:4px solid var(--c-main)}
.entry h3{font-size:18px;margin:1.2em 0 .5em}
.entry ul{padding-left:1.4em;list-style:disc}.entry ol{padding-left:1.4em;list-style:decimal}
.entry img{margin:10px auto;border-radius:var(--r)}
.entry table{width:100%;border-collapse:collapse}
.entry td,.entry th{border:1px solid var(--c-line);padding:8px 10px}
.entry th{background:var(--c-bg)}
.info-table{width:100%;border-collapse:collapse;margin:16px 0}
.info-table th{width:110px;text-align:left;background:var(--c-bg)}
.info-table td,.info-table th{border:1px solid var(--c-line);padding:9px 12px}
.side .box{background:#fff;border:1px solid var(--c-line);border-radius:var(--r);padding:18px;margin-bottom:20px}
.side .box h3{font-size:17px;margin-bottom:12px;padding-bottom:8px;border-bottom:2px solid var(--c-main);display:inline-block}
.side li{padding:6px 0;border-bottom:1px dashed var(--c-line);font-size:14px}
.side li a{color:#333}
.video-wrap{background:#000;border-radius:var(--r);overflow:hidden;margin-bottom:20px}
.video-wrap video{width:100%;max-height:560px;display:block}
.gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:16px 0}
.gallery img{aspect-ratio:4/3;object-fit:cover;border-radius:var(--r);width:100%}
.faq-item{border:1px solid var(--c-line);border-radius:var(--r);margin-bottom:12px}
.faq-item summary{padding:14px 16px;font-weight:600;cursor:pointer;list-style:none}
.faq-item summary::before{content:"Q";display:inline-block;width:22px;height:22px;line-height:22px;text-align:center;background:var(--c-main);color:#fff;border-radius:4px;font-size:12px;margin-right:8px}
.faq-item .a{padding:0 16px 14px 46px;color:#555}
.cta{background:var(--c-accent);color:#fff;text-align:center;padding:36px 0}
.cta h2{font-size:26px;margin-bottom:8px}
.cta .btn{background:#fff;color:var(--c-accent);margin-top:12px}

/* form */
.form-row{margin-bottom:12px}
.form-row label{display:block;font-size:14px;margin-bottom:4px;color:#555}
.form-row input,.form-row select,.form-row textarea{width:100%;padding:10px 12px;border:1px solid #ccd2da;border-radius:6px;font-size:15px;background:#fff}
.form-row textarea{min-height:80px}
.form-tip{font-size:12px;color:var(--c-muted);margin-top:8px}
.notice{padding:12px 16px;border-radius:var(--r);margin-bottom:16px}
.notice-ok{background:#e8f7ee;color:#1d7a3e;border:1px solid #bfe7cd}
.notice-err{background:#fdeeee;color:#b42323;border:1px solid #f3c3c3}
.hp{position:absolute;left:-9999px}

/* pagination */
.pagination{display:flex;gap:6px;justify-content:center;margin:30px 0}
.pagination .page-numbers{padding:6px 12px;border:1px solid var(--c-line);border-radius:4px;color:#333}
.pagination .current{background:var(--c-main);color:#fff;border-color:var(--c-main)}

/* footer */
.site-footer{background:#222;color:#aaa;padding:40px 0 20px;font-size:14px;margin-top:40px}
.site-footer .cols{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:30px;margin-bottom:24px}
.site-footer h4{color:#fff;margin-bottom:12px;font-size:16px}
.site-footer a{color:#aaa}.site-footer a:hover{color:#fff}
.site-footer li{padding:3px 0}
.copy{border-top:1px solid #333;padding-top:16px;text-align:center;font-size:13px}
.mobile-bar{display:none;position:fixed;bottom:0;left:0;right:0;z-index:60;background:#fff;border-top:1px solid var(--c-line)}
.mobile-bar a{flex:1;text-align:center;padding:12px 0;font-size:15px;font-weight:600}
.mobile-bar a+a{background:var(--c-accent);color:#fff}

@media (max-width:960px){
  .grid-4{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(2,1fr)}
  .main{grid-template-columns:1fr}
  .hero .wrap{grid-template-columns:1fr}.hero h1{font-size:28px}
  .site-footer .cols{grid-template-columns:1fr 1fr}
  .nav{display:none;position:absolute;left:0;right:0;top:70px;background:#fff;border-bottom:1px solid var(--c-line)}
  .nav.open{display:block}.nav ul{flex-direction:column;padding:8px 16px}
  .nav-toggle{display:block}.header-tel{display:none}.topbar{display:none}
}
@media (max-width:600px){
  .grid-4,.grid-3,.grid-2{grid-template-columns:1fr}
  .site-footer .cols{grid-template-columns:1fr}
  .mobile-bar{display:flex}body{padding-bottom:52px}
  .gallery{grid-template-columns:repeat(2,1fr)}
  .sec{padding:32px 0}
}

/* ===== 第 3 批补充 ===== */

/* 页头 */
.page-head{background:#fff;border-bottom:1px solid var(--c-line);padding:22px 0 18px}
.page-head h1{font-size:26px;margin-top:6px}

/* 面包屑 */
.crumb{font-size:13px;color:var(--c-muted);line-height:1.6}
.crumb a{color:var(--c-muted)}
.crumb a:hover{color:var(--c-main)}
.crumb .sep{margin:0 2px;opacity:.6}

/* 分类筛选标签行 */
.filter{display:flex;flex-wrap:wrap;gap:8px}
.filter .tag{padding:4px 12px;font-size:13px;border:1px solid var(--c-line);background:#fff;color:var(--c-text);border-radius:20px;transition:.15s}
.filter .tag:hover{border-color:var(--c-main);color:var(--c-main)}

/* 报名表单 */
.kh-form{position:relative}
.kh-form h3{font-size:18px;margin-bottom:14px;padding-bottom:10px;border-bottom:2px solid var(--c-accent)}
.kh-form .row{margin-bottom:12px}
.kh-form label{display:block;font-size:13px;color:var(--c-muted);margin-bottom:4px}
.kh-form label i{color:var(--c-accent);font-style:normal}
.kh-form input[type=text],.kh-form input[type=tel],.kh-form select,.kh-form textarea{
	width:100%;padding:9px 12px;border:1px solid var(--c-line);border-radius:6px;font:inherit;font-size:14px;background:#fff}
.kh-form input:focus,.kh-form select:focus,.kh-form textarea:focus{outline:0;border-color:var(--c-main);box-shadow:0 0 0 3px rgba(0,0,0,.04)}
.kh-form textarea{resize:vertical}
.kh-form .tip{font-size:12px;color:var(--c-muted);text-align:center;margin-top:8px}
.kh-form .notice{margin-bottom:12px;font-size:14px}
.kh-form.compact h3{font-size:16px}
.kh-form.compact .row{margin-bottom:8px}

/* 卡片缩略图容器（专业/视频卡片里的 .thumb 需相对定位放标签） */
.card .thumb{position:relative;display:block;overflow:hidden}
.card .thumb img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.card:hover .thumb img{transform:scale(1.04)}

/* 简章列表 / 搜索列表 */
.jz-list .card:hover,.search-list li:hover{background:#fafafa}
.search-list .tag{font-size:12px;vertical-align:middle}

/* FAQ 折叠 */
.faq-item{border:1px solid var(--c-line);border-radius:6px;margin-bottom:10px;background:#fff}
.faq-item summary{cursor:pointer;padding:12px 14px;font-weight:600;list-style:none;position:relative;padding-right:36px}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:"+";position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:20px;color:var(--c-muted)}
.faq-item[open] summary::after{content:"−"}
.faq-item .a{padding:0 14px 14px;color:#444;line-height:1.8}

/* 分页链接 */
.page-links{margin-top:20px;font-size:14px}
.page-links a{display:inline-block;padding:2px 8px;border:1px solid var(--c-line);border-radius:4px;margin-left:4px}

/* ===== 新增页面（学校概况/升学就业/联系我们） ===== */
.single{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:32px;align-items:start;padding:26px 0 50px}
.single .breadcrumb,.single h1{grid-column:1/-1}
.single h1 small{display:block;font-size:14px;font-weight:400;color:var(--c-muted);margin-top:4px}
.single article h2{font-size:22px;margin:1.4em 0 .6em;padding-left:10px;border-left:4px solid var(--c-main)}
.single .content{margin-top:6px}
.cta-box{position:sticky;top:86px;background:#fff;border:1px solid var(--c-line);border-radius:var(--r);padding:18px;margin:0}
.cta-box h2{font-size:18px;margin-bottom:12px;padding-bottom:8px;border-bottom:2px solid var(--c-accent)}
.gallery{display:grid;gap:10px;grid-template-columns:repeat(2,1fr)}
.gallery img{border-radius:var(--r);aspect-ratio:4/3;object-fit:cover;width:100%}
@media(min-width:900px){.gallery{grid-template-columns:repeat(3,1fr)}}

@media (max-width:768px){
	.page-head h1{font-size:22px}
	.jz-list .card{flex-direction:column}
	.jz-list .card>div:first-child{flex:none;width:100px}
	.single{grid-template-columns:1fr}
	.cta-box{position:static;margin-top:20px}
}

/* ===== 2026-10-07 页头适配 =====
   起因：学校设置里填入招生电话后，页头右侧多出 .header-tel，
   与「10 项主导航 + 校名」在 1200px 容器内放不下，校名和导航被挤成两行。

   ⚠ 导航相关规则必须限定在桌面断点内：
   主题在 @media (max-width:960px) 用 .nav{display:none} 收起移动菜单，
   如果这里不限定宽度，文件末尾同优先级的 .nav{display:flex} 会覆盖它，
   导致手机端整张导航常驻展开、把首屏内容全部挤下去。 */
.logo{flex:0 1 auto;min-width:0}
.logo span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar .wrap{gap:12px}
.topbar .wrap>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

@media (min-width:961px){
  .site-header .wrap{gap:14px}
  .nav{flex:1 1 auto;min-width:0;display:flex;justify-content:flex-end}
  .nav ul{flex-wrap:nowrap;gap:2px}
  .nav a{padding:8px 9px;font-size:15px;white-space:nowrap}
  .header-tel{font-size:16px;flex:0 0 auto}
}

/* ===== 2026-10-07 移动端完善 ===== */
/* 背景：主题原本只在 960/600 断点做了「能看」级别的适配，
   实测问题有三个：
   1) 触控目标普遍过小 —— 侧栏/页脚/列表链接只有 19~26px 高，
      汉堡按钮只有 23×35px（移动端建议 ≥44px）；
   2) 下拉菜单每项点击区小、无分隔线，容易误触；
   3) 移动端首屏留白按桌面尺寸给（hero padding 70px）。
   以下只覆盖 max-width 断点，不动桌面样式。
   注意：必须写在媒体查询里 —— 追加在文件末尾的同优先级规则会覆盖
   主题自身的移动端规则（页头导航就踩过这个坑）。 */
@media (max-width:960px){
  /* --- 页头与下拉菜单：给足触控区 --- */
  .site-header .wrap{height:64px}
  .logo{font-size:19px}
  .nav-toggle{width:44px;height:44px;padding:0;margin-right:-10px;
              display:flex;align-items:center;justify-content:center;font-size:24px;line-height:1}
  .nav{top:64px;box-shadow:0 10px 24px rgba(0,0,0,.10);max-height:calc(100vh - 64px);overflow-y:auto}
  .nav ul{padding:4px 12px 10px;gap:0}
  /* 基础样式给 .nav a 加了 8px 圆角（桌面端的 hover 药丸），
     移动端配上 border-bottom 会变成「飘浮的圆角卡片 + 断开的线」，
     这里去掉圆角，做成连续的分隔线列表。 */
  .nav a{padding:13px 10px;font-size:16px;border-radius:0;
         border-bottom:1px solid var(--c-line)}
  .nav li:last-child>a{border-bottom:0}
  .nav li.current-menu-item>a,.nav li.current_page_item>a{background:var(--c-bg)}

  /* --- 侧栏链接：19px → 41px --- */
  .side li{padding:0}
  .side li a{display:inline-block;padding:11px 0}

  /* --- 首页列表（招生简章 / 校园动态）：22~26px → 40px --- */
  .news-list li{padding:6px 0}
  .news-list li a{display:inline-block;padding:9px 0}

  /* --- 页脚链接：19px → 39px --- */
  .site-footer li{padding:0}
  .site-footer li a,.site-footer .copy a{display:inline-block;padding:10px 0}

  /* --- 卡片里的按钮是行内 padding:6px 0，需 !important 覆盖 --- */
  .card .body a.btn{padding:12px 0 !important;font-size:14px !important}

  /* --- 表格与按钮 --- */
  .info-table th,.info-table td{padding:11px 10px}
  .btn{padding:12px 20px}

  /* --- 首屏留白收紧 --- */
  .hero{padding:36px 0}
  .hero h1{font-size:26px}
  .hero p{font-size:16px;margin-bottom:18px}

  /* --- 第二轮补充（面包屑 / 筛选标签 / 页脚段落链接） --- */
  /* 面包屑：17px → 33px */
  .breadcrumb a{display:inline-block;padding:8px 0}
  /* 专业列表的系部筛选标签：22px → 34px */
  .filter .tag{padding:7px 12px;font-size:13px;line-height:1.5}
  /* 详情页头部标签 */
  .page-head .tag{padding:6px 10px;line-height:1.5}
  /* 页脚「招生电话：<a>」在 <p> 里，不走 li 规则 */
  .site-footer p a{display:inline-block;padding:8px 0}
  /* 卡片标题链接：22px → 30px（次要入口，图片和按钮才是主入口） */
  .card h3 a{display:inline-block;padding:4px 0}
}
@media (max-width:600px){
  .hero{padding:28px 0}
  .hero h1{font-size:23px}
  .hero-form{padding:18px}
  .sec{padding:28px 0}
  .sec-title h2{font-size:22px}
  .page-head{padding:20px 0}
  .cta{padding:26px 0}
  .cta h2{font-size:20px}
  .entry{font-size:15px}
}
