/* ==========================================================================
   中科磁控官网 · UI 优化层
   设计令牌 + 组件规范  |  2026-10
   引入位置：assets/css/theme.css 之后
   ========================================================================== */

:root {
  /* 品牌色（取自 logo 蓝 #0055BC 体系） */
  --brand: #0055BC;
  --brand-dark: #004A9E;
  --brand-darker: #00377A;
  --brand-soft: #EAF2FC;
  --ink: #1B2130;
  --ink-2: #4B5261;
  --ink-3: #80879A;
  --line: #E6E9F0;
  --surface: #FFFFFF;
  --surface-2: #F6F8FB;

  /* 间距阶 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 64px;
  --sp-8: 96px;

  /* 圆角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* 阴影 */
  --sh-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --sh-md: 0 6px 16px rgba(16, 24, 40, .08);
  --sh-lg: 0 16px 40px rgba(16, 24, 40, .14);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------------------------------------------------------------
   基础排版
   --------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--brand);
  color: #fff;
}

img {
  max-width: 100%;
  height: auto;
}

p {
  color: var(--ink-2);
  margin-bottom: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  letter-spacing: .02em;
  line-height: 1.35;
}

a {
  transition: color .18s var(--ease);
}

/* 键盘可达性：统一 focus ring */
a:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.nav-link:focus-visible,
.nav-tabs .nav-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 85, 188, .3) !important;
  border-radius: var(--r-sm);
}

/* ---------------------------------------------------------------
   按钮
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: .6rem 1.5rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .03em;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
    background-color .18s var(--ease), color .18s var(--ease),
    border-color .18s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--sh-sm);
}

.btn-primary,
.btn-accent {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-primary:hover, .btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.btn-accent:hover, .btn-accent:focus {
  background-color: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
  color: #fff;
}

.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus {
  box-shadow: 0 0 0 3px rgba(0, 85, 188, .3);
}

.btn-outline-primary {
  color: var(--brand);
  border-color: var(--brand);
  background-color: transparent;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-sm {
  min-height: 36px;
  padding: .35rem 1rem;
  font-size: 14px;
}

/* ---------------------------------------------------------------
   导航
   --------------------------------------------------------------- */
.navbar {
  min-height: 72px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  padding-top: var(--sp-2);
  padding-bottom: var(--sp-2);
}

.navbar-brand img {
  height: 44px;
  width: auto;
  display: block;
}

.navbar-light .navbar-nav .nav-link {
  position: relative;
  padding: .55rem .95rem;
  font-size: 15px;
  color: var(--ink-2);
}

.navbar-light .navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: .95rem;
  right: .95rem;
  bottom: .2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .24s var(--ease);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
  color: var(--brand);
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link:focus::after,
.navbar-light .navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

.navbar-light .navbar-nav .nav-link.active {
  color: var(--brand);
  font-weight: 600;
}

.navbar.sticky.fixed {
  box-shadow: 0 4px 18px rgba(16, 24, 40, .10);
  background-color: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
}

.navbar-toggler {
  border-color: var(--line);
  border-radius: var(--r-sm);
}

/* ---------------------------------------------------------------
   页面区块 / 标题
   --------------------------------------------------------------- */
.page-section {
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-8);
}

.page-section.bg-secondary {
  background-color: var(--surface-2);
}

.subhead {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--brand);
  margin-bottom: var(--sp-2);
}

.title-section {
  color: var(--ink);
  font-weight: 700;
}

.divider {
  width: 48px;
  height: 3px;
  margin: var(--sp-3) 0;
  border-radius: var(--r-pill);
  background: var(--brand);
  opacity: .9;
}

.divider.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.text-secondary {
  color: var(--ink-2) !important;
}

/* ---------------------------------------------------------------
   内页 banner
   --------------------------------------------------------------- */
.page-banner {
  border-radius: 0;
  overflow: hidden;
}

.page-banner img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.page-banner.overlay-dark::before {
  background: linear-gradient(180deg, rgba(8, 26, 51, .25) 0%, rgba(8, 26, 51, .62) 100%);
}

.banner-section h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .3);
}

