
/* 层顺序声明:必须在所有 @layer 块之前出现,决定跨文件层级
   legacy = 原 main.css 拆分规则;swiper = Swiper 库;clean = 重写的干净规则(后续迁入) */
@layer legacy, swiper, clean;

@layer legacy {
/* ==========================================================================
   Ricodisk Enterprise Theme — 01-global-hover.css
   由 main.css 自动拆分(保序连续段 1/30,作用域: global)
   ========================================================================== */
/* ==========================================================================
   Ricodisk Enterprise Theme — main.css
   整合版：消除重复规则，统一 CSS 变量
   ========================================================================== */

/* ── CSS 变量 ───────────────────────────────────────────────────────────── */
:root {
  --color-navy:       #0b1f3a;
  --color-navy-2:     #102b4f;
  --color-navy-deep:  #071427;
  --color-blue:       #e53935;
  --color-blue-dark:  #c62828;
  --color-text:       #101827;
  --color-muted:      #2d3137;
  --color-border:     #dbe3ee;
  --color-bg:         #f5f7fb;
  --color-white:      #ffffff;
  --shadow-card:      0 18px 50px rgba(11, 31, 58, 0.08);
  --shadow-soft:      0 10px 30px rgba(11, 31, 58, 0.08);
  --radius-lg:        28px;
  --radius-md:        18px;
  --radius-sm:        10px;
  --container:        1200px;
}

/* ── 基础重置 ───────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-white);
  font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-blue); }

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

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* 无障碍 */
.skip-link,
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  width: auto; height: auto;
  clip: auto;
  z-index: 1000;
  padding: 10px 16px; margin: 10px;
  background: var(--color-blue);
  color: var(--color-white);
}

/* ── Header & Nav ───────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1300;
  height: auto;
  min-height: 70px;
  background: #020c16;
  padding-top: 5px;
}

.navbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand-logo img {
  object-fit: contain;
}

.primary-nav { margin-left: auto; }

/* 隐藏导航菜单中的"联系我们"项（右侧已有按钮） */

/* hover：文字颜色轻微变深，不加任何线 */

/* 当前页：底部细线，低调标记 */
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-page-ancestor > a {
  color: #111827;
}

.primary-menu > li.current-menu-item > a::after,
.primary-menu > li.current-page-ancestor > a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  height: 1.5px;
  background: #111827;
  border-radius: 2px;
  opacity: 0.35;
}

/* 按钮 */
.header-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.header-cta,
.btn-primary {
  background: var(--color-blue);
  color: var(--color-white);
  box-shadow: 0 10px 24px rgba(229, 57, 53, 0.2);
}
.header-cta:hover,
.btn-primary:hover {
  background: var(--color-blue-dark);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
}
.nav-toggle span:not(.screen-reader-text) {
  display: block;
  width: 20px; height: 2px;
  margin: 4px auto;
  background: var(--color-navy);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--color-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 20px; height: 2px;
  background: var(--color-blue);
  flex-shrink: 0;
}

/* section 内的 eyebrow 颜色（非 hero 深色背景） */

/* Hero 右侧产品图 */

/* ── 品牌代理条（Hero 下方）────────────────────────────────────────────── */

/* ── Stats 数据条 ────────────────────────────────────────────────────────── */

/* stat 数字后缀（小字单位）*/

/* ── 通用 Section ────────────────────────────────────────────────────────── */

/* 网格 */

/* ── 产品卡片 ────────────────────────────────────────────────────────────── */
.card {
  position: relative;
  height: 100%;
  padding: 22px;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  background: var(--color-white);
  box-shadow: 0 1px 4px rgba(11, 31, 58, 0.04);
  transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(11, 31, 58, 0.1);
  border-color: rgba(229, 57, 53, 0.2);
}

.card__media {
  display: grid;
  place-items: center;
  min-height: 160px;
  margin: -4px -4px 18px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #f1f3f7;
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  padding: 12px;
}

/* 各品牌占位色块 */

.card__label {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-bottom: 8px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card h3 {
  margin: 0 0 10px;
  color: #0b1220;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--color-muted);
  font-weight: 500;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  color: var(--color-blue);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
  transition: opacity 0.15s ease, gap 0.15s ease;
}
.card__link:hover {
  opacity: 1;
  gap: 7px;
  color: var(--color-blue);
}

/* ── 产品分类 Tab 筛选条 ─────────────────────────────────────────────── */
.product-tab.is-active {
  background: #0b1220;
  border-color: #0b1220;
  color: var(--color-white);
  box-shadow: none;
}

/* Tab 产品项容器：作为 grid item，内层 card 撑满 */
.product-grid .product-tab-item.is-hidden {
  display: none !important;
}

/* ── 应用场景卡片 ────────────────────────────────────────────────────────── */
.solution-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  color: var(--color-white);
  /* 默认渐变背景，有特色图时被 inline style 覆盖 */
  background: linear-gradient(145deg, rgba(10, 31, 58, 0.96), rgba(21, 94, 239, 0.72));
  background-size: cover;
  background-position: center;
}

