/**
 * social-share.css — 页脚社媒关注 + 文章文末分享条
 */

/* ── 页脚：关注我们 ── */
.footer-social {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--footer-border, rgba(255, 255, 255, 0.08));
}

.footer-social-title {
  margin: 0 0 0.65rem;
  font-size: var(--footer-fs-sm, 0.75rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--footer-text-muted, rgba(255, 255, 255, 0.55));
  font-weight: 600;
}

.footer-social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--footer-border, rgba(255, 255, 255, 0.12));
  background: rgba(255, 255, 255, 0.04);
  color: var(--footer-text, rgba(255, 255, 255, 0.82));
  text-decoration: none;
  font-size: var(--footer-fs-sm-plus, 0.8125rem);
  line-height: 1.2;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.footer-social-link:hover {
  color: var(--footer-text-strong, #fff);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.footer-social-icon {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.92;
}

.footer-social-link--wechat-mp .footer-social-icon { color: #07c160; }
.footer-social-link--douyin .footer-social-icon { color: #fe2c55; }
.footer-social-link--weibo .footer-social-icon { color: #e6162d; }

/* ── 微信公众号二维码弹层（全站统一） ── */
.wechat-mp-follow {
  --wxmp-ink: #1a1a1a;
  --wxmp-muted: #5c5a54;
  --wxmp-line: rgba(184, 136, 42, 0.2);
  --wxmp-gold: #b8882a;
  --wxmp-gold-soft: rgba(200, 169, 110, 0.16);
  --wxmp-wechat: #07c160;
  --wxmp-panel: #fffcf7;
  --wxmp-qr-bg: #ffffff;

  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, env(safe-area-inset-top, 0px))
    max(1.25rem, env(safe-area-inset-right, 0px))
    max(1.25rem, env(safe-area-inset-bottom, 0px))
    max(1.25rem, env(safe-area-inset-left, 0px));
  font-family: var(--sans, system-ui, -apple-system, 'Segoe UI', sans-serif);
}

.wechat-mp-follow[hidden] {
  display: none !important;
}

.wechat-mp-follow__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.wechat-mp-follow.is-open .wechat-mp-follow__backdrop {
  opacity: 1;
}

.wechat-mp-follow__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 22.5rem);
  padding: 1.65rem 1.5rem 1.45rem;
  border-radius: 1.35rem;
  border: 1px solid var(--wxmp-line);
  background:
    radial-gradient(120% 80% at 50% -10%, var(--wxmp-gold-soft), transparent 58%),
    linear-gradient(180deg, #fffefb 0%, var(--wxmp-panel) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.65) inset,
    0 1.75rem 4rem rgba(12, 14, 18, 0.22),
    0 0.35rem 1rem rgba(184, 136, 42, 0.08);
  text-align: center;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition:
    opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.wechat-mp-follow.is-open .wechat-mp-follow__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.wechat-mp-follow__glow {
  pointer-events: none;
  position: absolute;
  inset: -30% -20% auto;
  height: 55%;
  background: radial-gradient(ellipse at 50% 0%, rgba(200, 169, 110, 0.22), transparent 68%);
  opacity: 0.85;
}

.wechat-mp-follow__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #666;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.wechat-mp-follow__close:hover {
  color: var(--wxmp-ink);
  border-color: rgba(184, 136, 42, 0.35);
  background: #fff;
}

.wechat-mp-follow__close:active {
  transform: scale(0.96);
}

.wechat-mp-follow__head {
  position: relative;
  padding: 0 0.25rem;
  margin-bottom: 1.1rem;
}

.wechat-mp-follow__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
  padding: 0.28rem 0.65rem 0.28rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(7, 193, 96, 0.28);
  background: rgba(7, 193, 96, 0.08);
  color: #067a42;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.wechat-mp-follow__badge-icon {
  display: inline-flex;
  color: var(--wxmp-wechat);
}

.wechat-mp-follow__title {
  margin: 0 0 0.4rem;
  font-family: var(--serif, Georgia, 'Songti SC', serif);
  font-size: clamp(1.12rem, 2.8vw, 1.28rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--wxmp-ink);
}

.wechat-mp-follow__subtitle {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--wxmp-muted);
}

.wechat-mp-follow__qr-stage {
  display: flex;
  justify-content: center;
  margin-bottom: 0.95rem;
}

.wechat-mp-follow__qr-frame {
  position: relative;
  padding: 0.7rem;
  border-radius: 1rem;
  background: var(--wxmp-qr-bg);
  border: 1px solid rgba(26, 26, 26, 0.07);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9) inset,
    0 0.65rem 1.6rem rgba(12, 14, 18, 0.08);
}

