/* ==========================================
   C11 弘文文化艺术发展学会 HCADS
   主色: #014e5e (深青) / 辅色: #c5a255 (暖金)
   仿站参考: caai.cn 学术严谨风格
   ========================================== */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #014e5e;
  --primary-light: #02697d;
  --primary-dark: #013a47;
  --gold: #c5a255;
  --gold-light: #d4b76a;
  --text: #2c2c2c;
  --text-light: #666;
  --bg-white: #ffffff;
  --bg-light: #f7f8fa;
  --bg-dark: #014e5e;
  --border: #e0e0e0;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  background: var(--bg-white);
}

a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === Navbar === */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--bg-white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  height: 72px;
  transition: background 0.3s;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--primary);
}
.navbar-brand img { height: 48px; width: auto; }
.navbar-brand span {
  font-size: 15px; font-weight: 600; color: var(--primary);
  letter-spacing: 1px; white-space: nowrap;
}

.nav-menu { display: flex; align-items: center; gap: 0; list-style: none; }
.nav-item { position: relative; flex: 0 0 auto; }
.nav-item > a {
  display: block; padding: 24px 16px; font-size: 15px;
  color: var(--text); font-weight: 500; transition: color 0.3s;
  white-space: nowrap;
}
.nav-item > a:hover, .nav-item:hover > a { color: var(--primary); }

/* Dropdown */
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--bg-white); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: 4px; padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all 0.3s ease;
}
.nav-item:hover .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu a {
  display: block; padding: 10px 20px; font-size: 14px;
  color: var(--text); transition: all 0.2s;
}
.dropdown-menu a:hover {
  background: var(--bg-light); color: var(--primary);
}

/* Search */
.nav-search {
  cursor: pointer; padding: 8px; color: var(--text-light);
  font-size: 18px; transition: color 0.3s;
}
.nav-search:hover { color: var(--primary); }

/* Search overlay */
.search-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85); z-index: 2000;
  display: none; align-items: center; justify-content: center;
}
.search-overlay.active { display: flex; }
.search-overlay input {
  width: 600px; max-width: 90vw; padding: 16px 24px;
  font-size: 20px; border: none; border-bottom: 2px solid var(--gold);
  background: transparent; color: #fff; outline: none;
}
.search-overlay input::placeholder { color: rgba(255,255,255,0.5); }
.search-close {
  position: absolute; top: 40px; right: 40px;
  color: #fff; font-size: 32px; cursor: pointer;
}

/* Mobile menu toggle */
.nav-toggle { display: none; cursor: pointer; font-size: 24px; color: var(--text); }

/* === Hero === */
.hero {
  position: relative; height: 600px; margin-top: 72px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(1,78,94,0.45) 0%, rgba(1,58,71,0.55) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 800px; padding: 0 20px; }
.hero h1 {
  font-size: 38px; font-weight: 700; margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6); letter-spacing: 3px;
}
.hero p {
  font-size: 18px; line-height: 1.8; margin-bottom: 30px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* Page hero (subpages) */
.page-hero {
  position: relative; height: 350px; margin-top: 72px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(1,78,94,0.5);
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: 32px; font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6); margin-bottom: 10px;
}
.page-hero p {
  font-size: 17px; text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* === Buttons === */
.btn {
  display: inline-block; padding: 12px 32px; font-size: 15px;
  font-weight: 500; border-radius: 4px; transition: all 0.3s;
  cursor: pointer; border: none; text-align: center;
}
.btn-primary {
  background: var(--gold); color: #fff;
}
.btn-primary:hover { background: var(--gold-light); color: #fff; }
.btn-outline {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }
.btn-outline-dark {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline-dark:hover { background: var(--primary); color: #fff; }

.btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* === Stats Section === */
.stats-section {
  background: var(--primary);
  padding: 50px 0; color: #fff;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px;
  text-align: center;
}
.stat-item h3 {
  font-size: 42px; font-weight: 700; color: var(--gold);
  margin-bottom: 8px;
}
.stat-awards-count::after { content: "届"; }
html.en .stat-awards-count::after { content: ""; }
.stat-item p { font-size: 15px; color: rgba(255,255,255,0.85); }

/* === Section === */
.section { padding: 80px 0; }
.section-light { background: var(--bg-light); }
.section-dark { background: var(--primary); color: #fff; }

.section-header {
  text-align: center; margin-bottom: 50px;
}
.section-header h2 {
  font-size: 30px; font-weight: 700; color: var(--primary);
  margin-bottom: 12px;
}
.section-dark .section-header h2 { color: #fff; }
.section-header p { font-size: 16px; color: var(--text-light); max-width: 600px; margin: 0 auto; }
.section-dark .section-header p { color: rgba(255,255,255,0.8); }

.section-header::after {
  content: ''; display: block; width: 60px; height: 3px;
  background: var(--gold); margin: 16px auto 0;
}

/* === Cards === */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--bg-white); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden; transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,0.1); }
.card-cover {
  height: 200px; background-size: cover; background-position: center;
  position: relative;
}
.card-cover::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.3) 100%);
}
.card-body { padding: 24px; }
.card-body h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; color: var(--primary); }
.card-body p { font-size: 14px; color: var(--text-light); line-height: 1.7; }
.card-body .btn { margin-top: 16px; }

