/* ═══════════════════════════════════════════════
   公民力量工作室 - 主样式表
   设计风格：沉稳 + 清新
   色彩：深蓝灰 / 浅米白 / 柔和蓝绿
═══════════════════════════════════════════════ */

/* 变量 */
:root {
  --primary:      #4a6fa5;
  --primary-dark: #3a5a8a;
  --accent:       #7ab0d4;
  --bg:           #f7f6f2;
  --bg-card:      #ffffff;
  --text:         #2c3040;
  --text-muted:   #6e7281;
  --border:       #dde1e9;
  --shadow:       0 2px 16px rgba(44,48,64,.08);
  --shadow-hover: 0 6px 28px rgba(44,48,64,.16);
  --radius:       10px;
  --nav-h:        68px;
  font-size: 16px;
}

/* 基础重置 */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.75;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* ─── 导航栏 ─── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1.5rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-family: 'Noto Serif SC', serif;
  font-weight: 600;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.nav-badge {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: .15rem;
  align-items: center;
}
.nav-links a {
  display: block;
  padding: .45rem .7rem;
  color: var(--text);
  font-size: .88rem;
  border-radius: 6px;
  transition: background .2s, color .2s;
}
.nav-links a:hover {
  background: var(--primary);
  color: #fff;
}
.nav-admin-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 .3rem;
  flex-shrink: 0;
}
.nav-login-btn {
  color: var(--primary) !important;
  font-weight: 500;
}
.nav-login-btn:hover {
  background: var(--primary) !important;
  color: #fff !important;
}
.nav-admin-btn {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: 6px !important;
}
.nav-admin-btn:hover {
  background: var(--primary-dark) !important;
}
.nav-logout-btn {
  color: var(--text-muted) !important;
}
.nav-logout-btn:hover {
  background: #e74c3c !important;
  color: #fff !important;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s;
}

/* ─── Hero区 ─── */
main { padding-top: var(--nav-h); }

.hero-section {
  background: linear-gradient(135deg, #eef2f9 0%, #f7f6f2 60%, #e8f4ed 100%);
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}
.hero-badge-wrap {
  flex-shrink: 0;
}
.hero-badge {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 24px rgba(74,111,165,.2);
  border: 4px solid white;
}
.hero-text { flex: 1; }
.hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .8rem;
  letter-spacing: .05em;
}
.hero-slogan {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 640px;
  margin: 0;
}

/* ─── 风采掠影 ─── */
.gallery-section {
  padding: 4rem 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.gallery-track-wrap {
  overflow: hidden;
  width: 100%;
  position: relative;
}
.gallery-track-wrap::before,
.gallery-track-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.gallery-track-wrap::before {
  left: 0;
  background: linear-gradient(to right, white, transparent);
}
.gallery-track-wrap::after {
  right: 0;
  background: linear-gradient(to left, white, transparent);
}
.gallery-track {
  display: flex;
  gap: 1.2rem;
  animation: galleryScroll 40s linear infinite;
  width: max-content;
}
.gallery-track:hover { animation-play-state: paused; }
@keyframes galleryScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.gallery-item {
  flex-shrink: 0;
  width: 280px;
  height: 190px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: white;
  font-size: .8rem;
  padding: .8rem .8rem .5rem;
}

/* ─── 板块导航 ─── */
.sections-nav {
  padding: 4rem 0 5rem;
}
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
}
.section-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--text);
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.section-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--text);
}
.sc-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: background .2s, color .2s;
}
.section-card:hover .sc-icon {
  background: var(--primary);
  color: white;
}
.sc-body { flex: 1; }
.sc-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 .25rem;
}
.sc-desc {
  font-size: .83rem;
  color: var(--text-muted);
  margin: 0;
}
.sc-arrow {
  color: var(--text-muted);
  transition: transform .2s, color .2s;
}
.section-card:hover .sc-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* ─── 小节标题 ─── */
.section-heading {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text);
}
.heading-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border));
}
.section-heading .heading-line:last-child {
  background: linear-gradient(to left, transparent, var(--border));
}

