/* ==========================================
   ncyds 主题样式优化 - 参照 laihangkeji.com
   现代、简洁、专业风格
   ========================================== */

/* ========== 1. 全局基础 ========== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --primary-gradient-hover: linear-gradient(135deg, #1d4ed8 0%, #0891b2 100%);
  --secondary: #0f172a;
  --accent: #06b6d4;
  --accent-light: #ecfeff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg-light: #f8fafc;
  --bg-section: #f1f5f9;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 12px 40px rgba(37, 99, 235, 0.12);
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background: #fff;
}

/* ========== 2. 导航栏 ========== */
.navbar {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.04) !important;
  transition: var(--transition);
}

/* ========== 2. 导航栏（双层结构） ========== */

/* 固定头部容器 */
.header-fixed-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

/* ---- 顶部联系栏 ---- */
.top-bar {
  background: #fff;
  color: #64748b;
  font-size: 13px;
  padding: 6px 0;
  line-height: 1;
  border-bottom: 1px solid #f1f5f9;
}

.top-bar a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.3s;
}

.top-bar a:hover {
  color: #2563eb;
}

.top-bar-info span {
  display: inline-block;
}

.top-bar-info .fa {
  margin-right: 1px;
  color: var(--primary-light);
}

.top-bar-slogan {
  color: #2563eb !important;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.top-bar-slogan .fa {
  color: #ef4444 !important;
}

/* ---- 主导航 ---- */
.main-navbar {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06) !important;
  transition: var(--transition);
  padding: 0.3rem 1rem;
}

.main-navbar .navbar-brand {
  padding-top: 0;
  padding-bottom: 0;
}

.main-navbar .navbar-brand .site-title {
  color: var(--primary) !important;
  font-weight: 700;
  font-size: 1.5em;
  letter-spacing: -0.5px;
  margin-bottom: 0;
  line-height: 1.2;
}

.main-navbar .navbar-brand .site-slogan {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 2px;
  white-space: nowrap;
}

.main-navbar .navbar-nav .nav-link {
  position: relative;
  font-size: 16px !important;
  font-weight: 500;
  padding: 0.8rem 1.3rem !important;
  color: var(--text-secondary) !important;
  transition: var(--transition);
}

.main-navbar .navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 2px;
  transition: var(--transition);
}

.main-navbar .navbar-nav .nav-link:hover,
.main-navbar .navbar-nav .active .nav-link {
  color: var(--primary) !important;
}

.main-navbar .navbar-nav .nav-link:hover::after,
.main-navbar .navbar-nav .active .nav-link::after {
  transform: translateX(-50%) scaleX(1);
}

.main-navbar .navbar-nav .dropdown-menu {
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius-sm);
  padding: 8px;
  animation: dropdownIn 0.2s ease;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.main-navbar .navbar-nav .dropdown-item {
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  transition: var(--transition);
}

.main-navbar .navbar-nav .dropdown-item:hover {
  background: var(--accent-light);
  color: var(--primary) !important;
}

.main-navbar .navbar-nav .active .nav-link {
  color: var(--primary) !important;
}

/* Logo图片适配 */
.main-navbar .navbar-brand .logo-sm-height {
  height: 48px !important;
  transition: var(--transition);
}

/* 占位：顶部栏(~32px) + 导航栏(~62px) */
.header-placeholder {
  height: 82px;
}

/* ========== 3. 幻灯片/横幅 ========== */
.slideshow {
  height: 520px;
  object-fit: cover;
}

.swiper-container {
  position: relative;
}

.swiper-container .swiper-slide {
  position: relative;
}

/* 淡入淡出效果：让图片叠在一起 */
.swiper-container-fade .swiper-slide {
  opacity: 0 !important;
  transition-property: opacity !important;
}
.swiper-container-fade .swiper-slide-active {
  opacity: 1 !important;
}

/* 文字的初始状态由JS控制，这里只设过渡 */
.swiper-slide h1,
.swiper-slide h4,
.swiper-slide a.d-inline-block {
  will-change: transform, opacity;
}

