/*
Theme Name: 峰峰一中智慧门户
Theme URI: https://www.hbffcgzx.cn/
Description: 河北峰峰第一中学响应式学校门户网站主题。内置双模式首页轮播图（撑满屏幕 / 不撑满屏幕，后台可切换）、GEO 生成式引擎优化（全站与每篇文章可配置，默认可空）、完善的校园门户栏目与响应式布局。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Author: 学校信息中心
Author URI: https://www.hbffcgzx.cn/
Text Domain: fengfeng-school
Tags: responsive, education, school, carousel, geo, custom-colors, custom-menu, featured-images
*/

:root {
  --ff-primary: #1a4b8c;
  --ff-primary-dark: #143a6e;
  --ff-primary-light: #e8f0fb;
  --ff-accent: #c9a24b;
  --ff-accent-dark: #a9852f;
  --ff-text: #2b2f36;
  --ff-text-soft: #5a6472;
  --ff-bg: #f5f7fa;
  --ff-bg-card: #ffffff;
  --ff-border: #e3e8ef;
  --ff-radius: 12px;
  --ff-shadow: 0 6px 24px rgba(26, 75, 140, 0.08);
  --ff-shadow-lg: 0 12px 40px rgba(26, 75, 140, 0.16);
  --ff-container: 1200px;
  --ff-header-h: 72px;
}

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

html, body { overflow-x: hidden; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "Noto Sans CJK SC", sans-serif;
  color: var(--ff-text);
  background: var(--ff-bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ff-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ff-accent-dark); }

img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--ff-container); margin: 0 auto; padding: 0 20px; }

.site-content { min-height: 60vh; }

.section { padding: 56px 0; }
.section-title {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin: 0 0 28px; border-left: 5px solid var(--ff-accent);
  padding-left: 14px;
}
.section-title h2 { font-size: 26px; margin: 0; color: var(--ff-primary); letter-spacing: 2px; }
.section-title .en { font-size: 13px; color: var(--ff-text-soft); letter-spacing: 1px; text-transform: uppercase; }
.section-more { margin-left: auto; font-size: 14px; color: var(--ff-text-soft); }
.section-more:hover { color: var(--ff-accent-dark); }

.btn {
  display: inline-block; padding: 11px 26px; border-radius: 30px;
  background: var(--ff-primary); color: #fff; font-size: 15px; border: none;
  cursor: pointer; transition: background .2s, transform .1s;
}
.btn:hover { background: var(--ff-primary-dark); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--ff-accent); }
.btn-accent:hover { background: var(--ff-accent-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 999; background: rgba(255,255,255,.98);
  backdrop-filter: blur(8px); box-shadow: 0 2px 14px rgba(0,0,0,.06);
}
.header-inner { display: flex; align-items: center; height: var(--ff-header-h); gap: 18px; position: relative; }
.site-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.site-logo img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.site-logo .logo-text { line-height: 1.2; }
.site-logo .logo-title { font-size: 19px; font-weight: 700; color: var(--ff-primary); letter-spacing: 1px; }
.site-logo .logo-sub { font-size: 11px; color: var(--ff-text-soft); letter-spacing: 2px; }

.header-right { display: flex; align-items: center; gap: 16px; margin-left: auto; flex: 0 1 auto; min-width: 0; }

/* 主导航 */
.main-nav { flex: 0 1 auto; min-width: 0; }
.main-nav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.main-nav li { position: relative; }
.main-nav a {
  display: flex; align-items: center; gap: 4px;
  padding: 9px 12px; color: var(--ff-text); font-size: 14px;
  border-radius: 6px; white-space: nowrap;
}
.main-nav a:hover, .main-nav li.current-menu-item > a, .main-nav li.current-menu-ancestor > a {
  color: var(--ff-primary); background: var(--ff-primary-light);
}

/* 二级下拉菜单 */
.main-nav .sub-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 190px; background: #fff;
  box-shadow: var(--ff-shadow-lg); border-radius: 10px; padding: 8px 0; display: none;
  flex-direction: column; gap: 0; z-index: 1000;
  border: 1px solid var(--ff-border);
}
.main-nav .sub-menu::before {
  content: ""; position: absolute; top: -6px; left: 24px; width: 12px; height: 12px;
  background: #fff; transform: rotate(45deg); border-left: 1px solid var(--ff-border); border-top: 1px solid var(--ff-border);
}
.main-nav li:hover > .sub-menu { display: flex; }
.main-nav .sub-menu a { color: var(--ff-text); background: none; border-radius: 0; padding: 9px 18px; }
.main-nav .sub-menu a:hover { background: var(--ff-primary-light); color: var(--ff-primary); }
.submenu-toggle { display: none; }