/* 图片上叠加深色渐变遮罩，保证文字可读 */
.solution-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.55) 60%,
    rgba(0, 0, 0, 0.82) 100%
  );
  z-index: 0;
}

.solution-card > * { position: relative; z-index: 1; }

/* ── 企业能力区 ──────────────────────────────────────────────────────────── */

/* ── 关于我们区 ──────────────────────────────────────────────────────────── */

/* ── 新闻区：1大+2小混合布局 ────────────────────────────────────────── */

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

/* ── CTA 带 ──────────────────────────────────────────────────────────────── */

/* ── 内页公共组件 ─────────────────────────────────────────────────────────── */
.page-hero {
  padding: 94px 0;
  color: var(--color-white);
  background:
    radial-gradient(circle at 80% 20%, rgba(21, 94, 239, 0.24), transparent 28%),
    linear-gradient(135deg, #08182e, #123d70);
}
.page-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}
.page-hero p {
  max-width: 700px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 18px;
}

.content-area { padding: 78px 0; }

.entry-content { max-width: 860px; margin-inline: auto; }
.entry-content h2,
.entry-content h3 { color: var(--color-navy); line-height: 1.3; }
.entry-content p,
.entry-content li { color: #334155; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.filter-note {
  margin-bottom: 28px;
  padding: 18px 22px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  color: var(--color-muted);
  background: var(--color-bg);
}

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
}

.single-sidebar {
  position: sticky;
  top: 126px;
  align-self: start;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.meta-list {
  display: grid;
  gap: 14px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.meta-list span { display: block; color: var(--color-muted); font-size: 13px; }
.meta-list strong { color: var(--color-navy); }

.pagination { margin-top: 42px; }
.nav-links { display: flex; gap: 10px; justify-content: center; }
.page-numbers {
  min-width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-weight: 700;
}
.page-numbers.current,
.page-numbers:hover {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: var(--color-white);
}

.not-found { text-align: center; padding: 80px 0; }

/* 旧版 trust-panel / product-device（保留兼容） */

/* ── 页脚 ────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-navy-deep);
  color: rgba(255, 255, 255, 0.72);
}

/* 页脚顶部品牌授权条 */

/* 页脚主网格：3 列 */

/* 联系方式图标列表 */

/* ── 响应式：平板 (≤1024px) ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .header-cta { display: none; }


  .single-layout {
    grid-template-columns: 1fr;
  }


  .archive-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 响应式：平板 (≤900px) ──────────────────────────────────────────────── */

/* ── 响应式：手机 (≤760px) ──────────────────────────────────────────────── */
@media (max-width: 760px) {

  .navbar { min-height: 68px; }

  .brand-logo img { width: 220px; }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .primary-nav {
    position: absolute;
    inset: 68px 0 auto 0;
    display: none;
    margin: 0;
    padding: 12px 20px 24px;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
  }
  /* 移动端折叠主菜单：body .psd-menu{display:flex} 优先级更高，
     这里用 body 前缀 + 类名组合提升优先级确保覆盖 */

  /* 子菜单改为静态堆叠。带 body 前缀提升优先级，
     覆盖下方 .primary-menu .sub-menu 的 absolute + hover 展开规则 */
  body .primary-nav.psd-menu .sub-menu,
  body .psd-menu .sub-menu {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
    box-shadow: none;
    border: 0;
    background: transparent;
    min-width: 0;
    padding: 0 0 8px 12px;
  }
  /* 子菜单默认折叠，由 JS 给父 li 加 .is-expanded 控制展开（移动端无 hover） */
  body .psd-menu li.is-expanded > .sub-menu,
.primary-nav.is-open,
body .primary-nav.psd-menu.is-open {
    display: block;
  }


  .archive-grid { grid-template-columns: 1fr; }
}

/* imported product spec table */

/* ==========================================================================
   PSD rebuilt homepage: semantic HTML + CSS, only key visuals as images
   ========================================================================== */
.psd-container {
  width: min(100% - 64px, 1440px);
  margin-inline: auto;
}
.psd-site-header:not(.site-header) {
  height: 100px;
  background: var(--psd-navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(7, 10, 22, 0.16);
}
.psd-nav:not(.navbar) {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 54px;
}
.psd-logo:not(.brand-logo) {
  width: 265px;
  flex: 0 0 265px;
  display: block;
}
.psd-logo:not(.brand-logo) img {
  width: 265px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.psd-menu:not(.primary-nav) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-left: auto;
  height: 100%;
}
.psd-menu:not(.primary-nav) a {
  min-width: 118px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.86);
  font-size: 16px;
  font-weight: 600;
  position: relative;
}
.psd-menu:not(.primary-nav) a + a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 31px;
  width: 1px;
  height: 44px;
  background: rgba(255,255,255,.17);
}
.psd-menu:not(.primary-nav) a:hover,
.psd-contact:hover,
.psd-menu:not(.primary-nav) a:first-child { color: #fff; }
.psd-menu:not(.primary-nav) a:first-child::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 26px;
  height: 3px;
  border-radius: 3px;
  transform: translateX(-50%);
  background: var(--psd-red);
}
.psd-contact:not(.header-cta) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 2px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
}
