/*
Theme Name: SDSCA 学会门户
Theme URI: https://www.sdsca.cn/
Author: 山东省干细胞学会
Description: 山东省干细胞学会 WordPress 门户主题。页眉、首页模块、文章栏目、颜色与页脚均可在后台维护。
Version: 1.2.0
Text Domain: sdsca
*/
:root {
  --green: #11503b;
  --green-dark: #103b2e;
  --lime: #86bc42;
  --ink: #183d30;
  --muted: #6c7b75;
  --line: #dfe8e3;
  --wash: #edf4f0;
  --white: #fff;
  --page-bg: #f8faf8;
  --hero-bg: #edf4f0;
  --shell: 1180px;
  --header-height: 116px;
  --logo-width: 390px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page-bg); color: #17251f; font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
.shell { width: min(var(--shell), calc(100% - 40px)); margin: auto; }

.site-header { position: sticky; top: 0; z-index: 20; background: var(--green-dark); background: color-mix(in srgb, var(--green-dark) 97%, transparent); color: #fff; box-shadow: 0 8px 28px rgba(9,49,35,.15); }
.sdsca-header-static .site-header { position: relative; }
.header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 14px 0; }
.brand-wrap { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand, .custom-logo-link { display: block; flex: 0 1 auto; }
.brand img, .custom-logo { display: block; width: min(var(--logo-width),58vw); max-height: calc(var(--header-height) - 28px); height: auto; object-fit: contain; }
.header-tagline { max-width: 180px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.75); font-size: 13px; line-height: 1.6; }
.nav-wrap { display: flex; align-items: center; gap: 18px; }
.primary-menu { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.primary-menu > li { position: relative; padding: calc((var(--header-height) - 24px) / 2) 0; }
.primary-menu a { display: block; font-size: 15px; color: rgba(255,255,255,.9); }
.primary-menu a:hover, .primary-menu a:focus-visible { color: #b9df73; }
.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: -18px;
  z-index: 30;
  display: block;
  visibility: hidden;
  min-width: 200px;
  margin: 0;
  padding: 10px;
  list-style: none;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 0 0 12px 12px;
  background: var(--green-dark);
  box-shadow: 0 18px 40px rgba(0,0,0,.2);
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; }
.primary-menu .sub-menu li { position: relative; }
.primary-menu .sub-menu a { padding: 10px 12px; white-space: nowrap; }
.primary-menu .sub-menu .sub-menu { top: -10px; left: calc(100% + 10px); border-radius: 12px; }
.header-cta { flex: 0 0 auto; padding: 10px 15px; border-radius: 9px; background: var(--lime); color: #14372b; font-size: 14px; font-weight: 700; }
.menu-toggle { display: none; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; background: transparent; color: #fff; padding: 9px 12px; }

.hero { position: relative; overflow: hidden; background: var(--hero-bg); }
.hero-slide { position: relative; display: none; background: var(--hero-bg); }
.hero-slide.is-active { display: block; }
.hero img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; object-fit: contain; }
.hero-overlay { position: absolute; inset: 0; display: flex; align-items: center; background: linear-gradient(90deg, rgba(5,32,23,.7), rgba(5,32,23,.1) 65%, transparent); color: #fff; }
.hero-copy { max-width: 650px; padding: 40px 0 65px; }
.hero-copy h1 { margin: 0 0 14px; font-size: clamp(30px,4vw,54px); line-height: 1.3; }
.hero-copy p { max-width: 580px; margin: 0 0 24px; color: rgba(255,255,255,.86); font-size: 18px; line-height: 1.8; }
.hero-button { display: inline-flex; padding: 12px 20px; border-radius: 10px; background: var(--lime); color: #15382c; font-weight: 700; }
.hero-dots { position: absolute; bottom: 20px; left: 50%; z-index: 2; display: flex; gap: 8px; transform: translateX(-50%); }
.hero-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.6); cursor: pointer; transition: width .2s ease; }
.hero-dots button.is-active { width: 32px; background: #fff; }

.quick-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; padding: 40px 0; }
.quick-card { display: flex; align-items: center; gap: 18px; border: 1px solid #dbe7e1; border-radius: 16px; background: #f9fbfa; padding: 22px; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.quick-card:hover { border-color: var(--lime); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(19,72,51,.08); }
.quick-card strong { display: block; color: #173e30; font-size: 18px; }
.quick-card span { display: block; margin-top: 6px; color: #75847e; font-size: 14px; }

.content-section { padding: 72px 0; background: #fff; }
.content-section.alt { background: var(--wash); }
.home-page-content { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section-head > a { flex: 0 0 auto; color: var(--green); font-weight: 700; }
.kicker { color: #6f9e36; color: color-mix(in srgb, var(--lime) 75%, #355c28); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.section-head h2, .page-title { margin: 8px 0 0; color: var(--ink); font-family: "STKaiti","KaiTi",serif; font-size: 38px; }
.post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.post-card { min-height: 220px; display: flex; flex-direction: column; border: 1px solid #dce7e1; border-radius: 16px; background: #fff; padding: 25px; box-shadow: 0 12px 34px rgba(19,72,51,.06); }
.post-card h3 { margin: 16px 0 10px; color: var(--ink); font-size: 18px; line-height: 1.75; }
.post-card p { margin: 0 0 20px; color: #697871; line-height: 1.75; }
.post-card .more { margin-top: auto; color: var(--green); font-size: 14px; font-weight: 700; }
.date { color: #788881; font-size: 14px; }

.page-hero { padding: 56px 0; background: #eaf2ee; }
.content-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 46px; padding: 56px 0; }
.article { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 42px 52px; box-shadow: 0 16px 44px rgba(17,80,59,.05); }
.article h1 { margin: 0; color: var(--ink); font-size: clamp(28px,3.4vw,42px); line-height: 1.4; }
.article .entry-meta { margin: 20px 0 34px; padding-bottom: 22px; border-bottom: 1px solid #e4ebe7; color: #819089; font-size: 14px; }
.entry-content { font-size: 17px; line-height: 2; color: #33443d; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content img { max-width: 100%; height: auto; border-radius: 12px; }
.entry-content .alignwide { width: min(calc(100vw - 40px), calc(var(--shell) + 160px)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.sidebar { height: max-content; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 24px; }
.sidebar h2 { border-left: 4px solid var(--lime); padding-left: 12px; color: var(--ink); font-size: 18px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { border-top: 1px solid #e5ece8; padding: 14px 0; line-height: 1.7; color: #52635c; }
.archive-list article { display: grid; grid-template-columns: 145px 1fr auto; gap: 20px; align-items: center; padding: 28px 0; border-bottom: 1px solid #e0e8e4; }
.archive-list h2 { margin: 0; color: var(--ink); font-size: 19px; }

.site-footer { margin-top: 70px; background: var(--green-dark); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .9fr; gap: 40px; padding: 56px 0; }
.footer-logo { display: block; width: 100%; max-width: 390px; height: auto; }
.site-footer p, .site-footer li, .site-footer a { color: rgba(255,255,255,.7); line-height: 1.8; }
.copyright { padding: 20px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; color: rgba(255,255,255,.55); font-size: 14px; }

@media (max-width:1100px) {
  .menu-toggle { display: block; }
  .nav-wrap { display: none; position: absolute; top: var(--header-height); left: 0; right: 0; max-height: calc(100vh - var(--header-height)); overflow: auto; background: var(--green-dark); padding: 18px 20px; }
  .nav-wrap.is-open { display: block; }
  .primary-menu { width: min(var(--shell),100%); margin: auto; display: grid; grid-template-columns: repeat(2,1fr); align-items: start; }
  .primary-menu > li { padding: 5px 0; }
  .primary-menu .sub-menu, .primary-menu .sub-menu .sub-menu { position: static; display: block; visibility: visible; min-width: 0; margin-top: 8px; padding: 4px 0 4px 14px; border: 0; border-left: 1px solid rgba(255,255,255,.2); border-radius: 0; background: transparent; box-shadow: none; opacity: 1; transform: none; pointer-events: auto; }
  .primary-menu .sub-menu a { white-space: normal; }
  .header-cta { display: block; width: min(var(--shell),100%); margin: 18px auto 0; text-align: center; }
  .post-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width:760px) {
  .shell { width: calc(100% - 28px); }
  .header-tagline { display: none; }
  .quick-grid, .post-grid, .footer-grid, .content-layout { grid-template-columns: 1fr; }
  .primary-menu { grid-template-columns: 1fr; }
  .archive-list article { grid-template-columns: 1fr; }
  .article { padding: 30px 22px; }
  .section-head { align-items: start; }
  .section-head h2, .page-title { font-size: 31px; }
  .hero-copy p { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
