/* ===== 基础样式 ===== */
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
}
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ===== 图片懒加载样式 ===== */
.lazy-image {
  opacity: 0;
  transition: opacity 0.3s ease-in;
  display: block;
}

.lazy-image.lazy-loaded {
  opacity: 1;
}

.lazy-image.lazy-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.lazy-image.lazy-error {
  opacity: 1;
  background-color: #f3f4f6;
}

/* 确保图片容器不会溢出 */
.h-64 img.lazy-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

/* 确保图标在图片之上 */
.w-12.h-12.bg-primary,
.w-12.h-12.bg-white {
  position: relative;
  z-index: 10;
}
 
/* ===== 交互元素 ===== */
.section-dot {
  transition: all 0.3s ease;
}
.section-dot.active  {
  transform: scale(1.5);
  background-color: #2563eb;
}
 
.hexagon {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition: transform 0.3s ease;
}
.hexagon:hover { transform: scale(1.05); }
 
.news-item {
  transition: transform 0.3s ease;
}
.news-item:hover { transform: translateX(10px); }
 
/* ===== 开关控件 ===== */
.custom-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.custom-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #2563eb;
}
input:checked + .slider:before {
  transform: translateX(26px);
}
input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
 
/* ===== 英雄区域 ===== */
#hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
}
#hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
  transform: translateZ(0);
  transition: opacity 0.8s ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}
#hero video.loaded  { opacity: 1; }
#hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%);
  z-index: 1;
}
 
/* ===== 加载动画 ===== */
.video-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.video-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

/* 新闻列表动画效果 */
.news-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-item:hover {
  transform: translateY(-3px);
}
 
/* 文字截断 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
 
/* 图片缩放效果 */
img {
  transition: transform 0.5s cubic-bezier(0.25, 0.45, 0.45, 0.95);
}
 
/* ===== 导航系统 ===== */
header {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 15px rgba(37, 99, 235, 0.1);
}
.nav-item {
  position: relative;
  margin: 0 4px;
}
.nav-link {
  position: relative;
  padding: 12px 16px;
  font-weight: 500;
  color: #374151;
  transition: all 0.3s ease;
  border-radius: 8px;
  font-size: 15px;
}
.nav-link:hover {
  color: #2563eb;
  background-color: rgba(37, 99, 235, 0.05);
  transform: translateY(-2px);
}
.nav-link.current  {
  color: #2563eb;
  background-color: rgba(37, 99, 235, 0.1);
  font-weight: 600;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 0;
  height: 2px;
  background-color: #2563eb;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.current::after  {
  width: calc(100% - 32px);
}
 
/* ===== 下拉菜单 ===== */
.nav-dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -5px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  padding: 8px 0;
}
.group:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: #4B5563;
  font-size: 14px;
  transition: all 0.2s ease;
  animation: slideIn 0.3s ease-out forwards;
  opacity: 0;
}
.nav-dropdown-item:hover {
  color: #2563eb;
  background-color: rgba(37, 99, 235, 0.05);
  padding-left: 20px;
}
.group::after {
  content: '';
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
  border-top: 5px solid #4B5563;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  transition: transform 0.3s ease;
}
.group:hover::after {
  transform: rotate(180deg);
  border-top-color: #2563eb;
}
 
/* ===== 移动端导航 ===== */
#mobileMenu {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
/* 确保没有其他样式覆盖 */
#mobileMenu:not(.translate-x-full) {
  transform: translateX(0);
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: #1F2937;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin: 4px 0;
}
.mobile-nav-link:hover {
  background-color: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}
.mobile-submenu {
  padding-left: 12px;
  margin-top: 4px;
  display: none;
  animation: fadeIn 0.3s ease-out;
}
.mobile-submenu.active  {
  display: block;
}
.mobile-submenu-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: #4B5563;
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.mobile-submenu-item:hover {
  background-color: rgba(37, 99, 235, 0.05);
  color: #2563eb;
  padding-left: 24px;
}
#mobileMenuButton, #closeMobileMenu {
  transition: transform 0.3s ease;
}
#mobileMenuButton:hover, #closeMobileMenu:hover {
  transform: scale(1.1);
}
 