/* === Service Cards (icon style) === */
.service-card {
  background: var(--bg-white); border-radius: 8px; padding: 36px 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  text-align: center; transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,0.1); }
.service-card .icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  background: var(--bg-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--primary);
}
.service-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; color: var(--primary); }
.service-card p { font-size: 14px; color: var(--text-light); line-height: 1.7; }

/* === News Cards === */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.news-card {
  background: var(--bg-white); border-radius: 8px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s;
}
.news-card:hover { transform: translateY(-4px); }
.news-card .thumb {
  height: 180px; background-size: cover; background-position: center;
}
.news-card .info { padding: 20px; }
.news-card .date { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.news-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; line-height: 1.5; }
.news-card h3 a { color: var(--text); }
.news-card h3 a:hover { color: var(--primary); }
.news-card .excerpt { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* === CTA Band === */
.cta-band {
  position: relative; padding: 80px 0; text-align: center;
  background-size: cover; background-position: center; color: #fff;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(1,78,94,0.55);
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { font-size: 28px; font-weight: 700; margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.cta-band p { font-size: 16px; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }

/* === Timeline (left-aligned, line through dots) === */
.timeline { position: relative; padding: 20px 0; max-width: 900px; margin: 0 auto; }
.timeline::before {
  content: ''; position: absolute; left: 97px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item {
  display: flex; margin-bottom: 36px; position: relative;
  align-items: flex-start;
}
.timeline-date {
  width: 90px; min-width: 90px; text-align: right; padding-right: 24px;
  font-size: 16px; font-weight: 600; color: var(--primary);
  padding-top: 2px;
}
.timeline-dot {
  width: 16px; height: 16px; min-width: 16px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--bg-white);
  box-shadow: 0 0 0 2px var(--gold);
  margin-top: 4px; z-index: 2; position: relative;
}
.timeline-content {
  flex: 1; padding-left: 24px;
  font-size: 15px; color: var(--text-light); line-height: 1.7;
}

/* === Breadcrumb === */
.breadcrumb {
  padding: 16px 0; font-size: 14px; color: var(--text-light);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* === Content === */
.content-area { padding: 60px 0; }
.content-area h2 { font-size: 24px; font-weight: 700; color: var(--primary); margin: 40px 0 16px; }
.content-area h3 { font-size: 20px; font-weight: 600; color: var(--text); margin: 30px 0 12px; }
.content-area p { font-size: 15px; line-height: 1.8; margin-bottom: 16px; }
.content-area ul, .content-area ol { padding-left: 24px; margin-bottom: 16px; }
.content-area li { font-size: 15px; line-height: 1.8; margin-bottom: 6px; }

/* Tables */
.content-area table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
}
.content-area th {
  background: var(--primary); color: #fff; padding: 12px 16px;
  text-align: left; font-size: 14px; font-weight: 600;
}
.content-area td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.content-area tr:hover td { background: var(--bg-light); }

/* === Award Categories === */
.award-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.award-item {
  background: var(--bg-white); border-radius: 8px; padding: 30px 20px;
  text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border-top: 3px solid var(--gold);
}
.award-item .icon { font-size: 36px; color: var(--gold); margin-bottom: 16px; }
.award-item h3 { font-size: 16px; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.award-item p { font-size: 13px; color: var(--text-light); line-height: 1.6; }

/* === Winners === */
.winner-card {
  background: var(--bg-white); border-radius: 8px; padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06); margin-bottom: 20px;
  border-left: 4px solid var(--gold);
}
.winner-card h4 { font-size: 16px; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.winner-card .role { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.winner-card p { font-size: 14px; color: var(--text); line-height: 1.6; }

/* === Gallery === */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-item {
  border-radius: 8px; overflow: hidden; position: relative;
  height: 280px; background-size: cover; background-position: center;
  cursor: pointer;
}
.gallery-item::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.6) 100%);
  opacity: 0; transition: opacity 0.3s;
}
.gallery-item:hover::before { opacity: 1; }
.gallery-item .caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px 20px; color: #fff;
  transform: translateY(100%); transition: transform 0.3s;
}
.gallery-item:hover .caption { transform: translateY(0); }
.gallery-item .caption h4 { font-size: 15px; font-weight: 600; }
.gallery-item .caption p { font-size: 13px; opacity: 0.85; }

/* === News List === */
.news-list-item {
  display: flex; gap: 24px; padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.news-list-item .thumb {
  width: 240px; min-width: 240px; height: 160px;
  border-radius: 8px; background-size: cover; background-position: center;
}
.news-list-item .content { flex: 1; }
.news-list-item .date { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.news-list-item h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.news-list-item h3 a { color: var(--text); }
.news-list-item h3 a:hover { color: var(--primary); }
.news-list-item .excerpt { font-size: 14px; color: var(--text-light); line-height: 1.7; }
.news-list-item .read-more { display: inline-block; margin-top: 10px; font-size: 14px; color: var(--primary); font-weight: 500; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 40px 0; }
.pagination button {
  padding: 8px 16px; border: 1px solid var(--border); background: var(--bg-white);
  border-radius: 4px; cursor: pointer; font-size: 14px; transition: all 0.3s;
}
.pagination button.active, .pagination button:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* === Announcement List === */
.announcement-item {
  padding: 20px 0; border-bottom: 1px solid var(--border);
}
.announcement-item .date { font-size: 13px; color: var(--gold); font-weight: 600; margin-bottom: 4px; }
.announcement-item h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.announcement-item h3 a { color: var(--text); }
.announcement-item h3 a:hover { color: var(--primary); }
.announcement-item .excerpt { font-size: 14px; color: var(--text-light); }

/* === Contact === */
.contact-page { padding: 56px 0 72px; background: var(--bg-white); }
.section-kicker {
  margin: 0 0 8px; color: var(--gold); font-size: 13px;
  font-weight: 700; letter-spacing: 0;
}
.contact-lead {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px; align-items: end; margin-bottom: 28px;
  padding-left: 18px; border-left: 4px solid var(--gold);
}
.contact-lead h2 {
  margin: 0 0 10px; color: var(--primary); font-size: 28px;
  line-height: 1.35; font-weight: 700;
}
.contact-lead p { max-width: 760px; margin-bottom: 0; color: var(--text-light); }
.contact-top-grid {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 24px; align-items: stretch;
}
.contact-card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 28px; box-shadow: 0 10px 24px rgba(1,78,94,0.06);
}
.contact-card h3 {
  margin: 0 0 12px; color: var(--primary); font-size: 20px;
  line-height: 1.4; font-weight: 700;
}
.contact-card-intro { color: var(--text-light); margin: 0 0 22px; }
.contact-method-list { display: grid; gap: 18px; }
.contact-method {
  display: grid; grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px; align-items: start;
}
.contact-method i {
  color: var(--gold); font-size: 18px; line-height: 1.5; text-align: center;
}
.contact-method strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 14px; }
.contact-method p { margin: 0; color: var(--text-light); font-size: 15px; }
.contact-route-card p { margin-bottom: 18px; color: var(--text-light); }
.route-list { display: grid; gap: 10px; }
.route-row {
  display: grid; grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1fr);
  gap: 14px; align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.route-row:last-child { border-bottom: 0; }
.route-row strong { color: var(--primary); font-weight: 700; word-break: break-word; }
.contact-section { margin-top: 48px; }
.contact-section-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 24px; margin-bottom: 18px;
}
.contact-section-head h2 {
  margin: 0; color: var(--primary); font-size: 24px; line-height: 1.35;
}
.contact-section-head p { max-width: 460px; margin: 0; color: var(--text-light); }
.office-grid, .faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.office-card {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px;
  padding: 22px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-light);
}
.office-card i { color: var(--gold); font-size: 20px; margin-top: 2px; }
.office-card h3, .faq-item h3 {
  margin: 0 0 8px; color: var(--primary); font-size: 17px; font-weight: 700;
}
.office-card p, .faq-item p { margin: 0; color: var(--text-light); font-size: 14px; }
.contact-muted { margin-top: 6px !important; color: var(--text-light); }
.inquiry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inquiry-card {
  min-height: 96px; padding: 16px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; display: flex; flex-direction: column;
  justify-content: space-between; gap: 10px;
}
.inquiry-card > span { color: var(--text); font-size: 14px; line-height: 1.6; }
.inquiry-card strong { color: var(--primary); font-size: 14px; line-height: 1.5; word-break: break-word; }
.faq-item {
  padding: 22px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}

