/* ============================================================
   dooo design · myweb 模板公共样式
   字体 / 基础 / 对齐容器 / 桌面导航展开 / +✕ 图标 / 手机菜单
   ============================================================ */

/* ===== 自定义字体：Poppins（英文/数字）+ 阿里巴巴普惠体（中文） ===== */
@font-face {
  font-family: 'Poppins';
  src: url('/static/myweb/Fonts/Poppins-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/static/myweb/Fonts/Poppins-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Alibaba PuHuiTi';
  src: url('/static/myweb/Fonts/阿里巴巴普惠体/Alibaba-PuHuiTi-Light.otf') format('opentype');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Alibaba PuHuiTi';
  src: url('/static/myweb/Fonts/阿里巴巴普惠体/Alibaba-PuHuiTi-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Alibaba PuHuiTi';
  src: url('/static/myweb/Fonts/阿里巴巴普惠体/Alibaba-PuHuiTi-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Alibaba PuHuiTi';
  src: url('/static/myweb/Fonts/阿里巴巴普惠体/Alibaba-PuHuiTi-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Alibaba PuHuiTi';
  src: url('/static/myweb/Fonts/阿里巴巴普惠体/Alibaba-PuHuiTi-Heavy.otf') format('opentype');
  font-weight: 900;
  font-display: swap;
}

html, body { height: 100%; }
body { -webkit-font-smoothing: antialiased; }

/* 全站统一对齐容器：导航 / 主体 / 页脚共用同一组左右边界 */
.site-container {
  width: 100%;
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
}

/* 菜单长条：默认收起在 “+” 按钮内（宽度为 0），点击后从按钮处丝滑展开 */
#navMenu {
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width .55s cubic-bezier(.22,.61,.36,1),
              padding .55s cubic-bezier(.22,.61,.36,1),
              opacity .4s ease;
}
#navMenu.is-open {
  max-width: 46rem;
  padding-left: 2.5rem;
  padding-right: 1.25rem;
  opacity: 1;
}

/* 菜单展开后：整条灰色胶囊背景延伸到 “✕” 按钮下方 */
.nav-group {
  border-radius: 9999px;
  transition: background-color .5s ease;
}
.nav-group:has(#navMenu.is-open) {
  background-color: rgb(245 245 245 / .95);
}
.nav-group:has(#navMenu.is-open) #menuToggle {
  background-color: transparent;
}
.nav-group:has(#navMenu.is-open) #menuToggle:hover {
  background-color: rgb(229 229 229 / .9);
}

/* “+” / “✕” 按钮内的两条横线 */
.plus-icon {
  position: relative;
  width: 20px;
  height: 20px;
  /* 整体旋转的过渡（+ → ✕），缓动带轻微回弹更丝滑 */
  transition: transform .5s cubic-bezier(.34,1.35,.44,1);
}
.plus-icon span {
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 2px;
  background: #111;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform .5s cubic-bezier(.34,1.35,.44,1);
}
.plus-icon .bar-v { transform: translate(-50%, -50%) rotate(90deg); }
#menuToggle.is-active .plus-icon { transform: rotate(135deg); }

/* ============================================================
   加载更多：转圈 spinner + 新卡片依次入场
   ============================================================ */

/* 按钮内转圈 */
.lm-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lm-spin .7s linear infinite;
}
.lm-loading-text { letter-spacing: 0.15em; }

/* 加载完毕/无更多：禁用态（灰色、无横线、不可点） */
.lm-disabled {
  color: #a3a3a3 !important;      /* neutral-400 */
  cursor: default;
  pointer-events: none;
}
@keyframes lm-spin { to { transform: rotate(360deg); } }

/* 新条目初始态 → 入场态（JS 逐个加 .is-in 并设置 transition-delay） */
.card-enter {
  opacity: 0;
  transform: translateY(28px) scale(.985);
  transition: opacity .62s cubic-bezier(.22,.61,.36,1),
              transform .62s cubic-bezier(.22,.61,.36,1);
}
.card-enter.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .lm-spinner { animation-duration: 1.4s; }
  .card-enter { transition-duration: .01ms; transform: none; }
}
