/* ==========================================================================
   案例列表页 + 案例详情页 —— 共用部分
   作用域：body.page-cases、body.page-case-detail
   包含：主题 token 覆写、导航（浅底）、页脚（浅底）、登录/注册弹窗、底部红色渐变
   ========================================================================== */

:is(body.page-cases, body.page-case-detail) {
  /* 覆写 style.css 全局 token，让复用组件在浅色页上正常显示 */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f7;
  --border: rgba(16, 16, 22, 0.08);
  --text-primary: #14141a;
  --text-secondary: #6b6b76;
  --text-muted: #a0a0aa;
  --accent: #e8382f;
  --accent-light: #ff4438;
  --accent-glow: rgba(232, 56, 47, 0.28);
  --gradient: linear-gradient(135deg, #ff5a4d 0%, #e8382f 50%, #c22a22 100%);
  --shadow-sm: 0 2px 8px rgba(16, 16, 22, 0.06);
  --shadow-md: 0 8px 24px rgba(16, 16, 22, 0.08);
  --shadow-lg: 0 16px 48px rgba(16, 16, 22, 0.12);

  background: #ffffff;
  color: var(--text-primary);
}

/* ---------- 导航（浅底） ---------- */
:is(body.page-cases, body.page-case-detail) .header {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

:is(body.page-cases, body.page-case-detail) .header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--border);
}

:is(body.page-cases, body.page-case-detail) .nav-link {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  padding: 8px 16px;
}

:is(body.page-cases, body.page-case-detail) .nav-link:hover,
:is(body.page-cases, body.page-case-detail) .nav-link.active {
  color: var(--text-primary);
  background: none;
  text-decoration: none;
}

/* 当前项下方小横线 */
:is(body.page-cases, body.page-case-detail) .nav-link.active::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  margin: 6px auto 0;
  border-radius: 2px;
  background: var(--accent);
}

:is(body.page-cases, body.page-case-detail) .logo-text {
  color: var(--text-primary);
}

:is(body.page-cases, body.page-case-detail) .nav-toggle span {
  background: var(--text-primary);
}

/* 导航右侧登录按钮：红色胶囊 */
:is(body.page-cases, body.page-case-detail) .btn-nav-auth {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  border-radius: 100px;
  padding: 9px 26px;
  box-shadow: 0 6px 18px rgba(232, 56, 47, 0.28);
}

:is(body.page-cases, body.page-case-detail) .btn-nav-auth:hover {
  color: #fff;
  background: #d62d24;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(232, 56, 47, 0.38);
}

/* ---------- 页脚（浅底，与首页一致） ---------- */
:is(body.page-cases, body.page-case-detail) .footer {
  background: #ffffff;
  border-top: none;
  padding: 64px 0 28px;
  min-height: 365px;
  color: #14141a;
}

:is(body.page-cases, body.page-case-detail) .footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 48px;
}

:is(body.page-cases, body.page-case-detail) .footer-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

:is(body.page-cases, body.page-case-detail) .footer-logo-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

:is(body.page-cases, body.page-case-detail) .footer-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

:is(body.page-cases, body.page-case-detail) .footer-logo-text {
  font-size: 2rem;
  font-weight: 800;
  color: #14141a;
  letter-spacing: -0.02em;
}

:is(body.page-cases, body.page-case-detail) .footer-slogan {
  margin-top: 16px;
  font-size: 0.9375rem;
  color: #99999f;
  font-weight: 400;
}

:is(body.page-cases, body.page-case-detail) .footer-nav {
  display: flex;
  gap: 60px;
}

:is(body.page-cases, body.page-case-detail) .footer-nav a {
  font-size: 1.125rem;
  color: #33333a;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

:is(body.page-cases, body.page-case-detail) .footer-nav a:hover {
  color: var(--accent);
}

:is(body.page-cases, body.page-case-detail) .footer-middle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 40px;
  gap: 40px;
}

:is(body.page-cases, body.page-case-detail) .footer-contact {
  display: flex;
  flex-direction: row;
  gap: 64px;
  align-items: center;
  flex-wrap: wrap;
}

:is(body.page-cases, body.page-case-detail) .footer-contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

:is(body.page-cases, body.page-case-detail) .footer-contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

:is(body.page-cases, body.page-case-detail) .footer-contact-icon svg {
  width: 20px;
  height: 20px;
}

:is(body.page-cases, body.page-case-detail) .footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

:is(body.page-cases, body.page-case-detail) .footer-contact-label {
  font-size: 0.875rem;
  color: #99999f;
  font-weight: 400;
}

:is(body.page-cases, body.page-case-detail) .footer-contact-value {
  font-size: 1rem;
  color: #14141a;
  font-weight: 500;
}

:is(body.page-cases, body.page-case-detail) .footer-phone {
  color: var(--accent);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

:is(body.page-cases, body.page-case-detail) .footer-qrcodes {
  display: flex;
  gap: 28px;
}

:is(body.page-cases, body.page-case-detail) .footer-qrcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

:is(body.page-cases, body.page-case-detail) .footer-qrcode-img {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(20, 20, 26, 0.08);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

:is(body.page-cases, body.page-case-detail) .footer-qrcode-img svg,
:is(body.page-cases, body.page-case-detail) .footer-qrcode-img img {
  width: 100%;
  height: 100%;
}

:is(body.page-cases, body.page-case-detail) .footer-qrcode span {
  font-size: 0.875rem;
  color: #88888f;
}

:is(body.page-cases, body.page-case-detail) .footer-bottom {
  border-top: 1px solid rgba(20, 20, 26, 0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

:is(body.page-cases, body.page-case-detail) .footer-bottom p {
  font-size: 0.875rem;
  color: #99999f;
  margin: 0;
}

:is(body.page-cases, body.page-case-detail) .back-to-top {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(20, 20, 26, 0.08);
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

:is(body.page-cases, body.page-case-detail) .back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

:is(body.page-cases, body.page-case-detail) .back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ---------- 底部红色渐变过渡（纯装饰） ---------- */
:is(body.page-cases, body.page-case-detail) .cases-fade {
  height: 300px;
  background:
    radial-gradient(ellipse 88% 120% at 50% 132%, #e8382f 0%, rgba(232, 56, 47, 0.9) 26%, rgba(226, 52, 44, 0.42) 52%, rgba(246, 214, 212, 0.55) 76%, transparent 96%),
    linear-gradient(180deg, #ffffff 0%, #fff9f8 100%);
  pointer-events: none;
}

/* ---------- 登录/注册弹窗 ---------- */
:is(body.page-cases, body.page-case-detail) .modal-overlay {
  background: rgba(8, 8, 12, 0.62);
}

:is(body.page-cases, body.page-case-detail) .modal {
  background: #fff;
}

:is(body.page-cases, body.page-case-detail) .modal-title {
  color: #14141a;
}

:is(body.page-cases, body.page-case-detail) .modal-desc,
:is(body.page-cases, body.page-case-detail) .modal-switch {
  color: #6b6b76;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  :is(body.page-cases, body.page-case-detail) .cases-fade {
    height: 260px;
  }
}

@media (max-width: 768px) {
  :is(body.page-cases, body.page-case-detail) .footer-main,
  :is(body.page-cases, body.page-case-detail) .footer-middle {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  :is(body.page-cases, body.page-case-detail) .footer-nav {
    flex-wrap: wrap;
    gap: 20px 28px;
  }

  :is(body.page-cases, body.page-case-detail) .cases-fade {
    height: 220px;
  }
}