/* Legacy contact form styles retained for older static pages. */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h3 { font-size: 20px; font-weight: 600; color: var(--primary); margin-bottom: 20px; }
.contact-info .item { display: flex; gap: 12px; margin-bottom: 16px; }
.contact-info .item i { color: var(--gold); font-size: 18px; margin-top: 3px; }
.contact-info .item p { font-size: 15px; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: 4px; font-size: 15px; margin-bottom: 16px;
  font-family: inherit; transition: border 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--primary);
}
.contact-form textarea { height: 120px; resize: vertical; }

/* === Footer === */
.footer {
  background: var(--primary-dark); color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand img { height: 40px; background: #fff; padding: 4px; border-radius: 4px; }
.footer-brand span { color: #fff; font-size: 14px; font-weight: 600; }
.footer p { font-size: 14px; line-height: 1.7; }
.footer h4 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 20px 0; margin-top: 40px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-col {}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-links a:hover { color: var(--gold); }

/* News pagination items */
.news-page-item { }

/* === Animations === */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* === Org Chart === */
.org-chart { text-align: center; padding: 30px 0; }
.org-level { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.org-box {
  background: var(--bg-white); border: 2px solid var(--primary);
  border-radius: 8px; padding: 16px 24px; min-width: 200px;
  text-align: center;
}
.org-box.primary { background: var(--primary); color: #fff; }
.org-box.gold { border-color: var(--gold); }
.org-box h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.org-box p { font-size: 13px; opacity: 0.8; }
.org-connector { text-align: center; font-size: 24px; color: var(--border); margin: -10px 0; }

/* === News Detail === */
.article-header { max-width: 800px; margin: 0 auto; padding: 40px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.article-header h1 { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.article-meta { font-size: 14px; color: var(--text-light); }
.article-meta span { margin-right: 20px; }
.article-content { max-width: 800px; margin: 0 auto; }
.article-content p { font-size: 15px; line-height: 2; margin-bottom: 20px; }
.article-content h2 { font-size: 22px; margin: 30px 0 16px; color: var(--primary); }
.article-content h3 { font-size: 18px; margin: 24px 0 12px; }
.article-back { margin-top: 40px; text-align: center; }

/* === Charter (Accordion) === */
.charter-chapter { margin-bottom: 16px; }
.charter-title {
  background: var(--bg-light); padding: 16px 20px; cursor: pointer;
  font-size: 16px; font-weight: 600; color: var(--primary);
  border-radius: 4px; display: flex; justify-content: space-between; align-items: center;
  transition: background 0.3s;
}
.charter-title:hover { background: var(--border); }
.charter-title .toggle { font-size: 18px; color: var(--text-light); transition: transform 0.3s; }
.charter-content {
  box-sizing: border-box;
  height: 0;
  padding: 0 20px;
  overflow: hidden;
  transition: height 0.28s ease, padding-top 0.28s ease, padding-bottom 0.28s ease;
  will-change: height;
}
.charter-content.active { padding-top: 16px; padding-bottom: 16px; }
.charter-content p { font-size: 15px; line-height: 1.8; margin-bottom: 10px; }

/* === Responsive === */
@media (max-width: 1024px) {
  .card-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .award-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-top-grid { grid-template-columns: 1fr; }
  .inquiry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .nav-toggle { display: block; }
  .nav-menu.active {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg-white); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 16px 0;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .nav-item > a { padding: 12px 20px; }
  .nav-item .dropdown-menu {
    display: none;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    transition: none;
  }
  .nav-item .dropdown-menu a {
    padding-left: 36px;
  }
  .nav-item .dropdown-menu.open { display: block; }
  .hero { height: 450px; }
  .hero h1 { font-size: 26px; }
  .page-hero { height: 250px; }
  .page-hero h1 { font-size: 24px; }
  .card-grid, .news-grid, .gallery-grid { grid-template-columns: 1fr !important; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .award-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-page { padding: 40px 0 56px; }
  .contact-lead { grid-template-columns: 1fr; align-items: start; padding-left: 14px; }
  .contact-lead h2 { font-size: 24px; }
  .contact-card { padding: 22px; }
  .contact-section { margin-top: 36px; }
  .contact-section-head { display: block; }
  .contact-section-head > p { margin-top: 8px; }
  .office-grid, .inquiry-grid, .faq-grid { grid-template-columns: 1fr; }
  .route-row { grid-template-columns: 1fr; gap: 4px; }
  .contact-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 20px; }
  .timeline-date { width: auto; text-align: left; padding-right: 0; padding-left: 50px; }
  .timeline-item:nth-child(even) .timeline-date { text-align: left; padding-left: 50px; }
  .timeline-dot { left: 20px; }
  .timeline-content { width: auto; padding-left: 50px; }
  .timeline-item:nth-child(even) .timeline-content { padding-right: 0; padding-left: 50px; text-align: left; }
  .timeline-item { flex-direction: column !important; }
  .news-list-item { flex-direction: column; }
  .news-list-item .thumb { width: 100%; min-width: auto; height: 200px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* == begin appended by build_pages.py == */
/* --- yzncms pagination --- */
.pagination{margin-top:50px;display:flex;justify-content:center}
.pagination ul{list-style:none;padding:0;margin:0;display:inline-flex;gap:8px;flex-wrap:wrap;justify-content:center;align-items:center}
.pagination li{display:inline-flex}
.pagination li > a,.pagination li > span{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:44px;padding:0 18px;background:#fff;border:1px solid #e0d5c7;border-radius:8px;color:#555;font-size:14px;text-decoration:none;transition:all .2s;line-height:1;font-weight:500}
.pagination li > a:hover{background:#c9a96e;color:#fff;border-color:#c9a96e;transform:translateY(-1px);box-shadow:0 2px 8px rgba(0,0,0,.08)}
.pagination li.active > span{background:#c9a96e;color:#fff;border-color:#c9a96e;cursor:default}
.pagination li.disabled > span{color:#bbb;background:#f7f7f7;cursor:not-allowed;border-color:#eee}
@media(max-width:640px){.pagination li > a,.pagination li > span{min-width:40px;height:40px;padding:0 12px;font-size:13px}}

/* == end appended by build_pages.py == */

/* === Language Toggle === */
.lang-en { display: none; }
html.en .lang-zh { display: none !important; }
html.en .lang-en.lang-p,
html.en .lang-en.lang-div,
html.en .lang-en.lang-li,
html.en .lang-en.lang-h1,
html.en .lang-en.lang-h2,
html.en .lang-en.lang-h3,
html.en .lang-en.lang-h4,
html.en .lang-en.lang-block { display: block !important; }
html.en .lang-en.lang-flex { display: flex !important; }
html.en span.lang-en,
html.en a.lang-en,
html.en strong.lang-en,
html.en em.lang-en,
html.en i.lang-en,
html.en label.lang-en,
html.en button.lang-en { display: inline !important; }
html.en .navbar .container { max-width: 1320px; padding-left: 14px; padding-right: 14px; }
html.en .navbar-brand { gap: 8px; }
html.en .navbar-brand img { height: 42px; }
html.en .navbar-brand span { font-size: 15px; letter-spacing: 0; }
html.en .nav-item > a { padding-left: 11px; padding-right: 11px; font-size: 14px; }
html.en .nav-search { padding-left: 6px; padding-right: 6px; }
/* Lang toggle button */
.lang-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1px solid var(--primary); border-radius: 4px;
  font-size: 12px; font-weight: 700; color: var(--primary); cursor: pointer;
  background: transparent; margin-left: 10px; user-select: none;
  transition: all .25s; letter-spacing: 0.5px;
}
.lang-toggle-btn:hover { background: var(--primary); color: #fff; }
@media (max-width: 768px) {
  .lang-toggle-btn { width: 32px; height: 32px; font-size: 10px; margin-left: 6px; }
}
@media (max-width: 1240px) {
  html.en .nav-menu { display: none; }
  html.en .nav-toggle { display: block; }
  html.en .nav-menu.active {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg-white); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 16px 0;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  html.en .nav-item { width: 100%; }
  html.en .nav-item > a { padding: 12px 20px; font-size: 15px; }
  html.en .nav-item .dropdown-menu {
    display: none;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    transition: none;
  }
  html.en .nav-item .dropdown-menu a { padding-left: 36px; }
  html.en .nav-item .dropdown-menu.open { display: block; }
}
