/*
Theme Name: Homing Institute
Theme URI: https://www.homingsi.com
Author: 漢明戰略研究院 Homing Strategic Institute
Description: 漢明戰略研究院官方网站主题 —— 深蓝暖金学术风格，适用于智库、研究机构。包含研究报告、专业评论、专家团队、资讯动态、合作伙伴等内容类型。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: homing
*/

/* ==========================================================================
   1. 设计变量
   ========================================================================== */
:root {
  --navy: #0d2c4b;
  --navy-deep: #081c31;
  --navy-soft: #1b4a76;
  --gold: #b8935a;
  --gold-soft: #d9c39c;
  --ink: #1c2733;
  --muted: #5d6b7a;
  --bg: #f7f8fa;
  --card: #ffffff;
  --line: #e3e7ec;
  --serif: "Songti SC", "SimSun", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap: 1200px;
}

/* ==========================================================================
   2. 基础
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }
h1, h2, h3, h4, h5 { font-family: var(--serif); color: var(--navy); line-height: 1.35; margin: 0 0 .6em; font-weight: 600; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }
blockquote {
  margin: 1.5em 0; padding: 1em 1.4em;
  border-left: 3px solid var(--gold);
  background: #fbfaf7; color: var(--muted); font-family: var(--serif);
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

/* ==========================================================================
   3. 顶部
   ========================================================================== */
.site-topbar {
  background: var(--navy-deep); color: #b9c7d6; font-size: 13px;
  padding: 8px 0;
}
.site-topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-topbar .en-name { letter-spacing: .12em; text-transform: uppercase; font-size: 11px; color: var(--gold-soft); }
.site-topbar .topbar-meta a { color: #b9c7d6; }
.site-topbar .topbar-meta a:hover { color: var(--gold-soft); }
.site-topbar .topbar-meta span + span { margin-left: 16px; }

.site-header {
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px rgba(13,44,75,.05);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; }
.site-brand { display: flex; align-items: center; gap: 14px; }
.site-brand .brand-mark {
  width: 46px; height: 46px; border-radius: 4px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--gold-soft); font-family: var(--serif); font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.site-brand .brand-text { display: flex; flex-direction: column; }
.site-brand .cn { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: .06em; }
.site-brand .en { font-size: 11px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.site-brand img { max-height: 52px; width: auto; }
/* 定稿 Logo：圆形印章徽标 */
.site-brand img.custom-logo,
.site-brand .custom-logo-link img {
	width: 52px; height: 52px; max-height: 52px;
	object-fit: cover; border-radius: 50%;
	display: block;
	box-shadow: 0 1px 4px rgba(13, 44, 75, .18);
}
.site-brand .custom-logo-link { line-height: 0; }

.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 10px 14px; font-size: 15px; color: var(--ink);
  border-bottom: 2px solid transparent; font-weight: 500;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a {
  color: var(--navy); border-bottom-color: var(--gold);
}
.main-nav .sub-menu {
  position: absolute; display: none; flex-direction: column; min-width: 190px;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(13,44,75,.12);
  padding: 8px 0; z-index: 50;
}
.main-nav li { position: relative; }
.main-nav li:hover > .sub-menu { display: flex; }
.main-nav .sub-menu a { padding: 8px 16px; border: 0; font-weight: 400; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; font-size: 18px; color: var(--navy); cursor: pointer; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); display: none; padding: 8px 0; z-index: 60; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 12px 24px; border-bottom: 1px solid var(--line); }
  .site-header .wrap { position: relative; }
}

/* ==========================================================================
   4. 首页 Hero
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-soft) 100%);
  color: #fff; padding: 88px 0 96px; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -80px; width: 460px; height: 460px;
  border-radius: 50%; background: radial-gradient(circle, rgba(184,147,90,.28) 0%, rgba(184,147,90,0) 68%);
}
.hero .wrap { position: relative; z-index: 2; max-width: 900px; }
.hero .kicker {
  display: inline-block; font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-soft); border: 1px solid rgba(217,195,156,.45); padding: 6px 14px; border-radius: 2px; margin-bottom: 26px;
}
.hero h1 { color: #fff; font-size: 3rem; margin-bottom: 22px; letter-spacing: .02em; }
.hero .lead { font-size: 1.12rem; color: #c9d6e4; max-width: 720px; font-family: var(--serif); line-height: 1.9; }
.hero .actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 13px 30px; border-radius: 3px; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: all .2s; text-align: center;
}
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: #a37f45; border-color: #a37f45; color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-soft); color: #fff; }

/* ==========================================================================
   5. 通用区块
   ========================================================================== */