/* 头部搜索 */
.header-search form {
  display: flex; align-items: center;
  background: var(--ff-bg); border: 1px solid var(--ff-border); border-radius: 24px;
  padding: 4px 4px 4px 14px; transition: box-shadow .2s, border-color .2s;
}
.header-search form:focus-within {
  border-color: var(--ff-primary); box-shadow: 0 0 0 3px rgba(26,75,140,.1);
}
.header-search input {
  border: none; background: transparent; outline: none; font-size: 14px;
  width: 130px; color: var(--ff-text); padding: 0;
}
.header-search input::placeholder { color: #95a0ad; }
.header-search button {
  border: none; background: var(--ff-primary); color: #fff; width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.header-search button:hover { background: var(--ff-primary-dark); }

/* 移动端搜索（在展开的菜单顶部） */
.mobile-search { display: none; padding: 12px 16px; border-bottom: 1px solid var(--ff-border); }
.mobile-search form {
  display: flex; align-items: center;
  background: var(--ff-bg); border: 1px solid var(--ff-border); border-radius: 24px;
  padding: 4px 4px 4px 14px;
}
.mobile-search input {
  border: none; background: transparent; outline: none; font-size: 14px; flex: 1; color: var(--ff-text);
}
.mobile-search button {
  border: none; background: var(--ff-primary); color: #fff; width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.nav-toggle { display: none; margin-left: auto; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--ff-primary); margin: 4px 0; border-radius: 2px; transition: .3s; }

/* ---------- Carousel ---------- */
.ff-carousel { position: relative; overflow: hidden; background: #0c2547; width: 100%; }
.ff-carousel.contained { max-width: var(--ff-container); margin: 24px auto; border-radius: var(--ff-radius); box-shadow: var(--ff-shadow-lg); overflow: hidden; }
.ff-carousel .slides { display: flex; width: 100%; transition: transform .6s cubic-bezier(.4,0,.2,1); will-change: transform; }
.ff-carousel .slide {
  position: relative; flex: 0 0 100%; width: 100%; min-width: 100%; min-height: 460px;
  display: flex; align-items: center;
  color: #fff; background-size: cover; background-repeat: no-repeat; background-position: center;
}
.ff-carousel.full .slide { min-height: 72vh; }
.ff-carousel.contained .slide { min-height: 440px; }
.ff-carousel .slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,28,56,.82) 0%, rgba(8,28,56,.55) 50%, rgba(8,28,56,.35) 100%);
}
.ff-carousel .slide-inner { position: relative; z-index: 2; max-width: var(--ff-container); margin: 0 auto; padding: 0 20px; width: 100%; }
.ff-carousel .slide-tag {
  display: inline-block; background: var(--ff-accent); color: #fff; padding: 4px 14px;
  border-radius: 20px; font-size: 13px; margin-bottom: 16px; letter-spacing: 1px;
}
.ff-carousel .slide-title { font-size: 40px; font-weight: 700; margin: 0 0 14px; text-shadow: 0 2px 12px rgba(0,0,0,.3); word-break: break-word; }
.ff-carousel .slide-desc { font-size: 18px; max-width: 620px; opacity: .95; margin: 0 0 22px; word-break: break-word; }
.ff-carousel .slide-link { background: #fff; color: var(--ff-primary); }
.ff-carousel .slide-link:hover { background: var(--ff-accent); color: #fff; }

.ff-carousel .nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.25); color: #fff; font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
  transition: background .2s;
}
.ff-carousel .nav-arrow:hover { background: rgba(255,255,255,.5); color: var(--ff-primary); }
.ff-carousel .nav-arrow.prev { left: 18px; }
.ff-carousel .nav-arrow.next { right: 18px; }
.ff-carousel .dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 8px; }
.ff-carousel .dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; padding: 0; opacity: .8; }
.ff-carousel .dot.active { background: var(--ff-accent); border-color: var(--ff-accent); opacity: 1; }

