/* =====================================================================
   暖星心语工作室 · 温暖治愈风样式表
   主色：鼠尾草绿 (#52796F) | 点缀：暖杏色 (#D48C6A) | 底色：暖米白 (#FAF7F2)
   ===================================================================== */

:root {
  --bg-page: #FAF7F2;
  --bg-alt: #F3EDE3;
  --bg-card: #FFFFFF;
  --primary: #52796F;
  --primary-dark: #3B5B53;
  --primary-soft: #E9F0EC;
  --accent: #D48C6A;
  --accent-soft: #F9EDE6;
  --text-main: #2F3532;
  --text-muted: #5F6863;
  --text-light: #858E88;
  --border: #E6DFD3;
  --shadow-sm: 0 4px 16px rgba(47, 53, 50, 0.05);
  --shadow-md: 0 12px 32px rgba(47, 53, 50, 0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --container: 1120px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

/* 顶部吸顶导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(230, 223, 211, 0.75);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.site-nav a:hover {
  color: var(--primary);
}

.site-nav .nav-cta {
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
}

.site-nav .nav-cta:hover {
  background: var(--primary-dark);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* 首屏 Hero */
.hero {
  padding: 64px 0 76px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.32;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.hero-desc {
  margin: 0 0 30px;
  font-size: 1.03rem;
  color: var(--text-muted);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(82, 121, 111, 0.22);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--primary-dark);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.hero-card-badge {
  position: absolute;
  top: 32px;
  left: 32px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.hero-illustration {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.hero-quote {
  margin: 16px 4px 4px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* 通用板块 */
.section {
  padding: 76px 0;
  scroll-margin-top: 76px;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 44px;
}

.section-tag {
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 2.5vw, 2.05rem);
  line-height: 1.3;
  color: var(--text-main);
}

.section-subtitle {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text-muted);
}

/* 服务卡片 */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(82, 121, 111, 0.35);
}

.service-tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.service-card h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  color: var(--text-main);
}

.service-card p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-muted);
}

/* 科普文章筛选与卡片 */
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-align: left;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(82, 121, 111, 0.45);
}

.article-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.article-cat {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
}

.article-cat.autism {
  background: var(--accent-soft);
  color: #A65E3E;
}

.article-cat.counseling {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.article-time {
  font-size: 0.78rem;
  color: var(--text-light);
}

.article-card h3 {
  margin: 0 0 12px;
  font-size: 1.08rem;
  line-height: 1.45;
  color: var(--text-main);
}

.article-card p {
  margin: 0 0 18px;
  font-size: 0.91rem;
  color: var(--text-muted);
  flex: 1;
}

.article-read-more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 关于咨询师 */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: center;
}

.avatar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}

.avatar-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 18px;
}

.avatar-card h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.counselor-role {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
}

.credential-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.credential-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.credential-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.about-content .section-title {
  text-align: left;
  margin-bottom: 18px;
}

.about-paragraphs p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.97rem;
}

.ethics-box {
  margin-top: 22px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  font-size: 0.9rem;
  color: var(--primary-dark);
}

/* FAQ 折叠区 */
.faq-container {
  max-width: 840px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.faq-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--primary);
  color: #FFFFFF;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 0.94rem;
  color: var(--text-muted);
  border-top: 1px dashed rgba(230, 223, 211, 0.8);
  padding-top: 14px;
}

/* 联系方式 */
.contact-card {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 40px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 42px;
  box-shadow: var(--shadow-md);
}

.contact-info .section-title {
  text-align: left;
  margin-bottom: 14px;
}

.contact-lead {
  margin: 0 0 26px;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.contact-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-item {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.contact-item strong {
  font-size: 0.94rem;
  color: var(--text-main);
  word-break: break-all;
}

.contact-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-copy {
  padding: 5px 12px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background var(--transition);
}

.btn-copy:hover {
  background: var(--primary-dark);
}

.contact-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qr-box {
  width: 230px;
  height: 230px;
  border-radius: 20px;
  background: var(--bg-page);
  border: 1.5px dashed #C7BFA9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.qr-placeholder p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-main);
}

.qr-placeholder span {
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-light);
}

.qr-placeholder code {
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.qr-tip {
  margin: 12px 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* 页脚与免责声明 */
.site-footer {
  background: #ECE5D8;
  padding: 42px 0 32px;
  border-top: 1px solid var(--border);
}

.disclaimer-box {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.disclaimer-box strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 6px;
}

.disclaimer-box p {
  margin: 0;
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.back-top {
  color: var(--primary-dark);
  font-weight: 600;
}

/* 文章阅读弹窗 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(47, 53, 50, 0.52);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  width: 100%;
  max-width: 720px;
  max-height: 86vh;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-page);
}

.modal-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.modal-body {
  padding: 26px 28px 30px;
  overflow-y: auto;
}

.modal-body h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  line-height: 1.4;
}

.modal-meta {
  font-size: 0.84rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.modal-content p {
  margin: 0 0 14px;
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--text-main);
}

.modal-note {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: #8A4D30;
  font-size: 0.84rem;
  line-height: 1.65;
}

/* 轻提示 Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  background: var(--text-main);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 120;
  box-shadow: var(--shadow-md);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 移动端与平板自适应（微信浏览友好） */
@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card {
    padding: 28px;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 18px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px 18px 20px;
    display: none;
    box-shadow: var(--shadow-md);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .site-nav .nav-cta {
    text-align: center;
    margin-top: 6px;
  }

  .hero {
    padding: 36px 0 52px;
  }

  .section {
    padding: 54px 0;
  }

  .services-grid,
  .articles-grid,
  .contact-items {
    grid-template-columns: 1fr;
  }

  .modal-body {
    padding: 20px;
  }
}