.section { padding: 72px 0; }
.section-alt { background: #fff; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 38px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.section-head h2 { margin: 0; position: relative; padding-left: 16px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 4px; background: var(--gold); border-radius: 2px; }
.section-head .en-sub { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 6px; padding-left: 16px; }
.section-head .more { font-size: 14px; color: var(--muted); white-space: nowrap; }
.section-head .more:hover { color: var(--gold); }

.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(13,44,75,.10); }
.card .thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, #e8edf3, #d6dfe9); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.card .tag {
  display: inline-block; font-size: 12px; color: var(--gold); border: 1px solid var(--gold-soft);
  padding: 2px 10px; border-radius: 2px; margin-bottom: 12px; align-self: flex-start;
}
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card h3 a { color: var(--navy); }
.card h3 a:hover { color: var(--gold); }
.card .excerpt { color: var(--muted); font-size: 14.5px; flex: 1; }
.card .meta { font-size: 13px; color: #8794a3; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }

/* 专家 */
.expert-card { text-align: center; padding: 30px 22px; }
.expert-card .avatar {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 18px; overflow: hidden;
  border: 3px solid #fff; box-shadow: 0 6px 18px rgba(13,44,75,.12); background: #e8edf3;
}
.expert-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.expert-card .name { font-family: var(--serif); font-size: 1.15rem; color: var(--navy); margin-bottom: 4px; }
.expert-card .title-text { font-size: 13px; color: var(--gold); margin-bottom: 12px; }
.expert-card .bio { font-size: 14px; color: var(--muted); }

/* 动态 */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.news-list li:last-child { border-bottom: 0; }
.news-list .date { flex: 0 0 96px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.news-list .t { font-family: var(--serif); font-size: 1.05rem; }
.news-list .t a { color: var(--ink); }
.news-list .t a:hover { color: var(--gold); }

/* 合作伙伴 */
.partner-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
@media (max-width: 1000px) { .partner-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .partner-grid { grid-template-columns: repeat(2, 1fr); } }
.partner-item {
  background: #fff; border: 1px solid var(--line); border-radius: 4px; min-height: 96px;
  display: flex; align-items: center; justify-content: center; padding: 18px; text-align: center;
  color: var(--muted); font-size: 14px; font-family: var(--serif); transition: all .2s;
}
.partner-item:hover { border-color: var(--gold-soft); box-shadow: 0 8px 22px rgba(13,44,75,.08); color: var(--navy); }
.partner-item img { max-height: 54px; width: auto; }

/* ==========================================================================
   6. 内容页
   ========================================================================== */
.page-hero {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: #fff; padding: 58px 0 54px;
}
.page-hero h1 { color: #fff; margin: 0; font-size: 2.2rem; }
.page-hero .crumb { font-size: 13px; color: #a9bccf; margin-bottom: 14px; }
.page-hero .crumb a { color: #a9bccf; }
.page-hero .crumb a:hover { color: var(--gold-soft); }
.page-hero .desc { color: #bccbd9; margin: 14px 0 0; max-width: 760px; font-family: var(--serif); }

.content-wrap { padding: 56px 0 72px; }
.entry { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 44px 52px; }
@media (max-width: 760px) { .entry { padding: 28px 22px; } }
.entry h2 { margin-top: 1.6em; }
.entry h2:first-child, .entry h3:first-child { margin-top: 0; }
.entry ul, .entry ol { padding-left: 1.4em; }
.entry table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.entry th, .entry td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.entry th { background: #f3f6f9; color: var(--navy); font-weight: 600; }
.entry-meta { font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 28px; display: flex; gap: 18px; flex-wrap: wrap; }

.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; }
@media (max-width: 980px) { .layout-side { grid-template-columns: 1fr; } }
.widget { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 24px 26px; margin-bottom: 24px; }
.widget-title { font-family: var(--serif); font-size: 1.05rem; color: var(--navy); margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.widget li:last-child { border-bottom: 0; }

.download-box {
  background: #fbfaf7; border: 1px solid var(--gold-soft); border-radius: 4px;
  padding: 22px 26px; margin: 30px 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.download-box .dl-title { font-family: var(--serif); color: var(--navy); }

.pagination { margin-top: 40px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-block; padding: 8px 15px; border: 1px solid var(--line); border-radius: 3px;
  background: #fff; color: var(--ink); font-size: 14px;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.empty-state { background: #fff; border: 1px dashed var(--line); border-radius: 4px; padding: 60px 26px; text-align: center; color: var(--muted); }

/* ==========================================================================
   7. 页脚
   ========================================================================== */
.site-footer { background: var(--navy-deep); color: #93a7bb; padding: 62px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.site-footer h4 { color: #fff; font-size: 1.02rem; margin-bottom: 18px; font-family: var(--serif); }
.site-footer a { color: #93a7bb; }
.site-footer a:hover { color: var(--gold-soft); }
.site-footer .footer-brand .cn { font-family: var(--serif); font-size: 1.25rem; color: #fff; margin-bottom: 6px; }
.site-footer .footer-brand .en { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 6px 0; font-size: 14.5px; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.10); padding: 22px 0 28px; font-size: 13px; color: #7d90a4; }
.footer-legal .statement { margin: 0 0 10px; line-height: 1.9; }
.footer-legal .copyright { margin: 0; }

/* 其他 */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { margin: 0 auto 16px; }
.wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; }