/* ---------- Quick links ---------- */
.quick-links { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.quick-link {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--ff-bg-card); border-radius: var(--ff-radius); padding: 22px 12px; text-align: center;
  box-shadow: var(--ff-shadow); transition: transform .2s, box-shadow .2s;
}
.quick-link:hover { transform: translateY(-4px); box-shadow: var(--ff-shadow-lg); }
.ql-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--ff-primary-light); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.ql-title { font-size: 15px; color: var(--ff-text); font-weight: 500; }

/* ---------- Home news grid ---------- */
.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--ff-border); }
.news-list li:last-child { border-bottom: none; }
.news-list .news-date { flex-shrink: 0; width: 56px; text-align: center; color: var(--ff-text-soft); font-size: 12px; }
.news-list .news-date b { display: block; font-size: 20px; color: var(--ff-primary); line-height: 1; }
.news-list .news-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.news-list .news-cat { font-size: 12px; color: var(--ff-accent-dark); background: var(--ff-primary-light); padding: 2px 8px; border-radius: 4px; flex-shrink: 0; }

/* ---------- Admission banner ---------- */
.admission-banner {
  background: linear-gradient(120deg, var(--ff-primary) 0%, var(--ff-primary-dark) 100%);
  color: #fff; border-radius: var(--ff-radius); padding: 38px 40px;
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap; box-shadow: var(--ff-shadow-lg);
}
.admission-banner h3 { font-size: 26px; margin: 0 0 8px; }
.admission-banner p { margin: 0; opacity: .92; max-width: 620px; }
.admission-banner .ab-actions { margin-left: auto; display: flex; gap: 12px; }