/* ===== 按钮样式 ===== */
.btn-primary {
  background: #2563eb;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}
.btn-primary:hover::after {
  animation: ripple 1s ease-out;
}
.cta-button:hover {
  animation: pulse 1.5s infinite;
}
 
/* ===== 动画定义 ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}
 
/* ===== 延迟动画 ===== */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.nav-dropdown-item:nth-child(1) { animation-delay: 0.1s; }
.nav-dropdown-item:nth-child(2) { animation-delay: 0.15s; }
.nav-dropdown-item:nth-child(3) { animation-delay: 0.2s; }
.nav-dropdown-item:nth-child(4) { animation-delay: 0.25s; }
 
/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .nav-link {
    padding: 10px 14px;
    font-size: 14px;
  }
  .nav-dropdown {
    min-width: 200px;
  }
}
@media (max-width: 768px) {
  header { padding: 12px 0; }
  .mobile-nav-link { font-size: 16px; }
  .mobile-submenu-item { font-size: 15px; }
}
@media (max-aspect-ratio: 16/9) {
  #hero video { width: auto; height: 100%; }
}
@media (min-aspect-ratio: 16/9) {
  #hero video { width: 100%; height: auto; }
}
 
/* ===== 实用类 ===== */
.animate-fade-in { animation: fadeIn 0.8s ease-out forwards; }
.hero-title { animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }

/* ===== RemixIcon 图标保护样式 ===== */
/* 确保 RemixIcon 图标正确显示，防止被其他样式覆盖 */
[class^="ri-"]::before,
[class*=" ri-"]::before {
  font-family: 'remixicon' !important;
  font-style: normal !important;
  font-weight: normal !important;
  display: inline-block !important;
  text-rendering: auto !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

i[class^="ri-"],
i[class*=" ri-"] {
  font-family: 'remixicon' !important;
  font-style: normal !important;
  font-weight: normal !important;
  display: inline-block !important;
  text-rendering: auto !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}
/* 板块内子tab(2026-09-11 外援原稿:分段胶囊控件——灰轨+白胶囊选中;位置挪到标题区与筛选行之间) */
/* 09-14 对齐修复:宽度基准跟主内容走(HTML 挂 container mx-auto px-* 同类),不再写死 80rem——
   否则子tab 比主容器窄,胶囊右偏、管理后台左偏,两边都对不上标题行 */
.cases-subnav { padding-top: 0; background: transparent; border-bottom: none; margin: 20px 0 4px; }
.cases-subnav-inner { display: flex; align-items: center; justify-content: space-between; }
.cases-subnav-track { display: inline-flex; align-items: center; gap: 4px; background: #f7f8fa; border-radius: 9999px; padding: 4px; }
/* 09-16 蕾蕾「胶囊改成和周边一样」:图22版——选中=白底+深色描边(#c3cad6=ink-300)+阴影;未选中透明边占位防 1px 跳动 */
.cases-subnav-track a { padding: 6px 16px; font-size: 14px; color: #5b6577; text-decoration: none; border-radius: 9999px; white-space: nowrap; transition: color .2s; border: 1px solid transparent; }
.cases-subnav-track a:hover { color: #1a1f2b; }
.cases-subnav-track a.current { background: #fff; color: #1a1f2b; font-weight: 500; border-color: #c3cad6; box-shadow: 0 1px 2px rgba(15,19,28,.04), 0 1px 3px rgba(15,19,28,.05); }
/* 管理后台入口(2026-09-11 蕾蕾「找不到病例管理入口」:胶囊行右侧,仅运营/超管经 admin-entry.js 核验后显示) */
.cases-subnav a.cases-subnav-admin { border: 1px solid #2563eb; color: #2563eb; border-radius: 9999px; padding: 4px 14px; font-size: 13px; text-decoration: none; }
.cases-subnav a.cases-subnav-admin:hover { background: rgba(37,99,235,.06); color: #1d4ed8; }
.cases-subnav a.cases-subnav-admin[hidden] { display: none; }
/* ===== 2026-09-10 门户统一换皮(医疗科技感):PortalChrome 静态版 + hero ===== */
/* 2026-09-11 外援设计稿二改:导航激活=浅蓝胶囊;注册=墨黑;登录=纯文字;页底 #fafbfc */
body { background: #fafbfc; }
.pchrome { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(255,255,255,.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid #eef0f4; box-shadow: none; }
/* 09-16 蕾蕾:病例库导航与门户对齐——三栏 space-between(logo左/导航中/登录右),
   此前普通 flex+gap 让导航挤在 logo 右侧;同时撤掉 .pchrome-right 的 margin-left:auto(双推会把导航顶歪) */
.pchrome-inner { max-width: 72rem; margin: 0 auto; padding: 0 1rem; height: 56px; display: flex; align-items: center; gap: 24px; justify-content: space-between; }
@media (min-width: 640px) { .pchrome-inner { padding: 0 1.5rem; } }
.pchrome-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.pchrome-logo img { width: 30px; height: 30px; border-radius: 9999px; object-fit: cover; }
.pchrome-logo span { font-weight: 700; color: #2563eb; font-size: 15px; }
/* 09-14 隐身字修复:.pchrome-logo span(0,1,1)的蓝色会压过本规则的白色字,
   「理」变蓝底蓝字隐身——提权重到 (0,2,0) 让白色生效 */
.pchrome-logo .pchrome-logo-mark { width: 30px; height: 30px; border-radius: 9999px; background: #2563eb; color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.pchrome-logo-text { font-weight: 600; color: #0f131c !important; font-size: 15px; letter-spacing: -.01em; }
.pchrome-nav { display: none; align-items: center; gap: 4px; font-size: 14px; }
@media (min-width: 768px) { .pchrome-nav { display: flex; } }
.pchrome-nav a { color: #3e4757; text-decoration: none; padding: 8px 12px; background: none; border-radius: 6px; font-weight: 400; transition: color .2s, background .2s; }
.pchrome-nav a:hover { color: #0f131c; background: #f7f8fa; transform: none; }
.pchrome-nav a.current { color: #1e40af; background: #eff6ff; font-weight: 500; }
.pchrome-nav a::after, .pchrome-nav a.current::after { display: none; }
.pchrome-right { display: flex; align-items: center; gap: 8px; }

/* ===== 09-16 一致性:内容限宽对齐门户 1200px =====
   Tailwind .container 在 xl 断点=1280,且 tailwind-full.css 晚于本文件加载(同优先级后赢),
   故提特异性 body .container 稳压;cases 全族(库/详情/抽卡/排行)的 .container 均为内容容器,全覆盖 */
body .container { max-width: 1200px; }
.pchrome-btn { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 6px; font-size: 14px; text-decoration: none; transition: all .2s ease; }
.pchrome-btn-solid { background: #0f131c; color: #f8fafc; }
.pchrome-btn-solid:hover { background: #2a3140; }
.pchrome-btn-outline { border: none; color: #3e4757; background: transparent; }
.pchrome-btn-outline:hover { color: #0f131c; background: transparent; }

/* 标题区(原稿:白透扁平和页底融为一体;padding-top 顶开 fixed 头 56px) */
.cases-hero { background: transparent !important; border-bottom: none !important; position: relative; padding-top: 88px; }
.cases-hero::before { content: none; }
.cases-hero > * { position: relative; }
/* 整卡链接不画下划线(2026-09-11 原稿整卡 <a>:旧裁剪 CSS 没去 a 下划线,文字全被装饰线贯穿) */
a.case-card, a.case-card:hover { text-decoration: none; }
/* 根治:旧站 .group::after 是给下拉按钮画小三角的,原稿卡片带 group 类被误画尾巴——仅豁免病例卡 */
.case-card.group::after { content: none; }