.swiper-container .swiper-slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.75) 0%, rgba(15,23,42,0.4) 40%, rgba(15,23,42,0.15) 70%, transparent 100%);
  pointer-events: none;
}

.swiper-container .position-absolute {
  z-index: 2;
}

.swiper-container .position-absolute h1 {
  font-weight: 700;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 0.5rem;
}

.swiper-container .position-absolute h4 {
  font-weight: 400;
  opacity: 0.9;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

/* Banner了解更多按钮 */
.swiper-slide a[style*="border-radius:50px"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5) !important;
}

.swiper-slide a[style*="border-radius:50px"]:hover span {
  transform: translateX(4px);
}

.swiper-button-prev,
.swiper-button-next {
  width: 50px !important;
  height: 50px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(10px);
  border-radius: 50%;
  transition: var(--transition);
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.1);
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 18px !important;
  color: #fff;
}

.swiper-pagination-bullet {
  width: 10px !important;
  height: 10px !important;
  background: rgba(255, 255, 255, 0.5) !important;
  opacity: 1 !important;
  transition: var(--transition);
}

.swiper-pagination-bullet-active {
  background: #fff !important;
  width: 28px !important;
  border-radius: 5px !important;
}

/* ========== 4. 区块标题 ========== */
section .fs-26.fs-sm-28 {
  position: relative;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: inline-block;
}

section .fs-26.fs-sm-28::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
  margin: 12px auto 0;
}

/* 各区块标题颜色统一为主色 */
section .text-success,
section .text-info,
section .text-warning {
  color: var(--primary) !important;
}

section .text-secondary.fs-14.fs-sm-16 {
  color: var(--text-muted) !important;
  font-size: 1rem !important;
  letter-spacing: 2px;
}

/* ========== 5. 卡片样式 ========== */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  overflow: hidden;
  background: #fff;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

.card-img-150 {
  height: 200px;
  overflow: hidden;
}