/* ---------- Campus gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-item { position: relative; border-radius: var(--ff-radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--ff-shadow); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .gi-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 14px 10px; color: #fff; font-size: 14px; background: linear-gradient(transparent, rgba(0,0,0,.7)); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat { background: var(--ff-bg-card); border-radius: var(--ff-radius); padding: 26px 14px; box-shadow: var(--ff-shadow); }
.stat .num { font-size: 38px; font-weight: 800; color: var(--ff-accent-dark); line-height: 1; }
.stat .label { margin-top: 8px; color: var(--ff-text-soft); font-size: 14px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--ff-text-soft); padding: 16px 0; }
.breadcrumb a { color: var(--ff-text-soft); }

/* ---------- Layout with sidebar ---------- */
/* 默认（未设置侧边栏）：主内容占满整行 */
.layout { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
/* 仅当侧边栏-1 配置了小工具时，才为主内容留出侧边栏位置 */
.layout.has-sidebar { grid-template-columns: 1fr 300px; }
.sidebar .widget {
  background: var(--ff-bg-card); border-radius: var(--ff-radius); padding: 22px 22px 18px;
  margin-bottom: 22px; box-shadow: var(--ff-shadow); border: 1px solid var(--ff-border);
}
.sidebar .widget h3 { margin: 0 0 16px; font-size: 17px; color: var(--ff-primary); border-left: 4px solid var(--ff-accent); padding-left: 12px; letter-spacing: 1px; }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget > ul > li { padding: 10px 0; border-bottom: 1px dashed var(--ff-border); }
.sidebar .widget > ul > li:last-child { border-bottom: none; }

/* ---------- 通用搜索表单（小工具 + 页面） ---------- */
.search-form, .ff-search-form {
  display: flex; align-items: stretch;
  background: var(--ff-bg); border: 1px solid var(--ff-border); border-radius: 28px;
  padding: 3px; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.search-form:focus-within, .ff-search-form:focus-within { border-color: var(--ff-primary); box-shadow: 0 0 0 3px rgba(26,75,140,.1); }
.search-form label, .ff-search-form label { display: flex; flex: 1; margin: 0; }
.search-field, .ff-search-field {
  border: none; background: transparent; outline: none; font-size: 14px;
  flex: 1; width: 100%; color: var(--ff-text); padding: 8px 12px;
}
.search-field::placeholder, .ff-search-field::placeholder { color: #95a0ad; }
.search-submit, .ff-search-submit {
  border: none; background: var(--ff-primary); color: #fff; width: 40px; min-width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.search-submit:hover, .ff-search-submit:hover { background: var(--ff-primary-dark); }
.search-submit svg, .ff-search-submit svg { width: 18px; height: 18px; }

/* 旧版 WordPress 搜索小工具强制兜底 */
.widget_search .search-form { padding: 3px; }
.widget_search .search-field { padding: 8px 14px; }
.widget_search .search-submit, .widget_search input[type="submit"] {
  width: 42px; min-width: 42px; height: 42px; border-radius: 50%;
  font-size: 0 !important; color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
  background-size: 18px 18px;
}
.widget_search .search-submit::before, .widget_search .search-submit::after { display: none !important; content: none !important; }

/* ---------- 文章目录小工具 ---------- */
.ff-toc-list { list-style: none; margin: 0; padding: 0; }
.ff-toc-list li { padding: 0; margin: 0; }
.ff-toc-list li + li { border-top: 1px dashed var(--ff-border); }
.ff-toc-list a {
  display: block; padding: 10px 0; color: var(--ff-text-soft); font-size: 14px;
  line-height: 1.5; position: relative; padding-left: 12px;
  transition: color .2s, padding-left .2s;
}
.ff-toc-list a::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--ff-border);
  transition: background .2s, transform .2s;
}
.ff-toc-list a:hover { color: var(--ff-primary); padding-left: 16px; }
.ff-toc-list a:hover::before { background: var(--ff-primary); transform: translateY(-50%) scale(1.4); }
.ff-toc-level-3 a { padding-left: 22px; font-size: 13px; color: #6b7582; }
.ff-toc-level-3 a::before { left: 10px; }
.ff-toc-level-3 a:hover { padding-left: 26px; }

/* ---------- 最近文章小工具 ---------- */
.ff-recent-posts { list-style: none; margin: 0; padding: 0; }
.ff-recent-posts li { padding: 12px 0; border-bottom: 1px dashed var(--ff-border); }
.ff-recent-posts li:last-child { border-bottom: none; }
.ff-recent-posts .frp-title { display: block; font-size: 14px; color: var(--ff-text); line-height: 1.55; margin-bottom: 4px; }
.ff-recent-posts .frp-title:hover { color: var(--ff-primary); }
.ff-recent-posts .frp-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ff-text-soft); }
.ff-recent-posts .frp-cat { color: var(--ff-accent-dark); background: var(--ff-primary-light); padding: 1px 7px; border-radius: 4px; }

/* ---------- 分类标签小工具 ---------- */
.ff-cat-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.ff-cat-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 20px; background: var(--ff-bg); border: 1px solid var(--ff-border);
  font-size: 13px; color: var(--ff-text); transition: .2s;
}
.ff-cat-tag:hover { background: var(--ff-primary); border-color: var(--ff-primary); color: #fff; }
.ff-cat-tag .ff-cat-count { font-size: 11px; opacity: .75; }

/* ---------- 学校简介小工具 ---------- */
.ff-about-widget .ff-about-name { font-size: 16px; font-weight: 700; color: var(--ff-primary); margin-bottom: 4px; }
.ff-about-widget .ff-about-motto { font-size: 13px; color: var(--ff-accent-dark); letter-spacing: 1px; margin-bottom: 10px; }
.ff-about-widget p { font-size: 14px; color: var(--ff-text-soft); line-height: 1.7; margin: 0 0 12px; }
.ff-link-arrow { font-size: 13px; color: var(--ff-primary); font-weight: 500; }
.ff-link-arrow:hover { color: var(--ff-accent-dark); }

/* ---------- 联系方式小工具 ---------- */
.ff-contact-list { list-style: none; margin: 0; padding: 0; }
.ff-contact-list li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; font-size: 14px; color: var(--ff-text-soft); border-bottom: 1px dashed var(--ff-border); }
.ff-contact-list li:last-child { border-bottom: none; }
.ff-contact-list .ff-contact-icon { flex-shrink: 0; font-size: 16px; line-height: 1.5; }
.ff-contact-list a { color: var(--ff-text-soft); word-break: break-all; }
.ff-contact-list a:hover { color: var(--ff-primary); }

