/* ============================================================
   common.css — 万佳净科技 全局公共样式
   基于 Bootstrap 5 扩展，适配多页面架构
   ============================================================ */

/* ===== CSS 变量 ===== */
:root {
  --blue: #0b5ed7;
  --blue-d: #0a3d91;
  --blue-dd: #082b66;
  --cyan: #19c2ff;
  --ink: #12233f;
  --mut: #5b6b84;
  --bg: #f4f7fc;
  --line: #e3eaf5;
  --grad: linear-gradient(135deg, #0a3d91 0%, #0b5ed7 55%, #19a7ff 100%);
  --grad-hero: linear-gradient(160deg, #071f49 0%, #0a3d91 55%, #0b5ed7 100%);
  --nav-height: 68px;
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-height);
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== 通用组件 ===== */

/* Kicker 标签 */
.kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--blue);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--blue);
  vertical-align: middle;
  margin-right: 10px;
}

/* 区域标题 */
.sec-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.sec-sub {
  color: var(--mut);
  max-width: 760px;
  margin-bottom: 44px;
}

/* 灰色背景区域 */
.sec-gray {
  background: var(--bg);
}

/* ===== 按钮 ===== */
.btn-pri {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: .25s;
  background: linear-gradient(90deg, #19c2ff, #0ea5e9);
  color: #fff;
  border: none;
  box-shadow: 0 10px 26px rgba(25, 194, 255, .35);
}
.btn-pri:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(25, 194, 255, .45);
  color: #fff;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: .25s;
  border: 1px solid rgba(255, 255, 255, .45);
  color: #fff;
  background: transparent;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.btn-outline-blue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: .25s;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  background: transparent;
}
.btn-outline-blue:hover {
  background: var(--blue);
  color: #fff;
}

/* ===== 导航栏 ===== */
.navbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
  min-height: var(--nav-height);
}
.navbar.scrolled {
  box-shadow: 0 6px 24px rgba(10, 61, 145, .10);
}
.navbar-brand {
  font-weight: 800;
  font-size: 17px;
  color: var(--blue-d) !important;
  line-height: 1.25;
}
.navbar-brand img {
  height: 40px;
  width: auto;
}
.navbar-brand small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--mut);
  letter-spacing: .5px;
}
.navbar .nav-link {
  padding: 8px 13px !important;
  font-size: 15px;
  color: var(--ink) !important;
  border-radius: 8px;
  transition: .2s;
  font-weight: 500;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--blue) !important;
  background: #eef4ff;
}
.navbar .btn-contact {
  background: var(--grad);
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: 999px;
  font-weight: 600;
}
.navbar .btn-contact:hover {
  filter: brightness(1.08);
}

/* 下拉菜单 */
.navbar .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(10, 61, 145, .12);
  padding: 8px;
  margin-top: 6px;
}
.navbar .dropdown-item {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--ink);
  transition: .15s;
}
.navbar .dropdown-item:hover {
  background: #eef4ff;
  color: var(--blue);
}
/* 产品中心下拉菜单在 active 页面时父级高亮 */
.navbar .nav-link.dropdown-toggle.active {
  color: var(--blue) !important;
  background: #eef4ff;
}

/* 移动端导航 */
@media (max-width: 991px) {
  .navbar-collapse {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(10, 61, 145, .12);
    margin-top: 8px;
  }
  .navbar .nav-link {
    padding: 10px 12px !important;
    border-bottom: 1px solid #f0f4fa;
  }
  .navbar .nav-link:last-child {
    border-bottom: none;
  }
  /* 修复移动端 dropdown 不显示的问题 */
  .navbar .dropdown-menu {
    position: static !important;
    float: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 0 0 16px !important;
    margin: 0 !important;
    background: transparent !important;
  }
  .navbar .dropdown-menu .dropdown-item {
    padding: 8px 12px !important;
    font-size: 14px;
    color: var(--mut) !important;
    border-radius: 8px;
  }
  .navbar .dropdown-menu .dropdown-item:hover {
    background: #eef4ff !important;
    color: var(--blue) !important;
  }
  .navbar .dropdown-toggle::after {
    float: right;
    margin-top: 8px;
  }
}