.banner-section p {
  font-size: clamp(14px, 2vw, 20px);
  font-weight: 400;
  color: rgba(255, 255, 255, .92);
}

.page-banner .breadcrumb {
  background: rgba(0, 0, 0, .28);
  border-radius: var(--r-pill);
  display: inline-flex;
  padding: .35rem 1.1rem;
  margin-bottom: var(--sp-3);
}

.page-banner .breadcrumb-item,
.page-banner .breadcrumb-item a {
  font-size: 13px;
  color: rgba(255, 255, 255, .9);
}

.page-banner .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, .6);
}

/* ---------------------------------------------------------------
   首页 banner-info 数字区
   --------------------------------------------------------------- */
.banner-info .wrap {
  padding: var(--sp-7) 0;
}

.banner-info .row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5) var(--sp-4);
  justify-items: center;
}

.banner-info .title-section {
  width: 100% !important;
  max-width: 340px !important;
  min-height: 116px;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center;
  border: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.banner-info .title-section h2 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0;
}

.banner-info .title-section p {
  font-size: 13px;
  line-height: 1.6;
  height: auto !important;
  margin: var(--sp-2) 0 0;
}

/* 统计区所有文字统一纯白 */
.banner-info .title-section,
.banner-info .title-section h2,
.banner-info .title-section span,
.banner-info .title-section p {
  color: #fff;
}

.banner-info .divider {
  width: 28px;
  height: 2px;
  margin: var(--sp-2) auto;
  background: rgba(255, 255, 255, .6);
}

@media (max-width: 991.98px) {
  .banner-info .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .banner-info .row {
    grid-template-columns: minmax(0, 1fr);
  }
  .banner-info .title-section {
    min-height: 0;
  }
  .banner-info .title-section h2 {
    font-size: 32px;
  }
}

/* ---------------------------------------------------------------
   产品卡片
   --------------------------------------------------------------- */
.features-bg {
  position: relative;
  aspect-ratio: 700 / 360;
  border-radius: var(--r-md);
  overflow: hidden;
  background-color: var(--surface-2);
  box-shadow: var(--sh-sm);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}

.features-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.features-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 20, 40, 0) 45%, rgba(10, 20, 40, .62) 100%);
  pointer-events: none;
}

.features-bg:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

.features-bg:hover img {
  transform: scale(1.05);
}

.features .features-item {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
}

.features h5 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 2px;
}

.features p {
  font-size: 12px;
  color: rgba(255, 255, 255, .75);
  margin-bottom: var(--sp-2);
}

.features a {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .5);
  padding-bottom: 2px;
}

.features a:hover {
  border-color: #fff;
}

/* ---------------------------------------------------------------
   合作伙伴 logo 墙
   --------------------------------------------------------------- */
.card-blog .header {
  margin: 0;
}

.post-thumb {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  overflow: visible;
  box-shadow: none;
  transition: transform .22s var(--ease);
}

.post-thumb img {
  display: block;
  width: 100%;
  border-radius: 0;
  opacity: .92;
  transition: opacity .22s var(--ease);
}

.post-thumb:hover {
  transform: translateY(-2px);
  box-shadow: none;
  border-color: transparent;
}

.post-thumb:hover img {
  opacity: 1;
}

/* ---------------------------------------------------------------
   解决方案卡片
   --------------------------------------------------------------- */
.solution-bg {
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}

.solution-bg img {
  display: block;
  width: 100%;
  transition: transform .5s var(--ease);
}

.solution-bg:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

.solution-bg:hover img {
  transform: scale(1.04);
}

.solution-item {
  padding: var(--sp-4) 20px var(--sp-5);
  border-radius: 0 0 var(--r-md) var(--r-md);
}

.solution-item h2 {
  font-size: 18px;
  font-weight: 700;
}

.solution-item p {
  line-height: 1.7;
  height: auto;
  font-size: 13px;
}

.service-item p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------
   服务/新闻卡片
   --------------------------------------------------------------- */
.service-item,
.news-section .news-item {
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: var(--sp-4);
}

.news-section .news-wrap img {
  border-radius: var(--r-md) var(--r-md) 0 0;
}

.news-section .news-wrap {
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}