.card-img-150 img,
.card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-150 img,
.card:hover .card-img-top {
  transform: scale(1.08);
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-title a {
  color: var(--text-primary);
  transition: var(--transition);
}

.card-title a:hover {
  color: var(--primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

.card .badge {
  font-weight: 500;
  border-radius: 4px;
}

/* 卡片内图片全面适配 */
.card-img-top {
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* ========== 6. 按钮 ========== */
.btn {
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-info {
  background: var(--primary-gradient) !important;
  border: none !important;
  color: #fff !important;
}

.btn-info:hover {
  background: var(--primary-gradient-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.btn-light {
  background: var(--bg-light) !important;
  border: 1px solid #e2e8f0 !important;
  color: var(--text-secondary) !important;
}

.btn-light:hover {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border: none !important;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

/* 查看更多按钮 */
section h4 a.text-secondary {
  color: var(--primary) !important;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}

section h4 a.text-secondary::after {
  content: ' →';
  transition: var(--transition);
  opacity: 0;
  margin-left: -12px;
}

section h4 a.text-secondary:hover::after {
  opacity: 1;
  margin-left: 4px;
}

/* ========== 7. 关于我们区块 ========== */
section.bg-light {
  background: var(--bg-section) !important;
}

section .text-secondary.lh-2 {
  color: var(--text-secondary) !important;
  font-size: 1rem;
  line-height: 2 !important;
}

/* ========== 8. 新闻列表 ========== */
.media {
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.media:hover {
  background: var(--bg-light);
}

.media h5 a {
  color: var(--text-primary);
  font-weight: 600;
  transition: var(--transition);
}

.media h5 a:hover {
  color: var(--primary);
}

.media-body p a {
  color: var(--text-secondary) !important;
  transition: var(--transition);
}

.media-body p a:hover {
  color: var(--primary) !important;
}

/* ========== 9. 页脚 ========== */
.footer {
  background: var(--secondary) !important;
  color: #cbd5e1 !important;
  border-top: none !important;
  padding-top: 3rem !important;
}

.footer h5 {
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer ul li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer a {
  color: #94a3b8 !important;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--primary-light) !important;
  text-decoration: none;
}

.footer .code {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: 8px;
  display: inline-block;
}

.footer .code img {
  border-radius: 4px;
}

.footer .small {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.footer .copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-muted) !important;
  font-size: 0.85rem;
  padding: 1rem 0;
}

/* ========== 10. 在线客服 ========== */
.online {
  position: fixed;
  bottom: 150px;
  right: 20px;
  width: 56px;
  z-index: 999;
}

.online dl {
  background: var(--primary-gradient) !important;
  border-radius: 12px !important;
  padding: 10px 5px !important;
  margin-bottom: 8px !important;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
  transition: var(--transition);
  cursor: pointer;
}

.online dl:hover {
  transform: translateX(-4px);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4);
}

.online dl dd {
  color: #fff !important;
  font-size: 11px !important;
}

.online dl dd i {
  font-size: 22px !important;
}

.online dl dt {
  right: 64px !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.online dl dt h3 {
  color: var(--text-primary) !important;
  border-bottom-color: #e2e8f0 !important;
}

.online dl dt button {
  background: var(--primary-gradient) !important;
  border-radius: 6px !important;
}

/* 返回顶部 */
.online .scroll-top {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px);
  border: 1px solid #e2e8f0 !important;
}

.online .scroll-top dd {
  color: var(--text-secondary) !important;
}

.online .scroll-top:hover {
  background: #fff !important;
}

/* ========== 11. 移动端底部导航 ========== */
.bg-info.fixed-bottom {
  background: var(--primary-gradient) !important;
}

.bg-info.fixed-bottom a {
  font-size: 13px;
}

/* ========== 12. 面包屑/位置 ========== */
.position,
.position a {
  color: var(--text-muted) !important;
  font-size: 0.875rem;
}

.position a:hover {
  color: var(--primary) !important;
}

/* ========== 13. 内容页面 ========== */
.pages {
  min-height: 500px;
}

.content {
  color: var(--text-secondary);
  line-height: 2;
  font-size: 1rem;
}

.content h2,
.content h3,
.content h4 {
  color: var(--text-primary);
  font-weight: 600;
}

/* ========== 14. 分类导航 ========== */
.sonsort .btn {
  margin-right: 6px;
  border-radius: 20px !important;
  font-size: 0.875rem;
  padding: 0.35rem 1.2rem;
}

/* ========== 15. 分页 ========== */
.page-link {
  color: var(--text-secondary) !important;
  border: 1px solid #e2e8f0 !important;
  padding: 0.5rem 0.9rem !important;
  margin: 0 2px;
  border-radius: 6px !important;
  transition: var(--transition);
  font-size: 0.875rem;
}

.page-link:hover {
  background: var(--bg-light) !important;
  color: var(--primary) !important;
  border-color: var(--primary-light) !important;
}

a.page-num:hover,
.page-link:hover {
  text-decoration: none;
}

.page-num-current {
  background: var(--primary-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.page-num-current:hover {
  color: #fff !important;
  opacity: 0.9;
}

/* ========== 16. 横幅/大屏 ========== */
.jumbotron {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
}

.jumbotron::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.05);
}

.jumbotron .container {
  position: relative;
  z-index: 1;
}

.jumbotron h1 {
  font-weight: 700;
}

/* ========== 17. 标签 ========== */
.badge {
  font-weight: 500;
  border-radius: 4px;
}

.badge-secondary {
  background: var(--bg-section) !important;
  color: var(--text-secondary) !important;
  border: 1px solid #e2e8f0;
}

.badge-secondary:hover {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary);
}

/* ========== 18. 表单元素 ========== */
.form-control {
  border-radius: var(--border-radius-sm);
  border: 1px solid #e2e8f0;
  padding: 0.6rem 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ========== 19. 分隔线 ========== */
.border-bottom {
  border-bottom-color: #e2e8f0 !important;
}

.border-info {
  border-color: var(--primary-light) !important;
}

/* ========== 20. 响应式优化 ========== */
@media only screen and (max-width: 768px) {
  .slideshow {
    height: 280px;
  }

  .swiper-container .position-absolute {
    padding-left: 30px !important;
    max-width: 85% !important;
  }

  .swiper-container .position-absolute h1 {
    font-size: 1.3rem !important;
  }

  .swiper-container .position-absolute h4 {
    font-size: 0.85rem !important;
  }

  .main-navbar .navbar-brand .site-title {
    font-size: 1.2em;
  }

  .main-navbar {
    padding: 0.2rem 0.5rem;
  }

  .main-navbar .navbar-nav .nav-link {
    font-size: 15px !important;
    padding: 0.5rem 0.8rem !important;
  }

  .top-bar {
    font-size: 12px;
    padding: 5px 0;
  }

  .header-placeholder {
    height: 88px;
  }

  .card-img-150 {
    height: 180px;
  }

  .online {
    right: 10px;
    width: 48px;
  }

  .online dl {
    padding: 8px 4px !important;
  }

  .online dl dd i {
    font-size: 18px !important;
  }

  .online dl dd {
    font-size: 10px !important;
  }

  section .fs-26.fs-sm-28 {
    font-size: 1.4rem !important;
  }
}

@media only screen and (max-width: 576px) {
  .slideshow {
    height: 200px;
  }

  .card-img-150 {
    height: 160px;
  }

  .footer {
    text-align: center;
  }

  .footer h5::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .top-bar-right {
    display: none;
  }

  .top-bar-info {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    font-size: 11px;
  }

  .top-bar-info span {
    white-space: nowrap;
  }

  .top-bar-info .ml-3 {
    margin-left: 6px !important;
  }

  .header-placeholder {
    height: 82px;
  }
}

/* 平板及手机：顶部栏隐藏标语，显示在公司名称下方 */
@media only screen and (max-width: 991px) {
  .top-bar-slogan {
    display: none !important;
  }
}

/* ========== 21. 案例卡片 ========== */
.case-card { border-radius:12px; box-shadow:0 2px 15px rgba(0,0,0,0.05); transition:all 0.3s ease; background:#fff; height:100%; display:flex; flex-direction:column; overflow:hidden; }
.case-card:hover { box-shadow:0 8px 30px rgba(37,99,235,0.10); transform:translateY(-3px); }
.case-card-body { padding:24px; flex:1; display:flex; flex-direction:column; }
.case-card-body h5 { font-size:1.05rem; font-weight:700; color:#0f172a; margin-bottom:10px; line-height:1.4; }
.case-card-body h5 span { color:#2563eb; margin-right:6px; }
.case-card-body p { font-size:0.88rem; color:#475569; line-height:1.8; flex:1; margin-bottom:16px; }
.case-card-body a { color:#64748b; font-size:0.85rem; font-weight:500; text-decoration:none; display:inline-flex; align-items:center; gap:4px; align-self:flex-end; }
.case-card-body a i { transition:transform 0.3s; font-size:12px; }
.case-card-body a:hover i { transform:translateX(4px); }

/* ========== 22. 产品详情页 ========== */
.view {
  max-width: 100%;
}

.view .swiper-slide {
  border-radius: var(--border-radius);
  overflow: hidden;
}

/* ========== 22. 案例页图片列表 ========== */
.figure {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.figure:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.figure .card-img-200 {
  overflow: hidden;
}

.figure .card-img-200 img {
  transition: transform 0.5s ease;
}

.figure:hover .card-img-200 img {
  transform: scale(1.08);
}

.figure-caption {
  padding: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.figure-caption a {
  color: var(--text-primary);
  transition: var(--transition);
}

.figure-caption a:hover {
  color: var(--primary);
}

/* ========== 23. 列表页 ========== */
ul .lh-3.border-bottom-dashed {
  padding: 0.6rem 0;
  border-bottom: 1px solid #f1f5f9 !important;
  transition: var(--transition);
}

ul .lh-3.border-bottom-dashed:hover {
  padding-left: 8px;
  background: var(--bg-light);
  border-radius: 6px;
}

ul .lh-3.border-bottom-dashed a {
  color: var(--text-primary);
  transition: var(--transition);
}

ul .lh-3.border-bottom-dashed:hover a {
  color: var(--primary);
}

/* ========== 24. WoW动画增强 ========== */
.wow {
  visibility: visible !important;
}
