/* ============================================================
   利浦网站 共享样式 (common.css)
   全站导航/按钮/动画/布局/响应式 统一管理
   ============================================================ */

/* ============ 基础设置 ============ */
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'HarmonyOS Sans', 'Source Han Sans CN', 'Microsoft YaHei', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    background: #0F1B2D;
    color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ 自定义工具类 ============ */
.font-num { font-weight: 200; }
.label-tag {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ============ 导航栏 ============ */
.nav-fixed {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: backdrop-filter;
}
.nav-transparent { background: transparent; border-bottom: 1px solid transparent; }
.nav-solid {
    background: rgba(15, 27, 45, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(37, 99, 235, 0.15);
}
.nav-link {
    position: relative; color: #FFFFFF; font-size: 13px;
    font-weight: 500; letter-spacing: 0.05em; transition: color 0.3s ease;
    text-decoration: none;
}
.nav-link::after {
    content: ''; position: absolute; bottom: -6px; left: 50%;
    width: 0; height: 1px; background: #2563EB;
    transition: all 0.3s ease; transform: translateX(-50%);
}
.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: #2563EB; }
.nav-link.active { color: #2563EB; }
.nav-link.active::after { width: 100%; }

/* ============ 滚动渐入动画 ============ */
.reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
/* 支持最多 8 个子元素交错动画 */
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.00s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.10s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.20s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.30s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.40s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.50s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.60s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.70s; }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* ============ 按钮 ============ */
.btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 14px 32px; background: #2563EB; color: #FFFFFF;
    font-size: 13px; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; border: 1px solid #2563EB;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1); cursor: pointer;
    text-decoration: none;
}
.btn-primary:hover {
    background: #3B82F6; border-color: #3B82F6;
    transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.5);
}
.btn-outline {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 14px 32px; background: transparent; color: #FFFFFF;
    font-size: 13px; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; border: 1px solid rgba(255,255,255,0.4);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1); cursor: pointer;
    text-decoration: none;
}
.btn-outline:hover {
    border-color: #FFFFFF; background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
}
.btn-light {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 14px 32px; background: #0F1B2D; color: #FFFFFF;
    font-size: 13px; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; border: 1px solid #0F1B2D;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1); cursor: pointer;
    text-decoration: none;
}
.btn-light:hover { background: #2563EB; border-color: #2563EB; transform: translateY(-2px); }

/* ============ 链接箭头 ============ */
.arrow-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: #2563EB; font-size: 13px; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; position: relative;
    text-decoration: none;
}
.arrow-link .arrow { display: inline-block; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.arrow-link:hover .arrow { transform: translateX(6px); }
.arrow-link::after {
    content: ''; position: absolute; left: 0; bottom: -4px;
    width: 0; height: 1px; background: #2563EB;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.arrow-link:hover::after { width: calc(100% - 24px); }

/* ============ 数字统计 ============ */
.stat-num { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* ============ 产品图片悬停 ============ */
.product-image { overflow: hidden; position: relative; }
.product-image img {
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
    filter: brightness(0.9) contrast(1.05);
}
.product-image:hover img { transform: scale(1.04); filter: brightness(1) contrast(1.1); }
.product-number { transition: color 0.4s ease; }
.product-card:hover .product-number { color: #2563EB; }

/* ============ 新闻卡片 ============ */
.news-card { transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease; }
.news-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -20px rgba(0,0,0,0.15); }

/* ============ 分类筛选按钮（新闻页） ============ */
.filter-btn {
    padding: 8px 20px; font-size: 13px; font-weight: 600; letter-spacing: 0.05em;
    border: 1px solid rgba(15,27,45,0.15); color: #475569;
    cursor: pointer; transition: all 0.3s ease; text-decoration: none;
}
.filter-btn:hover { border-color: #2563EB; color: #2563EB; }
.filter-btn.active { background: #2563EB; color: #FFFFFF; border-color: #2563EB; }

/* ============ 分隔细线 ============ */
.divider-line { width: 1px; background: rgba(255,255,255,0.15); }
.divider-line-light { width: 1px; background: rgba(0,0,0,0.1); }

/* ============ 精细网格背景 ============ */
.grid-pattern {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ============ 资质图标 ============ */
.cert-icon {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border: 1px solid #14B8A6; color: #14B8A6; flex-shrink: 0;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.cert-icon:hover,
tr:hover .cert-icon,
li:hover .cert-icon { background: #14B8A6; color: #FFFFFF; border-color: #14B8A6; }

/* ============ 文章正文排版 ============ */
.article-body p { margin-bottom: 1.5rem; }
.article-body h2 { font-size: 1.75rem; font-weight: 700; margin: 2.5rem 0 1rem; color: #0F1B2D; }
.article-body h3 { font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 1rem; color: #0F1B2D; }
.article-body h4 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 0.75rem; color: #0F1B2D; }
.article-body blockquote { border-left: 3px solid #2563EB; padding-left: 1.5rem; margin: 2rem 0; color: #475569; font-style: italic; }
.article-body ul, .article-body ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.article-body img { max-width: 100%; height: auto; border-radius: 2px; margin: 1.5rem 0; }
.article-body figure.image { margin: 1.5rem 0; }
.article-body figure.image img { margin: 0; display: block; width: 100%; }
.article-body figure.image figcaption { color: #6B7280; font-size: 13px; text-align: center; padding: 8px 0; }
.article-body a { color: #2563EB; text-decoration: underline; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.article-body th, .article-body td { border: 1px solid #ddd; padding: 8px 12px; text-align: left; }

/* ============ 规格参数表 ============ */
.spec-table th {
    font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.1em;
    padding: 14px 20px; border-bottom: 1px solid rgba(0,0,0,0.08); text-align: left;
}
.spec-table td { padding: 14px 20px; border-bottom: 1px solid rgba(0,0,0,0.08); text-align: left; }
.spec-table tbody tr:hover { background: #F1F5F9; }

/* ============ 移动端菜单 ============ */
.mobile-menu {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: #0F1B2D; z-index: 200;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column; justify-content: center; padding: 2rem;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu a {
    display: block; padding: 1rem 0; font-size: 28px; font-weight: 600;
    color: #FFFFFF; border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: color 0.3s ease, padding-left 0.3s ease;
    text-decoration: none;
}
.mobile-menu a:hover { color: #2563EB; padding-left: 12px; }

/* ============ 通用 ============ */
::selection { background: #2563EB; color: #FFFFFF; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0F1B2D; }
::-webkit-scrollbar-thumb { background: #1A2942; }
::-webkit-scrollbar-thumb:hover { background: #2563EB; }

/* 跳过导航链接（无障碍） */
.skip-link {
    position: absolute; top: -100px; left: 16px; z-index: 999;
    background: #2563EB; color: #fff; padding: 8px 16px; font-size: 14px;
    border-radius: 0 0 4px 4px; transition: top 0.3s;
}
.skip-link:focus { top: 0; }

/* ============ 中英双语切换 ============ */
/* 默认中文：隐藏英文；切到英文时隐藏中文 */
html[lang="en"] .t-zh { display: none !important; }
html:not([lang="en"]) .t-en { display: none !important; }

/* 语言切换按钮（由 common.js 注入到导航栏） */
.lang-switch {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 36px; padding: 0 12px;
    border: 1px solid rgba(255,255,255,0.25);
    color: #FFFFFF; font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em; cursor: pointer;
    background: transparent; transition: all 0.3s ease;
    font-family: inherit; text-decoration: none;
}
.lang-switch:hover { border-color: #2563EB; color: #2563EB; }
/* 导航栏透明态下保持可见 */
.nav-transparent .lang-switch { border-color: rgba(255,255,255,0.3); }
.nav-solid .lang-switch { border-color: rgba(148,163,184,0.35); }

/* 移动端菜单内的语言切换 */
.mobile-menu .lang-switch {
    align-self: flex-start; margin-bottom: 1.5rem;
    border-color: rgba(255,255,255,0.25); color: #FFFFFF;
}

/* ============ 响应式 ============ */
@media (max-width: 1023px) {
    .text-hero { font-size: 3.25rem !important; }
    .text-section { font-size: 2.5rem !important; }
    .text-numbered { font-size: 6rem !important; }
}
@media (max-width: 767px) {
    .text-hero { font-size: 2.25rem !important; }
    .text-section { font-size: 1.875rem !important; }
    .text-numbered { font-size: 4.5rem !important; }
}