/* ===== 页面顶部 Banner ===== */
.page-hero {
  position: relative;
  padding: 80px 0 60px;
  background: var(--grad-hero);
  color: #fff;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .25;
  pointer-events: none;
}
.page-hero .container {
  position: relative;
  z-index: 2;
}
.page-hero h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.page-hero .lead {
  font-size: 17px;
  color: #cfe3ff;
}
.page-hero .kicker {
  color: #7fd8ff;
}
.page-hero .kicker::before {
  background: #7fd8ff;
}

/* 深色背景下的 kicker 调整 */
.bg-dark-custom .kicker,
section.bg-dark-custom .kicker {
  color: #7fd8ff;
}
.bg-dark-custom .kicker::before,
section.bg-dark-custom .kicker::before {
  background: #7fd8ff;
}

/* ===== 卡片通用 ===== */
.card-hover {
  transition: .25s;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(11, 94, 215, .12);
}

/* ===== 页脚 ===== */
.site-footer {
  background: #061a3c;
  color: #a9c0e4;
  padding: 56px 0 0;
}
.site-footer h5 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
}
.site-footer a {
  color: #a9c0e4;
  transition: .2s;
}
.site-footer a:hover {
  color: #fff;
}
.site-footer ul {
  list-style: none;
  padding: 0;
}
.site-footer ul li {
  margin-bottom: 10px;
  font-size: 14.5px;
}
.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.site-footer .footer-brand img {
  height: 44px;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
}
.site-footer .footer-brand b {
  color: #fff;
  font-size: 17px;
}
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: #7e96c0;
  margin-top: 40px;
}

/* ===== 灯箱 ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 14, 34, .9);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: zoom-out;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

/* ===== 图片占位 & 淡入 ===== */
img.img-placeholder,
img.img-ph {
  background: #e8eef6;
  min-height: 40px;
  color: transparent;
}
img.img-ph {
  opacity: 0;
  transition: opacity .3s ease;
}
img.img-fade-in {
  opacity: 0;
  transition: opacity .35s ease;
}
img.img-fade-in.loaded,
img.img-fade-in[src]:not([src*="data:image/svg+xml"]) {
  opacity: 1;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .page-hero h1 {
    font-size: 32px;
  }
  .sec-title {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: 60px 0 40px;
  }
  .page-hero h1 {
    font-size: 26px;
  }
  .sec-title {
    font-size: 24px;
  }
  .sec-sub {
    margin-bottom: 28px;
  }
  .navbar-brand {
    font-size: 14px;
  }
  .navbar-brand small {
    display: none;
  }
}

/* ===== 移动端 section 间距统一优化 ===== */
@media (max-width: 768px) {
  section.sys-section,
  section.pain-section,
  section.capability-section,
  section.solutions-section,
  section.detail-section,
  section.downloads-section,
  section.feat-section,
  section.prod-section,
  section.mod-section,
  section.news-section,
  section.contact-section,
  section.info-section,
  section.join-section,
  section.about-section,
  section.env-section {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
  section.pain-section {
    padding-top: 32px !important;
    padding-bottom: 48px !important;
  }
  section.detail-section {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
  section.dashboard-section {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
}

@media (max-width: 480px) {
  section.sys-section,
  section.pain-section,
  section.capability-section,
  section.solutions-section,
  section.detail-section,
  section.downloads-section,
  section.feat-section,
  section.prod-section,
  section.mod-section,
  section.news-section,
  section.contact-section,
  section.info-section,
  section.join-section,
  section.about-section,
  section.env-section {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
  section.pain-section {
    padding-top: 24px !important;
    padding-bottom: 36px !important;
  }
  section.detail-section {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
  section.dashboard-section {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
}

/* 段落首行缩进两格 */
.about-txt p,
.sys-txt p,
.page-hero .lead,
.hero-home .lead,
.pain p,
.news-desc,
.adv p,
.sd-section p {
  text-indent: 2em;
}

/* 居中的副标题不需要缩进，覆盖 */
.sec-sub,
.text-center p {
  text-indent: 0 !important;
}