/* ============================================================
   南京瑞德医疗官网 — 交互层配套样式 v2.0
   仅覆盖/叠加增强，不破坏原站任何结构与内容
   ============================================================ */

/* ─── 全局基础 ─────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

/* 页面进入淡入 */
body {
  animation: ryderPageFadeIn 0.45s ease-out both;
}

@keyframes ryderPageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ─── 顶部加载进度条 ─────────────────────────────────────────── */
#ryder-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #1F2B60 0%, #496EE8 50%, #1F2B60 100%);
  background-size: 200% 100%;
  z-index: 999999;
  transition: width 0.3s ease, opacity 0.4s ease;
  animation: ryderProgressShimmer 1.4s linear infinite;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(73, 110, 232, 0.6);
}

#ryder-progress-bar.done {
  width: 100% !important;
  opacity: 0;
  transition: width 0.15s ease, opacity 0.5s ease 0.2s;
}

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


/* ─── animateModule 进场动画修复 ─────────────────────────────── */
/* 原站平台 JS 离线失效，导致 opacity:0 永久。
   用 .ryder-visible 类叠加覆盖，由我们的 IntersectionObserver 触发。 */
.animateModule.ryder-visible,
.jz_hidden_content_Animate.ryder-visible {
  opacity: 1 !important;
  animation: ryderSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

/* 针对不同层级的 animateModule，给父子都加上 */
.ryder-visible > .module_wrap,
.ryder-visible > .module_content {
  opacity: 1 !important;
}

@keyframes ryderSlideUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 延迟错落感（同行多个模块） */
.animateModule:nth-child(2).ryder-visible { animation-delay: 0.08s !important; }
.animateModule:nth-child(3).ryder-visible { animation-delay: 0.16s !important; }
.animateModule:nth-child(4).ryder-visible { animation-delay: 0.24s !important; }
.animateModule:nth-child(5).ryder-visible { animation-delay: 0.32s !important; }


/* ─── 导航激活高亮 ───────────────────────────────────────────── */
.jz_nav_item.ryder-nav-active {
  position: relative;
}

.jz_nav_item.ryder-nav-active .nav_item_text_wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: #496EE8;
  border-radius: 2px 2px 0 0;
  transition: width 0.3s ease;
}

.jz_nav_item.ryder-nav-active .nav_main_name {
  color: rgba(255, 255, 255, 1) !important;
  --s_n-cf-sc-color: rgba(255, 255, 255, 1) !important;
}

/* 导航 hover 动效增强 */
.jz_nav_item .nav_item_text_wrap {
  position: relative;
  transition: all 0.2s ease;
}

.jz_nav_item:hover .nav_item_text_wrap::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  transition: width 0.25s ease;
}


/* ─── 新闻卡片 hover 升起效果 ─────────────────────────────────── */
.news_list_item_inner {
  display: block;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.news_list_item_inner:hover {
  transform: translateY(-7px) !important;
  box-shadow: 0 16px 40px rgba(31, 43, 96, 0.14) !important;
  text-decoration: none !important;
}

/* 新闻图片放大效果 */
.news_list_img_box {
  overflow: hidden;
}

.news_list_img_box .c__image_wrap {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: block;
}

.news_list_item_inner:hover .news_list_img_box .c__image_wrap {
  transform: scale(1.05) !important;
}

/* 新闻标题 hover 颜色 */
.news_list_item_inner:hover .news_list_item_title {
  color: rgba(31, 43, 96, 1) !important;
}

.news_list_item_arrow {
  transition: transform 0.25s ease;
}

.news_list_item_inner:hover .news_list_item_arrow {
  transform: translateX(5px);
}


/* ─── 产品/图片模块 hover 效果 ───────────────────────────────── */
.jz_module_style_7 .module_img_wrap {
  overflow: hidden;
  border-radius: 4px;
}

.jz_module_style_7 .c__imgeffects_wrap {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.jz_module_style_7:hover .c__imgeffects_wrap {
  transform: scale(1.03) !important;
}


/* ─── 按钮动效升级 ───────────────────────────────────────────── */
.module_button_content {
  overflow: hidden;
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease !important;
}

.module_button_content:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 43, 96, 0.2) !important;
}

.module_button_content:active {
  transform: translateY(0);
}