/* ---------- 快速导航小工具 ---------- */
.ff-quick-links { display: flex; flex-direction: column; }
.ff-quick-links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px dashed var(--ff-border); font-size: 14px; color: var(--ff-text);
}
.ff-quick-links a:last-child { border-bottom: none; }
.ff-quick-links a::after { content: "→"; color: var(--ff-border); transition: color .2s, transform .2s; }
.ff-quick-links a:hover { color: var(--ff-primary); }
.ff-quick-links a:hover::after { color: var(--ff-primary); transform: translateX(3px); }

/* ---------- Post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { background: var(--ff-bg-card); border-radius: var(--ff-radius); overflow: hidden; box-shadow: var(--ff-shadow); transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--ff-shadow-lg); }
.post-card .pc-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--ff-primary-light); }
.post-card .pc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .pc-body { padding: 16px 18px 20px; }
.post-card .pc-meta { font-size: 12px; color: var(--ff-text-soft); margin-bottom: 8px; }
.post-card .pc-title { font-size: 17px; margin: 0 0 8px; line-height: 1.5; }
.post-card .pc-excerpt { font-size: 14px; color: var(--ff-text-soft); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Single post ---------- */
.single-article { background: var(--ff-bg-card); border-radius: var(--ff-radius); padding: 34px 40px; box-shadow: var(--ff-shadow); }
.single-article h1 { font-size: 28px; color: var(--ff-primary); margin: 0 0 14px; line-height: 1.4; }
.single-meta { font-size: 13px; color: var(--ff-text-soft); border-bottom: 1px solid var(--ff-border); padding-bottom: 14px; margin-bottom: 22px; display: flex; gap: 18px; flex-wrap: wrap; }
.single-content { font-size: 16px; }
.single-content p { margin: 0 0 18px; }
.single-content img { border-radius: 8px; margin: 18px 0; }
.single-content h2, .single-content h3 { color: var(--ff-primary); margin: 28px 0 12px; }

