/* ═════════════════════════���═════════════
   HEADER
═══════════════════════════════════════ */
#header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13,13,13,0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0;
}

#header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

#header #logoArea {
  display: flex;
  align-items: center;
}

#header #logoArea .logo a img {
  height: 36px;
  width: auto;
  display: block;
  filter: invert(1);
}

#header #globalNavigation ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#header #globalNavigation ul li a {
  color: var(--text-secondary);
  font-size: 14px;
  font-family: var(--font-sans);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

#header #globalNavigation ul li a:hover,
#header #globalNavigation ul li.active a {
  color: var(--accent-gold);
  background: var(--accent-gold-dim);
}

/* hamburger button */
#header #headerMenu {
  display: none;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

#header #headerMenu .menuIcon {
  display: block;
  position: relative;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: background-color .3s;
}

#header #headerMenu .menuIcon::before,
#header #headerMenu .menuIcon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: transform .3s, top .3s;
}

#header #headerMenu .menuIcon::before { top: -7px; }
#header #headerMenu .menuIcon::after  { top:  7px; }

#header #headerMenu[menuOpen] .menuIcon        { background: transparent; }
#header #headerMenu[menuOpen] .menuIcon::before { top: 0; transform: rotate(45deg); }
#header #headerMenu[menuOpen] .menuIcon::after  { top: 0; transform: rotate(-45deg); }

/* ══════════════════════���════════════════
   MOBILE NAV
═══════════════════════════════════════ */
@media (max-width: 900px) {
  #header #headerMenu { display: block; }

  #header #globalNavigation {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: 0;
    overflow: hidden;
    background: rgba(13,13,13,0.98);
    transition: height .35s ease, opacity .35s ease;
    opacity: 0;
  }

  #header #globalNavigation[menuOpen] {
    height: calc(100vh - 64px);
    overflow-y: auto;
    opacity: 1;
  }

  #header #globalNavigation ul {
    flex-direction: column;
    padding: 24px 0;
    gap: 0;
  }

  #header #globalNavigation ul li {
    width: 100%;
    border-bottom: 1px solid var(--border-subtle);
  }

  #header #globalNavigation ul li a {
    display: block;
    padding: 16px 24px;
    font-size: 17px;
    border-radius: 0;
  }
}

/* ═══════════════════════════════════════
   PAGE BANNER
═══════════════════════════════════════ */
#banner,
.page-banner {
  position: relative;
  background: var(--bg-secondary);
  background-size: cover;
  background-position: center;
  color: var(--text-primary);
  text-align: center;
  padding: var(--space-xxl) var(--container-pad);
  overflow: hidden;
}

#banner::before,
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 0;
}

#banner > *,
.page-banner > * {
  position: relative;
  z-index: 1;
}

#banner h1,
.page-banner h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
}

#banner p,
.page-banner p {
  font-size: clamp(13px, 2vw, 16px);
  color: var(--text-secondary);
  margin: 0 0 var(--space-md);
  letter-spacing: 0.1em;
}

/* banner-staff 已被 banner-divider 替代，样式移至 index.css */

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
#footer {
  background: #080808;
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-xl) 0 var(--space-lg);
  color: var(--text-secondary);
}

#footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

#footer .footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

#footer .footer-logo img {
  height: 32px;
  width: auto;
  filter: invert(1);
  opacity: 0.7;
}

#footer .footer-nav {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

#footer .footer-nav a {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  transition: var(--transition);
}

#footer .footer-nav a:hover {
  color: var(--accent-gold);
}

#footer .footer-contact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

#footer .footer-contact .contact-item {
  text-align: center;
}

#footer .footer-contact .contact-item p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 var(--space-xs);
}

#footer .footer-contact .contact-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: var(--space-xs);
}

#footer .footer-contact .footer-contact-icon {
  width: 100px;
  height: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xs);
  color: var(--accent-gold);
}

#footer .footer-contact .footer-contact-icon svg {
  width: 64px;
  height: 64px;
  display: block;
  fill: currentColor;
}

.contact-vector-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  color: var(--accent-gold);
}

.contact-vector-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

#footer .footer-contact .contact-item h3 {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 4px 0 2px;
}

#footer .footer-contact .contact-item .value {
  font-size: 14px;
  color: var(--text-muted);
}

#footer .footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  #footer .footer-contact {
    grid-template-columns: repeat(2, 1fr);
  }
  #footer .footer-top {
    flex-direction: column;
    align-items: stretch;   /* 子元素撑满宽度，消除左侧堆叠 */
  }
}

@media (max-width: 480px) {
  #footer .footer-contact {
    grid-template-columns: 1fr 1fr;
  }
}

/* ═══════════════════════════════════════
   MOBILE GLOBAL OVERRIDES
   覆盖 CSS 自定义属性，让全站间距自动缩小
═══════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --space-xl:  32px;
    --space-xxl: 32px;
    --container-pad: 16px;
  }

  /* body 底部留出移动端固定 CTA 栏的高度 */
  body {
    padding-bottom: 68px;
  }

  /* ── Header：logo 区撑满宽度，菜单按钮靠右 ── */
  #header #logoArea {
    width: 100%;
    justify-content: space-between;
  }

  /* ── 各子页面 banner：硬编码 80px 改为响应式 ── */
  #services-banner,
  #news-banner,
  #german-banner {
    padding-top:    44px;
    padding-bottom: 32px;
  }

  /* ── 页脚 nav：三列网格，充分利用屏幕宽度 ──
     gap:1px + 背景色 = 细分隔线，无需逐项加 border */
  #footer .footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    width: 100%;
  }

  #footer .footer-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 6px;
    font-size: 13px;
    text-align: center;
    background: var(--bg-secondary);
    color: var(--text-muted);
    transition: background 0.18s, color 0.18s;
    /* 最小点击区高度约 42px（13px * 1.6 + 26px padding），符合触控规范 */
  }

  #footer .footer-nav a:active {
    background: var(--bg-card);
    color: var(--accent-gold);
  }

  /* ── 页脚联系方式：QR 双列，电话/邮件横排全宽 ── */
  #footer .footer-contact {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  /* 电话 & 邮件项横排 */
  #footer .footer-contact .contact-item:nth-child(3),
  #footer .footer-contact .contact-item:nth-child(4) {
    grid-column: span 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
  }

  #footer .footer-contact .contact-item:nth-child(3) .footer-contact-icon,
  #footer .footer-contact .contact-item:nth-child(4) .footer-contact-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  #footer .footer-contact .contact-item:nth-child(3) .footer-contact-icon svg,
  #footer .footer-contact .contact-item:nth-child(4) .footer-contact-icon svg {
    width: 26px;
    height: 26px;
  }

  #footer .footer-contact .contact-item:nth-child(3) h3,
  #footer .footer-contact .contact-item:nth-child(4) h3 {
    margin: 0 0 2px;
    font-size: 13px;
  }

  #footer .footer-contact .contact-item:nth-child(3) .value,
  #footer .footer-contact .contact-item:nth-child(4) .value {
    font-size: 13px;
  }

  /* 移动端页脚底部为 CTA 栏额外留白 */
  #footer {
    padding-bottom: calc(var(--space-lg) + 16px);
  }
}

/* ═══════════════════════════════════════
   SECTION COMMON
═══════════════════════════════════════ */
.section {
  padding: var(--space-xl) 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-title h2 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 400;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.section-title p {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0;
}

.section-title .gold-line {
  width: 48px;
  height: 1px;
  background: var(--accent-gold);
  margin: 12px auto 0;
}