/* ─── 页面Hero ─── */
.page-hero {
  background: linear-gradient(135deg, #eef2f9, #f7f6f2);
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.9rem;
  font-weight: 700;
  margin: .5rem 0 .4rem;
}
.page-desc {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0;
  line-height: 1.8;
  font-size: .95rem;
}

/* ─── 文章卡片网格 ─── */
.content-section { padding: 3rem 0 5rem; }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.6rem;
}
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  color: var(--text);
  transition: box-shadow .25s, transform .25s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  color: var(--text);
}
.ac-cover {
  width: 100%; height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8eff9, #f0f5ea);
}
.ac-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.article-card:hover .ac-cover img { transform: scale(1.06); }
.ac-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
  opacity: .4;
}
.ac-body { padding: 1.2rem; flex: 1; }
.ac-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .4rem;
  line-height: 1.5;
}
.ac-subtitle {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: .6rem;
  line-height: 1.6;
}
.ac-meta {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ─── 文章详情 ─── */
.article-page { padding: 2rem 0 5rem; }
.article-header { margin-bottom: 2rem; }
.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  max-height: 460px;
}
.article-cover img { width: 100%; object-fit: cover; }
.article-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.article-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: .8rem;
}
.article-meta {
  color: var(--text-muted);
  font-size: .85rem;
}
.article-body {
  font-size: 1rem;
  line-height: 1.9;
  max-width: 800px;
}
.article-body h1,.article-body h2,.article-body h3 {
  font-family: 'Noto Serif SC', serif;
  margin-top: 1.8rem;
}
.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
  color: var(--text-muted);
  font-style: italic;
}
.article-media { margin-top: 2.5rem; }
.media-heading {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.media-item { border-radius: 8px; overflow: hidden; }
.media-item img { width: 100%; display: block; }
.article-back { margin-top: 3rem; }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: .9rem;
  transition: background .2s, color .2s;
}
.btn-back:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ─── 成员卡片 ─── */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.6rem;
  margin-bottom: 4rem;
}
.member-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow .25s, transform .25s;
}
.member-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.mc-photo {
  width: 100%; height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8eff9, #f0f5ea);
}
.mc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.mc-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: var(--text-muted); opacity: .3;
}
.mc-body { padding: 1.2rem; }
.mc-name {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: .3rem;
}
.mc-title-tag {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: .75rem;
  padding: .15rem .6rem;
  border-radius: 20px;
  margin-bottom: .4rem;
}
.mc-position {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.mc-bio {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ─── 加入区 ─── */
.join-section { text-align: center; padding: 2rem 0; }
.join-card {
  display: inline-block;
  background: linear-gradient(135deg, #eef2f9, #f0f5ea);
  border-radius: 16px;
  padding: 2.5rem 3rem;
  border: 1px solid var(--border);
  max-width: 560px;
}
.join-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.4rem;
  margin-bottom: .4rem;
}
.join-subtitle {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 1.2rem;
}
.join-contact {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: white;
  padding: .7rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: .95rem;
  white-space: pre-wrap;
  word-break: break-all;
}
.join-contact-hint { color: var(--text-muted); font-size: .9rem; }

/* ─── 面包屑 ─── */
.breadcrumb { font-size: .85rem; margin-bottom: .5rem; }
.breadcrumb-item.active { color: var(--text-muted); }

/* ─── 页脚 ─── */
.site-footer {
  background: #2c3040;
  color: #b0b6c8;
  padding: 2.5rem 0;
  text-align: center;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.footer-badge {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.2);
}
.footer-name {
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  color: white;
  margin: 0;
}
.footer-slogan {
  font-size: .8rem;
  color: #8890a8;
  margin: .1rem 0 0;
}
.footer-copy {
  font-size: .8rem;
  color: #6e7688;
  margin: 0;
}
.footer-links {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.footer-links a {
  color: #8890a8;
  font-size: .82rem;
  transition: color .2s;
}
.footer-links a:hover { color: white; }
.footer-dot {
  width: 3px; height: 3px;
  background: #6e7688;
  border-radius: 50%;
  display: inline-block;
}

/* ─── 空状态 ─── */
.empty-hint {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-hint i { font-size: 3.5rem; opacity: .25; display: block; margin-bottom: 1rem; }

/* ─── 登录页（集成式） ─── */
.login-main {
  padding-top: var(--nav-h);
  background: linear-gradient(135deg, #eef2f9 0%, #f0f5ea 100%);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem 2.8rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.1);
  max-width: 440px;
  margin: 3rem auto;
  border: 1px solid var(--border);
}
.login-header { text-align: center; margin-bottom: 1.8rem; }
.login-badge-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: .8rem; box-shadow: 0 4px 16px rgba(74,111,165,.15); }
.login-card-title { font-family: 'Noto Serif SC', serif; font-size: 1.5rem; margin: 0 0 .3rem; color: var(--text); }
.login-card-desc { color: var(--text-muted); font-size: .88rem; margin: 0; }
.login-alert {
  padding: .6rem 1rem;
  border-radius: 8px;
  font-size: .88rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.login-alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.login-field { margin-bottom: 1.2rem; }
.login-label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: .4rem; color: var(--text); }
.login-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.login-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,111,165,.1);
}
.login-input-icon {
  padding: 0 .8rem;
  color: var(--text-muted);
  background: var(--bg);
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
  height: 44px;
}
.login-input {
  flex: 1;
  border: none;
  outline: none;
  padding: .7rem .8rem;
  font-size: .95rem;
  color: var(--text);
  font-family: inherit;
}
.login-input::placeholder { color: #b0b6c8; }
.login-submit-btn {
  width: 100%;
  padding: .75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: background .2s, transform .1s;
  font-family: inherit;
}
.login-submit-btn:hover { background: var(--primary-dark); }
.login-submit-btn:active { transform: scale(.98); }
.login-hint {
  margin-top: 1.2rem;
  font-size: .78rem;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  line-height: 1.6;
}

/* ─── 登录页（独立旧版，保留兼容） ─── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2f9 0%, #f0f5ea 100%);
}
.login-wrap { width: 100%; max-width: 420px; padding: 1rem; }
.login-card-old {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
}
.login-footer { margin-top: 1.2rem; text-align: center; font-size: .85rem; }

/* ─── 错误页 ─── */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.error-code {
  font-size: 7rem;
  font-weight: 700;
  color: var(--primary);
  opacity: .2;
  line-height: 1;
  margin-bottom: .5rem;
}
.error-msg { font-size: 1.3rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* ─── 响应式 ─── */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: white; padding: .8rem; border-bottom: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,.1); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero-inner { flex-direction: column; text-align: center; gap: 1.5rem; }
  .hero-badge { width: 120px; height: 120px; }
  .hero-title { font-size: 1.6rem; }
  .gallery-item { width: 220px; height: 150px; }
  .sections-grid { grid-template-columns: 1fr; }
  .join-card { padding: 1.8rem 1.2rem; }
}