/* GEO summary box on single posts */
.geo-summary {
  background: var(--ff-primary-light); border-left: 4px solid var(--ff-accent);
  border-radius: 8px; padding: 16px 18px; margin: 0 0 22px; font-size: 15px; color: var(--ff-text);
}
.geo-summary .gs-label { font-size: 12px; color: var(--ff-accent-dark); font-weight: 700; letter-spacing: 1px; display: block; margin-bottom: 6px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin: 36px 0; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 6px; background: var(--ff-bg-card); box-shadow: var(--ff-shadow); color: var(--ff-text); }
.pagination .current { background: var(--ff-primary); color: #fff; }

/* ---------- Search page ---------- */
.search-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 28px; }
.sf-label { font-size: 14px; color: var(--ff-text-soft); }
.sf-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 20px; background: var(--ff-bg-card); border: 1px solid var(--ff-border);
  font-size: 14px; color: var(--ff-text); transition: .2s;
}
.sf-item:hover { border-color: var(--ff-primary); color: var(--ff-primary); }
.sf-item.active { background: var(--ff-primary); border-color: var(--ff-primary); color: #fff; }
.sf-item small { opacity: .8; }

.search-results-grouped { display: flex; flex-direction: column; gap: 32px; }
.sr-group { background: var(--ff-bg-card); border-radius: var(--ff-radius); padding: 24px; box-shadow: var(--ff-shadow); }
.sr-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sr-group-head h3 { margin: 0; font-size: 18px; color: var(--ff-primary); border-left: 4px solid var(--ff-accent); padding-left: 10px; }
.sr-more { font-size: 13px; color: var(--ff-text-soft); }
.sr-more:hover { color: var(--ff-primary); }
.search-empty { background: var(--ff-bg-card); border-radius: var(--ff-radius); padding: 40px 24px; text-align: center; box-shadow: var(--ff-shadow); }
.search-empty .search-form { justify-content: center; margin-top: 18px; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, #143a6e 0%, #0f2d55 100%);
  color: #b8c8df; margin-top: 60px;
}
.footer-top {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 36px 0; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand { flex: 1; min-width: 0; }
.footer-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.footer-logo img { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.12); padding: 4px; }
.footer-logo strong { display: block; font-size: 20px; color: #fff; letter-spacing: 1px; }
.footer-logo span { display: block; font-size: 13px; color: #9fb2cf; margin-top: 2px; }
.footer-motto { margin: 0; font-size: 14px; color: var(--ff-accent); letter-spacing: 2px; }

.footer-contact { display: flex; flex-wrap: wrap; gap: 18px 28px; }
.fc-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #cdd9ec; }
.fc-item svg { flex-shrink: 0; color: var(--ff-accent); }

.footer-links {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding: 30px 0 36px;
}
.fl-group h5 { font-size: 15px; color: #fff; margin: 0 0 14px; letter-spacing: 1px; }
.fl-group ul { list-style: none; margin: 0; padding: 0; }
.fl-group li { margin: 8px 0; }
.fl-group a { color: #9fb2cf; font-size: 14px; }
.fl-group a:hover { color: #fff; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; text-align: center; font-size: 13px; color: #8296b5; }
.footer-bottom a { color: #8296b5; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav-toggle { display: block; transform: translateX(16px); }
  .header-right {
    position: static;
  }
  .main-nav {
    position: absolute; top: var(--ff-header-h); left: 0; right: 0; width: 100%; background: #fff;
    max-height: 0; overflow: hidden; transition: max-height .35s ease; box-shadow: var(--ff-shadow);
  }
  .main-nav.open { max-height: 80vh; overflow-y: auto; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .main-nav a { border-radius: 0; justify-content: space-between; padding: 12px 16px; }
  .main-nav .sub-menu { position: static; box-shadow: none; display: none; padding-left: 0; background: var(--ff-bg); border: none; }
  .main-nav .sub-menu::before { display: none; }
  .main-nav li:hover > .sub-menu { display: none; }
  .main-nav li.open > .sub-menu { display: flex; }
  .main-nav .sub-menu a { padding-left: 32px; }
  .submenu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; margin-left: 8px; border-radius: 4px;
    transition: transform .2s, background .2s;
  }
  .main-nav li.open > a .submenu-toggle { transform: rotate(180deg); }
  .mobile-search { display: block; }
  .header-search { display: none; }
  .quick-links { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .container { padding: 0 28px; }
  .home-cols { grid-template-columns: 1fr; }
  .layout, .layout.has-sidebar { grid-template-columns: 1fr; }
  .admission-banner .ab-actions { margin-left: 0; width: 100%; }
  .ff-carousel .slide-title { font-size: 28px; }
  .ff-carousel .slide-desc { font-size: 15px; }
  .sidebar { order: 2; margin-top: 8px; }
  .single-article { order: 1; }
}
@media (max-width: 560px) {
  .container { padding: 0 32px; }
  .logo-sub { display: none; }
  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr; }
  .section { padding: 42px 0; }
  .breadcrumb { padding-top: 20px; padding-bottom: 20px; }
  .section-title h2 { font-size: 22px; }
  .single-article { padding: 24px 20px; }
  .admission-banner { padding: 24px; }
  .admission-banner h3 { font-size: 20px; }
  .ff-carousel .nav-arrow { display: none; }
  .ff-carousel .slide-inner { max-width: none; text-align: center; }
  .ff-carousel .slide-title { font-size: 20px; }
  .ff-carousel .slide-desc { font-size: 14px; }
  .ff-carousel .slide-inner { padding: 0 16px; }
  .ff-carousel.full .slide, .ff-carousel.contained .slide { min-height: 260px; }
  .news-list li { align-items: flex-start; gap: 8px; }
  .news-list .news-date { width: 44px; font-size: 11px; }
  .news-list .news-date b { font-size: 17px; }
  .news-list .news-title { white-space: normal; overflow: visible; font-size: 14px; }

  /* 手机端底部紧凑化 */
  .footer-top { padding: 26px 0; }
  .footer-logo img { width: 44px; height: 44px; }
  .footer-logo strong { font-size: 17px; }
  .footer-contact { flex-direction: column; gap: 10px; }
  .fc-item { font-size: 13px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 22px 0 26px; }
  .fl-group h5 { font-size: 14px; margin-bottom: 10px; }
  .fl-group li { margin: 5px 0; }
  .fl-group a { font-size: 13px; }
  .footer-bottom { font-size: 12px; padding: 14px 0; }

  /* 手机端搜索筛选 */
  .search-filter { gap: 8px; }
  .sf-item { padding: 5px 11px; font-size: 13px; }
  .sr-group { padding: 18px; }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ff-carousel .slides { transition: none; }
  html { scroll-behavior: auto; }
}

/* Screen reader text */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
  width: 1px; word-wrap: normal !important;
}
