/* ============================================================
   extras.css —— WordPress 适配 + 入场/悬停动效（对应 framer-motion）
   ============================================================ */

/* 登录后管理条与固定导航避让 */
body.admin-bar .neo-nav {
  top: calc(1.5rem + 32px);
}
@media (max-width: 782px) {
  body.admin-bar .neo-nav {
    top: calc(1.5rem + 46px);
  }
}

/* 卡片悬停上浮（React whileHover y:-5） */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
  transform: translateY(-5px);
}

/* 滚动入场 */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
[data-animate].is-inview {
  opacity: 1;
  transform: none;
}

/* Hero 首屏动画（对应 motion initial/animate） */
@keyframes neo-slide-left {
  from { opacity: 0; transform: translateX(-50px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes neo-pop {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes neo-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes neo-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-slide-left { animation: neo-slide-left 0.5s ease both; }
.anim-pop        { animation: neo-pop 0.5s ease both; }
.anim-fade       { animation: neo-fade 0.6s ease both; }
.anim-fade-up    { animation: neo-fade-up 0.4s ease both; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.45s; }
.delay-5 { animation-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-animate] { opacity: 1; transform: none; }
}

/* ID 卡 hover 回正 */
.idcard-inner {
  transform: rotate(2deg);
  transition: transform 0.3s ease;
}
.idcard-inner:hover {
  transform: rotate(0deg);
}

/* 微信弹窗（对应 framer-motion AnimatePresence） */
.wechat-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.wechat-modal.is-open {
  display: flex;
  animation: neo-fade 0.2s ease both;
}
.wechat-modal__panel {
  background: #fff;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 #000;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 24rem;
  width: 100%;
  text-align: center;
  position: relative;
  animation: neo-pop 0.25s ease both;
}
.wechat-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.5rem;
  border-radius: 9999px;
  cursor: pointer;
  background: transparent;
}
.wechat-modal__close:hover { background: #f3f4f6; }
.wechat-modal__qr {
  background: #f3f4f6;
  border: 4px solid #000;
  border-radius: 1rem;
  padding: 1rem;
}
.wechat-modal__qr img { margin: 0 auto; width: 100%; max-width: 240px; }

/* ============================================================
   WhatsApp 联系入口（绿底白图标，参照 northsources .btn-wa
   并融合本站粗黑描边 + 硬阴影）
   ============================================================ */

/* 导航栏绿色气泡按钮 */
.neo-wa-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25d366;
  color: #fff;
  border: 3px solid #000;
  border-radius: 12px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 3px 3px 0 #000;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.neo-wa-bubble:hover {
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #000;
}
.neo-wa-bubble:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
}
@media (max-width: 640px) {
  .neo-wa-bubble { padding: 6px 8px; }
  .neo-wa-bubble__txt { display: none; }
}

/* 页脚 WhatsApp 文字链 */
.neo-wa-link { color: #128c7e; font-weight: 800; transition: color 0.15s ease; }
.neo-wa-link:hover { color: #0da06e; text-decoration: underline; }

/* 右下角悬浮 Chat on WhatsApp 胶囊 */
#wa-float {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  padding: 11px 18px 11px 13px;
  border: 3px solid #000;
  border-radius: 999px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.85);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#wa-float:hover {
  color: #fff;
  transform: translate(-1px, -2px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.85);
}
#wa-float:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.85);
}
@media (max-width: 640px) {
  #wa-float { padding: 11px; right: 14px; bottom: 16px; }
  #wa-float span { display: none; }
}

/* ============================================================
   正文排版（后台编辑器写出的文章内容）
   ============================================================ */
.entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #374151;
}
.entry-content p { margin: 0 0 1.25em; }
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: #000;
  font-weight: 900;
  line-height: 1.25;
  margin: 1.6em 0 0.6em;
}
.entry-content h1 { font-size: 2.25rem; }
.entry-content h2 { font-size: 1.75rem; }
.entry-content h3 { font-size: 1.375rem; }
.entry-content ul { list-style: disc; padding-left: 1.5rem; margin: 0 0 1.25em; }
.entry-content ol { list-style: decimal; padding-left: 1.5rem; margin: 0 0 1.25em; }
.entry-content li { margin: 0.35em 0; display: list-item; }
.entry-content a { color: #2563eb; text-decoration: underline; }
.entry-content blockquote {
  border-left: 4px solid #facc15;
  background: #fffdf0;
  padding: 0.75rem 1.25rem;
  margin: 0 0 1.25em;
  font-style: italic;
}
.entry-content img {
  border-radius: 0.75rem;
  margin: 1rem auto;
}
.entry-content pre {
  background: #111;
  color: #f5f5f5;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 0 0 1.25em;
  font-size: 0.875rem;
}
.entry-content code {
  background: #f3f4f6;
  padding: 0.15em 0.4em;
  border-radius: 0.3em;
  font-size: 0.9em;
}
.entry-content pre code { background: none; padding: 0; }
.entry-content iframe { max-width: 100%; border-radius: 0.75rem; }