.news-section .news-wrap:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

.news-section .news-pricing img {
  border-radius: var(--r-md);
}

.news-section .news-pricing .news-item {
  border-radius: var(--r-md);
  margin-top: var(--sp-3);
}

.news-section .news-pricing .news-item h1 {
  font-size: 17px;
}

.news-item h1 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.news-item p {
  font-size: 14px;
  color: var(--ink-2);
}

.news-link a {
  font-weight: 500;
  color: var(--brand);
}

.news-link a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* ---------------------------------------------------------------
   Tabs
   --------------------------------------------------------------- */
.nav-tabs {
  border-bottom: 1px solid var(--line);
}

.nav-tabs .nav-link {
  border: 0;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: 14px;
  padding: .45rem 1.15rem;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}

.nav-tabs .nav-link:hover {
  color: var(--brand);
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  background: var(--brand);
  color: #fff;
  font-weight: 500;
}

/* ---------------------------------------------------------------
   表单
   --------------------------------------------------------------- */
.form-control {
  min-height: 46px;
  padding: .7rem 1rem;
  border-radius: var(--r-sm);
  border-color: var(--line);
  font-size: 15px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 85, 188, .14);
}

.contact-form {
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}

/* ---------------------------------------------------------------
   联系我们页信息卡
   --------------------------------------------------------------- */
.page-section .display-4 .mai-pin,
.page-section .display-4 .mai-call,
.page-section .display-4 .mai-mail {
  font-size: 40px;
  color: var(--brand);
}

/* ---------------------------------------------------------------
   页脚
   --------------------------------------------------------------- */
.page-footer {
  padding-top: var(--sp-7);
  background-color: #0E2A4D;
}

.page-footer h5 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 18px;
}

.page-footer p {
  color: rgba(255, 255, 255, .62);
  font-size: 14px;
}

/* 页脚列表项：裸文本（如地址）也要保持浅色，不能继承深色正文 */
.page-footer .footer-menu li {
  color: rgba(255, 255, 255, .68);
  font-size: 14px;
  line-height: 1.9;
}

.footer-menu a {
  display: inline-block;
  transition: color .18s var(--ease), padding-left .18s var(--ease);
}

.footer-menu a:hover {
  color: #fff;
  padding-left: 4px;
}

#copyright {
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
  padding-top: var(--sp-4);
  margin-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, .12);
}

/* ---------------------------------------------------------------
   返回顶部
   --------------------------------------------------------------- */
.back-to-top {
  width: 48px;
  height: 48px;
  background: var(--brand);
  box-shadow: var(--sh-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top::after {
  content: "";
  position: static;
  width: 10px;
  height: 10px;
  margin: 2px 0 0;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(-45deg);
}

.back-to-top:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

.back-to-top:hover::after {
  border-color: #fff;
}

/* ---------------------------------------------------------------
   杂项
   --------------------------------------------------------------- */
.banner-seo-check {
  background-image: radial-gradient(circle, #0F74E0 15%, #004A9E);
}

.banner-seo-check h5 {
  color: #fff;
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.banner-seo-check span {
  font-size: 12px;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .75);
}

.banner-info {
  background-image: linear-gradient(135deg, #004A9E 0%, #0055BC 55%, #0F74E0 100%);
}

/* 横幅类 section 的间距交给内层 .wrap，避免双重 padding 叠加 */
.page-section.banner-info,
.page-section.banner-seo-check {
  padding-top: 0;
  padding-bottom: 0;
}

.btn-scroll:hover {
  background-color: var(--brand-dark);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------
   详情页产品与服务：与首页一致的三列等高卡片
   --------------------------------------------------------------- */
.service-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background-color: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}

.service-wrap:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

.service-bg {
  flex: 0 0 auto;
  aspect-ratio: 700 / 360;
  overflow: hidden;
}

.service-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.service-wrap:hover .service-bg img {
  transform: scale(1.05);
}

.service-wrap .service-item {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  border-radius: 0;
}

.service-wrap .service-item h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.service-wrap .service-item p {
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 0;
}

.service-wrap .news-link {
  margin-top: var(--sp-3);
}