/* 按钮内填充水波升级 */
.module_button_content .after {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}


/* ─── 图片骨架屏占位 ─────────────────────────────────────────── */
.ryder-img-loading {
  background: linear-gradient(90deg, #f0f2f5 25%, #e8eaed 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: ryderSkeletonShimmer 1.5s infinite linear;
}

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

/* 图片加载完成淡入 */
img.ryder-img-loaded {
  animation: ryderImgFadeIn 0.4s ease-out both;
}

@keyframes ryderImgFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ─── 悬浮工具栏（升级版）──────────────────────────────────── */
.ryder-fixed-tools {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ryder-fixed-tools .tool-item {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #1F2B60 0%, #2d3f8a 100%);
  color: #FFFFFF;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(31, 43, 96, 0.3), 0 1px 3px rgba(0,0,0,0.1);
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  border: 1px solid rgba(255,255,255,0.08);
}

.ryder-fixed-tools .tool-item:hover {
  background: linear-gradient(135deg, #2d3f8a 0%, #496EE8 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 28px rgba(31, 43, 96, 0.4);
}

.ryder-fixed-tools .tool-item:active {
  transform: translateY(-1px) scale(1.02);
}

/* 工具栏图标 SVG */
.ryder-fixed-tools .tool-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* 气泡提示 */
.ryder-fixed-tools .tool-item .popover {
  display: none;
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 20, 50, 0.92);
  color: #FFFFFF;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
  animation: ryderPopoverIn 0.18s ease-out both;
}

.ryder-fixed-tools .tool-item .popover::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid rgba(10, 20, 50, 0.92);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.ryder-fixed-tools .tool-item:hover .popover {
  display: block;
}

@keyframes ryderPopoverIn {
  from { opacity: 0; transform: translateY(-50%) translateX(6px); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* 微信二维码卡片 */
.ryder-fixed-tools .tool-item .wechat-card {
  display: none;
  position: absolute;
  right: 58px;
  bottom: 0;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  text-align: center;
  width: 160px;
  animation: ryderCardPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ryder-fixed-tools .tool-item:hover .wechat-card {
  display: block;
}

.ryder-fixed-tools .wechat-card .wechat-qr-img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  background: #f0f2f5;
  display: block;
  margin: 0 auto 8px;
}

.ryder-fixed-tools .wechat-card .wechat-label {
  font-size: 12px;
  color: #555;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.5;
}

.ryder-fixed-tools .wechat-card .wechat-name {
  font-size: 13px;
  font-weight: 600;
  color: #1F2B60;
  margin-bottom: 4px;
}

/* 电话卡片 */
.ryder-fixed-tools .tool-item .phone-card {
  display: none;
  position: absolute;
  right: 58px;
  bottom: 0;
  background: linear-gradient(135deg, #1F2B60, #2d3f8a);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 12px 40px rgba(31,43,96,0.3);
  text-align: center;
  white-space: nowrap;
  animation: ryderCardPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ryder-fixed-tools .tool-item:hover .phone-card {
  display: block;
}

.ryder-fixed-tools .phone-card .phone-label {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  margin-bottom: 4px;
}

.ryder-fixed-tools .phone-card .phone-number {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

@keyframes ryderCardPopIn {
  from { opacity: 0; transform: scale(0.9) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* 返回顶部按钮 */
.ryder-fixed-tools .tool-top {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease,
              background 0.25s ease, box-shadow 0.25s ease !important;
}

.ryder-fixed-tools .tool-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ryder-fixed-tools .tool-top:hover {
  background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%) !important;
}


/* ─── 灯箱 ───────────────────────────────────────────────────── */
#ryder-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ryderFadeIn 0.2s ease-out;
  cursor: zoom-out;
}

#ryder-lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: ryderLightboxIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
  object-fit: contain;
}

#ryder-lightbox .lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

#ryder-lightbox .lb-close:hover {
  background: rgba(255,255,255,0.22);
  transform: rotate(90deg);
}

#ryder-lightbox .lb-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: rgba(0,0,0,0.4);
  padding: 6px 16px;
  border-radius: 20px;
  max-width: 80vw;
  text-align: center;
}

@keyframes ryderLightboxIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

/* 产品图片可点击提示 */
.ryder-lightbox-trigger {
  cursor: zoom-in !important;
  position: relative;
}

.ryder-lightbox-trigger::after {
  content: '🔍';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.45);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.ryder-lightbox-trigger:hover::after {
  opacity: 1;
}


/* ─── Toast 通知 ──────────────────────────────────────────────── */
#ryder-toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.ryder-toast {
  background: rgba(10, 20, 50, 0.92);
  color: #fff;
  padding: 12px 24px;
  border-radius: 40px;
  font-size: 14px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  max-width: 420px;
  text-align: center;
  line-height: 1.5;
  animation: ryderToastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ryder-toast.ryder-toast-success {
  background: rgba(16, 80, 40, 0.92);
  border-color: rgba(52, 199, 89, 0.3);
}

.ryder-toast.ryder-toast-error {
  background: rgba(80, 16, 16, 0.92);
  border-color: rgba(255, 59, 48, 0.3);
}

.ryder-toast.ryder-toast-out {
  animation: ryderToastOut 0.3s ease-in both;
}

@keyframes ryderToastIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ryderToastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-10px) scale(0.95); }
}


/* ─── 消息模态框（保留原始，小幅升级）────────────────────────── */
.ryder-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ryderFadeIn 0.2s ease-out;
}