.wechat-mp-follow__qr-frame::before {
  content: '';
  position: absolute;
  inset: 0.45rem;
  border-radius: 0.75rem;
  border: 1px dashed rgba(184, 136, 42, 0.22);
  pointer-events: none;
}

.wechat-mp-follow__qr {
  display: block;
  width: 11.25rem;
  height: 11.25rem;
  border-radius: 0.55rem;
  background: #f3f3f3;
  object-fit: contain;
}

.wechat-mp-follow__hint {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--wxmp-muted);
}

.wechat-mp-follow__perks {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid rgba(26, 26, 26, 0.06);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.5rem;
}

.wechat-mp-follow__perk {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(184, 136, 42, 0.08);
  color: #6b5a32;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
}

.wechat-mp-follow__perk-icon {
  display: inline-flex;
  color: var(--wxmp-gold);
}

/* 移动端：底部抽屉，与微信咨询弹框一致 */
@media (max-width: 768px) {
  .wechat-mp-follow {
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
  }

  .wechat-mp-follow__panel {
    width: 100%;
    max-width: none;
    border-radius: 1.35rem 1.35rem 0 0;
    padding: 1.5rem 1.35rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
  }

  .wechat-mp-follow.is-open .wechat-mp-follow__panel {
    transform: translateY(0);
  }

  .wechat-mp-follow__qr {
    width: min(11.25rem, 72vw);
    height: min(11.25rem, 72vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wechat-mp-follow__backdrop,
  .wechat-mp-follow__panel {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) and (min-width: 769px) {
  .wechat-mp-follow:not(.is-open) .wechat-mp-follow__panel {
    opacity: 0;
    transform: none;
  }

  .wechat-mp-follow.is-open .wechat-mp-follow__panel {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
  .wechat-mp-follow:not(.is-open) .wechat-mp-follow__panel {
    transform: translateY(100%);
  }

  .wechat-mp-follow.is-open .wechat-mp-follow__panel {
    transform: translateY(0);
  }
}

/* ── 文章文末分享条 ── */
.article-share {
  margin-top: clamp(1.75rem, 3.2vw, 2.35rem);
  padding: clamp(1rem, 2vw, 1.35rem) clamp(0.85rem, 1.5vw, 1.15rem);
  border-radius: var(--editorial-radius, 0.5rem);
  border: 1px solid var(--editorial-rule, var(--line));
  background: var(--editorial-wash-soft, var(--bg-2));
}

.article-share__title {
  margin: 0 0 0.85rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.share-actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg, #fafaf8);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

button.share-action {
  appearance: none;
  -webkit-appearance: none;
}

.share-action:hover {
  color: var(--ink);
  border-color: var(--ink-3);
  background: #fff;
}

.share-action:active {
  transform: scale(0.98);
}

.share-action__icon {
  display: inline-flex;
  flex-shrink: 0;
}

.share-action--wechat .share-action__icon { color: #07c160; }
.share-action--weibo .share-action__icon { color: #e6162d; }
.share-action--qq .share-action__icon { color: #12b7f5; }
.share-action--qzone .share-action__icon { color: #f5a623; }
.share-action--copy .share-action__icon { color: var(--ink-3); }
.share-action--email .share-action__icon { color: var(--accent); }

.article-share__toast {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
}

.article-share__toast[hidden] {
  display: none !important;
}

/* ── 文章文末服务号 CTA ── */
.article-mp-cta {
  margin-top: clamp(1.25rem, 2.4vw, 1.75rem);
  padding: clamp(1rem, 2vw, 1.35rem) clamp(1rem, 2vw, 1.5rem);
  border-radius: var(--editorial-radius, 0.5rem);
  border: 1px solid rgba(7, 193, 96, 0.22);
  background: linear-gradient(
    135deg,
    rgba(7, 193, 96, 0.06) 0%,
    var(--editorial-wash-soft, var(--bg-2)) 55%
  );
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
}

.article-mp-cta__title {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.article-mp-cta__sub {
  margin: 0.3rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-3);
  line-height: 1.5;
}

.article-mp-cta__btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(7, 193, 96, 0.45);
  background: #fff;
  color: #067a42;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.article-mp-cta__btn:hover {
  background: rgba(7, 193, 96, 0.08);
  border-color: rgba(7, 193, 96, 0.65);
}

.article-mp-cta__btn:active {
  transform: scale(0.98);
}

@media (max-width: 480px) {
  .share-action__label {
    font-size: 0.75rem;
  }

  .share-action {
    padding-inline: 0.6rem 0.65rem;
  }

  .article-mp-cta__btn {
    width: 100%;
  }
}
