/* =============================================================
   knauf.css — 跨页共享样式（header / nav / footer / btn / 基础）
   命名约定：组件 kebab-case，子元素 __双下划线，状态 is- 前缀，修饰 --双短横
   ============================================================= */

:root {
  --brand:        #004a9f;
  --brand-hover:  #0064c8;
  --brand-cyan:   #00a0e0;
  --brand-navy:   #00285e;
  --brand-deep:   #001d40;
  --brand-soft:   #eaf2fb;

  --text:         #484848;
  --text-2:       #484848;
  --text-3:       #484848;
  --line:         #e6e6e6;
  --white:        #fff;
  --bg-soft:      #f7f8fa;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 40px; }

/* ===== 顶部 Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 28px;
  height: 72px;
}
.brand-logo {
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  font-size: 21px; font-weight: 800;
  color: var(--brand);
  letter-spacing: -.01em;
  line-height: 1;
}

/* ===== 顶部导航 ===== */
.nav-menu {
  flex: 1;
  display: flex; align-items: center; gap: 4px;
}
.nav-menu__item { position: relative; }
.nav-menu__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 600;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 4px;
  white-space: nowrap;
  transition: color .15s;
}
.nav-menu__link:hover,
.nav-menu__link.is-current { color: var(--brand); }

.nav-item__chev {
  width: 10px; height: 10px;
  transition: transform .15s;
  fill: currentColor;
}
.nav-menu__item:hover .nav-item__chev { transform: rotate(180deg); }

/* 下拉菜单 */
.nav-item__dropdown {
  position: absolute; top: 100%; left: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .10);
  padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: all .18s;
  z-index: 50;
}
.nav-menu__item:hover .nav-item__dropdown,
.nav-menu__item:focus-within .nav-item__dropdown {
  opacity: 1; visibility: visible;
  transform: translateY(0);
}
.nav-item__dropdown a {
  display: block;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text-2);
  border-radius: 4px;
  transition: background .15s, color .15s;
}
.nav-item__dropdown a:hover {
  background: #f2f5f9;
  color: var(--brand);
}

/* ===== 顶部右侧工具 ===== */
.nav-tools {
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.icon-button {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 0; background: transparent;
  cursor: pointer; border-radius: 50%;
  color: var(--text);
  transition: background .15s;
}
.icon-button:hover { background: #f0f2f5; }
.icon-button svg { width: 20px; height: 20px; fill: currentColor; }

/* 汉堡按钮：默认在 PC 端隐藏，平板及以下才显示 */
.icon-button--menu { display: none; }

/* ===== 通用按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 600; line-height: 1;
  padding: 13px 24px; border-radius: 4px;
  cursor: pointer; transition: all .18s;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn--primary:hover { background: var(--brand-cyan); border-color: var(--brand-cyan); }
.btn--outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: var(--brand); color: #fff; }

/* ===== 底部 Footer ===== */
.site-footer { background: var(--brand-navy); color: #fff; }

.footer-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 48px 0 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.footer-brand {
  display: flex; align-items: center; gap: 12px;
}
.footer-brand strong {
  font-size: 21px; font-weight: 800;
  color: #fff;
  letter-spacing: -.01em;
}
.footer-tagline {
  font-size: 14px;
  color: rgba(255, 255, 255, .7);
  margin-top: 12px;
}

.footer-grid,
.footer-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  padding: 48px 0;
}
.footer-col__title {
  font-size: 15px; font-weight: 700;
  margin-bottom: 20px; color: #fff;
}
.footer-col__list li { margin-bottom: 12px; }
.footer-col__list a {
  font-size: 14px;
  color: rgba(255, 255, 255, .78);
  transition: color .15s;
}
.footer-col__list a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
}
.footer-legal {
  display: flex; gap: 24px; flex-wrap: wrap;
}
.footer-legal a {
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
  transition: color .15s;
}
.footer-legal a:hover { color: #fff; }
.footer-copy { font-size: 13px; color: rgba(255, 255, 255, .7); }

/* ===== 移动端菜单（首页用） ===== */
.mobile-menu {
  display: none;
  position: fixed; inset: 0; top: 72px;
  background: #fff; z-index: 999;
  overflow-y: auto;
  padding: 24px 0 48px;
}
.mobile-menu.is-open { display: block; }
.mobile-menu__link {
  display: block;
  padding: 14px 24px;
  font-size: 16px; font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.mobile-menu__link:hover { color: var(--brand); }
.mobile-menu__sub { padding-left: 24px; }
.mobile-menu__sub a {
  display: block;
  padding: 11px 24px;
  font-size: 14px;
  color: var(--text-2);
}

/* ===== 响应式 ===== */
/* 平板：导航开始折叠为汉堡菜单 */
@media (max-width: 1180px) {
  .nav-menu { display: none; }
  .icon-button--menu { display: flex; }
}
/* 中等屏：内边距收紧，footer 5 列变 3 列 */
@media (max-width: 980px) {
  .container { padding: 0 28px; }
  .footer-grid,
  .footer-nav { grid-template-columns: repeat(3, 1fr); }
}
/* 平板竖屏：2 列，hero 与各 section 标题收紧 */
@media (max-width: 820px) {
  .container { padding: 0 20px; }
  .footer-grid,
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
  .site-header__inner { height: 64px; }
  .brand-logo { font-size: 19px; }
  /* 通用 section padding */
  .hero,
  .page-banner,
  .about-hero,
  .news-section,
  .contact-section,
  .applications-section { padding-left: 0; padding-right: 0; }
}
/* 移动端：单列布局，hero 与页脚紧凑 */
@media (max-width: 560px) {
  .footer-grid,
  .footer-nav { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .brand-logo { font-size: 18px; }
}
/* 全局图片不拉伸 + 内容不溢出 */
img, svg, video { display: block; max-width: 100%; height: auto; }
table { width: 100%; }
pre, code { white-space: pre-wrap; word-break: break-word; }