.ryder-modal-box {
  background: #FFFFFF;
  border-radius: 16px;
  width: 90%;
  max-width: 460px;
  padding: 36px 28px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  text-align: center;
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
  animation: ryderPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ryder-modal-icon {
  font-size: 40px;
  margin-bottom: 16px;
  line-height: 1;
}

.ryder-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1F2B60;
  margin-bottom: 10px;
}

.ryder-modal-body {
  font-size: 15px;
  color: #4a5568;
  line-height: 1.75;
  margin-bottom: 28px;
}

.ryder-modal-foot {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.ryder-modal-btn {
  background: linear-gradient(135deg, #1F2B60 0%, #2d3f8a 100%);
  color: #FFFFFF;
  border: none;
  padding: 11px 36px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.22s ease;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  box-shadow: 0 4px 14px rgba(31, 43, 96, 0.28);
}

.ryder-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 43, 96, 0.38);
}

.ryder-modal-btn:active {
  transform: translateY(0);
}


/* ─── 阅读进度条（文章页）────────────────────────────────────── */
#ryder-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #1F2B60, #496EE8, #1F2B60);
  background-size: 200% 100%;
  z-index: 999998;
  border-radius: 0 3px 3px 0;
  transition: width 0.1s linear;
  animation: ryderProgressShimmer 2s linear infinite;
  box-shadow: 0 0 6px rgba(73, 110, 232, 0.5);
}


/* ─── 章节标题下划线动效 ─────────────────────────────────────── */
.fk-editor h1,
.fk-editor h2,
.fk-editor h3 {
  position: relative;
}


/* ─── 页脚区域增强 ───────────────────────────────────────────── */
.jz_web_footer a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.jz_web_footer a:hover {
  opacity: 0.8;
}


/* ─── 表单交互 ───────────────────────────────────────────────── */
.jz_form_wrap input:focus,
.jz_form_wrap textarea:focus,
.form_input_content input:focus,
.form_input_content textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(73, 110, 232, 0.25) !important;
  border-color: rgba(73, 110, 232, 0.6) !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}


/* ─── 通用工具 ───────────────────────────────────────────────── */
@keyframes ryderFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ryderPopIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* 平滑滚动锚点补偿 */
[id] {
  scroll-margin-top: 80px;
}

/* 二级导航菜单动效 */
.jz_nav .jz_sub_nav,
.nav_menu_items_wrap {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* 链接通用过渡 */
.jz_nav_item a,
.nav_item_text {
  transition: color 0.2s ease !important;
}

/* ─── 响应式微调 ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ryder-fixed-tools {
    right: 12px;
    bottom: 60px;
  }

  .ryder-fixed-tools .tool-item {
    width: 42px;
    height: 42px;
    border-radius: 8px;
  }

  #ryder-toast-container {
    width: 90vw;
  }
}

/* ─── 打印样式 ───────────────────────────────────────────────── */
@media print {
  .ryder-fixed-tools,
  #ryder-progress-bar,
  #ryder-reading-progress,
  #ryder-toast-container {
    display: none !important;
  }

  body {
    animation: none !important;
  }
}
